Class FacetGroup.Builder (0.11.0)

public static final class FacetGroup.Builder extends GeneratedMessageV3.Builder<FacetGroup.Builder> implements FacetGroupOrBuilder

A group of facet buckets to be passed back and forth between backend & frontend.

Protobuf type google.cloud.visionai.v1.FacetGroup

Implements

FacetGroupOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllBuckets(Iterable<? extends FacetBucket> values)

public FacetGroup.Builder addAllBuckets(Iterable<? extends FacetBucket> values)

Buckets associated with the facet. E.g. for "Team" facet, the bucket can be 49ers, patriots, etc.

repeated .google.cloud.visionai.v1.FacetBucket buckets = 3;

Parameter
Name Description
values Iterable<? extends com.google.cloud.visionai.v1.FacetBucket>
Returns
Type Description
FacetGroup.Builder

addBuckets(FacetBucket value)

public FacetGroup.Builder addBuckets(FacetBucket value)

Buckets associated with the facet. E.g. for "Team" facet, the bucket can be 49ers, patriots, etc.

repeated .google.cloud.visionai.v1.FacetBucket buckets = 3;

Parameter
Name Description
value FacetBucket
Returns
Type Description
FacetGroup.Builder

addBuckets(FacetBucket.Builder builderForValue)

public FacetGroup.Builder addBuckets(FacetBucket.Builder builderForValue)

Buckets associated with the facet. E.g. for "Team" facet, the bucket can be 49ers, patriots, etc.

repeated .google.cloud.visionai.v1.FacetBucket buckets = 3;

Parameter
Name Description
builderForValue FacetBucket.Builder
Returns
Type Description
FacetGroup.Builder

addBuckets(int index, FacetBucket value)

public FacetGroup.Builder addBuckets(int index, FacetBucket value)

Buckets associated with the facet. E.g. for "Team" facet, the bucket can be 49ers, patriots, etc.

repeated .google.cloud.visionai.v1.FacetBucket buckets = 3;

Parameters
Name Description
index int
value FacetBucket
Returns
Type Description
FacetGroup.Builder

addBuckets(int index, FacetBucket.Builder builderForValue)

public FacetGroup.Builder addBuckets(int index, FacetBucket.Builder builderForValue)

Buckets associated with the facet. E.g. for "Team" facet, the bucket can be 49ers, patriots, etc.

repeated .google.cloud.visionai.v1.FacetBucket buckets = 3;

Parameters
Name Description
index int
builderForValue FacetBucket.Builder
Returns
Type Description
FacetGroup.Builder

addBucketsBuilder()

public FacetBucket.Builder addBucketsBuilder()

Buckets associated with the facet. E.g. for "Team" facet, the bucket can be 49ers, patriots, etc.

repeated .google.cloud.visionai.v1.FacetBucket buckets = 3;

Returns
Type Description
FacetBucket.Builder

addBucketsBuilder(int index)

public FacetBucket.Builder addBucketsBuilder(int index)

Buckets associated with the facet. E.g. for "Team" facet, the bucket can be 49ers, patriots, etc.

repeated .google.cloud.visionai.v1.FacetBucket buckets = 3;

Parameter
Name Description
index int
Returns
Type Description
FacetBucket.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public FacetGroup build()
Returns
Type Description
FacetGroup

buildPartial()

public FacetGroup buildPartial()
Returns
Type Description
FacetGroup

clear()

public FacetGroup.Builder clear()
Returns
Type Description
FacetGroup.Builder
Overrides

clearBucketType()

public FacetGroup.Builder clearBucketType()

Facet bucket type.

.google.cloud.visionai.v1.FacetBucketType bucket_type = 4;

Returns
Type Description
FacetGroup.Builder

This builder for chaining.

clearBuckets()

public FacetGroup.Builder clearBuckets()

Buckets associated with the facet. E.g. for "Team" facet, the bucket can be 49ers, patriots, etc.

repeated .google.cloud.visionai.v1.FacetBucket buckets = 3;

Returns
Type Description
FacetGroup.Builder

clearDisplayName()

public FacetGroup.Builder clearDisplayName()

Display name of the facet. To be used by UI for facet rendering.

string display_name = 2;

Returns
Type Description
FacetGroup.Builder

This builder for chaining.

clearFacetId()

public FacetGroup.Builder clearFacetId()

Unique id of the facet group.

string facet_id = 1;

Returns
Type Description
FacetGroup.Builder

This builder for chaining.

clearFetchMatchedAnnotations()

public FacetGroup.Builder clearFetchMatchedAnnotations()

If true, return query matched annotations for this facet group's selection. This option is only applicable for facets based on partition level annotations. It supports the following facet values:

  • INTEGER
  • STRING (DataSchema.SearchStrategy.EXACT_SEARCH only)

bool fetch_matched_annotations = 5;

Returns
Type Description
FacetGroup.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

public FacetGroup.Builder clone()
Returns
Type Description
FacetGroup.Builder
Overrides

getBucketType()

public FacetBucketType getBucketType()

Facet bucket type.

.google.cloud.visionai.v1.FacetBucketType bucket_type = 4;

Returns
Type Description
FacetBucketType

The bucketType.

getBucketTypeValue()

public int getBucketTypeValue()

Facet bucket type.

.google.cloud.visionai.v1.FacetBucketType bucket_type = 4;

Returns
Type Description
int

The enum numeric value on the wire for bucketType.

getBuckets(int index)

public FacetBucket getBuckets(int index)

Buckets associated with the facet. E.g. for "Team" facet, the bucket can be 49ers, patriots, etc.

repeated .google.cloud.visionai.v1.FacetBucket buckets = 3;

Parameter
Name Description
index int
Returns
Type Description
FacetBucket

getBucketsBuilder(int index)

public FacetBucket.Builder getBucketsBuilder(int index)

Buckets associated with the facet. E.g. for "Team" facet, the bucket can be 49ers, patriots, etc.

repeated .google.cloud.visionai.v1.FacetBucket buckets = 3;

Parameter
Name Description
index int
Returns
Type Description
FacetBucket.Builder

getBucketsBuilderList()

public List<FacetBucket.Builder> getBucketsBuilderList()

Buckets associated with the facet. E.g. for "Team" facet, the bucket can be 49ers, patriots, etc.

repeated .google.cloud.visionai.v1.FacetBucket buckets = 3;

Returns
Type Description
List<Builder>

getBucketsCount()

public int getBucketsCount()

Buckets associated with the facet. E.g. for "Team" facet, the bucket can be 49ers, patriots, etc.

repeated .google.cloud.visionai.v1.FacetBucket buckets = 3;

Returns
Type Description
int

getBucketsList()

public List<FacetBucket> getBucketsList()

Buckets associated with the facet. E.g. for "Team" facet, the bucket can be 49ers, patriots, etc.

repeated .google.cloud.visionai.v1.FacetBucket buckets = 3;

Returns
Type Description
List<FacetBucket>

getBucketsOrBuilder(int index)

public FacetBucketOrBuilder getBucketsOrBuilder(int index)

Buckets associated with the facet. E.g. for "Team" facet, the bucket can be 49ers, patriots, etc.

repeated .google.cloud.visionai.v1.FacetBucket buckets = 3;

Parameter
Name Description
index int
Returns
Type Description
FacetBucketOrBuilder

getBucketsOrBuilderList()

public List<? extends FacetBucketOrBuilder> getBucketsOrBuilderList()

Buckets associated with the facet. E.g. for "Team" facet, the bucket can be 49ers, patriots, etc.

repeated .google.cloud.visionai.v1.FacetBucket buckets = 3;

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

getDefaultInstanceForType()

public FacetGroup getDefaultInstanceForType()
Returns
Type Description
FacetGroup

getDescriptorForType()

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

getDisplayName()

public String getDisplayName()

Display name of the facet. To be used by UI for facet rendering.

string display_name = 2;

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Display name of the facet. To be used by UI for facet rendering.

string display_name = 2;

Returns
Type Description
ByteString

The bytes for displayName.

getFacetId()

public String getFacetId()

Unique id of the facet group.

string facet_id = 1;

Returns
Type Description
String

The facetId.

getFacetIdBytes()

public ByteString getFacetIdBytes()

