NAME

Google::Cloud::Discoveryengine::V1alpha::Schema - Compiled Protocol Buffers messages for google/cloud/discoveryengine/v1alpha/schema.proto

SYNOPSIS

use Google::Cloud::Discoveryengine::V1alpha::Schema;

my $msg = Google::Cloud::Discoveryengine::V1alpha::Schema::Schema->new({
    struct_schema => $struct_schema,
    json_schema => $json_schema,
    name => $name,
    field_configs => $field_configs,
});

# Read or update a field
my $val = $msg->struct_schema();

# Binary wire-format roundtrip
my $bytes   = $msg->serialize();
my $decoded = Google::Cloud::Discoveryengine::V1alpha::Schema::Schema->parse($bytes);

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

DESCRIPTION

Auto-generated Protobuf message classes compiled from google/cloud/discoveryengine/v1alpha/schema.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().

MESSAGES

Google::Cloud::Discoveryengine::V1alpha::Schema::Schema

Defines the structure and layout of a type of document data.

Inherits from Protobuf::Message.

Accessors

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

    Type: Message (Google::Protobuf::Struct::Struct)

    The structured representation of the schema.

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

    Type: String

    The JSON representation of the schema.

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

    Type: String

    Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.

    This field must be a UTF-8 encoded string with a length limit of 1024 characters.

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

    Type: Message (Google::Cloud::Discoveryengine::V1alpha::Schema::FieldConfig)

    Output only. Configurations for fields of the schema.

Google::Cloud::Discoveryengine::V1alpha::Schema::FieldConfig

Configurations for fields of a schema. For example, configuring a field is indexable, or searchable.

Inherits from Protobuf::Message.

