Class Control.Builder (2.14.0)

public static final class Control.Builder extends GeneratedMessageV3.Builder<Control.Builder> implements ControlOrBuilder

Configures dynamic metadata that can be linked to a ServingConfig and affect search or recommendation results at serving time.

Protobuf type google.cloud.retail.v2.Control

Implements

ControlOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllAssociatedServingConfigIds(Iterable<String> values)

public Control.Builder addAllAssociatedServingConfigIds(Iterable<String> values)

Output only. List of serving config ids that are associated with this control in the same Catalog. Note the association is managed via the ServingConfig, this is an output only denormalized view.

repeated string associated_serving_config_ids = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valuesIterable<String>

The associatedServingConfigIds to add.

Returns
TypeDescription
Control.Builder

This builder for chaining.

addAllSearchSolutionUseCase(Iterable<? extends SearchSolutionUseCase> values)

public Control.Builder addAllSearchSolutionUseCase(Iterable<? extends SearchSolutionUseCase> values)

Specifies the use case for the control. Affects what condition fields can be set. Only settable by search controls. Will default to SEARCH_SOLUTION_USE_CASE_SEARCH if not specified. Currently only allow one search_solution_use_case per control.

repeated .google.cloud.retail.v2.SearchSolutionUseCase search_solution_use_case = 7;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.retail.v2.SearchSolutionUseCase>

The searchSolutionUseCase to add.

Returns
TypeDescription
Control.Builder

This builder for chaining.

addAllSearchSolutionUseCaseValue(Iterable<Integer> values)

public Control.Builder addAllSearchSolutionUseCaseValue(Iterable<Integer> values)

Specifies the use case for the control. Affects what condition fields can be set. Only settable by search controls. Will default to SEARCH_SOLUTION_USE_CASE_SEARCH if not specified. Currently only allow one search_solution_use_case per control.

repeated .google.cloud.retail.v2.SearchSolutionUseCase search_solution_use_case = 7;

Parameter
NameDescription
valuesIterable<Integer>

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

Returns
TypeDescription
Control.Builder

This builder for chaining.

addAllSolutionTypes(Iterable<? extends SolutionType> values)

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

Required. Immutable. The solution types that the control is used for. Currently we support setting only one type of solution at creation time. Only SOLUTION_TYPE_SEARCH value is supported at the moment. If no solution type is provided at creation time, will default to SOLUTION_TYPE_SEARCH.

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

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

The solutionTypes to add.

Returns
TypeDescription
Control.Builder

This builder for chaining.

addAllSolutionTypesValue(Iterable<Integer> values)

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

Required. Immutable. The solution types that the control is used for. Currently we support setting only one type of solution at creation time. Only SOLUTION_TYPE_SEARCH value is supported at the moment. If no solution type is provided at creation time, will default to SOLUTION_TYPE_SEARCH.

