Class FacetProperty.FixedRangeBucketSpec.Builder (0.9.0)

public static final class FacetProperty.FixedRangeBucketSpec.Builder extends GeneratedMessageV3.Builder<FacetProperty.FixedRangeBucketSpec.Builder> 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

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public FacetProperty.FixedRangeBucketSpec.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
FacetProperty.FixedRangeBucketSpec.Builder
Overrides

build()

public FacetProperty.FixedRangeBucketSpec build()
Returns
Type Description
FacetProperty.FixedRangeBucketSpec

buildPartial()

public FacetProperty.FixedRangeBucketSpec buildPartial()
Returns
Type Description
FacetProperty.FixedRangeBucketSpec

clear()

public FacetProperty.FixedRangeBucketSpec.Builder clear()
Returns
Type Description
FacetProperty.FixedRangeBucketSpec.Builder
Overrides

clearBucketCount()

public FacetProperty.FixedRangeBucketSpec.Builder clearBucketCount()

Total number of buckets.

int32 bucket_count = 3;

Returns
Type Description
FacetProperty.FixedRangeBucketSpec.Builder

This builder for chaining.

clearBucketGranularity()

public FacetProperty.FixedRangeBucketSpec.Builder clearBucketGranularity()

Bucket granularity. NOTE: Only integer type is currently supported for this field.

.google.cloud.visionai.v1.FacetValue bucket_granularity = 2;

Returns
Type Description
FacetProperty.FixedRangeBucketSpec.Builder

clearBucketStart()

public FacetProperty.FixedRangeBucketSpec.Builder clearBucketStart()

Lower bound of the bucket. NOTE: Only integer type is currently supported for this field.

.google.cloud.visionai.v1.FacetValue bucket_start = 1;

Returns
Type Description
FacetProperty.FixedRangeBucketSpec.Builder

clearField(Descriptors.FieldDescriptor field)

public FacetProperty.FixedRangeBucketSpec.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
FacetProperty.FixedRangeBucketSpec.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public FacetProperty.FixedRangeBucketSpec.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
FacetProperty.FixedRangeBucketSpec.Builder
Overrides

clone()

public FacetProperty.FixedRangeBucketSpec.Builder clone()
Returns
Type Description
FacetProperty.FixedRangeBucketSpec.Builder
Overrides

getBucketCount()

public int getBucketCount()

Total number of buckets.

int32 bucket_count = 3;

Returns
Type Description
int

The bucketCount.

getBucketGranularity()

public FacetValue getBucketGranularity()

Bucket granularity. NOTE: Only integer type is currently supported for this field.

.google.cloud.visionai.v1.FacetValue bucket_granularity = 2;

Returns
Type Description
FacetValue

The bucketGranularity.

getBucketGranularityBuilder()

public FacetValue.Builder getBucketGranularityBuilder()

Bucket granularity. NOTE: Only integer type is currently supported for this field.

.google.cloud.visionai.v1.FacetValue bucket_granularity = 2;

Returns
Type Description
FacetValue.Builder

getBucketGranularityOrBuilder()

public FacetValueOrBuilder getBucketGranularityOrBuilder()

Bucket granularity. NOTE: Only integer type is currently supported for this field.

.google.cloud.visionai.v1.FacetValue bucket_granularity = 2;

Returns
Type Description
FacetValueOrBuilder

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;

Returns
Type Description
FacetValue

The bucketStart.

getBucketStartBuilder()

public FacetValue.Builder getBucketStartBuilder()

Lower bound of the bucket. NOTE: Only integer type is currently supported for this field.

.google.cloud.visionai.v1.FacetValue bucket_start = 1;

Returns
Type Description
FacetValue.Builder

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;

Returns
Type Description
FacetValueOrBuilder

getDefaultInstanceForType()

public FacetProperty.FixedRangeBucketSpec getDefaultInstanceForType()
Returns
Type Description
FacetProperty.FixedRangeBucketSpec

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

hasBucketGranularity()

public boolean hasBucketGranularity()

Bucket granularity. NOTE: Only integer type is currently supported for this field.

.google.cloud.visionai.v1.FacetValue bucket_granularity = 2;