Accessors

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

    Type: String

    Required. Field path of the schema field. For example: `title`, `description`, `release_info.release_year`.

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

    Type: Enum (Google::Cloud::Discoveryengine::V1alpha::FieldConfig::FieldType)

    Output only. Raw type of the field.

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

    Type: Enum (Google::Cloud::Discoveryengine::V1alpha::FieldConfig::IndexableOption)

    If [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option] is [INDEXABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.INDEXABLE_ENABLED], field values are indexed so that it can be filtered or faceted in [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search].

    If [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option] is unset, the server behavior defaults to [INDEXABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.INDEXABLE_DISABLED] for fields that support setting indexable options. For those fields that do not support setting indexable options, such as `object` and `boolean` and key properties, the server will skip [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option] setting, and setting [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option] for those fields will throw `INVALID_ARGUMENT` error.

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

    Type: Enum (Google::Cloud::Discoveryengine::V1alpha::FieldConfig::DynamicFacetableOption)

    If [dynamic_facetable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.dynamic_facetable_option] is [DYNAMIC_FACETABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.DYNAMIC_FACETABLE_ENABLED], field values are available for dynamic facet. Could only be [DYNAMIC_FACETABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.DYNAMIC_FACETABLE_DISABLED] if [FieldConfig.indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option] is [INDEXABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.INDEXABLE_DISABLED]. Otherwise, an `INVALID_ARGUMENT` error will be returned.

    If [dynamic_facetable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.dynamic_facetable_option] is unset, the server behavior defaults to [DYNAMIC_FACETABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.DYNAMIC_FACETABLE_DISABLED] for fields that support setting dynamic facetable options. For those fields that do not support setting dynamic facetable options, such as `object` and `boolean`, the server will skip dynamic facetable option setting, and setting [dynamic_facetable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.dynamic_facetable_option] for those fields will throw `INVALID_ARGUMENT` error.

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

    Type: Enum (Google::Cloud::Discoveryengine::V1alpha::FieldConfig::SearchableOption)

    If [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option] is [SEARCHABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.SEARCHABLE_ENABLED], field values are searchable by text queries in [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search].

    If [SEARCHABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.SEARCHABLE_ENABLED] but field type is numerical, field values will not be searchable by text queries in [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search], as there are no text values associated to numerical fields.

    If [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option] is unset, the server behavior defaults to [SEARCHABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.SEARCHABLE_DISABLED] for fields that support setting searchable options. Only `string` fields that have no key property mapping support setting [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option].

    For those fields that do not support setting searchable options, the server will skip searchable option setting, and setting [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option] for those fields will throw `INVALID_ARGUMENT` error.

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

    Type: Enum (Google::Cloud::Discoveryengine::V1alpha::FieldConfig::RetrievableOption)

    If [retrievable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.retrievable_option] is [RETRIEVABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption.RETRIEVABLE_ENABLED], field values are included in the search results.

    If [retrievable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.retrievable_option] is unset, the server behavior defaults to [RETRIEVABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption.RETRIEVABLE_DISABLED] for fields that support setting retrievable options. For those fields that do not support setting retrievable options, such as `object` and `boolean`, the server will skip retrievable option setting, and setting [retrievable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.retrievable_option] for those fields will throw `INVALID_ARGUMENT` error.

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

    Type: Enum (Google::Cloud::Discoveryengine::V1alpha::FieldConfig::CompletableOption)

    If [completable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.completable_option] is [COMPLETABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption.COMPLETABLE_ENABLED], field values are directly used and returned as suggestions for Autocomplete in [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery].

    If [completable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.completable_option] is unset, the server behavior defaults to [COMPLETABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption.COMPLETABLE_DISABLED] for fields that support setting completable options, which are just `string` fields. For those fields that do not support setting completable options, the server will skip completable option setting, and setting [completable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.completable_option] for those fields will throw `INVALID_ARGUMENT` error.

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

    Type: Enum (Google::Cloud::Discoveryengine::V1alpha::FieldConfig::FilterableOption)

    If [recs_filterable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.recs_filterable_option] is [FILTERABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.FILTERABLE_ENABLED], field values are filterable by filter expression in [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend].

    If [FILTERABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.FILTERABLE_ENABLED] but the field type is numerical, field values are not filterable by text queries in [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend]. Only textual fields are supported.

    If [recs_filterable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.recs_filterable_option] is unset, the default setting is [FILTERABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.FILTERABLE_DISABLED] for fields that support setting filterable options.

    When a field set to [FILTERABLE_DISABLED] is filtered, a warning is generated and an empty result is returned.

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

    Type: String

    Output only. Type of the key property that this field is mapped to. Empty string if this is not annotated as mapped to a key property.

    Example types are `title`, `description`. Full list is defined by `keyPropertyMapping` in the schema field annotation.

    If the schema field has a `KeyPropertyMapping` annotation, `indexable_option` and `searchable_option` of this field cannot be modified.

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

    Type: Enum (Google::Cloud::Discoveryengine::V1alpha::FieldConfig::AdvancedSiteSearchDataSource)

    If this field is set, only the corresponding source will be indexed for this field. Otherwise, the values from different sources are merged.

    Assuming a page with `<author, a>` in meta tag, and `<author, b>` in page map: if this enum is set to METATAGS, we will only index `<author, a>`; if this enum is not set, we will merge them and index `<author, [a, b]>`.

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

    Type: String

    Field paths for indexing custom attribute from schema.org data. More details of schema.org and its defined types can be found at [schema.org](https://schema.org).

    It is only used on advanced site search schema.

    Currently only support full path from root. The full path to a field is constructed by concatenating field names, starting from `_root`, with a period `.` as the delimiter. Examples:

    * Publish date of the root: _root.datePublished * Publish date of the reviews: _root.review.datePublished

Enum: FieldConfig::FieldType

  • FIELD_TYPE_UNSPECIFIED => 0

  • OBJECT => 1

  • STRING => 2

  • NUMBER => 3

  • INTEGER => 4

  • BOOLEAN => 5

  • GEOLOCATION => 6

  • DATETIME => 7

Enum: FieldConfig::IndexableOption

  • INDEXABLE_OPTION_UNSPECIFIED => 0

  • INDEXABLE_ENABLED => 1

  • INDEXABLE_DISABLED => 2

Enum: FieldConfig::DynamicFacetableOption

  • DYNAMIC_FACETABLE_OPTION_UNSPECIFIED => 0

  • DYNAMIC_FACETABLE_ENABLED => 1

  • DYNAMIC_FACETABLE_DISABLED => 2

Enum: FieldConfig::SearchableOption

  • SEARCHABLE_OPTION_UNSPECIFIED => 0

  • SEARCHABLE_ENABLED => 1

  • SEARCHABLE_DISABLED => 2

Enum: FieldConfig::RetrievableOption

  • RETRIEVABLE_OPTION_UNSPECIFIED => 0

  • RETRIEVABLE_ENABLED => 1

  • RETRIEVABLE_DISABLED => 2

Enum: FieldConfig::CompletableOption

  • COMPLETABLE_OPTION_UNSPECIFIED => 0

  • COMPLETABLE_ENABLED => 1

  • COMPLETABLE_DISABLED => 2

Enum: FieldConfig::FilterableOption

  • FILTERABLE_OPTION_UNSPECIFIED => 0

  • FILTERABLE_ENABLED => 1

  • FILTERABLE_DISABLED => 2

Enum: FieldConfig::AdvancedSiteSearchDataSource

  • ADVANCED_SITE_SEARCH_DATA_SOURCE_UNSPECIFIED => 0

  • METATAGS => 1

  • PAGEMAP => 2

  • URI_PATTERN_MAPPING => 3

  • SCHEMA_ORG => 4

SEE ALSO

Protobuf, Protobuf::Message, Google::Cloud::Discoveryengine::V1alpha::Schema::Types, https://protobuf.dev/

LICENSE AND COPYRIGHT

Copyright (C) 2026 Google LLC

This program is released under the Apache 2.0 license.