Class ServingConfig.Builder (0.42.0)

public static final class ServingConfig.Builder extends GeneratedMessageV3.Builder<ServingConfig.Builder> implements ServingConfigOrBuilder

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.

Protobuf type google.cloud.discoveryengine.v1alpha.ServingConfig

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllBoostControlIds(Iterable<String> values)

public ServingConfig.Builder addAllBoostControlIds(Iterable<String> values)

Boost 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.

repeated string boost_control_ids = 12;

Parameter
Name Description
values Iterable<String>

The boostControlIds to add.

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

addAllDissociateControlIds(Iterable<String> values)

public ServingConfig.Builder addAllDissociateControlIds(Iterable<String> values)

Condition 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 is SOLUTION_TYPE_SEARCH.

repeated string dissociate_control_ids = 17;

Parameter
Name Description
values Iterable<String>

The dissociateControlIds to add.

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

addAllFilterControlIds(Iterable<String> values)

public ServingConfig.Builder addAllFilterControlIds(Iterable<String> values)

Filter 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.

repeated string filter_control_ids = 11;

Parameter
Name Description
values Iterable<String>

The filterControlIds to add.

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

addAllIgnoreControlIds(Iterable<String> values)

public ServingConfig.Builder addAllIgnoreControlIds(Iterable<String> values)

Condition 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.

repeated string ignore_control_ids = 19;

Parameter
Name Description
values Iterable<String>

The ignoreControlIds to add.

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

addAllOnewaySynonymsControlIds(Iterable<String> values)

public ServingConfig.Builder addAllOnewaySynonymsControlIds(Iterable<String> values)

Condition 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 is SOLUTION_TYPE_SEARCH.

repeated string oneway_synonyms_control_ids = 16;

Parameter
Name Description
values Iterable<String>

The onewaySynonymsControlIds to add.

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

addAllRedirectControlIds(Iterable<String> values)

public ServingConfig.Builder addAllRedirectControlIds(Iterable<String> values)

IDs 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 is SOLUTION_TYPE_SEARCH.

repeated string redirect_control_ids = 14;

Parameter
Name Description
values Iterable<String>

The redirectControlIds to add.

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

addAllReplacementControlIds(Iterable<String> values)

public ServingConfig.Builder addAllReplacementControlIds(Iterable<String> values)

Condition 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 is SOLUTION_TYPE_SEARCH.

repeated string replacement_control_ids = 18;

Parameter
Name Description
values Iterable<String>

The replacementControlIds to add.

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

addAllSynonymsControlIds(Iterable<String> values)

public ServingConfig.Builder addAllSynonymsControlIds(Iterable<String> values)

Condition 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 is SOLUTION_TYPE_SEARCH.

repeated string synonyms_control_ids = 15;

Parameter
Name Description
values Iterable<String>

The synonymsControlIds to add.

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

addBoostControlIds(String value)

public ServingConfig.Builder addBoostControlIds(String value)

Boost 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.

repeated string boost_control_ids = 12;

Parameter
Name Description
value String

The boostControlIds to add.

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

addBoostControlIdsBytes(ByteString value)

public ServingConfig.Builder addBoostControlIdsBytes(ByteString value)

Boost 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.

repeated string boost_control_ids = 12;

Parameter
Name Description
value ByteString

The bytes of the boostControlIds to add.

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

addDissociateControlIds(String value)

public ServingConfig.Builder addDissociateControlIds(String value)

Condition 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 is SOLUTION_TYPE_SEARCH.

repeated string dissociate_control_ids = 17;

Parameter
Name Description
value String

The dissociateControlIds to add.

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

addDissociateControlIdsBytes(ByteString value)

public ServingConfig.Builder addDissociateControlIdsBytes(ByteString value)

Condition 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 is SOLUTION_TYPE_SEARCH.

repeated string dissociate_control_ids = 17;

Parameter
Name Description
value ByteString

The bytes of the dissociateControlIds to add.

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

addFilterControlIds(String value)

public ServingConfig.Builder addFilterControlIds(String value)

Filter 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.

repeated string filter_control_ids = 11;

Parameter
Name Description
value String

The filterControlIds to add.

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

addFilterControlIdsBytes(ByteString value)

public ServingConfig.Builder addFilterControlIdsBytes(ByteString value)

Filter 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.

repeated string filter_control_ids = 11;

Parameter
Name Description
value ByteString

The bytes of the filterControlIds to add.

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

addIgnoreControlIds(String value)

public ServingConfig.Builder addIgnoreControlIds(String value)

Condition 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.

repeated string ignore_control_ids = 19;

Parameter
Name Description
value String

The ignoreControlIds to add.

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

addIgnoreControlIdsBytes(ByteString value)

public ServingConfig.Builder addIgnoreControlIdsBytes(ByteString value)

Condition 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.

repeated string ignore_control_ids = 19;

Parameter
Name Description
value ByteString

The bytes of the ignoreControlIds to add.

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

addOnewaySynonymsControlIds(String value)

public ServingConfig.Builder addOnewaySynonymsControlIds(String value)

Condition 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 is SOLUTION_TYPE_SEARCH.

repeated string oneway_synonyms_control_ids = 16;

Parameter
Name Description
value String

The onewaySynonymsControlIds to add.

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

addOnewaySynonymsControlIdsBytes(ByteString value)

public ServingConfig.Builder addOnewaySynonymsControlIdsBytes(ByteString value)

Condition 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 is SOLUTION_TYPE_SEARCH.

repeated string oneway_synonyms_control_ids = 16;

Parameter
Name Description
value ByteString

The bytes of the onewaySynonymsControlIds to add.

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

addRedirectControlIds(String value)

public ServingConfig.Builder addRedirectControlIds(String value)

IDs 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 is SOLUTION_TYPE_SEARCH.

repeated string redirect_control_ids = 14;

Parameter
Name Description
value String

The redirectControlIds to add.

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

addRedirectControlIdsBytes(ByteString value)

public ServingConfig.Builder addRedirectControlIdsBytes(ByteString value)

IDs 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 is SOLUTION_TYPE_SEARCH.

repeated string redirect_control_ids = 14;

Parameter
Name Description
value ByteString

The bytes of the redirectControlIds to add.

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public ServingConfig.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
ServingConfig.Builder
Overrides

addReplacementControlIds(String value)

public ServingConfig.Builder addReplacementControlIds(String value)

Condition 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 is SOLUTION_TYPE_SEARCH.

repeated string replacement_control_ids = 18;

Parameter
Name Description
value String

The replacementControlIds to add.

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

addReplacementControlIdsBytes(ByteString value)

public ServingConfig.Builder addReplacementControlIdsBytes(ByteString value)

Condition 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 is SOLUTION_TYPE_SEARCH.

repeated string replacement_control_ids = 18;

Parameter
Name Description
value ByteString

The bytes of the replacementControlIds to add.

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

addSynonymsControlIds(String value)

public ServingConfig.Builder addSynonymsControlIds(String value)

Condition 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 is SOLUTION_TYPE_SEARCH.

repeated string synonyms_control_ids = 15;

Parameter
Name Description
value String

The synonymsControlIds to add.

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

addSynonymsControlIdsBytes(ByteString value)

public ServingConfig.Builder addSynonymsControlIdsBytes(ByteString value)

Condition 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 is SOLUTION_TYPE_SEARCH.

repeated string synonyms_control_ids = 15;

Parameter
Name Description
value ByteString

The bytes of the synonymsControlIds to add.

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

build()

public ServingConfig build()
Returns
Type Description
ServingConfig

buildPartial()

public ServingConfig buildPartial()
Returns
Type Description
ServingConfig

clear()

public ServingConfig.Builder clear()
Returns
Type Description
ServingConfig.Builder
Overrides

clearBoostControlIds()

public ServingConfig.Builder clearBoostControlIds()

Boost 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.

repeated string boost_control_ids = 12;

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

clearCreateTime()

public ServingConfig.Builder clearCreateTime()

Output only. ServingConfig created timestamp.

.google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ServingConfig.Builder

clearCustomFineTuningSpec()

public ServingConfig.Builder clearCustomFineTuningSpec()

Custom fine tuning configs.

.google.cloud.discoveryengine.v1alpha.CustomFineTuningSpec custom_fine_tuning_spec = 24;

Returns
Type Description
ServingConfig.Builder

clearDisplayName()

public ServingConfig.Builder clearDisplayName()

Required. 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.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

clearDissociateControlIds()

public ServingConfig.Builder clearDissociateControlIds()

Condition 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 is SOLUTION_TYPE_SEARCH.

repeated string dissociate_control_ids = 17;

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

clearDiversityLevel()

public ServingConfig.Builder clearDiversityLevel()

How 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 is SOLUTION_TYPE_RECOMMENDATION.

string diversity_level = 5;

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

clearEmbeddingConfig()

public ServingConfig.Builder clearEmbeddingConfig()

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 and the document embeddings that are provided by this EmbeddingConfig. If SearchRequest.EmbeddingSpec.EmbeddingVector.vector is provided, it overrides this ServingConfig.embedding_config.

.google.cloud.discoveryengine.v1alpha.EmbeddingConfig embedding_config = 20;

Returns
Type Description
ServingConfig.Builder

clearField(Descriptors.FieldDescriptor field)

public ServingConfig.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
ServingConfig.Builder
Overrides

clearFilterControlIds()

public ServingConfig.Builder clearFilterControlIds()

Filter 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.

repeated string filter_control_ids = 11;

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

clearGenericConfig()

public ServingConfig.Builder clearGenericConfig()

The GenericConfig of the serving configuration.

.google.cloud.discoveryengine.v1alpha.ServingConfig.GenericConfig generic_config = 10;

Returns
Type Description
ServingConfig.Builder

clearGuidedSearchSpec()

public ServingConfig.Builder clearGuidedSearchSpec()

Guided search configs.

.google.cloud.discoveryengine.v1alpha.GuidedSearchSpec guided_search_spec = 22;

Returns
Type Description
ServingConfig.Builder

clearIgnoreControlIds()

public ServingConfig.Builder clearIgnoreControlIds()

Condition 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.

repeated string ignore_control_ids = 19;

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

clearMediaConfig()

public ServingConfig.Builder clearMediaConfig()

The MediaConfig of the serving configuration.

.google.cloud.discoveryengine.v1alpha.ServingConfig.MediaConfig media_config = 7;

Returns
Type Description
ServingConfig.Builder

clearModelId()

public ServingConfig.Builder clearModelId()

The 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 is SOLUTION_TYPE_RECOMMENDATION.

string model_id = 4;

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

clearName()

public ServingConfig.Builder clearName()

Immutable. Fully qualified name projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}

string name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public ServingConfig.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
ServingConfig.Builder
Overrides

clearOnewaySynonymsControlIds()

public ServingConfig.Builder clearOnewaySynonymsControlIds()

Condition 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 is SOLUTION_TYPE_SEARCH.

repeated string oneway_synonyms_control_ids = 16;

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

clearRankingExpression()

public ServingConfig.Builder clearRankingExpression()

The 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 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).

string ranking_expression = 21;

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

clearRedirectControlIds()

public ServingConfig.Builder clearRedirectControlIds()

IDs 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 is SOLUTION_TYPE_SEARCH.

repeated string redirect_control_ids = 14;

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

clearReplacementControlIds()

public ServingConfig.Builder clearReplacementControlIds()

Condition 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 is SOLUTION_TYPE_SEARCH.

repeated string replacement_control_ids = 18;

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

clearSolutionType()

public ServingConfig.Builder clearSolutionType()

Required. Immutable. Specifies the solution type that a serving config can be associated with.

.google.cloud.discoveryengine.v1alpha.SolutionType solution_type = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

clearSynonymsControlIds()

public ServingConfig.Builder clearSynonymsControlIds()

Condition 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 is SOLUTION_TYPE_SEARCH.

repeated string synonyms_control_ids = 15;

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

clearUpdateTime()

public ServingConfig.Builder clearUpdateTime()

Output only. ServingConfig updated timestamp.

.google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ServingConfig.Builder

clearVerticalConfig()

public ServingConfig.Builder clearVerticalConfig()
Returns
Type Description
ServingConfig.Builder

clone()

public ServingConfig.Builder clone()
Returns
Type Description
ServingConfig.Builder
Overrides

getBoostControlIds(int index)

public String getBoostControlIds(int index)

Boost 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.

repeated string boost_control_ids = 12;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The boostControlIds at the given index.

getBoostControlIdsBytes(int index)

public ByteString getBoostControlIdsBytes(int index)

Boost 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.

repeated string boost_control_ids = 12;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the boostControlIds at the given index.

getBoostControlIdsCount()

public int getBoostControlIdsCount()

Boost 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.

repeated string boost_control_ids = 12;

Returns
Type Description
int

The count of boostControlIds.

getBoostControlIdsList()

public ProtocolStringList getBoostControlIdsList()

Boost 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.

repeated string boost_control_ids = 12;

Returns
Type Description
ProtocolStringList

A list containing the boostControlIds.

getCreateTime()

public Timestamp getCreateTime()

Output only. ServingConfig created timestamp.

.google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. ServingConfig created timestamp.

.google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. ServingConfig created timestamp.

.google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getCustomFineTuningSpec()

public CustomFineTuningSpec getCustomFineTuningSpec()

Custom fine tuning configs.

.google.cloud.discoveryengine.v1alpha.CustomFineTuningSpec custom_fine_tuning_spec = 24;

Returns
Type Description
CustomFineTuningSpec

The customFineTuningSpec.

getCustomFineTuningSpecBuilder()

public CustomFineTuningSpec.Builder getCustomFineTuningSpecBuilder()

Custom fine tuning configs.

.google.cloud.discoveryengine.v1alpha.CustomFineTuningSpec custom_fine_tuning_spec = 24;

Returns
Type Description
CustomFineTuningSpec.Builder

getCustomFineTuningSpecOrBuilder()

public CustomFineTuningSpecOrBuilder getCustomFineTuningSpecOrBuilder()

Custom fine tuning configs.

.google.cloud.discoveryengine.v1alpha.CustomFineTuningSpec custom_fine_tuning_spec = 24;

Returns
Type Description
CustomFineTuningSpecOrBuilder

getDefaultInstanceForType()

public ServingConfig getDefaultInstanceForType()
Returns
Type Description
ServingConfig

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getDisplayName()

public String getDisplayName()

Required. 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.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Required. 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.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for displayName.

getDissociateControlIds(int index)

public String getDissociateControlIds(int index)

Condition 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 is SOLUTION_TYPE_SEARCH.

repeated string dissociate_control_ids = 17;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The dissociateControlIds at the given index.

getDissociateControlIdsBytes(int index)

public ByteString getDissociateControlIdsBytes(int index)

Condition 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 is SOLUTION_TYPE_SEARCH.

repeated string dissociate_control_ids = 17;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the dissociateControlIds at the given index.

getDissociateControlIdsCount()

public int getDissociateControlIdsCount()

Condition 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 is SOLUTION_TYPE_SEARCH.

repeated string dissociate_control_ids = 17;

Returns
Type Description
int

The count of dissociateControlIds.

getDissociateControlIdsList()

public ProtocolStringList getDissociateControlIdsList()

Condition 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 is SOLUTION_TYPE_SEARCH.

repeated string dissociate_control_ids = 17;

Returns
Type Description
ProtocolStringList

A list containing the dissociateControlIds.

getDiversityLevel()

public String getDiversityLevel()

How 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 is SOLUTION_TYPE_RECOMMENDATION.

string diversity_level = 5;

Returns
Type Description
String

The diversityLevel.

getDiversityLevelBytes()

public ByteString getDiversityLevelBytes()

How 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 is SOLUTION_TYPE_RECOMMENDATION.

string diversity_level = 5;

Returns
Type Description
ByteString

The bytes for diversityLevel.

getEmbeddingConfig()

public EmbeddingConfig getEmbeddingConfig()

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 and the document embeddings that are provided by this EmbeddingConfig. If SearchRequest.EmbeddingSpec.EmbeddingVector.vector is provided, it overrides this ServingConfig.embedding_config.

.google.cloud.discoveryengine.v1alpha.EmbeddingConfig embedding_config = 20;

Returns
Type Description
EmbeddingConfig

The embeddingConfig.

getEmbeddingConfigBuilder()

public EmbeddingConfig.Builder getEmbeddingConfigBuilder()

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 and the document embeddings that are provided by this EmbeddingConfig. If SearchRequest.EmbeddingSpec.EmbeddingVector.vector is provided, it overrides this ServingConfig.embedding_config.

.google.cloud.discoveryengine.v1alpha.EmbeddingConfig embedding_config = 20;

Returns
Type Description
EmbeddingConfig.Builder

getEmbeddingConfigOrBuilder()

public EmbeddingConfigOrBuilder getEmbeddingConfigOrBuilder()

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 and the document embeddings that are provided by this EmbeddingConfig. If SearchRequest.EmbeddingSpec.EmbeddingVector.vector is provided, it overrides this ServingConfig.embedding_config.

.google.cloud.discoveryengine.v1alpha.EmbeddingConfig embedding_config = 20;

Returns
Type Description
EmbeddingConfigOrBuilder

getFilterControlIds(int index)

public String getFilterControlIds(int index)

Filter 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.

repeated string filter_control_ids = 11;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The filterControlIds at the given index.

getFilterControlIdsBytes(int index)

public ByteString getFilterControlIdsBytes(int index)

Filter 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.

repeated string filter_control_ids = 11;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the filterControlIds at the given index.

getFilterControlIdsCount()

public int getFilterControlIdsCount()

Filter 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.

repeated string filter_control_ids = 11;

Returns
Type Description
int

The count of filterControlIds.

getFilterControlIdsList()

public ProtocolStringList getFilterControlIdsList()

Filter 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.

repeated string filter_control_ids = 11;

Returns
Type Description
ProtocolStringList

A list containing the filterControlIds.

getGenericConfig()

public ServingConfig.GenericConfig getGenericConfig()

The GenericConfig of the serving configuration.

.google.cloud.discoveryengine.v1alpha.ServingConfig.GenericConfig generic_config = 10;

Returns
Type Description
ServingConfig.GenericConfig

The genericConfig.

getGenericConfigBuilder()

public ServingConfig.GenericConfig.Builder getGenericConfigBuilder()

The GenericConfig of the serving configuration.

.google.cloud.discoveryengine.v1alpha.ServingConfig.GenericConfig generic_config = 10;

Returns
Type Description
ServingConfig.GenericConfig.Builder

getGenericConfigOrBuilder()

public ServingConfig.GenericConfigOrBuilder getGenericConfigOrBuilder()

The GenericConfig of the serving configuration.

.google.cloud.discoveryengine.v1alpha.ServingConfig.GenericConfig generic_config = 10;

Returns
Type Description
ServingConfig.GenericConfigOrBuilder

getGuidedSearchSpec()

public GuidedSearchSpec getGuidedSearchSpec()

Guided search configs.

.google.cloud.discoveryengine.v1alpha.GuidedSearchSpec guided_search_spec = 22;

Returns
Type Description
GuidedSearchSpec

The guidedSearchSpec.

getGuidedSearchSpecBuilder()

public GuidedSearchSpec.Builder getGuidedSearchSpecBuilder()

Guided search configs.

.google.cloud.discoveryengine.v1alpha.GuidedSearchSpec guided_search_spec = 22;

Returns
Type Description
GuidedSearchSpec.Builder

getGuidedSearchSpecOrBuilder()

public GuidedSearchSpecOrBuilder getGuidedSearchSpecOrBuilder()

Guided search configs.

.google.cloud.discoveryengine.v1alpha.GuidedSearchSpec guided_search_spec = 22;

Returns
Type Description
GuidedSearchSpecOrBuilder

getIgnoreControlIds(int index)

public String getIgnoreControlIds(int index)

Condition 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.

repeated string ignore_control_ids = 19;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The ignoreControlIds at the given index.

getIgnoreControlIdsBytes(int index)

public ByteString getIgnoreControlIdsBytes(int index)

Condition 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.

repeated string ignore_control_ids = 19;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the ignoreControlIds at the given index.

getIgnoreControlIdsCount()

public int getIgnoreControlIdsCount()

Condition 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.

repeated string ignore_control_ids = 19;

Returns
Type Description
int

The count of ignoreControlIds.

getIgnoreControlIdsList()

public ProtocolStringList getIgnoreControlIdsList()

Condition 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.

repeated string ignore_control_ids = 19;

Returns
Type Description
ProtocolStringList

A list containing the ignoreControlIds.

getMediaConfig()

public ServingConfig.MediaConfig getMediaConfig()

The MediaConfig of the serving configuration.

.google.cloud.discoveryengine.v1alpha.ServingConfig.MediaConfig media_config = 7;

Returns
Type Description
ServingConfig.MediaConfig

The mediaConfig.

getMediaConfigBuilder()

public ServingConfig.MediaConfig.Builder getMediaConfigBuilder()

The MediaConfig of the serving configuration.

.google.cloud.discoveryengine.v1alpha.ServingConfig.MediaConfig media_config = 7;

Returns
Type Description
ServingConfig.MediaConfig.Builder

getMediaConfigOrBuilder()

public ServingConfig.MediaConfigOrBuilder getMediaConfigOrBuilder()

The MediaConfig of the serving configuration.

.google.cloud.discoveryengine.v1alpha.ServingConfig.MediaConfig media_config = 7;

Returns
Type Description
ServingConfig.MediaConfigOrBuilder

getModelId()

public String getModelId()

The 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 is SOLUTION_TYPE_RECOMMENDATION.

string model_id = 4;

Returns
Type Description
String

The modelId.

getModelIdBytes()

public ByteString getModelIdBytes()

The 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 is SOLUTION_TYPE_RECOMMENDATION.

string model_id = 4;

Returns
Type Description
ByteString

The bytes for modelId.

getName()

public String getName()

Immutable. Fully qualified name projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}

string name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Immutable. Fully qualified name projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}

string name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ByteString

The bytes for name.

getOnewaySynonymsControlIds(int index)

public String getOnewaySynonymsControlIds(int index)

Condition 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 is SOLUTION_TYPE_SEARCH.

repeated string oneway_synonyms_control_ids = 16;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The onewaySynonymsControlIds at the given index.

getOnewaySynonymsControlIdsBytes(int index)

public ByteString getOnewaySynonymsControlIdsBytes(int index)

Condition 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 is SOLUTION_TYPE_SEARCH.

repeated string oneway_synonyms_control_ids = 16;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the onewaySynonymsControlIds at the given index.

getOnewaySynonymsControlIdsCount()

public int getOnewaySynonymsControlIdsCount()

Condition 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 is SOLUTION_TYPE_SEARCH.

repeated string oneway_synonyms_control_ids = 16;

Returns
Type Description
int

The count of onewaySynonymsControlIds.

getOnewaySynonymsControlIdsList()

public ProtocolStringList getOnewaySynonymsControlIdsList()

Condition 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 is SOLUTION_TYPE_SEARCH.

repeated string oneway_synonyms_control_ids = 16;

Returns
Type Description
ProtocolStringList

A list containing the onewaySynonymsControlIds.

getRankingExpression()

public String getRankingExpression()

The 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 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).

string ranking_expression = 21;

Returns
Type Description
String

The rankingExpression.

getRankingExpressionBytes()

public ByteString getRankingExpressionBytes()

The 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 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).

string ranking_expression = 21;

Returns
Type Description
ByteString

The bytes for rankingExpression.

getRedirectControlIds(int index)

public String getRedirectControlIds(int index)

IDs 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 is SOLUTION_TYPE_SEARCH.

repeated string redirect_control_ids = 14;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The redirectControlIds at the given index.

getRedirectControlIdsBytes(int index)

public ByteString getRedirectControlIdsBytes(int index)

IDs 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 is SOLUTION_TYPE_SEARCH.

repeated string redirect_control_ids = 14;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the redirectControlIds at the given index.

getRedirectControlIdsCount()

public int getRedirectControlIdsCount()

IDs 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 is SOLUTION_TYPE_SEARCH.

repeated string redirect_control_ids = 14;

Returns
Type Description
int

The count of redirectControlIds.

getRedirectControlIdsList()

public ProtocolStringList getRedirectControlIdsList()

IDs 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 is SOLUTION_TYPE_SEARCH.

repeated string redirect_control_ids = 14;

Returns
Type Description
ProtocolStringList

A list containing the redirectControlIds.

getReplacementControlIds(int index)

public String getReplacementControlIds(int index)

Condition 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 is SOLUTION_TYPE_SEARCH.

repeated string replacement_control_ids = 18;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The replacementControlIds at the given index.

getReplacementControlIdsBytes(int index)

public ByteString getReplacementControlIdsBytes(int index)

Condition 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 is SOLUTION_TYPE_SEARCH.

repeated string replacement_control_ids = 18;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the replacementControlIds at the given index.

getReplacementControlIdsCount()

public int getReplacementControlIdsCount()

Condition 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 is SOLUTION_TYPE_SEARCH.

repeated string replacement_control_ids = 18;

Returns
Type Description
int

The count of replacementControlIds.

getReplacementControlIdsList()

public ProtocolStringList getReplacementControlIdsList()

Condition 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 is SOLUTION_TYPE_SEARCH.

repeated string replacement_control_ids = 18;

Returns
Type Description
ProtocolStringList

A list containing the replacementControlIds.

getSolutionType()

public SolutionType getSolutionType()

Required. Immutable. Specifies the solution type that a serving config can be associated with.

.google.cloud.discoveryengine.v1alpha.SolutionType solution_type = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
SolutionType

The solutionType.

getSolutionTypeValue()

public int getSolutionTypeValue()

Required. Immutable. Specifies the solution type that a serving config can be associated with.

.google.cloud.discoveryengine.v1alpha.SolutionType solution_type = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
int

The enum numeric value on the wire for solutionType.

getSynonymsControlIds(int index)

public String getSynonymsControlIds(int index)

Condition 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 is SOLUTION_TYPE_SEARCH.

repeated string synonyms_control_ids = 15;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The synonymsControlIds at the given index.

getSynonymsControlIdsBytes(int index)

public ByteString getSynonymsControlIdsBytes(int index)

Condition 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 is SOLUTION_TYPE_SEARCH.

repeated string synonyms_control_ids = 15;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the synonymsControlIds at the given index.

getSynonymsControlIdsCount()

public int getSynonymsControlIdsCount()

Condition 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 is SOLUTION_TYPE_SEARCH.

