Class Control (0.42.0)

public final class Control extends GeneratedMessageV3 implements ControlOrBuilder

Defines a conditioned behavior to employ during serving. Must be attached to a [ServingConfig][] to be considered at serving time. Permitted actions dependent on SolutionType.

Protobuf type google.cloud.discoveryengine.v1.Control

Implements

ControlOrBuilder

Static Fields

ASSOCIATED_SERVING_CONFIG_IDS_FIELD_NUMBER

public static final int ASSOCIATED_SERVING_CONFIG_IDS_FIELD_NUMBER
Field Value
Type Description
int

BOOST_ACTION_FIELD_NUMBER

public static final int BOOST_ACTION_FIELD_NUMBER
Field Value
Type Description
int

CONDITIONS_FIELD_NUMBER

public static final int CONDITIONS_FIELD_NUMBER
Field Value
Type Description
int

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
Type Description
int

FILTER_ACTION_FIELD_NUMBER

public static final int FILTER_ACTION_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

REDIRECT_ACTION_FIELD_NUMBER

public static final int REDIRECT_ACTION_FIELD_NUMBER
Field Value
Type Description
int

SOLUTION_TYPE_FIELD_NUMBER

public static final int SOLUTION_TYPE_FIELD_NUMBER
Field Value
Type Description
int

SYNONYMS_ACTION_FIELD_NUMBER

public static final int SYNONYMS_ACTION_FIELD_NUMBER
Field Value
Type Description
int

USE_CASES_FIELD_NUMBER

public static final int USE_CASES_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Control getDefaultInstance()
Returns
Type Description
Control

getDescriptor()

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

newBuilder()

public static Control.Builder newBuilder()
Returns
Type Description
Control.Builder

newBuilder(Control prototype)

public static Control.Builder newBuilder(Control prototype)
Parameter
Name Description
prototype Control
Returns
Type Description
Control.Builder

parseDelimitedFrom(InputStream input)

public static Control parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Control
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Control parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Control
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Control parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Control
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Control parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Control
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Control parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Control
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Control parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Control
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Control parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Control
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Control parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Control
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Control parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Control
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Control parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Control
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Control parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Control
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Control parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Control
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Control> parser()
Returns
Type Description
Parser<Control>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getActionCase()

public Control.ActionCase getActionCase()
Returns
Type Description
Control.ActionCase

getAssociatedServingConfigIds(int index)

public String getAssociatedServingConfigIds(int index)

Output only. List of all [ServingConfig][] ids this control is attached to. May take up to 10 minutes to update after changes.

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

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The associatedServingConfigIds at the given index.

getAssociatedServingConfigIdsBytes(int index)

public ByteString getAssociatedServingConfigIdsBytes(int index)

Output only. List of all [ServingConfig][] ids this control is attached to. May take up to 10 minutes to update after changes.

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

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the associatedServingConfigIds at the given index.

getAssociatedServingConfigIdsCount()

public int getAssociatedServingConfigIdsCount()

Output only. List of all [ServingConfig][] ids this control is attached to. May take up to 10 minutes to update after changes.

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

Returns
Type Description
int

The count of associatedServingConfigIds.

getAssociatedServingConfigIdsList()

public ProtocolStringList getAssociatedServingConfigIdsList()

Output only. List of all [ServingConfig][] ids this control is attached to. May take up to 10 minutes to update after changes.

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

Returns
Type Description
ProtocolStringList

A list containing the associatedServingConfigIds.

getBoostAction()

public Control.BoostAction getBoostAction()

Defines a boost-type control

.google.cloud.discoveryengine.v1.Control.BoostAction boost_action = 6;

Returns
Type Description
Control.BoostAction

The boostAction.

getBoostActionOrBuilder()

public Control.BoostActionOrBuilder getBoostActionOrBuilder()

Defines a boost-type control

.google.cloud.discoveryengine.v1.Control.BoostAction boost_action = 6;

Returns
Type Description
Control.BoostActionOrBuilder

getConditions(int index)

public Condition getConditions(int index)

Determines when the associated action will trigger.

Omit to always apply the action. Currently only a single condition may be specified. Otherwise an INVALID ARGUMENT error is thrown.

repeated .google.cloud.discoveryengine.v1.Condition conditions = 5;

Parameter
Name Description
index int
Returns
Type Description
Condition

getConditionsCount()

public int getConditionsCount()

Determines when the associated action will trigger.

Omit to always apply the action. Currently only a single condition may be specified. Otherwise an INVALID ARGUMENT error is thrown.

repeated .google.cloud.discoveryengine.v1.Condition conditions = 5;

Returns
Type Description
int

getConditionsList()

public List<Condition> getConditionsList()

Determines when the associated action will trigger.

Omit to always apply the action. Currently only a single condition may be specified. Otherwise an INVALID ARGUMENT error is thrown.

repeated .google.cloud.discoveryengine.v1.Condition conditions = 5;

Returns
Type Description
List<Condition>

getConditionsOrBuilder(int index)

public ConditionOrBuilder getConditionsOrBuilder(int index)

Determines when the associated action will trigger.

Omit to always apply the action. Currently only a single condition may be specified. Otherwise an INVALID ARGUMENT error is thrown.

repeated .google.cloud.discoveryengine.v1.Condition conditions = 5;

Parameter
Name Description
index int
Returns
Type Description
ConditionOrBuilder

getConditionsOrBuilderList()

public List<? extends ConditionOrBuilder> getConditionsOrBuilderList()

Determines when the associated action will trigger.

Omit to always apply the action. Currently only a single condition may be specified. Otherwise an INVALID ARGUMENT error is thrown.

repeated .google.cloud.discoveryengine.v1.Condition conditions = 5;

Returns
Type Description
List<? extends com.google.cloud.discoveryengine.v1.ConditionOrBuilder>

getDefaultInstanceForType()

public Control getDefaultInstanceForType()
Returns
Type Description
Control

getDisplayName()

public String getDisplayName()

Required. Human readable name. The identifier used in UI views.

Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an INVALID ARGUMENT error is thrown.

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

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Required. Human readable name. The identifier used in UI views.

Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an INVALID ARGUMENT error is thrown.

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

Returns
Type Description
ByteString

The bytes for displayName.

getFilterAction()

public Control.FilterAction getFilterAction()

Defines a filter-type control Currently not supported by Recommendation

.google.cloud.discoveryengine.v1.Control.FilterAction filter_action = 7;

Returns
Type Description
Control.FilterAction

The filterAction.

getFilterActionOrBuilder()

public Control.FilterActionOrBuilder getFilterActionOrBuilder()

Defines a filter-type control Currently not supported by Recommendation

.google.cloud.discoveryengine.v1.Control.FilterAction filter_action = 7;

Returns
Type Description
Control.FilterActionOrBuilder

getName()

public String getName()

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

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

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

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

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

Returns
Type Description
ByteString

The bytes for name.

getParserForType()

public Parser<Control> getParserForType()
Returns
Type Description
Parser<Control>
Overrides

getRedirectAction()

public Control.RedirectAction getRedirectAction()

Defines a redirect-type control.

.google.cloud.discoveryengine.v1.Control.RedirectAction redirect_action = 9;

Returns
Type Description
Control.RedirectAction

The redirectAction.

getRedirectActionOrBuilder()

public Control.RedirectActionOrBuilder getRedirectActionOrBuilder()

Defines a redirect-type control.

.google.cloud.discoveryengine.v1.Control.RedirectAction redirect_action = 9;

Returns
Type Description
Control.RedirectActionOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getSolutionType()

public SolutionType getSolutionType()

Required. Immutable. What solution the control belongs to.

Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT error is thrown.

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

Returns
Type Description
SolutionType

