Class FacetGroup.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<FacetGroup.Builder>
com.google.cloud.visionai.v1.FacetGroup.Builder
All Implemented Interfaces:
FacetGroupOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
FacetGroup

public static final class FacetGroup.Builder extends com.google.protobuf.GeneratedMessage.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
  • 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.Builder<FacetGroup.Builder>
    • clear

      public FacetGroup.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<FacetGroup.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<FacetGroup.Builder>
    • getDefaultInstanceForType

      public FacetGroup getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public FacetGroup build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public FacetGroup buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public FacetGroup.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<FacetGroup.Builder>
    • mergeFrom

      public FacetGroup.Builder mergeFrom(FacetGroup other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<FacetGroup.Builder>
    • mergeFrom

      public FacetGroup.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<FacetGroup.Builder>
      Throws:
      IOException
    • getFacetId

      public String getFacetId()
       Unique id of the facet group.
       
      string facet_id = 1;
      Specified by:
      getFacetId in interface FacetGroupOrBuilder
      Returns:
      The facetId.
    • getFacetIdBytes

      public com.google.protobuf.ByteString getFacetIdBytes()
       Unique id of the facet group.
       
      string facet_id = 1;
      Specified by:
      getFacetIdBytes in interface FacetGroupOrBuilder
      Returns:
      The bytes for facetId.
    • setFacetId

      public FacetGroup.Builder setFacetId(String value)
       Unique id of the facet group.
       
      string facet_id = 1;
      Parameters:
      value - The facetId to set.
      Returns:
      This builder for chaining.
    • clearFacetId

      public FacetGroup.Builder clearFacetId()
       Unique id of the facet group.
       
      string facet_id = 1;
      Returns:
      This builder for chaining.
    • setFacetIdBytes

      public FacetGroup.Builder setFacetIdBytes(com.google.protobuf.ByteString value)
       Unique id of the facet group.
       
      string facet_id = 1;
      Parameters:
      value - The bytes for facetId to set.
      Returns:
      This builder for chaining.
    • getDisplayName

      public String getDisplayName()
       Display name of the facet. To be used by UI for facet rendering.
       
      string display_name = 2;
      Specified by:
      getDisplayName in interface FacetGroupOrBuilder
      Returns:
      The displayName.
    • getDisplayNameBytes

      public com.google.protobuf.ByteString getDisplayNameBytes()
       Display name of the facet. To be used by UI for facet rendering.
       
      string display_name = 2;
      Specified by:
      getDisplayNameBytes in interface FacetGroupOrBuilder
      Returns:
      The bytes for displayName.
    • setDisplayName

      public FacetGroup.Builder setDisplayName(String value)
       Display name of the facet. To be used by UI for facet rendering.
       
      string display_name = 2;
      Parameters:
      value - The displayName to set.
      Returns:
      This builder for chaining.
    • clearDisplayName

      public FacetGroup.Builder clearDisplayName()
       Display name of the facet. To be used by UI for facet rendering.
       
      string display_name = 2;
      Returns:
      This builder for chaining.
    • setDisplayNameBytes

      public FacetGroup.Builder setDisplayNameBytes(com.google.protobuf.ByteString value)
       Display name of the facet. To be used by UI for facet rendering.
       
      string display_name = 2;
      Parameters:
      value - The bytes for displayName to set.
      Returns:
      This builder for chaining.
    • 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;
      Specified by:
      getBucketsList in interface FacetGroupOrBuilder
    • 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;
      Specified by:
      getBucketsCount in interface FacetGroupOrBuilder
    • getBuckets

      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;
      Specified by:
      getBuckets in interface FacetGroupOrBuilder
    • setBuckets

      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;
    • setBuckets

      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;
    • addBuckets

      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;
    • addBuckets

      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;
    • addBuckets

      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;
    • addBuckets

      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;
    • addAllBuckets

      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;
    • 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;
    • removeBuckets

      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;
    • getBucketsBuilder

      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;
    • getBucketsOrBuilder

      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;
      Specified by:
      getBucketsOrBuilder in interface FacetGroupOrBuilder
    • 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;
      Specified by:
      getBucketsOrBuilderList in interface FacetGroupOrBuilder
    • 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;
    • addBucketsBuilder

      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;
    • 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;
    • getBucketTypeValue

      public int getBucketTypeValue()
       Facet bucket type.
       
      .google.cloud.visionai.v1.FacetBucketType bucket_type = 4;
      Specified by:
      getBucketTypeValue in interface FacetGroupOrBuilder
      Returns:
      The enum numeric value on the wire for bucketType.
    • setBucketTypeValue

      public FacetGroup.Builder setBucketTypeValue(int value)
       Facet bucket type.
       
      .google.cloud.visionai.v1.FacetBucketType bucket_type = 4;
      Parameters:
      value - The enum numeric value on the wire for bucketType to set.
      Returns:
      This builder for chaining.
    • getBucketType

      public FacetBucketType getBucketType()
       Facet bucket type.
       
      .google.cloud.visionai.v1.FacetBucketType bucket_type = 4;
      Specified by:
      getBucketType in interface FacetGroupOrBuilder
      Returns:
      The bucketType.
    • setBucketType

      public FacetGroup.Builder setBucketType(FacetBucketType value)
       Facet bucket type.
       
      .google.cloud.visionai.v1.FacetBucketType bucket_type = 4;
      Parameters:
      value - The bucketType to set.
      Returns:
      This builder for chaining.
    • clearBucketType

      public FacetGroup.Builder clearBucketType()
       Facet bucket type.
       
      .google.cloud.visionai.v1.FacetBucketType bucket_type = 4;
      Returns:
      This builder for chaining.
    • 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;
      Specified by:
      getFetchMatchedAnnotations in interface FacetGroupOrBuilder
      Returns:
      The fetchMatchedAnnotations.
    • setFetchMatchedAnnotations

      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;
      Parameters:
      value - The fetchMatchedAnnotations to set.
      Returns:
      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:
      This builder for chaining.