Unique id of the facet group.

string facet_id = 1;

Returns
Type Description
ByteString

The bytes for facetId.

getFetchMatchedAnnotations()

public boolean getFetchMatchedAnnotations()

If true, return query matched annotations for this facet group's selection. This option is only applicable for facets based on partition level annotations. It supports the following facet values:

  • INTEGER
  • STRING (DataSchema.SearchStrategy.EXACT_SEARCH only)

bool fetch_matched_annotations = 5;

Returns
Type Description
boolean

The fetchMatchedAnnotations.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(FacetGroup other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeBuckets(int index)

public FacetGroup.Builder removeBuckets(int index)

Buckets associated with the facet. E.g. for "Team" facet, the bucket can be 49ers, patriots, etc.

repeated .google.cloud.visionai.v1.FacetBucket buckets = 3;

Parameter
Name Description
index int
Returns
Type Description
FacetGroup.Builder

setBucketType(FacetBucketType value)

public FacetGroup.Builder setBucketType(FacetBucketType value)

Facet bucket type.

.google.cloud.visionai.v1.FacetBucketType bucket_type = 4;

Parameter
Name Description
value FacetBucketType

The bucketType to set.

Returns
Type Description
FacetGroup.Builder

This builder for chaining.

setBucketTypeValue(int value)

public FacetGroup.Builder setBucketTypeValue(int value)

Facet bucket type.

.google.cloud.visionai.v1.FacetBucketType bucket_type = 4;

Parameter
Name Description
value int

The enum numeric value on the wire for bucketType to set.

Returns
Type Description
FacetGroup.Builder

This builder for chaining.

setBuckets(int index, FacetBucket value)

public FacetGroup.Builder setBuckets(int index, FacetBucket value)

Buckets associated with the facet. E.g. for "Team" facet, the bucket can be 49ers, patriots, etc.

repeated .google.cloud.visionai.v1.FacetBucket buckets = 3;

Parameters
Name Description
index int
value FacetBucket
Returns
Type Description
FacetGroup.Builder

setBuckets(int index, FacetBucket.Builder builderForValue)

public FacetGroup.Builder setBuckets(int index, FacetBucket.Builder builderForValue)

Buckets associated with the facet. E.g. for "Team" facet, the bucket can be 49ers, patriots, etc.

repeated .google.cloud.visionai.v1.FacetBucket buckets = 3;

Parameters
Name Description
index int
builderForValue FacetBucket.Builder
Returns
Type Description
FacetGroup.Builder

setDisplayName(String value)

public FacetGroup.Builder setDisplayName(String value)

Display name of the facet. To be used by UI for facet rendering.

string display_name = 2;

Parameter
Name Description
value String

The displayName to set.

Returns
Type Description
FacetGroup.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public FacetGroup.Builder setDisplayNameBytes(ByteString value)

Display name of the facet. To be used by UI for facet rendering.

string display_name = 2;

Parameter
Name Description
value ByteString

The bytes for displayName to set.

Returns
Type Description
FacetGroup.Builder

This builder for chaining.

setFacetId(String value)

public FacetGroup.Builder setFacetId(String value)

Unique id of the facet group.

string facet_id = 1;

Parameter
Name Description
value String

The facetId to set.

Returns
Type Description
FacetGroup.Builder

This builder for chaining.

setFacetIdBytes(ByteString value)

public FacetGroup.Builder setFacetIdBytes(ByteString value)

Unique id of the facet group.

string facet_id = 1;

Parameter
Name Description
value ByteString

The bytes for facetId to set.

Returns
Type Description
FacetGroup.Builder

This builder for chaining.

setFetchMatchedAnnotations(boolean value)

public FacetGroup.Builder setFetchMatchedAnnotations(boolean value)

If true, return query matched annotations for this facet group's selection. This option is only applicable for facets based on partition level annotations. It supports the following facet values:

  • INTEGER
  • STRING (DataSchema.SearchStrategy.EXACT_SEARCH only)

bool fetch_matched_annotations = 5;

Parameter
Name Description
value boolean

The fetchMatchedAnnotations to set.

Returns
Type Description
FacetGroup.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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