Class FacetProperty.CustomRangeBucketSpec.Builder (0.4.0)

public static final class FacetProperty.CustomRangeBucketSpec.Builder extends GeneratedMessageV3.Builder<FacetProperty.CustomRangeBucketSpec.Builder> implements FacetProperty.CustomRangeBucketSpecOrBuilder

If bucket type is CUSTOM_RANGE, specify how values are bucketized. Use integer bucket value as an example, when the endpoints are 0, 10, 100, and 1000, we will generate the following facets: [-inf, 0), [0, 10), [10, 100), [100, 1000), [1000, inf). Notably:

  • endpoints must be listed in ascending order. Otherwise, the SearchConfig API will reject the facet config.
  • < 1 endpoints is an invalid spec.

Protobuf type google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec

Static Methods

getDescriptor()

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

Methods

addAllEndpoints(Iterable<? extends FacetValue> values)

public FacetProperty.CustomRangeBucketSpec.Builder addAllEndpoints(Iterable<? extends FacetValue> values)

Currently, only integer type is supported for this field.

repeated .google.cloud.visionai.v1.FacetValue endpoints = 1;

Parameter
Name Description
values Iterable<? extends com.google.cloud.visionai.v1.FacetValue>
Returns
Type Description
FacetProperty.CustomRangeBucketSpec.Builder

addEndpoints(FacetValue value)

public FacetProperty.CustomRangeBucketSpec.Builder addEndpoints(FacetValue value)

Currently, only integer type is supported for this field.

repeated .google.cloud.visionai.v1.FacetValue endpoints = 1;

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

addEndpoints(FacetValue.Builder builderForValue)

public FacetProperty.CustomRangeBucketSpec.Builder addEndpoints(FacetValue.Builder builderForValue)

Currently, only integer type is supported for this field.

repeated .google.cloud.visionai.v1.FacetValue endpoints = 1;

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

addEndpoints(int index, FacetValue value)

public FacetProperty.CustomRangeBucketSpec.Builder addEndpoints(int index, FacetValue value)

Currently, only integer type is supported for this field.

repeated .google.cloud.visionai.v1.FacetValue endpoints = 1;

Parameters
Name Description
index int
value FacetValue
Returns
Type Description
FacetProperty.CustomRangeBucketSpec.Builder

addEndpoints(int index, FacetValue.Builder builderForValue)

public FacetProperty.CustomRangeBucketSpec.Builder addEndpoints(int index, FacetValue.Builder builderForValue)

Currently, only integer type is supported for this field.

repeated .google.cloud.visionai.v1.FacetValue endpoints = 1;

Parameters
Name Description
index int
builderForValue FacetValue.Builder
Returns
Type Description
FacetProperty.CustomRangeBucketSpec.Builder

addEndpointsBuilder()

public FacetValue.Builder addEndpointsBuilder()

Currently, only integer type is supported for this field.

repeated .google.cloud.visionai.v1.FacetValue endpoints = 1;

Returns
Type Description
FacetValue.Builder

addEndpointsBuilder(int index)

public FacetValue.Builder addEndpointsBuilder(int index)

Currently, only integer type is supported for this field.

repeated .google.cloud.visionai.v1.FacetValue endpoints = 1;

Parameter
Name Description
index int
Returns
Type Description
FacetValue.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

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

buildPartial()

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

clear()

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

clearEndpoints()

public FacetProperty.CustomRangeBucketSpec.Builder clearEndpoints()

Currently, only integer type is supported for this field.

repeated .google.cloud.visionai.v1.FacetValue endpoints = 1;

Returns
Type Description
FacetProperty.CustomRangeBucketSpec.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

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

getDefaultInstanceForType()

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

getDescriptorForType()

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

getEndpoints(int index)

public FacetValue getEndpoints(int index)

Currently, only integer type is supported for this field.

repeated .google.cloud.visionai.v1.FacetValue endpoints = 1;

Parameter
Name Description
index int
Returns
Type Description
FacetValue

getEndpointsBuilder(int index)

public FacetValue.Builder getEndpointsBuilder(int index)

Currently, only integer type is supported for this field.

repeated .google.cloud.visionai.v1.FacetValue endpoints = 1;

Parameter
Name Description
index int
Returns
Type Description
FacetValue.Builder

getEndpointsBuilderList()

public List<FacetValue.Builder> getEndpointsBuilderList()

Currently, only integer type is supported for this field.

repeated .google.cloud.visionai.v1.FacetValue endpoints = 1;

Returns
Type Description
List<Builder>

getEndpointsCount()

public int getEndpointsCount()

Currently, only integer type is supported for this field.

repeated .google.cloud.visionai.v1.FacetValue endpoints = 1;

Returns
Type Description
int

getEndpointsList()

public List<FacetValue> getEndpointsList()

Currently, only integer type is supported for this field.

repeated .google.cloud.visionai.v1.FacetValue endpoints = 1;

Returns
Type Description
List<FacetValue>

getEndpointsOrBuilder(int index)

public FacetValueOrBuilder getEndpointsOrBuilder(int index)

Currently, only integer type is supported for this field.

repeated .google.cloud.visionai.v1.FacetValue endpoints = 1;

Parameter
Name Description
index int
Returns
Type Description
FacetValueOrBuilder

getEndpointsOrBuilderList()

public List<? extends FacetValueOrBuilder> getEndpointsOrBuilderList()

Currently, only integer type is supported for this field.

repeated .google.cloud.visionai.v1.FacetValue endpoints = 1;

Returns
Type Description
List<? extends com.google.cloud.visionai.v1.FacetValueOrBuilder>

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(FacetProperty.CustomRangeBucketSpec other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeEndpoints(int index)

public FacetProperty.CustomRangeBucketSpec.Builder removeEndpoints(int index)

Currently, only integer type is supported for this field.

repeated .google.cloud.visionai.v1.FacetValue endpoints = 1;

Parameter
Name Description
index int
Returns
Type Description
FacetProperty.CustomRangeBucketSpec.Builder

setEndpoints(int index, FacetValue value)

public FacetProperty.CustomRangeBucketSpec.Builder setEndpoints(int index, FacetValue value)

Currently, only integer type is supported for this field.

repeated .google.cloud.visionai.v1.FacetValue endpoints = 1;

Parameters
Name Description
index int
value FacetValue
Returns
Type Description
FacetProperty.CustomRangeBucketSpec.Builder

setEndpoints(int index, FacetValue.Builder builderForValue)

public FacetProperty.CustomRangeBucketSpec.Builder setEndpoints(int index, FacetValue.Builder builderForValue)

Currently, only integer type is supported for this field.

repeated .google.cloud.visionai.v1.FacetValue endpoints = 1;

Parameters
Name Description
index int
builderForValue FacetValue.Builder
Returns
Type Description
FacetProperty.CustomRangeBucketSpec.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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