Class FacetProperty

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.visionai.v1.FacetProperty
All Implemented Interfaces:
FacetPropertyOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

@Generated public final class FacetProperty extends com.google.protobuf.GeneratedMessage implements FacetPropertyOrBuilder
 Central configuration for a facet.
 
Protobuf type google.cloud.visionai.v1.FacetProperty
See Also:
  • Field Details

    • FIXED_RANGE_BUCKET_SPEC_FIELD_NUMBER

      public static final int FIXED_RANGE_BUCKET_SPEC_FIELD_NUMBER
      See Also:
    • CUSTOM_RANGE_BUCKET_SPEC_FIELD_NUMBER

      public static final int CUSTOM_RANGE_BUCKET_SPEC_FIELD_NUMBER
      See Also:
    • DATETIME_BUCKET_SPEC_FIELD_NUMBER

      public static final int DATETIME_BUCKET_SPEC_FIELD_NUMBER
      See Also:
    • MAPPED_FIELDS_FIELD_NUMBER

      public static final int MAPPED_FIELDS_FIELD_NUMBER
      See Also:
    • DISPLAY_NAME_FIELD_NUMBER

      public static final int DISPLAY_NAME_FIELD_NUMBER
      See Also:
    • RESULT_SIZE_FIELD_NUMBER

      public static final int RESULT_SIZE_FIELD_NUMBER
      See Also:
    • BUCKET_TYPE_FIELD_NUMBER

      public static final int BUCKET_TYPE_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
    • getRangeFacetConfigCase

      public FacetProperty.RangeFacetConfigCase getRangeFacetConfigCase()
      Specified by:
      getRangeFacetConfigCase in interface FacetPropertyOrBuilder
    • hasFixedRangeBucketSpec

      public boolean hasFixedRangeBucketSpec()
       Fixed range facet bucket config.
       
      .google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec fixed_range_bucket_spec = 5;
      Specified by:
      hasFixedRangeBucketSpec in interface FacetPropertyOrBuilder
      Returns:
      Whether the fixedRangeBucketSpec field is set.
    • getFixedRangeBucketSpec

      public FacetProperty.FixedRangeBucketSpec getFixedRangeBucketSpec()
       Fixed range facet bucket config.
       
      .google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec fixed_range_bucket_spec = 5;
      Specified by:
      getFixedRangeBucketSpec in interface FacetPropertyOrBuilder
      Returns:
      The fixedRangeBucketSpec.
    • getFixedRangeBucketSpecOrBuilder

      public FacetProperty.FixedRangeBucketSpecOrBuilder getFixedRangeBucketSpecOrBuilder()
       Fixed range facet bucket config.
       
      .google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec fixed_range_bucket_spec = 5;
      Specified by:
      getFixedRangeBucketSpecOrBuilder in interface FacetPropertyOrBuilder
    • hasCustomRangeBucketSpec

      public boolean hasCustomRangeBucketSpec()
       Custom range facet bucket config.
       
      .google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec custom_range_bucket_spec = 6;
      Specified by:
      hasCustomRangeBucketSpec in interface FacetPropertyOrBuilder
      Returns:
      Whether the customRangeBucketSpec field is set.
    • getCustomRangeBucketSpec

      public FacetProperty.CustomRangeBucketSpec getCustomRangeBucketSpec()
       Custom range facet bucket config.
       
      .google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec custom_range_bucket_spec = 6;
      Specified by:
      getCustomRangeBucketSpec in interface FacetPropertyOrBuilder
      Returns:
      The customRangeBucketSpec.
    • getCustomRangeBucketSpecOrBuilder

      public FacetProperty.CustomRangeBucketSpecOrBuilder getCustomRangeBucketSpecOrBuilder()
       Custom range facet bucket config.
       
      .google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec custom_range_bucket_spec = 6;
      Specified by:
      getCustomRangeBucketSpecOrBuilder in interface FacetPropertyOrBuilder
    • hasDatetimeBucketSpec

      public boolean hasDatetimeBucketSpec()
       Datetime range facet bucket config.
       
      .google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec datetime_bucket_spec = 7;
      Specified by:
      hasDatetimeBucketSpec in interface FacetPropertyOrBuilder
      Returns:
      Whether the datetimeBucketSpec field is set.
    • getDatetimeBucketSpec

      public FacetProperty.DateTimeBucketSpec getDatetimeBucketSpec()
       Datetime range facet bucket config.
       
      .google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec datetime_bucket_spec = 7;
      Specified by:
      getDatetimeBucketSpec in interface FacetPropertyOrBuilder
      Returns:
      The datetimeBucketSpec.
    • getDatetimeBucketSpecOrBuilder

      public FacetProperty.DateTimeBucketSpecOrBuilder getDatetimeBucketSpecOrBuilder()
       Datetime range facet bucket config.
       
      .google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec datetime_bucket_spec = 7;
      Specified by:
      getDatetimeBucketSpecOrBuilder in interface FacetPropertyOrBuilder
    • getMappedFieldsList

      public com.google.protobuf.ProtocolStringList getMappedFieldsList()
       Name of the facets, which are the dimensions users want to use to refine
       search results. `mapped_fields` will match UserSpecifiedDataSchema keys.
      
       For example, user can add a bunch of UGAs with the same key, such as
       player:adam, player:bob, player:charles. When multiple mapped_fields are
       specified, will merge their value together as final facet value. E.g.
       home_team: a, home_team:b, away_team:a, away_team:c, when facet_field =
       [home_team, away_team], facet_value will be [a, b, c].
      
       UNLESS this is a 1:1 facet dimension (mapped_fields.size() == 1) AND the
       mapped_field equals the parent SearchConfig.name, the parent must
       also contain a SearchCriteriaProperty that maps to the same fields.
       mapped_fields must not be empty.
       
      repeated string mapped_fields = 1;
      Specified by:
      getMappedFieldsList in interface FacetPropertyOrBuilder
      Returns:
      A list containing the mappedFields.
    • getMappedFieldsCount

      public int getMappedFieldsCount()
       Name of the facets, which are the dimensions users want to use to refine
       search results. `mapped_fields` will match UserSpecifiedDataSchema keys.
      
       For example, user can add a bunch of UGAs with the same key, such as
       player:adam, player:bob, player:charles. When multiple mapped_fields are
       specified, will merge their value together as final facet value. E.g.
       home_team: a, home_team:b, away_team:a, away_team:c, when facet_field =
       [home_team, away_team], facet_value will be [a, b, c].
      
       UNLESS this is a 1:1 facet dimension (mapped_fields.size() == 1) AND the
       mapped_field equals the parent SearchConfig.name, the parent must
       also contain a SearchCriteriaProperty that maps to the same fields.
       mapped_fields must not be empty.
       
      repeated string mapped_fields = 1;
      Specified by:
      getMappedFieldsCount in interface FacetPropertyOrBuilder
      Returns:
      The count of mappedFields.
    • getMappedFields

      public String getMappedFields(int index)
       Name of the facets, which are the dimensions users want to use to refine
       search results. `mapped_fields` will match UserSpecifiedDataSchema keys.
      
       For example, user can add a bunch of UGAs with the same key, such as
       player:adam, player:bob, player:charles. When multiple mapped_fields are
       specified, will merge their value together as final facet value. E.g.
       home_team: a, home_team:b, away_team:a, away_team:c, when facet_field =
       [home_team, away_team], facet_value will be [a, b, c].
      
       UNLESS this is a 1:1 facet dimension (mapped_fields.size() == 1) AND the
       mapped_field equals the parent SearchConfig.name, the parent must
       also contain a SearchCriteriaProperty that maps to the same fields.
       mapped_fields must not be empty.
       
      repeated string mapped_fields = 1;
      Specified by:
      getMappedFields in interface FacetPropertyOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The mappedFields at the given index.
    • getMappedFieldsBytes

      public com.google.protobuf.ByteString getMappedFieldsBytes(int index)
       Name of the facets, which are the dimensions users want to use to refine
       search results. `mapped_fields` will match UserSpecifiedDataSchema keys.
      
       For example, user can add a bunch of UGAs with the same key, such as
       player:adam, player:bob, player:charles. When multiple mapped_fields are
       specified, will merge their value together as final facet value. E.g.
       home_team: a, home_team:b, away_team:a, away_team:c, when facet_field =
       [home_team, away_team], facet_value will be [a, b, c].
      
       UNLESS this is a 1:1 facet dimension (mapped_fields.size() == 1) AND the
       mapped_field equals the parent SearchConfig.name, the parent must
       also contain a SearchCriteriaProperty that maps to the same fields.
       mapped_fields must not be empty.
       
      repeated string mapped_fields = 1;
      Specified by:
      getMappedFieldsBytes in interface FacetPropertyOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the mappedFields at the given index.
    • getDisplayName

      public String getDisplayName()
       Display name of the facet. To be used by UI for facet rendering.
       
      string display_name = 2;
      Specified by:
      getDisplayName in interface FacetPropertyOrBuilder
      Returns:
      The displayName.
    • getDisplayNameBytes

      public com.google.protobuf.ByteString getDisplayNameBytes()
       Display name of the facet. To be used by UI for facet rendering.
       
      string display_name = 2;
      Specified by:
      getDisplayNameBytes in interface FacetPropertyOrBuilder
      Returns:
      The bytes for displayName.
    • getResultSize

      public long getResultSize()
       Maximum number of unique bucket to return for one facet. Bucket number can
       be large for high-cardinality facet such as "player". We only return top-n
       most related ones to user. If it's <= 0, the server will decide the
       appropriate result_size.
       
      int64 result_size = 3;
      Specified by:
      getResultSize in interface FacetPropertyOrBuilder
      Returns:
      The resultSize.
    • getBucketTypeValue

      public int getBucketTypeValue()
       Facet bucket type e.g. value, range.
       
      .google.cloud.visionai.v1.FacetBucketType bucket_type = 4;
      Specified by:
      getBucketTypeValue in interface FacetPropertyOrBuilder
      Returns:
      The enum numeric value on the wire for bucketType.
    • getBucketType

      public FacetBucketType getBucketType()
       Facet bucket type e.g. value, range.
       
      .google.cloud.visionai.v1.FacetBucketType bucket_type = 4;
      Specified by:
      getBucketType in interface FacetPropertyOrBuilder
      Returns:
      The bucketType.
    • 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 FacetProperty parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

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

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

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

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

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

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

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

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

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

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

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

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

      public static FacetProperty.Builder newBuilder()
    • newBuilder

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

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

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

      public static FacetProperty getDefaultInstance()
    • parser

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

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