repeated .google.cloud.retail.v2.SolutionType solution_types = 6 [(.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
Control.Builder

This builder for chaining.

addAssociatedServingConfigIds(String value)

public Control.Builder addAssociatedServingConfigIds(String value)

Output only. List of serving config ids that are associated with this control in the same Catalog. Note the association is managed via the ServingConfig, this is an output only denormalized view.

repeated string associated_serving_config_ids = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueString

The associatedServingConfigIds to add.

Returns
TypeDescription
Control.Builder

This builder for chaining.

addAssociatedServingConfigIdsBytes(ByteString value)

public Control.Builder addAssociatedServingConfigIdsBytes(ByteString value)

Output only. List of serving config ids that are associated with this control in the same Catalog. Note the association is managed via the ServingConfig, this is an output only denormalized view.

repeated string associated_serving_config_ids = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueByteString

The bytes of the associatedServingConfigIds to add.

Returns
TypeDescription
Control.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Control.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Control.Builder
Overrides

addSearchSolutionUseCase(SearchSolutionUseCase value)

public Control.Builder addSearchSolutionUseCase(SearchSolutionUseCase value)

Specifies the use case for the control. Affects what condition fields can be set. Only settable by search controls. Will default to SEARCH_SOLUTION_USE_CASE_SEARCH if not specified. Currently only allow one search_solution_use_case per control.

repeated .google.cloud.retail.v2.SearchSolutionUseCase search_solution_use_case = 7;

Parameter
NameDescription
valueSearchSolutionUseCase

The searchSolutionUseCase to add.

Returns
TypeDescription
Control.Builder

This builder for chaining.

addSearchSolutionUseCaseValue(int value)

public Control.Builder addSearchSolutionUseCaseValue(int value)

Specifies the use case for the control. Affects what condition fields can be set. Only settable by search controls. Will default to SEARCH_SOLUTION_USE_CASE_SEARCH if not specified. Currently only allow one search_solution_use_case per control.

repeated .google.cloud.retail.v2.SearchSolutionUseCase search_solution_use_case = 7;

Parameter
NameDescription
valueint

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

Returns
TypeDescription
Control.Builder

This builder for chaining.

addSolutionTypes(SolutionType value)

public Control.Builder addSolutionTypes(SolutionType value)

Required. Immutable. The solution types that the control is used for. Currently we support setting only one type of solution at creation time. Only SOLUTION_TYPE_SEARCH value is supported at the moment. If no solution type is provided at creation time, will default to SOLUTION_TYPE_SEARCH.

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

Parameter
NameDescription
valueSolutionType

The solutionTypes to add.

Returns
TypeDescription
Control.Builder

This builder for chaining.

addSolutionTypesValue(int value)

public Control.Builder addSolutionTypesValue(int value)

Required. Immutable. The solution types that the control is used for. Currently we support setting only one type of solution at creation time. Only SOLUTION_TYPE_SEARCH value is supported at the moment. If no solution type is provided at creation time, will default to SOLUTION_TYPE_SEARCH.

repeated .google.cloud.retail.v2.SolutionType solution_types = 6 [(.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
Control.Builder

This builder for chaining.

build()

public Control build()
Returns
TypeDescription
Control

buildPartial()

public Control buildPartial()
Returns
TypeDescription
Control

clear()

public Control.Builder clear()
Returns
TypeDescription
Control.Builder
Overrides

clearAssociatedServingConfigIds()

public Control.Builder clearAssociatedServingConfigIds()

Output only. List of serving config ids that are associated with this control in the same Catalog. Note the association is managed via the ServingConfig, this is an output only denormalized view.

repeated string associated_serving_config_ids = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Control.Builder

This builder for chaining.

clearControl()

public Control.Builder clearControl()
Returns
TypeDescription
Control.Builder

clearDisplayName()

public Control.Builder clearDisplayName()

Required. The human readable control 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 thrown.

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

Returns
TypeDescription
Control.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearName()

public Control.Builder clearName()

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

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

Returns
TypeDescription
Control.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Control.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Control.Builder
Overrides

clearRule()

public Control.Builder clearRule()

A rule control - a condition-action pair. Enacts a set action when the condition is triggered. For example: Boost "gShoe" when query full matches "Running Shoes".

.google.cloud.retail.v2.Rule rule = 4;

Returns
TypeDescription
Control.Builder

clearSearchSolutionUseCase()

public Control.Builder clearSearchSolutionUseCase()

Specifies the use case for the control. Affects what condition fields can be set. Only settable by search controls. Will default to SEARCH_SOLUTION_USE_CASE_SEARCH if not specified. Currently only allow one search_solution_use_case per control.

repeated .google.cloud.retail.v2.SearchSolutionUseCase search_solution_use_case = 7;

Returns
TypeDescription
Control.Builder

This builder for chaining.

clearSolutionTypes()

public Control.Builder clearSolutionTypes()

Required. Immutable. The solution types that the control is used for. Currently we support setting only one type of solution at creation time. Only SOLUTION_TYPE_SEARCH value is supported at the moment. If no solution type is provided at creation time, will default to SOLUTION_TYPE_SEARCH.

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

Returns
TypeDescription
Control.Builder

This builder for chaining.

clone()

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

getAssociatedServingConfigIds(int index)

public String getAssociatedServingConfigIds(int index)

Output only. List of serving config ids that are associated with this control in the same Catalog. Note the association is managed via the ServingConfig, this is an output only denormalized view.

repeated string associated_serving_config_ids = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The associatedServingConfigIds at the given index.

getAssociatedServingConfigIdsBytes(int index)

public ByteString getAssociatedServingConfigIdsBytes(int index)

Output only. List of serving config ids that are associated with this control in the same Catalog. Note the association is managed via the ServingConfig, this is an output only denormalized view.

repeated string associated_serving_config_ids = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the associatedServingConfigIds at the given index.

getAssociatedServingConfigIdsCount()

public int getAssociatedServingConfigIdsCount()

Output only. List of serving config ids that are associated with this control in the same Catalog. Note the association is managed via the ServingConfig, this is an output only denormalized view.

repeated string associated_serving_config_ids = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
int

The count of associatedServingConfigIds.

getAssociatedServingConfigIdsList()

public ProtocolStringList getAssociatedServingConfigIdsList()

Output only. List of serving config ids that are associated with this control in the same Catalog. Note the association is managed via the ServingConfig, this is an output only denormalized view.

repeated string associated_serving_config_ids = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ProtocolStringList

A list containing the associatedServingConfigIds.

getControlCase()

public Control.ControlCase getControlCase()
Returns
TypeDescription
Control.ControlCase

getDefaultInstanceForType()

public Control getDefaultInstanceForType()
Returns
TypeDescription
Control

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDisplayName()

public String getDisplayName()

Required. The human readable control 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 thrown.

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

Returns
TypeDescription
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Required. The human readable control 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 thrown.

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

Returns
TypeDescription
ByteString

The bytes for displayName.

getName()

public String getName()

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

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/*/controls/*

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

Returns
TypeDescription
ByteString

The bytes for name.

getRule()

public Rule getRule()

A rule control - a condition-action pair. Enacts a set action when the condition is triggered. For example: Boost "gShoe" when query full matches "Running Shoes".

.google.cloud.retail.v2.Rule rule = 4;

Returns
TypeDescription
Rule

The rule.

getRuleBuilder()

public Rule.Builder getRuleBuilder()

A rule control - a condition-action pair. Enacts a set action when the condition is triggered. For example: Boost "gShoe" when query full matches "Running Shoes".

.google.cloud.retail.v2.Rule rule = 4;

Returns
TypeDescription
Rule.Builder

getRuleOrBuilder()

public RuleOrBuilder getRuleOrBuilder()

A rule control - a condition-action pair. Enacts a set action when the condition is triggered. For example: Boost "gShoe" when query full matches "Running Shoes".

.google.cloud.retail.v2.Rule rule = 4;

Returns
TypeDescription
RuleOrBuilder

getSearchSolutionUseCase(int index)

public SearchSolutionUseCase getSearchSolutionUseCase(int index)

Specifies the use case for the control. Affects what condition fields can be set. Only settable by search controls. Will default to SEARCH_SOLUTION_USE_CASE_SEARCH if not specified. Currently only allow one search_solution_use_case per control.

repeated .google.cloud.retail.v2.SearchSolutionUseCase search_solution_use_case = 7;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
SearchSolutionUseCase

The searchSolutionUseCase at the given index.

getSearchSolutionUseCaseCount()

public int getSearchSolutionUseCaseCount()

Specifies the use case for the control. Affects what condition fields can be set. Only settable by search controls. Will default to SEARCH_SOLUTION_USE_CASE_SEARCH if not specified. Currently only allow one search_solution_use_case per control.

repeated .google.cloud.retail.v2.SearchSolutionUseCase search_solution_use_case = 7;

Returns
TypeDescription
int

The count of searchSolutionUseCase.

getSearchSolutionUseCaseList()

public List<SearchSolutionUseCase> getSearchSolutionUseCaseList()

Specifies the use case for the control. Affects what condition fields can be set. Only settable by search controls. Will default to SEARCH_SOLUTION_USE_CASE_SEARCH if not specified. Currently only allow one search_solution_use_case per control.

repeated .google.cloud.retail.v2.SearchSolutionUseCase search_solution_use_case = 7;

Returns
TypeDescription
List<SearchSolutionUseCase>

A list containing the searchSolutionUseCase.

getSearchSolutionUseCaseValue(int index)

public int getSearchSolutionUseCaseValue(int index)

Specifies the use case for the control. Affects what condition fields can be set. Only settable by search controls. Will default to SEARCH_SOLUTION_USE_CASE_SEARCH if not specified. Currently only allow one search_solution_use_case per control.

repeated .google.cloud.retail.v2.SearchSolutionUseCase search_solution_use_case = 7;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
int

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

getSearchSolutionUseCaseValueList()

public List<Integer> getSearchSolutionUseCaseValueList()

Specifies the use case for the control. Affects what condition fields can be set. Only settable by search controls. Will default to SEARCH_SOLUTION_USE_CASE_SEARCH if not specified. Currently only allow one search_solution_use_case per control.

repeated .google.cloud.retail.v2.SearchSolutionUseCase search_solution_use_case = 7;

Returns
TypeDescription
List<Integer>

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

getSolutionTypes(int index)

public SolutionType getSolutionTypes(int index)

Required. Immutable. The solution types that the control is used for. Currently we support setting only one type of solution at creation time. Only SOLUTION_TYPE_SEARCH value is supported at the moment. If no solution type is provided at creation time, will default to SOLUTION_TYPE_SEARCH.

repeated .google.cloud.retail.v2.SolutionType solution_types = 6 [(.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. The solution types that the control is used for. Currently we support setting only one type of solution at creation time. Only SOLUTION_TYPE_SEARCH value is supported at the moment. If no solution type is provided at creation time, will default to SOLUTION_TYPE_SEARCH.

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

Returns
TypeDescription
int

The count of solutionTypes.

getSolutionTypesList()

public List<SolutionType> getSolutionTypesList()

Required. Immutable. The solution types that the control is used for. Currently we support setting only one type of solution at creation time. Only SOLUTION_TYPE_SEARCH value is supported at the moment. If no solution type is provided at creation time, will default to SOLUTION_TYPE_SEARCH.

repeated .google.cloud.retail.v2.SolutionType solution_types = 6 [(.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. The solution types that the control is used for. Currently we support setting only one type of solution at creation time. Only SOLUTION_TYPE_SEARCH value is supported at the moment. If no solution type is provided at creation time, will default to SOLUTION_TYPE_SEARCH.

repeated .google.cloud.retail.v2.SolutionType solution_types = 6 [(.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. The solution types that the control is used for. Currently we support setting only one type of solution at creation time. Only SOLUTION_TYPE_SEARCH value is supported at the moment. If no solution type is provided at creation time, will default to SOLUTION_TYPE_SEARCH.

repeated .google.cloud.retail.v2.SolutionType solution_types = 6 [(.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.

hasRule()

public boolean hasRule()

A rule control - a condition-action pair. Enacts a set action when the condition is triggered. For example: Boost "gShoe" when query full matches "Running Shoes".

.google.cloud.retail.v2.Rule rule = 4;

Returns
TypeDescription
boolean

Whether the rule field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Control other)

public Control.Builder mergeFrom(Control other)
Parameter
NameDescription
otherControl
Returns
TypeDescription
Control.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public Control.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Control.Builder
Overrides

mergeRule(Rule value)

public Control.Builder mergeRule(Rule value)

A rule control - a condition-action pair. Enacts a set action when the condition is triggered. For example: Boost "gShoe" when query full matches "Running Shoes".

.google.cloud.retail.v2.Rule rule = 4;

Parameter
NameDescription
valueRule
Returns
TypeDescription
Control.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setAssociatedServingConfigIds(int index, String value)

public Control.Builder setAssociatedServingConfigIds(int index, String value)

Output only. List of serving config ids that are associated with this control in the same Catalog. Note the association is managed via the ServingConfig, this is an output only denormalized view.

repeated string associated_serving_config_ids = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The associatedServingConfigIds to set.

Returns
TypeDescription
Control.Builder

This builder for chaining.

setDisplayName(String value)

public Control.Builder setDisplayName(String value)

Required. The human readable control 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 thrown.

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

Parameter
NameDescription
valueString

The displayName to set.

Returns
TypeDescription
Control.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public Control.Builder setDisplayNameBytes(ByteString value)

Required. The human readable control 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 thrown.

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

Parameter
NameDescription
valueByteString

The bytes for displayName to set.

Returns
TypeDescription
Control.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Control.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Control.Builder
Overrides

setName(String value)

public Control.Builder setName(String value)

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

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

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
Control.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Control.Builder setNameBytes(ByteString value)

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

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

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
Control.Builder

This builder for chaining.

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

public Control.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Control.Builder
Overrides

setRule(Rule value)

public Control.Builder setRule(Rule value)

A rule control - a condition-action pair. Enacts a set action when the condition is triggered. For example: Boost "gShoe" when query full matches "Running Shoes".

.google.cloud.retail.v2.Rule rule = 4;

Parameter
NameDescription
valueRule
Returns
TypeDescription
Control.Builder

setRule(Rule.Builder builderForValue)

public Control.Builder setRule(Rule.Builder builderForValue)

A rule control - a condition-action pair. Enacts a set action when the condition is triggered. For example: Boost "gShoe" when query full matches "Running Shoes".

.google.cloud.retail.v2.Rule rule = 4;

Parameter
NameDescription
builderForValueRule.Builder
Returns
TypeDescription
Control.Builder

setSearchSolutionUseCase(int index, SearchSolutionUseCase value)

public Control.Builder setSearchSolutionUseCase(int index, SearchSolutionUseCase value)

Specifies the use case for the control. Affects what condition fields can be set. Only settable by search controls. Will default to SEARCH_SOLUTION_USE_CASE_SEARCH if not specified. Currently only allow one search_solution_use_case per control.

repeated .google.cloud.retail.v2.SearchSolutionUseCase search_solution_use_case = 7;

Parameters
NameDescription
indexint

The index to set the value at.

valueSearchSolutionUseCase

The searchSolutionUseCase to set.

Returns
TypeDescription
Control.Builder

This builder for chaining.

setSearchSolutionUseCaseValue(int index, int value)

public Control.Builder setSearchSolutionUseCaseValue(int index, int value)

Specifies the use case for the control. Affects what condition fields can be set. Only settable by search controls. Will default to SEARCH_SOLUTION_USE_CASE_SEARCH if not specified. Currently only allow one search_solution_use_case per control.

repeated .google.cloud.retail.v2.SearchSolutionUseCase search_solution_use_case = 7;

Parameters
NameDescription
indexint

The index to set the value at.

valueint

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

Returns
TypeDescription
Control.Builder

This builder for chaining.

setSolutionTypes(int index, SolutionType value)

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

Required. Immutable. The solution types that the control is used for. Currently we support setting only one type of solution at creation time. Only SOLUTION_TYPE_SEARCH value is supported at the moment. If no solution type is provided at creation time, will default to SOLUTION_TYPE_SEARCH.

repeated .google.cloud.retail.v2.SolutionType solution_types = 6 [(.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
Control.Builder

This builder for chaining.

setSolutionTypesValue(int index, int value)

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

Required. Immutable. The solution types that the control is used for. Currently we support setting only one type of solution at creation time. Only SOLUTION_TYPE_SEARCH value is supported at the moment. If no solution type is provided at creation time, will default to SOLUTION_TYPE_SEARCH.

repeated .google.cloud.retail.v2.SolutionType solution_types = 6 [(.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
Control.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Control.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Control.Builder
Overrides