NAME

Google::Ai::Generativelanguage::V1alpha::Retriever - Compiled Protocol Buffers messages for google/ai/generativelanguage/v1alpha/retriever.proto

SYNOPSIS

use Google::Ai::Generativelanguage::V1alpha::Retriever;

my $msg = Google::Ai::Generativelanguage::V1alpha::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::V1alpha::Retriever::Corpus->parse($bytes);

# Canonical ProtoJSON
my $json = $msg->to_json();

DESCRIPTION

Auto-generated Protobuf message classes compiled from google/ai/generativelanguage/v1alpha/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::V1alpha::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: String

    Immutable. 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: String

    Optional. 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::V1alpha::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: String

    Immutable. 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: String

    Optional. 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::V1alpha::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::V1alpha::Retriever::StringList

User provided string values assigned to a single metadata key.

Inherits from Protobuf::Message.

Accessors

  • $msg->values() / $msg->values($value)

    Type: String

    The string values of the metadata to store.

Google::Ai::Generativelanguage::V1alpha::Retriever::CustomMetadata

User provided metadata stored as key-value pairs.

Inherits from Protobuf::Message.

Accessors

  • $msg->string_value() / $msg->string_value($value)

    Type: String

    The string value of the metadata to store.

  • $msg->string_list_value() / $msg->string_list_value($value)

    Type: Message (Google::Ai::Generativelanguage::V1alpha::Retriever::StringList)

    The StringList value of the metadata to store.

  • $msg->numeric_value() / $msg->numeric_value($value)

    Type: Float

    The numeric value of the metadata to store.

  • $msg->key() / $msg->key($value)

    Type: String

    Required. The key of the metadata to store.

Google::Ai::Generativelanguage::V1alpha::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: String

    Required. The key of the metadata to filter on.

  • $msg->conditions() / $msg->conditions($value)

    Type: Message (Google::Ai::Generativelanguage::V1alpha::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::V1alpha::Retriever::Condition

Filter condition applicable to a single key.

Inherits from Protobuf::Message.

Accessors

  • $msg->string_value() / $msg->string_value($value)

    Type: String

    The string value to filter the metadata on.

  • $msg->numeric_value() / $msg->numeric_value($value)

    Type: Float

    The numeric value to filter the metadata on.

  • $msg->operation() / $msg->operation($value)

    Type: Enum (Google::Ai::Generativelanguage::V1alpha::Condition::Operator)

    Required. Operator applied to the given key-value pair to trigger the condition.

Enum: Condition::Operator

  • OPERATOR_UNSPECIFIED => 0

  • LESS => 1

  • LESS_EQUAL => 2

  • EQUAL => 3

  • GREATER_EQUAL => 4

  • GREATER => 5

  • NOT_EQUAL => 6

  • INCLUDES => 7

  • EXCLUDES => 8

Google::Ai::Generativelanguage::V1alpha::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: String

    Immutable. 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::V1alpha::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::V1alpha::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::V1alpha::Chunk::State)

    Output only. Current state of the `Chunk`.

Enum: Chunk::State

  • STATE_UNSPECIFIED => 0

  • STATE_PENDING_PROCESSING => 1

  • STATE_ACTIVE => 2

  • STATE_FAILED => 10

Google::Ai::Generativelanguage::V1alpha::Retriever::ChunkData

Extracted data that represents the `Chunk` content.

Inherits from Protobuf::Message.

Accessors

  • $msg->string_value() / $msg->string_value($value)

    Type: String

    The `Chunk` content as a string. The maximum number of tokens per chunk is 2043.

SEE ALSO

Protobuf, Protobuf::Message, Google::Ai::Generativelanguage::V1alpha::Retriever::Types, https://protobuf.dev/

LICENSE AND COPYRIGHT

Copyright (C) 2026 Google LLC

This program is released under the Apache 2.0 license.