Class Control (2.14.0)

public final class Control extends GeneratedMessageV3 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 Fields

ASSOCIATED_SERVING_CONFIG_IDS_FIELD_NUMBER

public static final int ASSOCIATED_SERVING_CONFIG_IDS_FIELD_NUMBER
Field Value
TypeDescription
int

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

RULE_FIELD_NUMBER

public static final int RULE_FIELD_NUMBER
Field Value
TypeDescription
int

SEARCH_SOLUTION_USE_CASE_FIELD_NUMBER

public static final int SEARCH_SOLUTION_USE_CASE_FIELD_NUMBER
Field Value
TypeDescription
int

SOLUTION_TYPES_FIELD_NUMBER

public static final int SOLUTION_TYPES_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Control getDefaultInstance()
Returns
TypeDescription
Control

getDescriptor()

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

newBuilder()

public static Control.Builder newBuilder()
Returns
TypeDescription
Control.Builder

newBuilder(Control prototype)

public static Control.Builder newBuilder(Control prototype)
Parameter
NameDescription
prototypeControl
Returns
TypeDescription
Control.Builder

parseDelimitedFrom(InputStream input)

public static Control parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Control
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Control parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Control
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Control parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Control
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Control parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Control
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Control parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Control
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Control parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Control
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Control parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Control
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Control parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Control
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Control parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Control
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Control parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Control
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Control parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Control
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Control parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Control
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Control> parser()
Returns
TypeDescription
Parser<Control>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
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

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.

getParserForType()

public Parser<Control> getParserForType()
Returns
TypeDescription
Parser<Control>
Overrides

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.

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.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

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.

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

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.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Control.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Control.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

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

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException