Class Control.BoostAction.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Control.BoostAction.Builder>
com.google.cloud.discoveryengine.v1beta.Control.BoostAction.Builder
All Implemented Interfaces:
Control.BoostActionOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
Control.BoostAction

public static final class Control.BoostAction.Builder extends com.google.protobuf.GeneratedMessage.Builder<Control.BoostAction.Builder> implements Control.BoostActionOrBuilder
 Adjusts order of products in returned list.
 
Protobuf type google.cloud.discoveryengine.v1beta.Control.BoostAction
  • 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.Builder<Control.BoostAction.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<Control.BoostAction.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<Control.BoostAction.Builder>
    • getDefaultInstanceForType

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

      public Control.BoostAction build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public Control.BoostAction buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public Control.BoostAction.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Control.BoostAction.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<Control.BoostAction.Builder>
    • mergeFrom

      public Control.BoostAction.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Control.BoostAction.Builder>
      Throws:
      IOException
    • getBoost

      public float getBoost()
       Required. Strength of the boost, which should be in [-1, 1]. Negative
       boost means demotion. Default is 0.0 (No-op).
       
      float boost = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getBoost in interface Control.BoostActionOrBuilder
      Returns:
      The boost.
    • setBoost

      public Control.BoostAction.Builder setBoost(float value)
       Required. Strength of the boost, which should be in [-1, 1]. Negative
       boost means demotion. Default is 0.0 (No-op).
       
      float boost = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The boost to set.
      Returns:
      This builder for chaining.
    • clearBoost

      public Control.BoostAction.Builder clearBoost()
       Required. Strength of the boost, which should be in [-1, 1]. Negative
       boost means demotion. Default is 0.0 (No-op).
       
      float boost = 1 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • getFilter

      public String getFilter()
       Required. Specifies which products to apply the boost to.
      
       If no filter is provided all products will be boosted (No-op).
       Syntax documentation:
       https://cloud.google.com/retail/docs/filter-and-order
       Maximum length is 5000 characters.
       Otherwise an INVALID ARGUMENT error is thrown.
       
      string filter = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getFilter in interface Control.BoostActionOrBuilder
      Returns:
      The filter.
    • getFilterBytes

      public com.google.protobuf.ByteString getFilterBytes()
       Required. Specifies which products to apply the boost to.
      
       If no filter is provided all products will be boosted (No-op).
       Syntax documentation:
       https://cloud.google.com/retail/docs/filter-and-order
       Maximum length is 5000 characters.
       Otherwise an INVALID ARGUMENT error is thrown.
       
      string filter = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getFilterBytes in interface Control.BoostActionOrBuilder
      Returns:
      The bytes for filter.
    • setFilter

      public Control.BoostAction.Builder setFilter(String value)
       Required. Specifies which products to apply the boost to.
      
       If no filter is provided all products will be boosted (No-op).
       Syntax documentation:
       https://cloud.google.com/retail/docs/filter-and-order
       Maximum length is 5000 characters.
       Otherwise an INVALID ARGUMENT error is thrown.
       
      string filter = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The filter to set.
      Returns:
      This builder for chaining.
    • clearFilter

      public Control.BoostAction.Builder clearFilter()
       Required. Specifies which products to apply the boost to.
      
       If no filter is provided all products will be boosted (No-op).
       Syntax documentation:
       https://cloud.google.com/retail/docs/filter-and-order
       Maximum length is 5000 characters.
       Otherwise an INVALID ARGUMENT error is thrown.
       
      string filter = 2 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • setFilterBytes

      public Control.BoostAction.Builder setFilterBytes(com.google.protobuf.ByteString value)
       Required. Specifies which products to apply the boost to.
      
       If no filter is provided all products will be boosted (No-op).
       Syntax documentation:
       https://cloud.google.com/retail/docs/filter-and-order
       Maximum length is 5000 characters.
       Otherwise an INVALID ARGUMENT error is thrown.
       
      string filter = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes for filter to set.
      Returns:
      This builder for chaining.
    • getDataStore

      public String getDataStore()
       Required. Specifies which data store's documents can be boosted by this
       control. Full data store name e.g.
       projects/123/locations/global/collections/default_collection/dataStores/default_data_store
       
      string data_store = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getDataStore in interface Control.BoostActionOrBuilder
      Returns:
      The dataStore.
    • getDataStoreBytes

      public com.google.protobuf.ByteString getDataStoreBytes()
       Required. Specifies which data store's documents can be boosted by this
       control. Full data store name e.g.
       projects/123/locations/global/collections/default_collection/dataStores/default_data_store
       
      string data_store = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getDataStoreBytes in interface Control.BoostActionOrBuilder
      Returns:
      The bytes for dataStore.
    • setDataStore

      public Control.BoostAction.Builder setDataStore(String value)
       Required. Specifies which data store's documents can be boosted by this
       control. Full data store name e.g.
       projects/123/locations/global/collections/default_collection/dataStores/default_data_store
       
      string data_store = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The dataStore to set.
      Returns:
      This builder for chaining.
    • clearDataStore

      public Control.BoostAction.Builder clearDataStore()
       Required. Specifies which data store's documents can be boosted by this
       control. Full data store name e.g.
       projects/123/locations/global/collections/default_collection/dataStores/default_data_store
       
      string data_store = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Returns:
      This builder for chaining.
    • setDataStoreBytes

      public Control.BoostAction.Builder setDataStoreBytes(com.google.protobuf.ByteString value)
       Required. Specifies which data store's documents can be boosted by this
       control. Full data store name e.g.
       projects/123/locations/global/collections/default_collection/dataStores/default_data_store
       
      string data_store = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The bytes for dataStore to set.
      Returns:
      This builder for chaining.