Class ServingConfig.Builder (0.36.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
TypeDescription
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
NameDescription
valuesIterable<String>

The boostControlIds to add.

Returns
TypeDescription
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
NameDescription
valuesIterable<String>

The dissociateControlIds to add.

Returns
TypeDescription
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
NameDescription
valuesIterable<String>

The filterControlIds to add.

Returns
TypeDescription
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
NameDescription
valuesIterable<String>

The ignoreControlIds to add.

Returns
TypeDescription
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
NameDescription
valuesIterable<String>

The onewaySynonymsControlIds to add.

Returns
TypeDescription
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
NameDescription
valuesIterable<String>

The redirectControlIds to add.

Returns
TypeDescription
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
NameDescription
valuesIterable<String>

The replacementControlIds to add.

Returns
TypeDescription
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
NameDescription
valuesIterable<String>

The synonymsControlIds to add.

Returns
TypeDescription
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
NameDescription
valueString

The boostControlIds to add.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes of the boostControlIds to add.

Returns
TypeDescription
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
NameDescription
valueString

The dissociateControlIds to add.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes of the dissociateControlIds to add.

Returns
TypeDescription
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
NameDescription
valueString

The filterControlIds to add.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes of the filterControlIds to add.

Returns
TypeDescription
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
NameDescription
valueString

The ignoreControlIds to add.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes of the ignoreControlIds to add.

Returns
TypeDescription
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
NameDescription
valueString

The onewaySynonymsControlIds to add.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes of the onewaySynonymsControlIds to add.

Returns
TypeDescription
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
NameDescription
valueString

The redirectControlIds to add.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes of the redirectControlIds to add.

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public ServingConfig.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The replacementControlIds to add.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes of the replacementControlIds to add.

Returns
TypeDescription
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
NameDescription
valueString

The synonymsControlIds to add.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes of the synonymsControlIds to add.

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

build()

public ServingConfig build()
Returns
TypeDescription
ServingConfig

buildPartial()

public ServingConfig buildPartial()
Returns
TypeDescription
ServingConfig

clear()

public ServingConfig.Builder clear()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ServingConfig.Builder

clearCustomFineTuningSpec()

public ServingConfig.Builder clearCustomFineTuningSpec()

Custom fine tuning configs.

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ServingConfig.Builder

clearField(Descriptors.FieldDescriptor field)

public ServingConfig.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ServingConfig.Builder

clearGuidedSearchSpec()

public ServingConfig.Builder clearGuidedSearchSpec()

Guided search configs.

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ServingConfig.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public ServingConfig.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ServingConfig.Builder

clearVerticalConfig()

public ServingConfig.Builder clearVerticalConfig()
Returns
TypeDescription
ServingConfig.Builder

clone()

public ServingConfig.Builder clone()
Returns
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. ServingConfig created timestamp.

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

Returns
TypeDescription
TimestampOrBuilder

getCustomFineTuningSpec()

public CustomFineTuningSpec getCustomFineTuningSpec()

Custom fine tuning configs.

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

Returns
TypeDescription
CustomFineTuningSpec

The customFineTuningSpec.

getCustomFineTuningSpecBuilder()

public CustomFineTuningSpec.Builder getCustomFineTuningSpecBuilder()

Custom fine tuning configs.

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

Returns
TypeDescription
CustomFineTuningSpec.Builder

getCustomFineTuningSpecOrBuilder()

public CustomFineTuningSpecOrBuilder getCustomFineTuningSpecOrBuilder()

Custom fine tuning configs.

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

Returns
TypeDescription
CustomFineTuningSpecOrBuilder

getDefaultInstanceForType()

public ServingConfig getDefaultInstanceForType()
Returns
TypeDescription
ServingConfig

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ServingConfig.GenericConfig.Builder

getGenericConfigOrBuilder()

public ServingConfig.GenericConfigOrBuilder getGenericConfigOrBuilder()

The GenericConfig of the serving configuration.

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

Returns
TypeDescription
ServingConfig.GenericConfigOrBuilder

getGuidedSearchSpec()

public GuidedSearchSpec getGuidedSearchSpec()

Guided search configs.

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

Returns
TypeDescription
GuidedSearchSpec

The guidedSearchSpec.

getGuidedSearchSpecBuilder()

public GuidedSearchSpec.Builder getGuidedSearchSpecBuilder()

Guided search configs.

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

Returns
TypeDescription
GuidedSearchSpec.Builder

getGuidedSearchSpecOrBuilder()

public GuidedSearchSpecOrBuilder getGuidedSearchSpecOrBuilder()

Guided search configs.

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

Returns
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ServingConfig.MediaConfig.Builder

getMediaConfigOrBuilder()

public ServingConfig.MediaConfigOrBuilder getMediaConfigOrBuilder()

The MediaConfig of the serving configuration.

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
Builder

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. ServingConfig updated timestamp.

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

Returns
TypeDescription
TimestampOrBuilder

getVerticalConfigCase()

public ServingConfig.VerticalConfigCase getVerticalConfigCase()
Returns
TypeDescription
ServingConfig.VerticalConfigCase

hasCreateTime()

public boolean hasCreateTime()

Output only. ServingConfig created timestamp.

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the genericConfig field is set.

hasGuidedSearchSpec()

public boolean hasGuidedSearchSpec()

Guided search configs.

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the updateTime field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
valueCustomFineTuningSpec
Returns
TypeDescription
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
NameDescription
valueEmbeddingConfig
Returns
TypeDescription
ServingConfig.Builder

mergeFrom(ServingConfig other)

public ServingConfig.Builder mergeFrom(ServingConfig other)
Parameter
NameDescription
otherServingConfig
Returns
TypeDescription
ServingConfig.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public ServingConfig.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ServingConfig.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public ServingConfig.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
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
NameDescription
valueServingConfig.GenericConfig
Returns
TypeDescription
ServingConfig.Builder

mergeGuidedSearchSpec(GuidedSearchSpec value)

public ServingConfig.Builder mergeGuidedSearchSpec(GuidedSearchSpec value)

Guided search configs.

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

Parameter
NameDescription
valueGuidedSearchSpec
Returns
TypeDescription
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
NameDescription
valueServingConfig.MediaConfig
Returns
TypeDescription
ServingConfig.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ServingConfig.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
indexint

The index to set the value at.

valueString

The boostControlIds to set.

Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
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
NameDescription
valueCustomFineTuningSpec
Returns
TypeDescription
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
NameDescription
builderForValueCustomFineTuningSpec.Builder
Returns
TypeDescription
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
NameDescription
valueString

The displayName to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for displayName to set.

Returns
TypeDescription
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
NameDescription
indexint

The index to set the value at.

valueString

The dissociateControlIds to set.

Returns
TypeDescription
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
NameDescription
valueString

The diversityLevel to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for diversityLevel to set.

Returns
TypeDescription
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
NameDescription
valueEmbeddingConfig
Returns
TypeDescription
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
NameDescription
builderForValueEmbeddingConfig.Builder
Returns
TypeDescription
ServingConfig.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public ServingConfig.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
indexint

The index to set the value at.

valueString

The filterControlIds to set.

Returns
TypeDescription
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
NameDescription
valueServingConfig.GenericConfig
Returns
TypeDescription
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
NameDescription
builderForValueServingConfig.GenericConfig.Builder
Returns
TypeDescription
ServingConfig.Builder

setGuidedSearchSpec(GuidedSearchSpec value)

public ServingConfig.Builder setGuidedSearchSpec(GuidedSearchSpec value)

Guided search configs.

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

Parameter
NameDescription
valueGuidedSearchSpec
Returns
TypeDescription
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
NameDescription
builderForValueGuidedSearchSpec.Builder
Returns
TypeDescription
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
NameDescription
indexint

The index to set the value at.

valueString

The ignoreControlIds to set.

Returns
TypeDescription
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
NameDescription
valueServingConfig.MediaConfig
Returns
TypeDescription
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
NameDescription
builderForValueServingConfig.MediaConfig.Builder
Returns
TypeDescription
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
NameDescription
valueString

The modelId to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for modelId to set.

Returns
TypeDescription
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
NameDescription
valueString

The name to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
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
NameDescription
indexint

The index to set the value at.

valueString

The onewaySynonymsControlIds to set.

Returns
TypeDescription
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
NameDescription
valueString

The rankingExpression to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for rankingExpression to set.

Returns
TypeDescription
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
NameDescription
indexint

The index to set the value at.

valueString

The redirectControlIds to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
indexint

The index to set the value at.

valueString

The replacementControlIds to set.

Returns
TypeDescription
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
NameDescription
valueSolutionType

The solutionType to set.

Returns
TypeDescription
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
NameDescription
valueint

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

Returns
TypeDescription
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
NameDescription
indexint

The index to set the value at.

valueString

The synonymsControlIds to set.

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final ServingConfig.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
ServingConfig.Builder