Class ServingConfig.Builder (2.9.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 together with the Catalog.default_branch, generates results.

Protobuf type google.cloud.retail.v2alpha.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)

Condition boost specifications. If a product matches multiple conditions in the specifications, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 100. Notice that if both ServingConfig.boost_control_ids and SearchRequest.boost_spec are set, the boost conditions from both places are evaluated. If a search request matches multiple boost conditions, the final boost score is equal to the sum of the boost scores from all matched boost conditions. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string boost_control_ids = 7;

Parameter
NameDescription
valuesIterable<String>

The boostControlIds to add.

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

addAllDoNotAssociateControlIds(Iterable<String> values)

public ServingConfig.Builder addAllDoNotAssociateControlIds(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 solution_types is SOLUTION_TYPE_SEARCH.

repeated string do_not_associate_control_ids = 13;

Parameter
NameDescription
valuesIterable<String>

The doNotAssociateControlIds to add.

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

addAllFacetControlIds(Iterable<String> values)

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

Facet specifications for faceted search. If empty, no facets are returned. The ids refer to the ids of Control resources with only the Facet control set. These controls are assumed to be in the same Catalog as the ServingConfig. A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error is returned. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string facet_control_ids = 5;

Parameter
NameDescription
valuesIterable<String>

The facetControlIds to add.

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

addAllFilterControlIds(Iterable<String> values)

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

Condition filter specifications. If a product matches multiple conditions in the specifications, filters from these specifications are all applied and combined via the AND operator. Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string filter_control_ids = 9;

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. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string ignore_control_ids = 15;

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. Order of controls in the list will not matter. Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string oneway_synonyms_control_ids = 12;

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)

Condition redirect specifications. Only the first triggered redirect action is applied, even if multiple apply. Maximum number of specifications is 1000. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string redirect_control_ids = 10;

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

repeated string replacement_control_ids = 14;

Parameter
NameDescription
valuesIterable<String>

The replacementControlIds to add.

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

addAllSolutionTypes(Iterable<? extends SolutionType> values)

public ServingConfig.Builder addAllSolutionTypes(Iterable<? extends SolutionType> values)

Required. Immutable. Specifies the solution types that a serving config can be associated with. Currently we support setting only one type of solution.

repeated .google.cloud.retail.v2alpha.SolutionType solution_types = 19 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.retail.v2alpha.SolutionType>

The solutionTypes to add.

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

addAllSolutionTypesValue(Iterable<Integer> values)

public ServingConfig.Builder addAllSolutionTypesValue(Iterable<Integer> values)

Required. Immutable. Specifies the solution types that a serving config can be associated with. Currently we support setting only one type of solution.

repeated .google.cloud.retail.v2alpha.SolutionType solution_types = 19 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
NameDescription
valuesIterable<Integer>

The enum numeric values on the wire for solutionTypes to add.

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

addAllTwowaySynonymsControlIds(Iterable<String> values)

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

Condition synonyms specifications. If multiple syonyms conditions match, all matching synonyms control in the list will execute. Order of controls in the list will not matter. Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string twoway_synonyms_control_ids = 18;

Parameter
NameDescription
valuesIterable<String>

The twowaySynonymsControlIds to add.

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

addBoostControlIds(String value)

public ServingConfig.Builder addBoostControlIds(String value)

Condition boost specifications. If a product matches multiple conditions in the specifications, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 100. Notice that if both ServingConfig.boost_control_ids and SearchRequest.boost_spec are set, the boost conditions from both places are evaluated. If a search request matches multiple boost conditions, the final boost score is equal to the sum of the boost scores from all matched boost conditions. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string boost_control_ids = 7;

Parameter
NameDescription
valueString

The boostControlIds to add.

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

addBoostControlIdsBytes(ByteString value)

public ServingConfig.Builder addBoostControlIdsBytes(ByteString value)

Condition boost specifications. If a product matches multiple conditions in the specifications, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 100. Notice that if both ServingConfig.boost_control_ids and SearchRequest.boost_spec are set, the boost conditions from both places are evaluated. If a search request matches multiple boost conditions, the final boost score is equal to the sum of the boost scores from all matched boost conditions. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string boost_control_ids = 7;

Parameter
NameDescription
valueByteString

The bytes of the boostControlIds to add.

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

addDoNotAssociateControlIds(String value)

