Class FacetProperty.FixedRangeBucketSpec

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

public static final class FacetProperty.FixedRangeBucketSpec extends com.google.protobuf.GeneratedMessage implements FacetProperty.FixedRangeBucketSpecOrBuilder
 If bucket type is FIXED_RANGE, specify how values are bucketized. Use
 FixedRangeBucketSpec when you want to create multiple buckets with equal
 granularities. Using integer bucket value as an example, when
 bucket_start = 0, bucket_granularity = 10, bucket_count = 5, this facet
 will be aggregated via the following buckets:
 [-inf, 0), [0, 10), [10, 20), [20, 30), [30, inf).
 Notably, bucket_count <= 1 is an invalid spec.
 
Protobuf type google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec
See Also:
  • Field Details

    • BUCKET_START_FIELD_NUMBER

      public static final int BUCKET_START_FIELD_NUMBER
      See Also:
    • BUCKET_GRANULARITY_FIELD_NUMBER

      public static final int BUCKET_GRANULARITY_FIELD_NUMBER
      See Also:
    • BUCKET_COUNT_FIELD_NUMBER

      public static final int BUCKET_COUNT_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
    • hasBucketStart

      public boolean hasBucketStart()
       Lower bound of the bucket. NOTE: Only integer type is currently supported
       for this field.
       
      .google.cloud.visionai.v1.FacetValue bucket_start = 1;
      Specified by:
      hasBucketStart in interface FacetProperty.FixedRangeBucketSpecOrBuilder
      Returns:
      Whether the bucketStart field is set.
    • getBucketStart

      public FacetValue getBucketStart()
       Lower bound of the bucket. NOTE: Only integer type is currently supported
       for this field.
       
      .google.cloud.visionai.v1.FacetValue bucket_start = 1;
      Specified by:
      getBucketStart in interface FacetProperty.FixedRangeBucketSpecOrBuilder
      Returns:
      The bucketStart.
    • getBucketStartOrBuilder

      public FacetValueOrBuilder getBucketStartOrBuilder()
       Lower bound of the bucket. NOTE: Only integer type is currently supported
       for this field.
       
      .google.cloud.visionai.v1.FacetValue bucket_start = 1;
      Specified by:
      getBucketStartOrBuilder in interface FacetProperty.FixedRangeBucketSpecOrBuilder
    • hasBucketGranularity

      public boolean hasBucketGranularity()
       Bucket granularity. NOTE: Only integer type is currently supported for
       this field.
       
      .google.cloud.visionai.v1.FacetValue bucket_granularity = 2;
      Specified by:
      hasBucketGranularity in interface FacetProperty.FixedRangeBucketSpecOrBuilder
      Returns:
      Whether the bucketGranularity field is set.
    • getBucketGranularity

      public FacetValue getBucketGranularity()
       Bucket granularity. NOTE: Only integer type is currently supported for
       this field.
       
      .google.cloud.visionai.v1.FacetValue bucket_granularity = 2;
      Specified by:
      getBucketGranularity in interface FacetProperty.FixedRangeBucketSpecOrBuilder
      Returns:
      The bucketGranularity.
    • getBucketGranularityOrBuilder

      public FacetValueOrBuilder getBucketGranularityOrBuilder()
       Bucket granularity. NOTE: Only integer type is currently supported for
       this field.
       
      .google.cloud.visionai.v1.FacetValue bucket_granularity = 2;
      Specified by:
      getBucketGranularityOrBuilder in interface FacetProperty.FixedRangeBucketSpecOrBuilder
    • getBucketCount

      public int getBucketCount()
       Total number of buckets.
       
      int32 bucket_count = 3;
      Specified by:
      getBucketCount in interface FacetProperty.FixedRangeBucketSpecOrBuilder
      Returns:
      The bucketCount.
    • 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.FixedRangeBucketSpec parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

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

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

      public static FacetProperty.FixedRangeBucketSpec 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.FixedRangeBucketSpec parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

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

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

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

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

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

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

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

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

      public static FacetProperty.FixedRangeBucketSpec.Builder newBuilder()
    • newBuilder

    • toBuilder

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

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

      public static FacetProperty.FixedRangeBucketSpec getDefaultInstance()
    • parser

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

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