The solutionType.

getSolutionTypeValue()

public int getSolutionTypeValue()

Required. Immutable. What solution the control belongs to.

Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT error is thrown.

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

Returns
Type Description
int

The enum numeric value on the wire for solutionType.

getSynonymsAction()

public Control.SynonymsAction getSynonymsAction()

Treats a group of terms as synonyms of one another.

.google.cloud.discoveryengine.v1.Control.SynonymsAction synonyms_action = 10;

Returns
Type Description
Control.SynonymsAction

The synonymsAction.

getSynonymsActionOrBuilder()

public Control.SynonymsActionOrBuilder getSynonymsActionOrBuilder()

Treats a group of terms as synonyms of one another.

.google.cloud.discoveryengine.v1.Control.SynonymsAction synonyms_action = 10;

Returns
Type Description
Control.SynonymsActionOrBuilder

getUseCases(int index)

public SearchUseCase getUseCases(int index)

Specifies the use case for the control. Affects what condition fields can be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only allow one use case per control. Must be set when solution_type is SolutionType.SOLUTION_TYPE_SEARCH.

repeated .google.cloud.discoveryengine.v1.SearchUseCase use_cases = 8;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
SearchUseCase

The useCases at the given index.

getUseCasesCount()

public int getUseCasesCount()

Specifies the use case for the control. Affects what condition fields can be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only allow one use case per control. Must be set when solution_type is SolutionType.SOLUTION_TYPE_SEARCH.

repeated .google.cloud.discoveryengine.v1.SearchUseCase use_cases = 8;

Returns
Type Description
int

The count of useCases.

getUseCasesList()

public List<SearchUseCase> getUseCasesList()

Specifies the use case for the control. Affects what condition fields can be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only allow one use case per control. Must be set when solution_type is SolutionType.SOLUTION_TYPE_SEARCH.

repeated .google.cloud.discoveryengine.v1.SearchUseCase use_cases = 8;

Returns
Type Description
List<SearchUseCase>

A list containing the useCases.

getUseCasesValue(int index)

public int getUseCasesValue(int index)

Specifies the use case for the control. Affects what condition fields can be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only allow one use case per control. Must be set when solution_type is SolutionType.SOLUTION_TYPE_SEARCH.

repeated .google.cloud.discoveryengine.v1.SearchUseCase use_cases = 8;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
int

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

getUseCasesValueList()

public List<Integer> getUseCasesValueList()

Specifies the use case for the control. Affects what condition fields can be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only allow one use case per control. Must be set when solution_type is SolutionType.SOLUTION_TYPE_SEARCH.

repeated .google.cloud.discoveryengine.v1.SearchUseCase use_cases = 8;

Returns
Type Description
List<Integer>

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

hasBoostAction()

public boolean hasBoostAction()

Defines a boost-type control

.google.cloud.discoveryengine.v1.Control.BoostAction boost_action = 6;

Returns
Type Description
boolean

Whether the boostAction field is set.

hasFilterAction()

public boolean hasFilterAction()

Defines a filter-type control Currently not supported by Recommendation

.google.cloud.discoveryengine.v1.Control.FilterAction filter_action = 7;

Returns
Type Description
boolean

Whether the filterAction field is set.

hasRedirectAction()

public boolean hasRedirectAction()

Defines a redirect-type control.

.google.cloud.discoveryengine.v1.Control.RedirectAction redirect_action = 9;

Returns
Type Description
boolean

Whether the redirectAction field is set.

hasSynonymsAction()

public boolean hasSynonymsAction()

Treats a group of terms as synonyms of one another.

.google.cloud.discoveryengine.v1.Control.SynonymsAction synonyms_action = 10;

Returns
Type Description
boolean

Whether the synonymsAction field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public Control.Builder newBuilderForType()
Returns
Type Description
Control.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Control.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Control.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public Control.Builder toBuilder()
Returns
Type Description
Control.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException