Class FacetProperty.CustomRangeBucketSpec (0.12.0)

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

Inheritance

Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > FacetProperty.CustomRangeBucketSpec

Static Fields

ENDPOINTS_FIELD_NUMBER

public static final int ENDPOINTS_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static FacetProperty.CustomRangeBucketSpec getDefaultInstance()
Returns
Type Description
FacetProperty.CustomRangeBucketSpec

getDescriptor()

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

newBuilder()

public static FacetProperty.CustomRangeBucketSpec.Builder newBuilder()
Returns
Type Description
FacetProperty.CustomRangeBucketSpec.Builder

newBuilder(FacetProperty.CustomRangeBucketSpec prototype)

public static FacetProperty.CustomRangeBucketSpec.Builder newBuilder(FacetProperty.CustomRangeBucketSpec prototype)
Parameter
Name Description
prototype FacetProperty.CustomRangeBucketSpec
Returns
Type Description
FacetProperty.CustomRangeBucketSpec.Builder

parseDelimitedFrom(InputStream input)

public static FacetProperty.CustomRangeBucketSpec parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
FacetProperty.CustomRangeBucketSpec
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static FacetProperty.CustomRangeBucketSpec parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FacetProperty.CustomRangeBucketSpec
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static FacetProperty.CustomRangeBucketSpec parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
FacetProperty.CustomRangeBucketSpec
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static FacetProperty.CustomRangeBucketSpec parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FacetProperty.CustomRangeBucketSpec
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static FacetProperty.CustomRangeBucketSpec parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
FacetProperty.CustomRangeBucketSpec
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static FacetProperty.CustomRangeBucketSpec parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FacetProperty.CustomRangeBucketSpec
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static FacetProperty.CustomRangeBucketSpec parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
FacetProperty.CustomRangeBucketSpec
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static FacetProperty.CustomRangeBucketSpec parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FacetProperty.CustomRangeBucketSpec
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static FacetProperty.CustomRangeBucketSpec parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
FacetProperty.CustomRangeBucketSpec
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static FacetProperty.CustomRangeBucketSpec parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FacetProperty.CustomRangeBucketSpec
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static FacetProperty.CustomRangeBucketSpec parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
FacetProperty.CustomRangeBucketSpec
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static FacetProperty.CustomRangeBucketSpec parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FacetProperty.CustomRangeBucketSpec
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<FacetProperty.CustomRangeBucketSpec> parser()
Returns
Type Description
Parser<CustomRangeBucketSpec>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

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

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

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>

getParserForType()

public Parser<FacetProperty.CustomRangeBucketSpec> getParserForType()
Returns
Type Description
Parser<CustomRangeBucketSpec>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public FacetProperty.CustomRangeBucketSpec.Builder newBuilderForType()
Returns
Type Description
FacetProperty.CustomRangeBucketSpec.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected FacetProperty.CustomRangeBucketSpec.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
FacetProperty.CustomRangeBucketSpec.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public FacetProperty.CustomRangeBucketSpec.Builder toBuilder()
Returns
Type Description
FacetProperty.CustomRangeBucketSpec.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException