Class CatalogAttribute.FacetConfig

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig
All Implemented Interfaces:
CatalogAttribute.FacetConfigOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable
Enclosing class:
CatalogAttribute

public static final class CatalogAttribute.FacetConfig extends com.google.protobuf.GeneratedMessage implements CatalogAttribute.FacetConfigOrBuilder
 Possible options for the facet that corresponds to the current attribute
 config.
 
Protobuf type google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig
See Also:
  • Field Details

    • FACET_INTERVALS_FIELD_NUMBER

      public static final int FACET_INTERVALS_FIELD_NUMBER
      See Also:
    • IGNORED_FACET_VALUES_FIELD_NUMBER

      public static final int IGNORED_FACET_VALUES_FIELD_NUMBER
      See Also:
    • MERGED_FACET_VALUES_FIELD_NUMBER

      public static final int MERGED_FACET_VALUES_FIELD_NUMBER
      See Also:
    • MERGED_FACET_FIELD_NUMBER

      public static final int MERGED_FACET_FIELD_NUMBER
      See Also:
    • RERANK_CONFIG_FIELD_NUMBER

      public static final int RERANK_CONFIG_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
    • getFacetIntervalsList

      public List<Interval> getFacetIntervalsList()
       If you don't set the facet
       [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.intervals]
       in the request to a numerical attribute, then we use the computed
       intervals with rounded bounds obtained from all its product numerical
       attribute values. The computed intervals might not be ideal for some
       attributes. Therefore, we give you the option to overwrite them with the
       facet_intervals field. The maximum of facet intervals per
       [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 40.
       Each interval must have a lower bound or an upper bound. If both bounds
       are provided, then the lower bound must be smaller or equal than the
       upper bound.
       
      repeated .google.cloud.retail.v2alpha.Interval facet_intervals = 1;
      Specified by:
      getFacetIntervalsList in interface CatalogAttribute.FacetConfigOrBuilder
    • getFacetIntervalsOrBuilderList

      public List<? extends IntervalOrBuilder> getFacetIntervalsOrBuilderList()
       If you don't set the facet
       [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.intervals]
       in the request to a numerical attribute, then we use the computed
       intervals with rounded bounds obtained from all its product numerical
       attribute values. The computed intervals might not be ideal for some
       attributes. Therefore, we give you the option to overwrite them with the
       facet_intervals field. The maximum of facet intervals per
       [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 40.
       Each interval must have a lower bound or an upper bound. If both bounds
       are provided, then the lower bound must be smaller or equal than the
       upper bound.
       
      repeated .google.cloud.retail.v2alpha.Interval facet_intervals = 1;
      Specified by:
      getFacetIntervalsOrBuilderList in interface CatalogAttribute.FacetConfigOrBuilder
    • getFacetIntervalsCount

      public int getFacetIntervalsCount()
       If you don't set the facet
       [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.intervals]
       in the request to a numerical attribute, then we use the computed
       intervals with rounded bounds obtained from all its product numerical
       attribute values. The computed intervals might not be ideal for some
       attributes. Therefore, we give you the option to overwrite them with the
       facet_intervals field. The maximum of facet intervals per
       [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 40.
       Each interval must have a lower bound or an upper bound. If both bounds
       are provided, then the lower bound must be smaller or equal than the
       upper bound.
       
      repeated .google.cloud.retail.v2alpha.Interval facet_intervals = 1;
      Specified by:
      getFacetIntervalsCount in interface CatalogAttribute.FacetConfigOrBuilder
    • getFacetIntervals

      public Interval getFacetIntervals(int index)
       If you don't set the facet
       [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.intervals]
       in the request to a numerical attribute, then we use the computed
       intervals with rounded bounds obtained from all its product numerical
       attribute values. The computed intervals might not be ideal for some
       attributes. Therefore, we give you the option to overwrite them with the
       facet_intervals field. The maximum of facet intervals per
       [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 40.
       Each interval must have a lower bound or an upper bound. If both bounds
       are provided, then the lower bound must be smaller or equal than the
       upper bound.
       
      repeated .google.cloud.retail.v2alpha.Interval facet_intervals = 1;
      Specified by:
      getFacetIntervals in interface CatalogAttribute.FacetConfigOrBuilder
    • getFacetIntervalsOrBuilder

      public IntervalOrBuilder getFacetIntervalsOrBuilder(int index)
       If you don't set the facet
       [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.intervals]
       in the request to a numerical attribute, then we use the computed
       intervals with rounded bounds obtained from all its product numerical
       attribute values. The computed intervals might not be ideal for some
       attributes. Therefore, we give you the option to overwrite them with the
       facet_intervals field. The maximum of facet intervals per
       [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 40.
       Each interval must have a lower bound or an upper bound. If both bounds
       are provided, then the lower bound must be smaller or equal than the
       upper bound.
       
      repeated .google.cloud.retail.v2alpha.Interval facet_intervals = 1;
      Specified by:
      getFacetIntervalsOrBuilder in interface CatalogAttribute.FacetConfigOrBuilder
    • getIgnoredFacetValuesList

      public List<CatalogAttribute.FacetConfig.IgnoredFacetValues> getIgnoredFacetValuesList()
       Each instance represents a list of attribute values to ignore as facet
       values for a specific time range. The maximum number of instances per
       [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 25.
       
      repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2;
      Specified by:
      getIgnoredFacetValuesList in interface CatalogAttribute.FacetConfigOrBuilder
    • getIgnoredFacetValuesOrBuilderList

      public List<? extends CatalogAttribute.FacetConfig.IgnoredFacetValuesOrBuilder> getIgnoredFacetValuesOrBuilderList()
       Each instance represents a list of attribute values to ignore as facet
       values for a specific time range. The maximum number of instances per
       [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 25.
       
      repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2;
      Specified by:
      getIgnoredFacetValuesOrBuilderList in interface CatalogAttribute.FacetConfigOrBuilder
    • getIgnoredFacetValuesCount

      public int getIgnoredFacetValuesCount()
       Each instance represents a list of attribute values to ignore as facet
       values for a specific time range. The maximum number of instances per
       [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 25.
       
      repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2;
      Specified by:
      getIgnoredFacetValuesCount in interface CatalogAttribute.FacetConfigOrBuilder
    • getIgnoredFacetValues

      public CatalogAttribute.FacetConfig.IgnoredFacetValues getIgnoredFacetValues(int index)
       Each instance represents a list of attribute values to ignore as facet
       values for a specific time range. The maximum number of instances per
       [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 25.
       
      repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2;
      Specified by:
      getIgnoredFacetValues in interface CatalogAttribute.FacetConfigOrBuilder
    • getIgnoredFacetValuesOrBuilder

      public CatalogAttribute.FacetConfig.IgnoredFacetValuesOrBuilder getIgnoredFacetValuesOrBuilder(int index)
       Each instance represents a list of attribute values to ignore as facet
       values for a specific time range. The maximum number of instances per
       [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 25.
       
      repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.IgnoredFacetValues ignored_facet_values = 2;
      Specified by:
      getIgnoredFacetValuesOrBuilder in interface CatalogAttribute.FacetConfigOrBuilder
    • getMergedFacetValuesList

      public List<CatalogAttribute.FacetConfig.MergedFacetValue> getMergedFacetValuesList()
       Each instance replaces a list of facet values by a merged facet
       value. If a facet value is not in any list, then it will stay the same.
       To avoid conflicts, only paths of length 1 are accepted. In other words,
       if "dark_blue" merged into "BLUE", then the latter can't merge into
       "blues" because this would create a path of length 2. The maximum number
       of instances of MergedFacetValue per
       [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 100.
       This feature is available only for textual custom attributes.
       
      repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3;
      Specified by:
      getMergedFacetValuesList in interface CatalogAttribute.FacetConfigOrBuilder
    • getMergedFacetValuesOrBuilderList

      public List<? extends CatalogAttribute.FacetConfig.MergedFacetValueOrBuilder> getMergedFacetValuesOrBuilderList()
       Each instance replaces a list of facet values by a merged facet
       value. If a facet value is not in any list, then it will stay the same.
       To avoid conflicts, only paths of length 1 are accepted. In other words,
       if "dark_blue" merged into "BLUE", then the latter can't merge into
       "blues" because this would create a path of length 2. The maximum number
       of instances of MergedFacetValue per
       [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 100.
       This feature is available only for textual custom attributes.
       
      repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3;
      Specified by:
      getMergedFacetValuesOrBuilderList in interface CatalogAttribute.FacetConfigOrBuilder
    • getMergedFacetValuesCount

      public int getMergedFacetValuesCount()
       Each instance replaces a list of facet values by a merged facet
       value. If a facet value is not in any list, then it will stay the same.
       To avoid conflicts, only paths of length 1 are accepted. In other words,
       if "dark_blue" merged into "BLUE", then the latter can't merge into
       "blues" because this would create a path of length 2. The maximum number
       of instances of MergedFacetValue per
       [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 100.
       This feature is available only for textual custom attributes.
       
      repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3;
      Specified by:
      getMergedFacetValuesCount in interface CatalogAttribute.FacetConfigOrBuilder
    • getMergedFacetValues

      public CatalogAttribute.FacetConfig.MergedFacetValue getMergedFacetValues(int index)
       Each instance replaces a list of facet values by a merged facet
       value. If a facet value is not in any list, then it will stay the same.
       To avoid conflicts, only paths of length 1 are accepted. In other words,
       if "dark_blue" merged into "BLUE", then the latter can't merge into
       "blues" because this would create a path of length 2. The maximum number
       of instances of MergedFacetValue per
       [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 100.
       This feature is available only for textual custom attributes.
       
      repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3;
      Specified by:
      getMergedFacetValues in interface CatalogAttribute.FacetConfigOrBuilder
    • getMergedFacetValuesOrBuilder

      public CatalogAttribute.FacetConfig.MergedFacetValueOrBuilder getMergedFacetValuesOrBuilder(int index)
       Each instance replaces a list of facet values by a merged facet
       value. If a facet value is not in any list, then it will stay the same.
       To avoid conflicts, only paths of length 1 are accepted. In other words,
       if "dark_blue" merged into "BLUE", then the latter can't merge into
       "blues" because this would create a path of length 2. The maximum number
       of instances of MergedFacetValue per
       [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] is 100.
       This feature is available only for textual custom attributes.
       
      repeated .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacetValue merged_facet_values = 3;
      Specified by:
      getMergedFacetValuesOrBuilder in interface CatalogAttribute.FacetConfigOrBuilder
    • hasMergedFacet

      public boolean hasMergedFacet()
       Use this field only if you want to merge a facet key into another facet
       key.
       
      .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4;
      Specified by:
      hasMergedFacet in interface CatalogAttribute.FacetConfigOrBuilder
      Returns:
      Whether the mergedFacet field is set.
    • getMergedFacet

       Use this field only if you want to merge a facet key into another facet
       key.
       
      .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4;
      Specified by:
      getMergedFacet in interface CatalogAttribute.FacetConfigOrBuilder
      Returns:
      The mergedFacet.
    • getMergedFacetOrBuilder

      public CatalogAttribute.FacetConfig.MergedFacetOrBuilder getMergedFacetOrBuilder()
       Use this field only if you want to merge a facet key into another facet
       key.
       
      .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.MergedFacet merged_facet = 4;
      Specified by:
      getMergedFacetOrBuilder in interface CatalogAttribute.FacetConfigOrBuilder
    • hasRerankConfig

      public boolean hasRerankConfig()
       Set this field only if you want to rerank based on facet values engaged
       by the user for the current key. This option is only possible for custom
       facetable textual keys.
       
      .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5;
      Specified by:
      hasRerankConfig in interface CatalogAttribute.FacetConfigOrBuilder
      Returns:
      Whether the rerankConfig field is set.
    • getRerankConfig

       Set this field only if you want to rerank based on facet values engaged
       by the user for the current key. This option is only possible for custom
       facetable textual keys.
       
      .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5;
      Specified by:
      getRerankConfig in interface CatalogAttribute.FacetConfigOrBuilder
      Returns:
      The rerankConfig.
    • getRerankConfigOrBuilder

      public CatalogAttribute.FacetConfig.RerankConfigOrBuilder getRerankConfigOrBuilder()
       Set this field only if you want to rerank based on facet values engaged
       by the user for the current key. This option is only possible for custom
       facetable textual keys.
       
      .google.cloud.retail.v2alpha.CatalogAttribute.FacetConfig.RerankConfig rerank_config = 5;
      Specified by:
      getRerankConfigOrBuilder in interface CatalogAttribute.FacetConfigOrBuilder
    • 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 CatalogAttribute.FacetConfig parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

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

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

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

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

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

      public static CatalogAttribute.FacetConfig parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

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

      public static CatalogAttribute.FacetConfig parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

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

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

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

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

      public static CatalogAttribute.FacetConfig.Builder newBuilder()
    • newBuilder

    • toBuilder

      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

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

      public static CatalogAttribute.FacetConfig getDefaultInstance()
    • parser

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

      public com.google.protobuf.Parser<CatalogAttribute.FacetConfig> 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 CatalogAttribute.FacetConfig getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder