Class CatalogAttribute.FacetConfig.RerankConfig.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<CatalogAttribute.FacetConfig.RerankConfig.Builder>
com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig.Builder
All Implemented Interfaces:
CatalogAttribute.FacetConfig.RerankConfigOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
CatalogAttribute.FacetConfig.RerankConfig

public static final class CatalogAttribute.FacetConfig.RerankConfig.Builder extends com.google.protobuf.GeneratedMessage.Builder<CatalogAttribute.FacetConfig.RerankConfig.Builder> implements CatalogAttribute.FacetConfig.RerankConfigOrBuilder
 Options to rerank based on facet values engaged by the user for the
 current key. That key needs to be a custom textual key and facetable.
 To use this control, you also need to pass all the facet keys engaged by
 the user in the request using the field [SearchRequest.FacetSpec]. In
 particular, if you don't pass the facet keys engaged that you want to
 rerank on, this control won't be effective. Moreover, to obtain better
 results, the facet values that you want to rerank on should be close to
 English (ideally made of words, underscores, and spaces).
 
Protobuf type google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig
  • 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<CatalogAttribute.FacetConfig.RerankConfig.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<CatalogAttribute.FacetConfig.RerankConfig.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<CatalogAttribute.FacetConfig.RerankConfig.Builder>
    • getDefaultInstanceForType

      public CatalogAttribute.FacetConfig.RerankConfig getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public CatalogAttribute.FacetConfig.RerankConfig.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<CatalogAttribute.FacetConfig.RerankConfig.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<CatalogAttribute.FacetConfig.RerankConfig.Builder>
    • mergeFrom

      public CatalogAttribute.FacetConfig.RerankConfig.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<CatalogAttribute.FacetConfig.RerankConfig.Builder>
      Throws:
      IOException
    • getRerankFacet

      public boolean getRerankFacet()
       If set to true, then we also rerank the dynamic facets based on the
       facet values engaged by the user for the current attribute key during
       serving.
       
      bool rerank_facet = 1;
      Specified by:
      getRerankFacet in interface CatalogAttribute.FacetConfig.RerankConfigOrBuilder
      Returns:
      The rerankFacet.
    • setRerankFacet

      public CatalogAttribute.FacetConfig.RerankConfig.Builder setRerankFacet(boolean value)
       If set to true, then we also rerank the dynamic facets based on the
       facet values engaged by the user for the current attribute key during
       serving.
       
      bool rerank_facet = 1;
      Parameters:
      value - The rerankFacet to set.
      Returns:
      This builder for chaining.
    • clearRerankFacet

       If set to true, then we also rerank the dynamic facets based on the
       facet values engaged by the user for the current attribute key during
       serving.
       
      bool rerank_facet = 1;
      Returns:
      This builder for chaining.
    • getFacetValuesList

      public com.google.protobuf.ProtocolStringList getFacetValuesList()
       If empty, rerank on all facet values for the current key. Otherwise,
       will rerank on the facet values from this list only.
       
      repeated string facet_values = 2;
      Specified by:
      getFacetValuesList in interface CatalogAttribute.FacetConfig.RerankConfigOrBuilder
      Returns:
      A list containing the facetValues.
    • getFacetValuesCount

      public int getFacetValuesCount()
       If empty, rerank on all facet values for the current key. Otherwise,
       will rerank on the facet values from this list only.
       
      repeated string facet_values = 2;
      Specified by:
      getFacetValuesCount in interface CatalogAttribute.FacetConfig.RerankConfigOrBuilder
      Returns:
      The count of facetValues.
    • getFacetValues

      public String getFacetValues(int index)
       If empty, rerank on all facet values for the current key. Otherwise,
       will rerank on the facet values from this list only.
       
      repeated string facet_values = 2;
      Specified by:
      getFacetValues in interface CatalogAttribute.FacetConfig.RerankConfigOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The facetValues at the given index.
    • getFacetValuesBytes

      public com.google.protobuf.ByteString getFacetValuesBytes(int index)
       If empty, rerank on all facet values for the current key. Otherwise,
       will rerank on the facet values from this list only.
       
      repeated string facet_values = 2;
      Specified by:
      getFacetValuesBytes in interface CatalogAttribute.FacetConfig.RerankConfigOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the facetValues at the given index.
    • setFacetValues

      public CatalogAttribute.FacetConfig.RerankConfig.Builder setFacetValues(int index, String value)
       If empty, rerank on all facet values for the current key. Otherwise,
       will rerank on the facet values from this list only.
       
      repeated string facet_values = 2;
      Parameters:
      index - The index to set the value at.
      value - The facetValues to set.
      Returns:
      This builder for chaining.
    • addFacetValues

       If empty, rerank on all facet values for the current key. Otherwise,
       will rerank on the facet values from this list only.
       
      repeated string facet_values = 2;
      Parameters:
      value - The facetValues to add.
      Returns:
      This builder for chaining.
    • addAllFacetValues

       If empty, rerank on all facet values for the current key. Otherwise,
       will rerank on the facet values from this list only.
       
      repeated string facet_values = 2;
      Parameters:
      values - The facetValues to add.
      Returns:
      This builder for chaining.
    • clearFacetValues

       If empty, rerank on all facet values for the current key. Otherwise,
       will rerank on the facet values from this list only.
       
      repeated string facet_values = 2;
      Returns:
      This builder for chaining.
    • addFacetValuesBytes

      public CatalogAttribute.FacetConfig.RerankConfig.Builder addFacetValuesBytes(com.google.protobuf.ByteString value)
       If empty, rerank on all facet values for the current key. Otherwise,
       will rerank on the facet values from this list only.
       
      repeated string facet_values = 2;
      Parameters:
      value - The bytes of the facetValues to add.
      Returns:
      This builder for chaining.