Returns
Type Description
boolean

Whether the bucketGranularity field is set.

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;

Returns
Type Description
boolean

Whether the bucketStart field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeBucketGranularity(FacetValue value)

public FacetProperty.FixedRangeBucketSpec.Builder mergeBucketGranularity(FacetValue value)

Bucket granularity. NOTE: Only integer type is currently supported for this field.

.google.cloud.visionai.v1.FacetValue bucket_granularity = 2;

Parameter
Name Description
value FacetValue
Returns
Type Description
FacetProperty.FixedRangeBucketSpec.Builder

mergeBucketStart(FacetValue value)

public FacetProperty.FixedRangeBucketSpec.Builder mergeBucketStart(FacetValue value)

Lower bound of the bucket. NOTE: Only integer type is currently supported for this field.

.google.cloud.visionai.v1.FacetValue bucket_start = 1;

Parameter
Name Description
value FacetValue
Returns
Type Description
FacetProperty.FixedRangeBucketSpec.Builder

mergeFrom(FacetProperty.FixedRangeBucketSpec other)

public FacetProperty.FixedRangeBucketSpec.Builder mergeFrom(FacetProperty.FixedRangeBucketSpec other)
Parameter
Name Description
other FacetProperty.FixedRangeBucketSpec
Returns
Type Description
FacetProperty.FixedRangeBucketSpec.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public FacetProperty.FixedRangeBucketSpec.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FacetProperty.FixedRangeBucketSpec.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public FacetProperty.FixedRangeBucketSpec.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
FacetProperty.FixedRangeBucketSpec.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final FacetProperty.FixedRangeBucketSpec.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
FacetProperty.FixedRangeBucketSpec.Builder
Overrides

setBucketCount(int value)

public FacetProperty.FixedRangeBucketSpec.Builder setBucketCount(int value)

Total number of buckets.

int32 bucket_count = 3;

Parameter
Name Description
value int

The bucketCount to set.

Returns
Type Description
FacetProperty.FixedRangeBucketSpec.Builder

This builder for chaining.

setBucketGranularity(FacetValue value)

public FacetProperty.FixedRangeBucketSpec.Builder setBucketGranularity(FacetValue value)

Bucket granularity. NOTE: Only integer type is currently supported for this field.

.google.cloud.visionai.v1.FacetValue bucket_granularity = 2;

Parameter
Name Description
value FacetValue
Returns
Type Description
FacetProperty.FixedRangeBucketSpec.Builder

setBucketGranularity(FacetValue.Builder builderForValue)

public FacetProperty.FixedRangeBucketSpec.Builder setBucketGranularity(FacetValue.Builder builderForValue)

Bucket granularity. NOTE: Only integer type is currently supported for this field.

.google.cloud.visionai.v1.FacetValue bucket_granularity = 2;

Parameter
Name Description
builderForValue FacetValue.Builder
Returns
Type Description
FacetProperty.FixedRangeBucketSpec.Builder

setBucketStart(FacetValue value)

public FacetProperty.FixedRangeBucketSpec.Builder setBucketStart(FacetValue value)

Lower bound of the bucket. NOTE: Only integer type is currently supported for this field.

.google.cloud.visionai.v1.FacetValue bucket_start = 1;

Parameter
Name Description
value FacetValue
Returns
Type Description
FacetProperty.FixedRangeBucketSpec.Builder

setBucketStart(FacetValue.Builder builderForValue)

public FacetProperty.FixedRangeBucketSpec.Builder setBucketStart(FacetValue.Builder builderForValue)

Lower bound of the bucket. NOTE: Only integer type is currently supported for this field.

.google.cloud.visionai.v1.FacetValue bucket_start = 1;

Parameter
Name Description
builderForValue FacetValue.Builder
Returns
Type Description
FacetProperty.FixedRangeBucketSpec.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public FacetProperty.FixedRangeBucketSpec.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
FacetProperty.FixedRangeBucketSpec.Builder
Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public FacetProperty.FixedRangeBucketSpec.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
FacetProperty.FixedRangeBucketSpec.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final FacetProperty.FixedRangeBucketSpec.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
FacetProperty.FixedRangeBucketSpec.Builder
Overrides