NAME
Google::Ai::Generativelanguage::V1beta::Retriever - Compiled Protocol Buffers messages for google/ai/generativelanguage/v1beta/retriever.proto
SYNOPSIS
use Google::Ai::Generativelanguage::V1beta::Retriever;
my $msg = Google::Ai::Generativelanguage::V1beta::Retriever::Corpus->new({
name => $name,
display_name => $display_name,
create_time => $create_time,
update_time => $update_time,
});
# Read or update a field
my $val = $msg->name();
# Binary wire-format roundtrip
my $bytes = $msg->serialize();
my $decoded = Google::Ai::Generativelanguage::V1beta::Retriever::Corpus->parse($bytes);
# Canonical ProtoJSON
my $json = $msg->to_json();
DESCRIPTION
Auto-generated Protobuf message classes compiled from google/ai/generativelanguage/v1beta/retriever.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().
MESSAGES
Google::Ai::Generativelanguage::V1beta::Retriever::Corpus
A `Corpus` is a collection of `Document`s. A project can create up to 5 corpora.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringImmutable. Identifier. The `Corpus` resource name. The ID (name excluding the "corpora/" prefix) can contain up to 40 characters that are lowercase alphanumeric or dashes (-). The ID cannot start or end with a dash. If the name is empty on create, a unique name will be derived from `display_name` along with a 12 character random suffix. Example: `corpora/my-awesome-corpora-123a456b789c`
$msg->display_name()/$msg->display_name($value)Type:
StringOptional. The human-readable display name for the `Corpus`. The display name must be no more than 512 characters in length, including spaces. Example: "Docs on Semantic Retriever"
$msg->create_time()/$msg->create_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Output only. The Timestamp of when the `Corpus` was created.
$msg->update_time()/$msg->update_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Output only. The Timestamp of when the `Corpus` was last updated.
Google::Ai::Generativelanguage::V1beta::Retriever::Document
A `Document` is a collection of `Chunk`s. A `Corpus` can have a maximum of 10,000 `Document`s.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringImmutable. Identifier. The `Document` resource name. The ID (name excluding the "corpora/*/documents/" prefix) can contain up to 40 characters that are lowercase alphanumeric or dashes (-). The ID cannot start or end with a dash. If the name is empty on create, a unique name will be derived from `display_name` along with a 12 character random suffix. Example: `corpora/{corpus_id}/documents/my-awesome-doc-123a456b789c`
$msg->display_name()/$msg->display_name($value)Type:
StringOptional. The human-readable display name for the `Document`. The display name must be no more than 512 characters in length, including spaces. Example: "Semantic Retriever Documentation"
$msg->custom_metadata()/$msg->custom_metadata($value)Type:
Message(Google::Ai::Generativelanguage::V1beta::Retriever::CustomMetadata)Optional. User provided custom metadata stored as key-value pairs used for querying. A `Document` can have a maximum of 20 `CustomMetadata`.
$msg->update_time()/$msg->update_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Output only. The Timestamp of when the `Document` was last updated.
$msg->create_time()/$msg->create_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Output only. The Timestamp of when the `Document` was created.
Google::Ai::Generativelanguage::V1beta::Retriever::StringList
User provided string values assigned to a single metadata key.
Inherits from Protobuf::Message.
Accessors
$msg->values()/$msg->values($value)Type:
StringThe string values of the metadata to store.
Google::Ai::Generativelanguage::V1beta::Retriever::CustomMetadata
User provided metadata stored as key-value pairs.
Inherits from Protobuf::Message.
Accessors
$msg->string_value()/$msg->string_value($value)Type:
StringThe string value of the metadata to store.
$msg->string_list_value()/$msg->string_list_value($value)Type:
Message(Google::Ai::Generativelanguage::V1beta::Retriever::StringList)The StringList value of the metadata to store.
$msg->numeric_value()/$msg->numeric_value($value)Type:
FloatThe numeric value of the metadata to store.
$msg->key()/$msg->key($value)Type:
StringRequired. The key of the metadata to store.
Google::Ai::Generativelanguage::V1beta::Retriever::MetadataFilter
User provided filter to limit retrieval based on `Chunk` or `Document` level metadata values. Example (genre = drama OR genre = action): key = "document.custom_metadata.genre" conditions = [{string_value = "drama", operation = EQUAL}, {string_value = "action", operation = EQUAL}]
Inherits from Protobuf::Message.
Accessors
$msg->key()/$msg->key($value)Type:
StringRequired. The key of the metadata to filter on.
$msg->conditions()/$msg->conditions($value)Type:
Message(Google::Ai::Generativelanguage::V1beta::Retriever::Condition)Required. The `Condition`s for the given key that will trigger this filter. Multiple `Condition`s are joined by logical ORs.
Google::Ai::Generativelanguage::V1beta::Retriever::Condition
Filter condition applicable to a single key.
Inherits from Protobuf::Message.
Accessors
$msg->string_value()/$msg->string_value($value)Type:
StringThe string value to filter the metadata on.
$msg->numeric_value()/$msg->numeric_value($value)Type:
FloatThe numeric value to filter the metadata on.
$msg->operation()/$msg->operation($value)Type:
Enum(Google::Ai::Generativelanguage::V1beta::Condition::Operator)Required. Operator applied to the given key-value pair to trigger the condition.
Enum: Condition::Operator
OPERATOR_UNSPECIFIED=>0LESS=>1LESS_EQUAL=>2EQUAL=>3GREATER_EQUAL=>4GREATER=>5NOT_EQUAL=>6INCLUDES=>7EXCLUDES=>8
Google::Ai::Generativelanguage::V1beta::Retriever::Chunk
A `Chunk` is a subpart of a `Document` that is treated as an independent unit for the purposes of vector representation and storage. A `Corpus` can have a maximum of 1 million `Chunk`s.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringImmutable. Identifier. The `Chunk` resource name. The ID (name excluding the "corpora/*/documents/*/chunks/" prefix) can contain up to 40 characters that are lowercase alphanumeric or dashes (-). The ID cannot start or end with a dash. If the name is empty on create, a random 12-character unique ID will be generated. Example: `corpora/{corpus_id}/documents/{document_id}/chunks/123a456b789c`
$msg->data()/$msg->data($value)Type:
Message(Google::Ai::Generativelanguage::V1beta::Retriever::ChunkData)Required. The content for the `Chunk`, such as the text string. The maximum number of tokens per chunk is 2043.
$msg->custom_metadata()/$msg->custom_metadata($value)Type:
Message(Google::Ai::Generativelanguage::V1beta::Retriever::CustomMetadata)Optional. User provided custom metadata stored as key-value pairs. The maximum number of `CustomMetadata` per chunk is 20.
$msg->create_time()/$msg->create_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Output only. The Timestamp of when the `Chunk` was created.
$msg->update_time()/$msg->update_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Output only. The Timestamp of when the `Chunk` was last updated.
$msg->state()/$msg->state($value)Type:
Enum(Google::Ai::Generativelanguage::V1beta::Chunk::State)Output only. Current state of the `Chunk`.
Enum: Chunk::State
STATE_UNSPECIFIED=>0STATE_PENDING_PROCESSING=>1STATE_ACTIVE=>2STATE_FAILED=>10
Google::Ai::Generativelanguage::V1beta::Retriever::ChunkData
Extracted data that represents the `Chunk` content.
Inherits from Protobuf::Message.
Accessors
$msg->string_value()/$msg->string_value($value)Type:
StringThe `Chunk` content as a string. The maximum number of tokens per chunk is 2043.
SEE ALSO
Protobuf, Protobuf::Message, Google::Ai::Generativelanguage::V1beta::Retriever::Types, https://protobuf.dev/
LICENSE AND COPYRIGHT
Copyright (C) 2026 Google LLC
This program is released under the Apache 2.0 license.