repeated string synonyms_control_ids = 15;

Returns
Type Description
int

The count of synonymsControlIds.

getSynonymsControlIdsList()

public ProtocolStringList getSynonymsControlIdsList()

Condition 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 is SOLUTION_TYPE_SEARCH.

repeated string synonyms_control_ids = 15;

Returns
Type Description
ProtocolStringList

A list containing the synonymsControlIds.

getUpdateTime()

public Timestamp getUpdateTime()

Output only. ServingConfig updated timestamp.

.google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeBuilder()

public Timestamp.Builder getUpdateTimeBuilder()

Output only. ServingConfig updated timestamp.

.google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. ServingConfig updated timestamp.

.google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getVerticalConfigCase()

public ServingConfig.VerticalConfigCase getVerticalConfigCase()
Returns
Type Description
ServingConfig.VerticalConfigCase

hasCreateTime()

public boolean hasCreateTime()

Output only. ServingConfig created timestamp.

.google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the createTime field is set.

hasCustomFineTuningSpec()

public boolean hasCustomFineTuningSpec()

Custom fine tuning configs.

.google.cloud.discoveryengine.v1alpha.CustomFineTuningSpec custom_fine_tuning_spec = 24;

Returns
Type Description
boolean

Whether the customFineTuningSpec field is set.

hasEmbeddingConfig()

public boolean hasEmbeddingConfig()

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 and the document embeddings that are provided by this EmbeddingConfig. If SearchRequest.EmbeddingSpec.EmbeddingVector.vector is provided, it overrides this ServingConfig.embedding_config.

.google.cloud.discoveryengine.v1alpha.EmbeddingConfig embedding_config = 20;

Returns
Type Description
boolean

Whether the embeddingConfig field is set.

hasGenericConfig()

public boolean hasGenericConfig()

The GenericConfig of the serving configuration.

.google.cloud.discoveryengine.v1alpha.ServingConfig.GenericConfig generic_config = 10;

Returns
Type Description
boolean

Whether the genericConfig field is set.

hasGuidedSearchSpec()

public boolean hasGuidedSearchSpec()

Guided search configs.

.google.cloud.discoveryengine.v1alpha.GuidedSearchSpec guided_search_spec = 22;

Returns
Type Description
boolean

Whether the guidedSearchSpec field is set.

hasMediaConfig()

public boolean hasMediaConfig()

The MediaConfig of the serving configuration.

.google.cloud.discoveryengine.v1alpha.ServingConfig.MediaConfig media_config = 7;

Returns
Type Description
boolean

Whether the mediaConfig field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. ServingConfig updated timestamp.

.google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the updateTime field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeCreateTime(Timestamp value)

public ServingConfig.Builder mergeCreateTime(Timestamp value)

Output only. ServingConfig created timestamp.

.google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
ServingConfig.Builder

mergeCustomFineTuningSpec(CustomFineTuningSpec value)

public ServingConfig.Builder mergeCustomFineTuningSpec(CustomFineTuningSpec value)

Custom fine tuning configs.

.google.cloud.discoveryengine.v1alpha.CustomFineTuningSpec custom_fine_tuning_spec = 24;

Parameter
Name Description
value CustomFineTuningSpec
Returns
Type Description
ServingConfig.Builder

mergeEmbeddingConfig(EmbeddingConfig value)

public ServingConfig.Builder mergeEmbeddingConfig(EmbeddingConfig value)

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 and the document embeddings that are provided by this EmbeddingConfig. If SearchRequest.EmbeddingSpec.EmbeddingVector.vector is provided, it overrides this ServingConfig.embedding_config.

.google.cloud.discoveryengine.v1alpha.EmbeddingConfig embedding_config = 20;

Parameter
Name Description
value EmbeddingConfig
Returns
Type Description
ServingConfig.Builder

mergeFrom(ServingConfig other)

public ServingConfig.Builder mergeFrom(ServingConfig other)
Parameter
Name Description
other ServingConfig
Returns
Type Description
ServingConfig.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public ServingConfig.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ServingConfig.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public ServingConfig.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
ServingConfig.Builder
Overrides

mergeGenericConfig(ServingConfig.GenericConfig value)

public ServingConfig.Builder mergeGenericConfig(ServingConfig.GenericConfig value)

The GenericConfig of the serving configuration.

.google.cloud.discoveryengine.v1alpha.ServingConfig.GenericConfig generic_config = 10;

Parameter
Name Description
value ServingConfig.GenericConfig
Returns
Type Description
ServingConfig.Builder

mergeGuidedSearchSpec(GuidedSearchSpec value)

public ServingConfig.Builder mergeGuidedSearchSpec(GuidedSearchSpec value)

Guided search configs.

.google.cloud.discoveryengine.v1alpha.GuidedSearchSpec guided_search_spec = 22;

Parameter
Name Description
value GuidedSearchSpec
Returns
Type Description
ServingConfig.Builder

mergeMediaConfig(ServingConfig.MediaConfig value)

public ServingConfig.Builder mergeMediaConfig(ServingConfig.MediaConfig value)

The MediaConfig of the serving configuration.

.google.cloud.discoveryengine.v1alpha.ServingConfig.MediaConfig media_config = 7;

Parameter
Name Description
value ServingConfig.MediaConfig
Returns
Type Description
ServingConfig.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ServingConfig.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
ServingConfig.Builder
Overrides

mergeUpdateTime(Timestamp value)

