Class Control

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.retail.v2alpha.Control
All Implemented Interfaces:
ControlOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

@Generated public final class Control extends com.google.protobuf.GeneratedMessage implements ControlOrBuilder
 Configures dynamic metadata that can be linked to a
 [ServingConfig][google.cloud.retail.v2alpha.ServingConfig] and affect search
 or recommendation results at serving time.
 
Protobuf type google.cloud.retail.v2alpha.Control
See Also:
  • Field Details

    • FACET_SPEC_FIELD_NUMBER

      public static final int FACET_SPEC_FIELD_NUMBER
      See Also:
    • RULE_FIELD_NUMBER

      public static final int RULE_FIELD_NUMBER
      See Also:
    • NAME_FIELD_NUMBER

      public static final int NAME_FIELD_NUMBER
      See Also:
    • DISPLAY_NAME_FIELD_NUMBER

      public static final int DISPLAY_NAME_FIELD_NUMBER
      See Also:
    • ASSOCIATED_SERVING_CONFIG_IDS_FIELD_NUMBER

      public static final int ASSOCIATED_SERVING_CONFIG_IDS_FIELD_NUMBER
      See Also:
    • SOLUTION_TYPES_FIELD_NUMBER

      public static final int SOLUTION_TYPES_FIELD_NUMBER
      See Also:
    • SEARCH_SOLUTION_USE_CASE_FIELD_NUMBER

      public static final int SEARCH_SOLUTION_USE_CASE_FIELD_NUMBER
      See Also:
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • getControlCase

      public Control.ControlCase getControlCase()
      Specified by:
      getControlCase in interface ControlOrBuilder
    • hasFacetSpec

      @Deprecated public boolean hasFacetSpec()
      Deprecated.
      google.cloud.retail.v2alpha.Control.facet_spec is deprecated. See google/cloud/retail/v2alpha/control.proto;l=51
       A facet specification to perform faceted search.
      
       Note that this field is deprecated and will throw NOT_IMPLEMENTED if
       used for creating a control.
       
      .google.cloud.retail.v2alpha.SearchRequest.FacetSpec facet_spec = 3 [deprecated = true];
      Specified by:
      hasFacetSpec in interface ControlOrBuilder
      Returns:
      Whether the facetSpec field is set.
    • getFacetSpec

      @Deprecated public SearchRequest.FacetSpec getFacetSpec()
      Deprecated.
      google.cloud.retail.v2alpha.Control.facet_spec is deprecated. See google/cloud/retail/v2alpha/control.proto;l=51
       A facet specification to perform faceted search.
      
       Note that this field is deprecated and will throw NOT_IMPLEMENTED if
       used for creating a control.
       
      .google.cloud.retail.v2alpha.SearchRequest.FacetSpec facet_spec = 3 [deprecated = true];
      Specified by:
      getFacetSpec in interface ControlOrBuilder
      Returns:
      The facetSpec.
    • getFacetSpecOrBuilder

      @Deprecated public SearchRequest.FacetSpecOrBuilder getFacetSpecOrBuilder()
      Deprecated.
       A facet specification to perform faceted search.
      
       Note that this field is deprecated and will throw NOT_IMPLEMENTED if
       used for creating a control.
       
      .google.cloud.retail.v2alpha.SearchRequest.FacetSpec facet_spec = 3 [deprecated = true];
      Specified by:
      getFacetSpecOrBuilder in interface ControlOrBuilder
    • 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.v2alpha.Rule rule = 4;
      Specified by:
      hasRule in interface ControlOrBuilder
      Returns:
      Whether the rule field is set.
    • 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.v2alpha.Rule rule = 4;
      Specified by:
      getRule in interface ControlOrBuilder
      Returns:
      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.v2alpha.Rule rule = 4;
      Specified by:
      getRuleOrBuilder in interface ControlOrBuilder
    • getName

      public String getName()
       Immutable. Fully qualified name
       `projects/*/locations/global/catalogs/*/controls/*`
       
      string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
      Specified by:
      getName in interface ControlOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Immutable. Fully qualified name
       `projects/*/locations/global/catalogs/*/controls/*`
       
      string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
      Specified by:
      getNameBytes in interface ControlOrBuilder
      Returns:
      The bytes for name.
    • 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];
      Specified by:
      getDisplayName in interface ControlOrBuilder
      Returns:
      The displayName.
    • getDisplayNameBytes

      public com.google.protobuf.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];
      Specified by:
      getDisplayNameBytes in interface ControlOrBuilder
      Returns:
      The bytes for displayName.
    • getAssociatedServingConfigIdsList

      public com.google.protobuf.ProtocolStringList getAssociatedServingConfigIdsList()
       Output only. List of [serving
       config][google.cloud.retail.v2alpha.ServingConfig] ids that are associated
       with this control in the same
       [Catalog][google.cloud.retail.v2alpha.Catalog].
      
       Note the association is managed via the
       [ServingConfig][google.cloud.retail.v2alpha.ServingConfig], this is an
       output only denormalized view.
       
      repeated string associated_serving_config_ids = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getAssociatedServingConfigIdsList in interface ControlOrBuilder
      Returns:
      A list containing the associatedServingConfigIds.
    • getAssociatedServingConfigIdsCount

      public int getAssociatedServingConfigIdsCount()
       Output only. List of [serving
       config][google.cloud.retail.v2alpha.ServingConfig] ids that are associated
       with this control in the same
       [Catalog][google.cloud.retail.v2alpha.Catalog].
      
       Note the association is managed via the
       [ServingConfig][google.cloud.retail.v2alpha.ServingConfig], this is an
       output only denormalized view.
       
      repeated string associated_serving_config_ids = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getAssociatedServingConfigIdsCount in interface ControlOrBuilder
      Returns:
      The count of associatedServingConfigIds.
    • getAssociatedServingConfigIds

      public String getAssociatedServingConfigIds(int index)
       Output only. List of [serving
       config][google.cloud.retail.v2alpha.ServingConfig] ids that are associated
       with this control in the same
       [Catalog][google.cloud.retail.v2alpha.Catalog].
      
       Note the association is managed via the
       [ServingConfig][google.cloud.retail.v2alpha.ServingConfig], this is an
       output only denormalized view.
       
      repeated string associated_serving_config_ids = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getAssociatedServingConfigIds in interface ControlOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The associatedServingConfigIds at the given index.
    • getAssociatedServingConfigIdsBytes

      public com.google.protobuf.ByteString getAssociatedServingConfigIdsBytes(int index)
       Output only. List of [serving
       config][google.cloud.retail.v2alpha.ServingConfig] ids that are associated
       with this control in the same
       [Catalog][google.cloud.retail.v2alpha.Catalog].
      
       Note the association is managed via the
       [ServingConfig][google.cloud.retail.v2alpha.ServingConfig], this is an
       output only denormalized view.
       
      repeated string associated_serving_config_ids = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getAssociatedServingConfigIdsBytes in interface ControlOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the associatedServingConfigIds at the given index.
    • 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][google.cloud.retail.v2alpha.SolutionType.SOLUTION_TYPE_SEARCH].
       
      repeated .google.cloud.retail.v2alpha.SolutionType solution_types = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
      Specified by:
      getSolutionTypesList in interface ControlOrBuilder
      Returns:
      A list containing the solutionTypes.
    • 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][google.cloud.retail.v2alpha.SolutionType.SOLUTION_TYPE_SEARCH].
       
      repeated .google.cloud.retail.v2alpha.SolutionType solution_types = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
      Specified by:
      getSolutionTypesCount in interface ControlOrBuilder
      Returns:
      The count of solutionTypes.
    • getSolutionTypes

      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][google.cloud.retail.v2alpha.SolutionType.SOLUTION_TYPE_SEARCH].
       
      repeated .google.cloud.retail.v2alpha.SolutionType solution_types = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
      Specified by:
      getSolutionTypes in interface ControlOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The 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][google.cloud.retail.v2alpha.SolutionType.SOLUTION_TYPE_SEARCH].
       
      repeated .google.cloud.retail.v2alpha.SolutionType solution_types = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
      Specified by:
      getSolutionTypesValueList in interface ControlOrBuilder
      Returns:
      A list containing the enum numeric values on the wire for solutionTypes.
    • getSolutionTypesValue

      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][google.cloud.retail.v2alpha.SolutionType.SOLUTION_TYPE_SEARCH].
       
      repeated .google.cloud.retail.v2alpha.SolutionType solution_types = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
      Specified by:
      getSolutionTypesValue in interface ControlOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The enum numeric value on the wire of solutionTypes at the given index.
    • 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][google.cloud.retail.v2alpha.SearchSolutionUseCase.SEARCH_SOLUTION_USE_CASE_SEARCH]
       if not specified. Currently only allow one search_solution_use_case per
       control.
       
      repeated .google.cloud.retail.v2alpha.SearchSolutionUseCase search_solution_use_case = 7;
      Specified by:
      getSearchSolutionUseCaseList in interface ControlOrBuilder
      Returns:
      A list containing the searchSolutionUseCase.
    • 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][google.cloud.retail.v2alpha.SearchSolutionUseCase.SEARCH_SOLUTION_USE_CASE_SEARCH]
       if not specified. Currently only allow one search_solution_use_case per
       control.
       
      repeated .google.cloud.retail.v2alpha.SearchSolutionUseCase search_solution_use_case = 7;
      Specified by:
      getSearchSolutionUseCaseCount in interface ControlOrBuilder
      Returns:
      The count of searchSolutionUseCase.
    • getSearchSolutionUseCase

      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][google.cloud.retail.v2alpha.SearchSolutionUseCase.SEARCH_SOLUTION_USE_CASE_SEARCH]
       if not specified. Currently only allow one search_solution_use_case per
       control.
       
      repeated .google.cloud.retail.v2alpha.SearchSolutionUseCase search_solution_use_case = 7;
      Specified by:
      getSearchSolutionUseCase in interface ControlOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The 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][google.cloud.retail.v2alpha.SearchSolutionUseCase.SEARCH_SOLUTION_USE_CASE_SEARCH]
       if not specified. Currently only allow one search_solution_use_case per
       control.
       
      repeated .google.cloud.retail.v2alpha.SearchSolutionUseCase search_solution_use_case = 7;
      Specified by:
      getSearchSolutionUseCaseValueList in interface ControlOrBuilder
      Returns:
      A list containing the enum numeric values on the wire for searchSolutionUseCase.
    • getSearchSolutionUseCaseValue

      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][google.cloud.retail.v2alpha.SearchSolutionUseCase.SEARCH_SOLUTION_USE_CASE_SEARCH]
       if not specified. Currently only allow one search_solution_use_case per
       control.
       
      repeated .google.cloud.retail.v2alpha.SearchSolutionUseCase search_solution_use_case = 7;
      Specified by:
      getSearchSolutionUseCaseValue in interface ControlOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The enum numeric value on the wire of searchSolutionUseCase at the given index.
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static Control parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Control parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Control parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Control parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Control parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Control parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Control parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Control parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Control parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Control parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Control parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Control parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public Control.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static Control.Builder newBuilder()
    • newBuilder

      public static Control.Builder newBuilder(Control prototype)
    • toBuilder

      public Control.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected Control.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static Control getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<Control> parser()
    • getParserForType

      public com.google.protobuf.Parser<Control> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public Control getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder