NAME
Google::Cloud::Discoveryengine::V1alpha::ServingConfig - Compiled Protocol Buffers messages for google/cloud/discoveryengine/v1alpha/serving_config.proto
SYNOPSIS
use Google::Cloud::Discoveryengine::V1alpha::ServingConfig;
my $msg = Google::Cloud::Discoveryengine::V1alpha::ServingConfig::ServingConfig->new({
media_config => $media_config,
generic_config => $generic_config,
name => $name,
display_name => $display_name,
});
# Read or update a field
my $val = $msg->media_config();
# Binary wire-format roundtrip
my $bytes = $msg->serialize();
my $decoded = Google::Cloud::Discoveryengine::V1alpha::ServingConfig::ServingConfig->parse($bytes);
# Canonical ProtoJSON
my $json = $msg->to_json();
DESCRIPTION
Auto-generated Protobuf message classes compiled from google/cloud/discoveryengine/v1alpha/serving_config.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::ServingConfig::ServingConfig
Configures metadata that is used to generate serving time results (e.g. search results or recommendation predictions). The ServingConfig is passed in the search and predict request and generates results.
Inherits from Protobuf::Message.
Accessors
$msg->media_config()/$msg->media_config($value)Type:
Message(Google::Cloud::Discoveryengine::V1alpha::ServingConfig::ServingConfig::MediaConfig)The MediaConfig of the serving configuration.
$msg->generic_config()/$msg->generic_config($value)Type:
Message(Google::Cloud::Discoveryengine::V1alpha::ServingConfig::ServingConfig::GenericConfig)The GenericConfig of the serving configuration.
$msg->name()/$msg->name($value)Type:
StringImmutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`
$msg->display_name()/$msg->display_name($value)Type:
StringRequired. The human readable serving config display name. Used in Discovery UI.
This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.
$msg->solution_type()/$msg->solution_type($value)Type:
Enum(Google::Cloud::Discoveryengine::V1alpha::SolutionType)Required. Immutable. Specifies the solution type that a serving config can be associated with.
$msg->model_id()/$msg->model_id($value)Type:
StringThe id of the model to use at serving time. Currently only RecommendationModels are supported. Can be changed but only to a compatible model (e.g. others-you-may-like CTR to others-you-may-like CVR).
Required when [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] is [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
$msg->diversity_level()/$msg->diversity_level($value)Type:
StringHow much diversity to use in recommendation model results e.g. `medium-diversity` or `high-diversity`. Currently supported values:
* `no-diversity` * `low-diversity` * `medium-diversity` * `high-diversity` * `auto-diversity`
If not specified, we choose default based on recommendation model type. Default value: `no-diversity`.
Can only be set if [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] is [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
$msg->embedding_config()/$msg->embedding_config($value)Type:
Message(Google::Cloud::Discoveryengine::V1alpha::Common::EmbeddingConfig)Bring your own embedding config. The config is used for search semantic retrieval. The retrieval is based on the dot product of [SearchRequest.EmbeddingSpec.EmbeddingVector.vector][google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.vector] and the document embeddings that are provided by this EmbeddingConfig. If [SearchRequest.EmbeddingSpec.EmbeddingVector.vector][google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.vector] is provided, it overrides this [ServingConfig.embedding_config][google.cloud.discoveryengine.v1alpha.ServingConfig.embedding_config].
$msg->ranking_expression()/$msg->ranking_expression($value)Type:
StringThe ranking expression controls the customized ranking on retrieval documents. To leverage this, document embedding is required. The ranking expression setting in ServingConfig applies to all search requests served by the serving config. However, if [SearchRequest.ranking_expression][google.cloud.discoveryengine.v1alpha.SearchRequest.ranking_expression] is specified, it overrides the ServingConfig ranking expression.
The ranking expression is a single function or multiple functions that are joined by "+".
* ranking_expression = function, { " + ", function };Supported functions:
* double * relevance_score * double * dotProduct(embedding_field_path)Function variables:
* `relevance_score`: pre-defined keywords, used for measure relevance between query and document. * `embedding_field_path`: the document embedding field used with query embedding vector. * `dotProduct`: embedding function between embedding_field_path and query embedding vector. Example ranking expression: If document has an embedding field doc_embedding, the ranking expression could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.$msg->guided_search_spec()/$msg->guided_search_spec($value)Type:
Message(Google::Cloud::Discoveryengine::V1alpha::Common::GuidedSearchSpec)Guided search configs.
$msg->custom_fine_tuning_spec()/$msg->custom_fine_tuning_spec($value)Type:
Message(Google::Cloud::Discoveryengine::V1alpha::Common::CustomFineTuningSpec)Custom fine tuning configs. If [SearchRequest.custom_fine_tuning_spec][google.cloud.discoveryengine.v1alpha.SearchRequest.custom_fine_tuning_spec] is set, it has higher priority than the configs set here.
$msg->create_time()/$msg->create_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Output only. ServingConfig created timestamp.
$msg->update_time()/$msg->update_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Output only. ServingConfig updated timestamp.
$msg->filter_control_ids()/$msg->filter_control_ids($value)Type:
StringFilter controls to use in serving path. All triggered filter controls will be applied. Filter controls must be in the same data store as the serving config. Maximum of 20 filter controls.
$msg->boost_control_ids()/$msg->boost_control_ids($value)Type:
StringBoost controls to use in serving path. All triggered boost controls will be applied. Boost controls must be in the same data store as the serving config. Maximum of 20 boost controls.
$msg->redirect_control_ids()/$msg->redirect_control_ids($value)Type:
StringIDs of the redirect controls. Only the first triggered redirect action is applied, even if multiple apply. Maximum number of specifications is 100.
Can only be set if [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] is [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_SEARCH].
$msg->synonyms_control_ids()/$msg->synonyms_control_ids($value)Type:
StringCondition synonyms specifications. If multiple synonyms conditions match, all matching synonyms controls in the list will execute. Maximum number of specifications is 100.
Can only be set if [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] is [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_SEARCH].
$msg->oneway_synonyms_control_ids()/$msg->oneway_synonyms_control_ids($value)Type:
StringCondition oneway synonyms specifications. If multiple oneway synonyms conditions match, all matching oneway synonyms controls in the list will execute. Maximum number of specifications is 100.
Can only be set if [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] is [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_SEARCH].
$msg->dissociate_control_ids()/$msg->dissociate_control_ids($value)Type:
StringCondition do not associate specifications. If multiple do not associate conditions match, all matching do not associate controls in the list will execute. Order does not matter. Maximum number of specifications is 100.
Can only be set if [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] is [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_SEARCH].
$msg->replacement_control_ids()/$msg->replacement_control_ids($value)Type:
StringCondition replacement specifications. Applied according to the order in the list. A previously replaced term can not be re-replaced. Maximum number of specifications is 100.
Can only be set if [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] is [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_SEARCH].
$msg->ignore_control_ids()/$msg->ignore_control_ids($value)Type:
StringCondition ignore specifications. If multiple ignore conditions match, all matching ignore controls in the list will execute. Order does not matter. Maximum number of specifications is 100.
SEE ALSO
Protobuf, Protobuf::Message, Google::Cloud::Discoveryengine::V1alpha::ServingConfig::Types, https://protobuf.dev/
LICENSE AND COPYRIGHT
Copyright (C) 2026 Google LLC
This program is released under the Apache 2.0 license.