public ServingConfig.Builder mergeUpdateTime(Timestamp value)

Output only. ServingConfig updated timestamp.

.google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
ServingConfig.Builder

setBoostControlIds(int index, String value)

public ServingConfig.Builder setBoostControlIds(int index, String value)

Boost 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.

repeated string boost_control_ids = 12;

Parameters
Name Description
index int

The index to set the value at.

value String

The boostControlIds to set.

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

setCreateTime(Timestamp value)

public ServingConfig.Builder setCreateTime(Timestamp value)

Output only. ServingConfig created timestamp.

.google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
ServingConfig.Builder

setCreateTime(Timestamp.Builder builderForValue)

public ServingConfig.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. ServingConfig created timestamp.

.google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
ServingConfig.Builder

setCustomFineTuningSpec(CustomFineTuningSpec value)

public ServingConfig.Builder setCustomFineTuningSpec(CustomFineTuningSpec value)

Custom fine tuning configs.

.google.cloud.discoveryengine.v1alpha.CustomFineTuningSpec custom_fine_tuning_spec = 24;

Parameter
Name Description
value CustomFineTuningSpec
Returns
Type Description
ServingConfig.Builder

setCustomFineTuningSpec(CustomFineTuningSpec.Builder builderForValue)

public ServingConfig.Builder setCustomFineTuningSpec(CustomFineTuningSpec.Builder builderForValue)

Custom fine tuning configs.

.google.cloud.discoveryengine.v1alpha.CustomFineTuningSpec custom_fine_tuning_spec = 24;

Parameter
Name Description
builderForValue CustomFineTuningSpec.Builder
Returns
Type Description
ServingConfig.Builder

setDisplayName(String value)

public ServingConfig.Builder setDisplayName(String value)

Required. 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.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The displayName to set.

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public ServingConfig.Builder setDisplayNameBytes(ByteString value)

Required. 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.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for displayName to set.

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

setDissociateControlIds(int index, String value)

public ServingConfig.Builder setDissociateControlIds(int index, String value)

Condition 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 is SOLUTION_TYPE_SEARCH.

repeated string dissociate_control_ids = 17;

Parameters
Name Description
index int

The index to set the value at.

value String

The dissociateControlIds to set.

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

setDiversityLevel(String value)

public ServingConfig.Builder setDiversityLevel(String value)

How 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 is SOLUTION_TYPE_RECOMMENDATION.

string diversity_level = 5;

Parameter
Name Description
value String

The diversityLevel to set.

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

setDiversityLevelBytes(ByteString value)

public ServingConfig.Builder setDiversityLevelBytes(ByteString value)

How 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 is SOLUTION_TYPE_RECOMMENDATION.

string diversity_level = 5;

Parameter
Name Description
value ByteString

The bytes for diversityLevel to set.

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

setEmbeddingConfig(EmbeddingConfig value)

public ServingConfig.Builder setEmbeddingConfig(EmbeddingConfig value)

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 and the document embeddings that are provided by this EmbeddingConfig. If SearchRequest.EmbeddingSpec.EmbeddingVector.vector is provided, it overrides this ServingConfig.embedding_config.

.google.cloud.discoveryengine.v1alpha.EmbeddingConfig embedding_config = 20;

Parameter
Name Description
value EmbeddingConfig
Returns
Type Description
ServingConfig.Builder

setEmbeddingConfig(EmbeddingConfig.Builder builderForValue)

public ServingConfig.Builder setEmbeddingConfig(EmbeddingConfig.Builder builderForValue)

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 and the document embeddings that are provided by this EmbeddingConfig. If SearchRequest.EmbeddingSpec.EmbeddingVector.vector is provided, it overrides this ServingConfig.embedding_config.

.google.cloud.discoveryengine.v1alpha.EmbeddingConfig embedding_config = 20;

Parameter
Name Description
builderForValue EmbeddingConfig.Builder
Returns
Type Description
ServingConfig.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public ServingConfig.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
ServingConfig.Builder
Overrides

setFilterControlIds(int index, String value)

public ServingConfig.Builder setFilterControlIds(int index, String value)

Filter 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.

repeated string filter_control_ids = 11;

Parameters
Name Description
index int

The index to set the value at.

value String

The filterControlIds to set.

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

setGenericConfig(ServingConfig.GenericConfig value)

public ServingConfig.Builder setGenericConfig(ServingConfig.GenericConfig value)

The GenericConfig of the serving configuration.

.google.cloud.discoveryengine.v1alpha.ServingConfig.GenericConfig generic_config = 10;

Parameter
Name Description
value ServingConfig.GenericConfig
Returns
Type Description
ServingConfig.Builder

setGenericConfig(ServingConfig.GenericConfig.Builder builderForValue)

public ServingConfig.Builder setGenericConfig(ServingConfig.GenericConfig.Builder builderForValue)

The GenericConfig of the serving configuration.

.google.cloud.discoveryengine.v1alpha.ServingConfig.GenericConfig generic_config = 10;

Parameter
Name Description
builderForValue ServingConfig.GenericConfig.Builder
Returns
Type Description
ServingConfig.Builder

setGuidedSearchSpec(GuidedSearchSpec value)

public ServingConfig.Builder setGuidedSearchSpec(GuidedSearchSpec value)

Guided search configs.

.google.cloud.discoveryengine.v1alpha.GuidedSearchSpec guided_search_spec = 22;

Parameter
Name Description
value GuidedSearchSpec
Returns
Type Description
ServingConfig.Builder

setGuidedSearchSpec(GuidedSearchSpec.Builder builderForValue)

public ServingConfig.Builder setGuidedSearchSpec(GuidedSearchSpec.Builder builderForValue)

Guided search configs.

.google.cloud.discoveryengine.v1alpha.GuidedSearchSpec guided_search_spec = 22;

Parameter
Name Description
builderForValue GuidedSearchSpec.Builder
Returns
Type Description
ServingConfig.Builder

setIgnoreControlIds(int index, String value)

public ServingConfig.Builder setIgnoreControlIds(int index, String value)

Condition 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.

repeated string ignore_control_ids = 19;

Parameters
Name Description
index int

The index to set the value at.

value String

The ignoreControlIds to set.

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

setMediaConfig(ServingConfig.MediaConfig value)

public ServingConfig.Builder setMediaConfig(ServingConfig.MediaConfig value)

The MediaConfig of the serving configuration.

.google.cloud.discoveryengine.v1alpha.ServingConfig.MediaConfig media_config = 7;

Parameter
Name Description
value ServingConfig.MediaConfig
Returns
Type Description
ServingConfig.Builder

setMediaConfig(ServingConfig.MediaConfig.Builder builderForValue)

public ServingConfig.Builder setMediaConfig(ServingConfig.MediaConfig.Builder builderForValue)

The MediaConfig of the serving configuration.

.google.cloud.discoveryengine.v1alpha.ServingConfig.MediaConfig media_config = 7;

Parameter
Name Description
builderForValue ServingConfig.MediaConfig.Builder
Returns
Type Description
ServingConfig.Builder

setModelId(String value)

public ServingConfig.Builder setModelId(String value)

The 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 is SOLUTION_TYPE_RECOMMENDATION.

string model_id = 4;

Parameter
Name Description
value String

The modelId to set.

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

setModelIdBytes(ByteString value)

public ServingConfig.Builder setModelIdBytes(ByteString value)

The 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 is SOLUTION_TYPE_RECOMMENDATION.

string model_id = 4;

Parameter
Name Description
value ByteString

The bytes for modelId to set.

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

setName(String value)

public ServingConfig.Builder setName(String value)

Immutable. Fully qualified name projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}

string name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

setNameBytes(ByteString value)

public ServingConfig.Builder setNameBytes(ByteString value)

Immutable. Fully qualified name projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}

string name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

setOnewaySynonymsControlIds(int index, String value)

public ServingConfig.Builder setOnewaySynonymsControlIds(int index, String value)

Condition 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 is SOLUTION_TYPE_SEARCH.

repeated string oneway_synonyms_control_ids = 16;

Parameters
Name Description
index int

The index to set the value at.

value String

The onewaySynonymsControlIds to set.

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

setRankingExpression(String value)

public ServingConfig.Builder setRankingExpression(String value)

The 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 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).

string ranking_expression = 21;

Parameter
Name Description
value String

The rankingExpression to set.

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

setRankingExpressionBytes(ByteString value)

public ServingConfig.Builder setRankingExpressionBytes(ByteString value)

The 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 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).

string ranking_expression = 21;

Parameter
Name Description
value ByteString

The bytes for rankingExpression to set.

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

setRedirectControlIds(int index, String value)

public ServingConfig.Builder setRedirectControlIds(int index, String value)

IDs 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 is SOLUTION_TYPE_SEARCH.

repeated string redirect_control_ids = 14;

Parameters
Name Description
index int

The index to set the value at.

value String

The redirectControlIds to set.

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public ServingConfig.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
ServingConfig.Builder
Overrides

setReplacementControlIds(int index, String value)

public ServingConfig.Builder setReplacementControlIds(int index, String value)

Condition 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 is SOLUTION_TYPE_SEARCH.

repeated string replacement_control_ids = 18;

Parameters
Name Description
index int

The index to set the value at.

value String

The replacementControlIds to set.

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

setSolutionType(SolutionType value)

public ServingConfig.Builder setSolutionType(SolutionType value)

Required. Immutable. Specifies the solution type that a serving config can be associated with.

.google.cloud.discoveryengine.v1alpha.SolutionType solution_type = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value SolutionType

The solutionType to set.

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

setSolutionTypeValue(int value)

public ServingConfig.Builder setSolutionTypeValue(int value)

Required. Immutable. Specifies the solution type that a serving config can be associated with.

.google.cloud.discoveryengine.v1alpha.SolutionType solution_type = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value int

The enum numeric value on the wire for solutionType to set.

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

setSynonymsControlIds(int index, String value)

public ServingConfig.Builder setSynonymsControlIds(int index, String value)

Condition 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 is SOLUTION_TYPE_SEARCH.

repeated string synonyms_control_ids = 15;

Parameters
Name Description
index int

The index to set the value at.

value String

The synonymsControlIds to set.

Returns
Type Description
ServingConfig.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final ServingConfig.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
ServingConfig.Builder
Overrides

setUpdateTime(Timestamp value)

public ServingConfig.Builder setUpdateTime(Timestamp value)

Output only. ServingConfig updated timestamp.

.google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
ServingConfig.Builder

setUpdateTime(Timestamp.Builder builderForValue)

public ServingConfig.Builder setUpdateTime(Timestamp.Builder builderForValue)

Output only. ServingConfig updated timestamp.

.google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
ServingConfig.Builder