public ServingConfig.Builder addDoNotAssociateControlIds(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 solution_types is SOLUTION_TYPE_SEARCH.

repeated string do_not_associate_control_ids = 13;

Parameter
NameDescription
valueString

The doNotAssociateControlIds to add.

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

addDoNotAssociateControlIdsBytes(ByteString value)

public ServingConfig.Builder addDoNotAssociateControlIdsBytes(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 solution_types is SOLUTION_TYPE_SEARCH.

repeated string do_not_associate_control_ids = 13;

Parameter
NameDescription
valueByteString

The bytes of the doNotAssociateControlIds to add.

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

addFacetControlIds(String value)

public ServingConfig.Builder addFacetControlIds(String value)

Facet specifications for faceted search. If empty, no facets are returned. The ids refer to the ids of Control resources with only the Facet control set. These controls are assumed to be in the same Catalog as the ServingConfig. A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error is returned. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string facet_control_ids = 5;

Parameter
NameDescription
valueString

The facetControlIds to add.

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

addFacetControlIdsBytes(ByteString value)

public ServingConfig.Builder addFacetControlIdsBytes(ByteString value)

Facet specifications for faceted search. If empty, no facets are returned. The ids refer to the ids of Control resources with only the Facet control set. These controls are assumed to be in the same Catalog as the ServingConfig. A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error is returned. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string facet_control_ids = 5;

Parameter
NameDescription
valueByteString

The bytes of the facetControlIds to add.

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

addFilterControlIds(String value)

public ServingConfig.Builder addFilterControlIds(String value)

Condition filter specifications. If a product matches multiple conditions in the specifications, filters from these specifications are all applied and combined via the AND operator. Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string filter_control_ids = 9;

Parameter
NameDescription
valueString

The filterControlIds to add.

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

addFilterControlIdsBytes(ByteString value)

public ServingConfig.Builder addFilterControlIdsBytes(ByteString value)

Condition filter specifications. If a product matches multiple conditions in the specifications, filters from these specifications are all applied and combined via the AND operator. Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string filter_control_ids = 9;

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. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string ignore_control_ids = 15;

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. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string ignore_control_ids = 15;

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. Order of controls in the list will not matter. Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string oneway_synonyms_control_ids = 12;

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. Order of controls in the list will not matter. Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string oneway_synonyms_control_ids = 12;

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)

Condition redirect specifications. Only the first triggered redirect action is applied, even if multiple apply. Maximum number of specifications is 1000. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string redirect_control_ids = 10;

Parameter
NameDescription
valueString

The redirectControlIds to add.

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

addRedirectControlIdsBytes(ByteString value)

public ServingConfig.Builder addRedirectControlIdsBytes(ByteString value)

Condition redirect specifications. Only the first triggered redirect action is applied, even if multiple apply. Maximum number of specifications is 1000. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string redirect_control_ids = 10;

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

repeated string replacement_control_ids = 14;

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

repeated string replacement_control_ids = 14;

Parameter
NameDescription
valueByteString

The bytes of the replacementControlIds to add.

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

addSolutionTypes(SolutionType value)

public ServingConfig.Builder addSolutionTypes(SolutionType value)

Required. Immutable. Specifies the solution types that a serving config can be associated with. Currently we support setting only one type of solution.

repeated .google.cloud.retail.v2alpha.SolutionType solution_types = 19 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
NameDescription
valueSolutionType

The solutionTypes to add.

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

addSolutionTypesValue(int value)

public ServingConfig.Builder addSolutionTypesValue(int value)

Required. Immutable. Specifies the solution types that a serving config can be associated with. Currently we support setting only one type of solution.

repeated .google.cloud.retail.v2alpha.SolutionType solution_types = 19 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
NameDescription
valueint

The enum numeric value on the wire for solutionTypes to add.

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

addTwowaySynonymsControlIds(String value)

public ServingConfig.Builder addTwowaySynonymsControlIds(String value)

Condition synonyms specifications. If multiple syonyms conditions match, all matching synonyms control in the list will execute. Order of controls in the list will not matter. Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string twoway_synonyms_control_ids = 18;

Parameter
NameDescription
valueString

The twowaySynonymsControlIds to add.

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

addTwowaySynonymsControlIdsBytes(ByteString value)

public ServingConfig.Builder addTwowaySynonymsControlIdsBytes(ByteString value)

Condition synonyms specifications. If multiple syonyms conditions match, all matching synonyms control in the list will execute. Order of controls in the list will not matter. Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string twoway_synonyms_control_ids = 18;

Parameter
NameDescription
valueByteString

The bytes of the twowaySynonymsControlIds 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()

Condition boost specifications. If a product matches multiple conditions in the specifications, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 100. Notice that if both ServingConfig.boost_control_ids and SearchRequest.boost_spec are set, the boost conditions from both places are evaluated. If a search request matches multiple boost conditions, the final boost score is equal to the sum of the boost scores from all matched boost conditions. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string boost_control_ids = 7;

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

clearDisplayName()

public ServingConfig.Builder clearDisplayName()

Required. The human readable serving config display name. Used in Retail 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.

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

string diversity_level = 8;

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

clearDoNotAssociateControlIds()

public ServingConfig.Builder clearDoNotAssociateControlIds()

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

repeated string do_not_associate_control_ids = 13;

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

clearDynamicFacetSpec()

public ServingConfig.Builder clearDynamicFacetSpec()

The specification for dynamically generated facets. Notice that only textual facets can be dynamically generated. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

.google.cloud.retail.v2alpha.SearchRequest.DynamicFacetSpec dynamic_facet_spec = 6;

Returns
TypeDescription
ServingConfig.Builder

clearEnableCategoryFilterLevel()

public ServingConfig.Builder clearEnableCategoryFilterLevel()

Whether to add additional category filters on the 'similar-items' model. If not specified, we enable it by default. Allowed values are:

  • 'no-category-match': No additional filtering of original results from the model and the customer's filters.
  • 'relaxed-category-match': Only keep results with categories that match at least one item categories in the PredictRequests's context item.
    • If customer also sends filters in the PredictRequest, then the results will satisfy both conditions (user given and category match). Can only be set if solution_types is SOLUTION_TYPE_RECOMMENDATION.

string enable_category_filter_level = 16;

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

clearFacetControlIds()

public ServingConfig.Builder clearFacetControlIds()

Facet specifications for faceted search. If empty, no facets are returned. The ids refer to the ids of Control resources with only the Facet control set. These controls are assumed to be in the same Catalog as the ServingConfig. A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error is returned. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string facet_control_ids = 5;

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public ServingConfig.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
ServingConfig.Builder
Overrides

clearFilterControlIds()

public ServingConfig.Builder clearFilterControlIds()

Condition filter specifications. If a product matches multiple conditions in the specifications, filters from these specifications are all applied and combined via the AND operator. Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string filter_control_ids = 9;

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

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. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string ignore_control_ids = 15;

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

clearModelId()

public ServingConfig.Builder clearModelId()

The id of the model to use at serving time. Currently only RecommendationModels are supported: https://cloud.google.com/retail/recommendations-ai/docs/create-models Can be changed but only to a compatible model (e.g. others-you-may-like CTR to others-you-may-like CVR). Required when solution_types is SOLUTION_TYPE_RECOMMENDATION.

string model_id = 3;

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

clearName()

public ServingConfig.Builder clearName()

Immutable. Fully qualified name projects/*/locations/global/catalogs/*/servingConfig/*

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. Order of controls in the list will not matter. Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string oneway_synonyms_control_ids = 12;

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

clearPriceRerankingLevel()

public ServingConfig.Builder clearPriceRerankingLevel()

How much price ranking we want in serving results. Price reranking causes product items with a similar recommendation probability to be ordered by price, with the highest-priced items first. This setting could result in a decrease in click-through and conversion rates. Allowed values are:

  • 'no-price-reranking'
  • 'low-price-raranking'
  • 'medium-price-reranking'
  • 'high-price-reranking' If not specified, we choose default based on model type. Default value: 'no-price-reranking'. Can only be set if solution_types is SOLUTION_TYPE_RECOMMENDATION.

string price_reranking_level = 4;

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

clearRedirectControlIds()

public ServingConfig.Builder clearRedirectControlIds()

Condition redirect specifications. Only the first triggered redirect action is applied, even if multiple apply. Maximum number of specifications is 1000. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string redirect_control_ids = 10;

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

repeated string replacement_control_ids = 14;

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

clearSolutionTypes()

public ServingConfig.Builder clearSolutionTypes()

Required. Immutable. Specifies the solution types that a serving config can be associated with. Currently we support setting only one type of solution.

repeated .google.cloud.retail.v2alpha.SolutionType solution_types = 19 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

clearTwowaySynonymsControlIds()

public ServingConfig.Builder clearTwowaySynonymsControlIds()

Condition synonyms specifications. If multiple syonyms conditions match, all matching synonyms control in the list will execute. Order of controls in the list will not matter. Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string twoway_synonyms_control_ids = 18;

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

clone()

public ServingConfig.Builder clone()
Returns
TypeDescription
ServingConfig.Builder
Overrides

getBoostControlIds(int index)

public String getBoostControlIds(int index)

Condition boost specifications. If a product matches multiple conditions in the specifications, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 100. Notice that if both ServingConfig.boost_control_ids and SearchRequest.boost_spec are set, the boost conditions from both places are evaluated. If a search request matches multiple boost conditions, the final boost score is equal to the sum of the boost scores from all matched boost conditions. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string boost_control_ids = 7;

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)

Condition boost specifications. If a product matches multiple conditions in the specifications, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 100. Notice that if both ServingConfig.boost_control_ids and SearchRequest.boost_spec are set, the boost conditions from both places are evaluated. If a search request matches multiple boost conditions, the final boost score is equal to the sum of the boost scores from all matched boost conditions. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string boost_control_ids = 7;

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()

Condition boost specifications. If a product matches multiple conditions in the specifications, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 100. Notice that if both ServingConfig.boost_control_ids and SearchRequest.boost_spec are set, the boost conditions from both places are evaluated. If a search request matches multiple boost conditions, the final boost score is equal to the sum of the boost scores from all matched boost conditions. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string boost_control_ids = 7;

Returns
TypeDescription
int

The count of boostControlIds.

getBoostControlIdsList()

public ProtocolStringList getBoostControlIdsList()

Condition boost specifications. If a product matches multiple conditions in the specifications, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 100. Notice that if both ServingConfig.boost_control_ids and SearchRequest.boost_spec are set, the boost conditions from both places are evaluated. If a search request matches multiple boost conditions, the final boost score is equal to the sum of the boost scores from all matched boost conditions. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string boost_control_ids = 7;

Returns
TypeDescription
ProtocolStringList

A list containing the boostControlIds.

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

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

string diversity_level = 8;

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

string diversity_level = 8;

Returns
TypeDescription
ByteString

The bytes for diversityLevel.

getDoNotAssociateControlIds(int index)

public String getDoNotAssociateControlIds(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 solution_types is SOLUTION_TYPE_SEARCH.

repeated string do_not_associate_control_ids = 13;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The doNotAssociateControlIds at the given index.

getDoNotAssociateControlIdsBytes(int index)

public ByteString getDoNotAssociateControlIdsBytes(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 solution_types is SOLUTION_TYPE_SEARCH.

repeated string do_not_associate_control_ids = 13;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the doNotAssociateControlIds at the given index.

getDoNotAssociateControlIdsCount()

public int getDoNotAssociateControlIdsCount()

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

repeated string do_not_associate_control_ids = 13;

Returns
TypeDescription
int

The count of doNotAssociateControlIds.

getDoNotAssociateControlIdsList()

public ProtocolStringList getDoNotAssociateControlIdsList()

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

repeated string do_not_associate_control_ids = 13;

Returns
TypeDescription
ProtocolStringList

A list containing the doNotAssociateControlIds.

getDynamicFacetSpec()

public SearchRequest.DynamicFacetSpec getDynamicFacetSpec()

The specification for dynamically generated facets. Notice that only textual facets can be dynamically generated. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

.google.cloud.retail.v2alpha.SearchRequest.DynamicFacetSpec dynamic_facet_spec = 6;

Returns
TypeDescription
SearchRequest.DynamicFacetSpec

The dynamicFacetSpec.

getDynamicFacetSpecBuilder()

public SearchRequest.DynamicFacetSpec.Builder getDynamicFacetSpecBuilder()

The specification for dynamically generated facets. Notice that only textual facets can be dynamically generated. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

.google.cloud.retail.v2alpha.SearchRequest.DynamicFacetSpec dynamic_facet_spec = 6;

Returns
TypeDescription
SearchRequest.DynamicFacetSpec.Builder

getDynamicFacetSpecOrBuilder()

public SearchRequest.DynamicFacetSpecOrBuilder getDynamicFacetSpecOrBuilder()

The specification for dynamically generated facets. Notice that only textual facets can be dynamically generated. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

.google.cloud.retail.v2alpha.SearchRequest.DynamicFacetSpec dynamic_facet_spec = 6;

Returns
TypeDescription
SearchRequest.DynamicFacetSpecOrBuilder

getEnableCategoryFilterLevel()

public String getEnableCategoryFilterLevel()

Whether to add additional category filters on the 'similar-items' model. If not specified, we enable it by default. Allowed values are:

  • 'no-category-match': No additional filtering of original results from the model and the customer's filters.
  • 'relaxed-category-match': Only keep results with categories that match at least one item categories in the PredictRequests's context item.
    • If customer also sends filters in the PredictRequest, then the results will satisfy both conditions (user given and category match). Can only be set if solution_types is SOLUTION_TYPE_RECOMMENDATION.

string enable_category_filter_level = 16;

Returns
TypeDescription
String

The enableCategoryFilterLevel.

getEnableCategoryFilterLevelBytes()

public ByteString getEnableCategoryFilterLevelBytes()

Whether to add additional category filters on the 'similar-items' model. If not specified, we enable it by default. Allowed values are:

  • 'no-category-match': No additional filtering of original results from the model and the customer's filters.
  • 'relaxed-category-match': Only keep results with categories that match at least one item categories in the PredictRequests's context item.
    • If customer also sends filters in the PredictRequest, then the results will satisfy both conditions (user given and category match). Can only be set if solution_types is SOLUTION_TYPE_RECOMMENDATION.

string enable_category_filter_level = 16;

Returns
TypeDescription
ByteString

The bytes for enableCategoryFilterLevel.

getFacetControlIds(int index)

public String getFacetControlIds(int index)

Facet specifications for faceted search. If empty, no facets are returned. The ids refer to the ids of Control resources with only the Facet control set. These controls are assumed to be in the same Catalog as the ServingConfig. A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error is returned. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string facet_control_ids = 5;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The facetControlIds at the given index.

getFacetControlIdsBytes(int index)

public ByteString getFacetControlIdsBytes(int index)

Facet specifications for faceted search. If empty, no facets are returned. The ids refer to the ids of Control resources with only the Facet control set. These controls are assumed to be in the same Catalog as the ServingConfig. A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error is returned. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string facet_control_ids = 5;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the facetControlIds at the given index.

getFacetControlIdsCount()

public int getFacetControlIdsCount()

Facet specifications for faceted search. If empty, no facets are returned. The ids refer to the ids of Control resources with only the Facet control set. These controls are assumed to be in the same Catalog as the ServingConfig. A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error is returned. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string facet_control_ids = 5;

Returns
TypeDescription
int

The count of facetControlIds.

getFacetControlIdsList()

public ProtocolStringList getFacetControlIdsList()

Facet specifications for faceted search. If empty, no facets are returned. The ids refer to the ids of Control resources with only the Facet control set. These controls are assumed to be in the same Catalog as the ServingConfig. A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error is returned. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string facet_control_ids = 5;

Returns
TypeDescription
ProtocolStringList

A list containing the facetControlIds.

getFilterControlIds(int index)

public String getFilterControlIds(int index)

Condition filter specifications. If a product matches multiple conditions in the specifications, filters from these specifications are all applied and combined via the AND operator. Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string filter_control_ids = 9;

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)

Condition filter specifications. If a product matches multiple conditions in the specifications, filters from these specifications are all applied and combined via the AND operator. Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string filter_control_ids = 9;

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()

Condition filter specifications. If a product matches multiple conditions in the specifications, filters from these specifications are all applied and combined via the AND operator. Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string filter_control_ids = 9;

Returns
TypeDescription
int

The count of filterControlIds.

getFilterControlIdsList()

public ProtocolStringList getFilterControlIdsList()

Condition filter specifications. If a product matches multiple conditions in the specifications, filters from these specifications are all applied and combined via the AND operator. Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string filter_control_ids = 9;

Returns
TypeDescription
ProtocolStringList

A list containing the filterControlIds.

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. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string ignore_control_ids = 15;

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. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string ignore_control_ids = 15;

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. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string ignore_control_ids = 15;

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. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string ignore_control_ids = 15;

Returns
TypeDescription
ProtocolStringList

A list containing the ignoreControlIds.

getModelId()

public String getModelId()

The id of the model to use at serving time. Currently only RecommendationModels are supported: https://cloud.google.com/retail/recommendations-ai/docs/create-models Can be changed but only to a compatible model (e.g. others-you-may-like CTR to others-you-may-like CVR). Required when solution_types is SOLUTION_TYPE_RECOMMENDATION.

string model_id = 3;

Returns
TypeDescription
String

The modelId.

getModelIdBytes()

public ByteString getModelIdBytes()

The id of the model to use at serving time. Currently only RecommendationModels are supported: https://cloud.google.com/retail/recommendations-ai/docs/create-models Can be changed but only to a compatible model (e.g. others-you-may-like CTR to others-you-may-like CVR). Required when solution_types is SOLUTION_TYPE_RECOMMENDATION.

string model_id = 3;

Returns
TypeDescription
ByteString

The bytes for modelId.

getName()

public String getName()

Immutable. Fully qualified name projects/*/locations/global/catalogs/*/servingConfig/*

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

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

Immutable. Fully qualified name projects/*/locations/global/catalogs/*/servingConfig/*

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. Order of controls in the list will not matter. Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string oneway_synonyms_control_ids = 12;

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. Order of controls in the list will not matter. Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string oneway_synonyms_control_ids = 12;

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. Order of controls in the list will not matter. Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string oneway_synonyms_control_ids = 12;

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. Order of controls in the list will not matter. Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string oneway_synonyms_control_ids = 12;

Returns
TypeDescription
ProtocolStringList

A list containing the onewaySynonymsControlIds.

getPriceRerankingLevel()

public String getPriceRerankingLevel()

How much price ranking we want in serving results. Price reranking causes product items with a similar recommendation probability to be ordered by price, with the highest-priced items first. This setting could result in a decrease in click-through and conversion rates. Allowed values are:

  • 'no-price-reranking'
  • 'low-price-raranking'
  • 'medium-price-reranking'
  • 'high-price-reranking' If not specified, we choose default based on model type. Default value: 'no-price-reranking'. Can only be set if solution_types is SOLUTION_TYPE_RECOMMENDATION.

string price_reranking_level = 4;

Returns
TypeDescription
String

The priceRerankingLevel.

getPriceRerankingLevelBytes()

public ByteString getPriceRerankingLevelBytes()

How much price ranking we want in serving results. Price reranking causes product items with a similar recommendation probability to be ordered by price, with the highest-priced items first. This setting could result in a decrease in click-through and conversion rates. Allowed values are:

  • 'no-price-reranking'
  • 'low-price-raranking'
  • 'medium-price-reranking'
  • 'high-price-reranking' If not specified, we choose default based on model type. Default value: 'no-price-reranking'. Can only be set if solution_types is SOLUTION_TYPE_RECOMMENDATION.

string price_reranking_level = 4;

Returns
TypeDescription
ByteString

The bytes for priceRerankingLevel.

getRedirectControlIds(int index)

public String getRedirectControlIds(int index)

Condition redirect specifications. Only the first triggered redirect action is applied, even if multiple apply. Maximum number of specifications is 1000. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string redirect_control_ids = 10;

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)

Condition redirect specifications. Only the first triggered redirect action is applied, even if multiple apply. Maximum number of specifications is 1000. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string redirect_control_ids = 10;

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()

Condition redirect specifications. Only the first triggered redirect action is applied, even if multiple apply. Maximum number of specifications is 1000. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string redirect_control_ids = 10;

Returns
TypeDescription
int

The count of redirectControlIds.

getRedirectControlIdsList()

public ProtocolStringList getRedirectControlIdsList()

Condition redirect specifications. Only the first triggered redirect action is applied, even if multiple apply. Maximum number of specifications is 1000. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string redirect_control_ids = 10;

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

repeated string replacement_control_ids = 14;

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

repeated string replacement_control_ids = 14;

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

repeated string replacement_control_ids = 14;

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

repeated string replacement_control_ids = 14;

Returns
TypeDescription
ProtocolStringList

A list containing the replacementControlIds.

getSolutionTypes(int index)

public SolutionType getSolutionTypes(int index)

Required. Immutable. Specifies the solution types that a serving config can be associated with. Currently we support setting only one type of solution.

repeated .google.cloud.retail.v2alpha.SolutionType solution_types = 19 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
SolutionType

The solutionTypes at the given index.

getSolutionTypesCount()

public int getSolutionTypesCount()

Required. Immutable. Specifies the solution types that a serving config can be associated with. Currently we support setting only one type of solution.

repeated .google.cloud.retail.v2alpha.SolutionType solution_types = 19 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
TypeDescription
int

The count of solutionTypes.

getSolutionTypesList()

public List<SolutionType> getSolutionTypesList()

Required. Immutable. Specifies the solution types that a serving config can be associated with. Currently we support setting only one type of solution.

repeated .google.cloud.retail.v2alpha.SolutionType solution_types = 19 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
TypeDescription
List<SolutionType>

A list containing the solutionTypes.

getSolutionTypesValue(int index)

public int getSolutionTypesValue(int index)

Required. Immutable. Specifies the solution types that a serving config can be associated with. Currently we support setting only one type of solution.

repeated .google.cloud.retail.v2alpha.SolutionType solution_types = 19 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
int

The enum numeric value on the wire of solutionTypes at the given index.

getSolutionTypesValueList()

public List<Integer> getSolutionTypesValueList()

Required. Immutable. Specifies the solution types that a serving config can be associated with. Currently we support setting only one type of solution.

repeated .google.cloud.retail.v2alpha.SolutionType solution_types = 19 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
TypeDescription
List<Integer>

A list containing the enum numeric values on the wire for solutionTypes.

getTwowaySynonymsControlIds(int index)

public String getTwowaySynonymsControlIds(int index)

Condition synonyms specifications. If multiple syonyms conditions match, all matching synonyms control in the list will execute. Order of controls in the list will not matter. Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string twoway_synonyms_control_ids = 18;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The twowaySynonymsControlIds at the given index.

getTwowaySynonymsControlIdsBytes(int index)

public ByteString getTwowaySynonymsControlIdsBytes(int index)

Condition synonyms specifications. If multiple syonyms conditions match, all matching synonyms control in the list will execute. Order of controls in the list will not matter. Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string twoway_synonyms_control_ids = 18;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the twowaySynonymsControlIds at the given index.

getTwowaySynonymsControlIdsCount()

public int getTwowaySynonymsControlIdsCount()

Condition synonyms specifications. If multiple syonyms conditions match, all matching synonyms control in the list will execute. Order of controls in the list will not matter. Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string twoway_synonyms_control_ids = 18;

Returns
TypeDescription
int

The count of twowaySynonymsControlIds.

getTwowaySynonymsControlIdsList()

public ProtocolStringList getTwowaySynonymsControlIdsList()

Condition synonyms specifications. If multiple syonyms conditions match, all matching synonyms control in the list will execute. Order of controls in the list will not matter. Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string twoway_synonyms_control_ids = 18;

Returns
TypeDescription
ProtocolStringList

A list containing the twowaySynonymsControlIds.

hasDynamicFacetSpec()

public boolean hasDynamicFacetSpec()

The specification for dynamically generated facets. Notice that only textual facets can be dynamically generated. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

.google.cloud.retail.v2alpha.SearchRequest.DynamicFacetSpec dynamic_facet_spec = 6;

Returns
TypeDescription
boolean

Whether the dynamicFacetSpec field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeDynamicFacetSpec(SearchRequest.DynamicFacetSpec value)

public ServingConfig.Builder mergeDynamicFacetSpec(SearchRequest.DynamicFacetSpec value)

The specification for dynamically generated facets. Notice that only textual facets can be dynamically generated. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

.google.cloud.retail.v2alpha.SearchRequest.DynamicFacetSpec dynamic_facet_spec = 6;

Parameter
NameDescription
valueSearchRequest.DynamicFacetSpec
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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ServingConfig.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
ServingConfig.Builder
Overrides

setBoostControlIds(int index, String value)

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

Condition boost specifications. If a product matches multiple conditions in the specifications, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 100. Notice that if both ServingConfig.boost_control_ids and SearchRequest.boost_spec are set, the boost conditions from both places are evaluated. If a search request matches multiple boost conditions, the final boost score is equal to the sum of the boost scores from all matched boost conditions. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string boost_control_ids = 7;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The boostControlIds to set.

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

setDisplayName(String value)

public ServingConfig.Builder setDisplayName(String value)

Required. The human readable serving config display name. Used in Retail 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 Retail 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.

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

string diversity_level = 8;

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

string diversity_level = 8;

Parameter
NameDescription
valueByteString

The bytes for diversityLevel to set.

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

setDoNotAssociateControlIds(int index, String value)

public ServingConfig.Builder setDoNotAssociateControlIds(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 solution_types is SOLUTION_TYPE_SEARCH.

repeated string do_not_associate_control_ids = 13;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The doNotAssociateControlIds to set.

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

setDynamicFacetSpec(SearchRequest.DynamicFacetSpec value)

public ServingConfig.Builder setDynamicFacetSpec(SearchRequest.DynamicFacetSpec value)

The specification for dynamically generated facets. Notice that only textual facets can be dynamically generated. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

.google.cloud.retail.v2alpha.SearchRequest.DynamicFacetSpec dynamic_facet_spec = 6;

Parameter
NameDescription
valueSearchRequest.DynamicFacetSpec
Returns
TypeDescription
ServingConfig.Builder

setDynamicFacetSpec(SearchRequest.DynamicFacetSpec.Builder builderForValue)

public ServingConfig.Builder setDynamicFacetSpec(SearchRequest.DynamicFacetSpec.Builder builderForValue)

The specification for dynamically generated facets. Notice that only textual facets can be dynamically generated. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

.google.cloud.retail.v2alpha.SearchRequest.DynamicFacetSpec dynamic_facet_spec = 6;

Parameter
NameDescription
builderForValueSearchRequest.DynamicFacetSpec.Builder
Returns
TypeDescription
ServingConfig.Builder

setEnableCategoryFilterLevel(String value)

public ServingConfig.Builder setEnableCategoryFilterLevel(String value)

Whether to add additional category filters on the 'similar-items' model. If not specified, we enable it by default. Allowed values are:

  • 'no-category-match': No additional filtering of original results from the model and the customer's filters.
  • 'relaxed-category-match': Only keep results with categories that match at least one item categories in the PredictRequests's context item.
    • If customer also sends filters in the PredictRequest, then the results will satisfy both conditions (user given and category match). Can only be set if solution_types is SOLUTION_TYPE_RECOMMENDATION.

string enable_category_filter_level = 16;

Parameter
NameDescription
valueString

The enableCategoryFilterLevel to set.

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

setEnableCategoryFilterLevelBytes(ByteString value)

public ServingConfig.Builder setEnableCategoryFilterLevelBytes(ByteString value)

Whether to add additional category filters on the 'similar-items' model. If not specified, we enable it by default. Allowed values are:

  • 'no-category-match': No additional filtering of original results from the model and the customer's filters.
  • 'relaxed-category-match': Only keep results with categories that match at least one item categories in the PredictRequests's context item.
    • If customer also sends filters in the PredictRequest, then the results will satisfy both conditions (user given and category match). Can only be set if solution_types is SOLUTION_TYPE_RECOMMENDATION.

string enable_category_filter_level = 16;

Parameter
NameDescription
valueByteString

The bytes for enableCategoryFilterLevel to set.

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

setFacetControlIds(int index, String value)

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

Facet specifications for faceted search. If empty, no facets are returned. The ids refer to the ids of Control resources with only the Facet control set. These controls are assumed to be in the same Catalog as the ServingConfig. A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error is returned. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string facet_control_ids = 5;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The facetControlIds to set.

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

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)

Condition filter specifications. If a product matches multiple conditions in the specifications, filters from these specifications are all applied and combined via the AND operator. Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string filter_control_ids = 9;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The filterControlIds to set.

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

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. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string ignore_control_ids = 15;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The ignoreControlIds to set.

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

setModelId(String value)

public ServingConfig.Builder setModelId(String value)

The id of the model to use at serving time. Currently only RecommendationModels are supported: https://cloud.google.com/retail/recommendations-ai/docs/create-models Can be changed but only to a compatible model (e.g. others-you-may-like CTR to others-you-may-like CVR). Required when solution_types is SOLUTION_TYPE_RECOMMENDATION.

string model_id = 3;

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: https://cloud.google.com/retail/recommendations-ai/docs/create-models Can be changed but only to a compatible model (e.g. others-you-may-like CTR to others-you-may-like CVR). Required when solution_types is SOLUTION_TYPE_RECOMMENDATION.

string model_id = 3;

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/*/locations/global/catalogs/*/servingConfig/*

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/*/locations/global/catalogs/*/servingConfig/*

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. Order of controls in the list will not matter. Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string oneway_synonyms_control_ids = 12;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The onewaySynonymsControlIds to set.

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

setPriceRerankingLevel(String value)

public ServingConfig.Builder setPriceRerankingLevel(String value)

How much price ranking we want in serving results. Price reranking causes product items with a similar recommendation probability to be ordered by price, with the highest-priced items first. This setting could result in a decrease in click-through and conversion rates. Allowed values are:

  • 'no-price-reranking'
  • 'low-price-raranking'
  • 'medium-price-reranking'
  • 'high-price-reranking' If not specified, we choose default based on model type. Default value: 'no-price-reranking'. Can only be set if solution_types is SOLUTION_TYPE_RECOMMENDATION.

string price_reranking_level = 4;

Parameter
NameDescription
valueString

The priceRerankingLevel to set.

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

setPriceRerankingLevelBytes(ByteString value)

public ServingConfig.Builder setPriceRerankingLevelBytes(ByteString value)

How much price ranking we want in serving results. Price reranking causes product items with a similar recommendation probability to be ordered by price, with the highest-priced items first. This setting could result in a decrease in click-through and conversion rates. Allowed values are:

  • 'no-price-reranking'
  • 'low-price-raranking'
  • 'medium-price-reranking'
  • 'high-price-reranking' If not specified, we choose default based on model type. Default value: 'no-price-reranking'. Can only be set if solution_types is SOLUTION_TYPE_RECOMMENDATION.

string price_reranking_level = 4;

Parameter
NameDescription
valueByteString

The bytes for priceRerankingLevel to set.

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

setRedirectControlIds(int index, String value)

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

Condition redirect specifications. Only the first triggered redirect action is applied, even if multiple apply. Maximum number of specifications is 1000. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string redirect_control_ids = 10;

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

repeated string replacement_control_ids = 14;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The replacementControlIds to set.

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

setSolutionTypes(int index, SolutionType value)

public ServingConfig.Builder setSolutionTypes(int index, SolutionType value)

Required. Immutable. Specifies the solution types that a serving config can be associated with. Currently we support setting only one type of solution.

repeated .google.cloud.retail.v2alpha.SolutionType solution_types = 19 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameters
NameDescription
indexint

The index to set the value at.

valueSolutionType

The solutionTypes to set.

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

setSolutionTypesValue(int index, int value)

public ServingConfig.Builder setSolutionTypesValue(int index, int value)

Required. Immutable. Specifies the solution types that a serving config can be associated with. Currently we support setting only one type of solution.

repeated .google.cloud.retail.v2alpha.SolutionType solution_types = 19 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameters
NameDescription
indexint

The index to set the value at.

valueint

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

Returns
TypeDescription
ServingConfig.Builder

This builder for chaining.

setTwowaySynonymsControlIds(int index, String value)

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

Condition synonyms specifications. If multiple syonyms conditions match, all matching synonyms control in the list will execute. Order of controls in the list will not matter. Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.

repeated string twoway_synonyms_control_ids = 18;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The twowaySynonymsControlIds 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