Class ImageSegmentationAnnotation.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<ImageSegmentationAnnotation.Builder>
com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation.Builder
All Implemented Interfaces:
ImageSegmentationAnnotationOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
ImageSegmentationAnnotation

public static final class ImageSegmentationAnnotation.Builder extends com.google.protobuf.GeneratedMessage.Builder<ImageSegmentationAnnotation.Builder> implements ImageSegmentationAnnotationOrBuilder
 Image segmentation annotation.
 
Protobuf type google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<ImageSegmentationAnnotation.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<ImageSegmentationAnnotation.Builder>
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<ImageSegmentationAnnotation.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<ImageSegmentationAnnotation.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<ImageSegmentationAnnotation.Builder>
    • getDefaultInstanceForType

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

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

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

      public ImageSegmentationAnnotation.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<ImageSegmentationAnnotation.Builder>
    • mergeFrom

    • isInitialized

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

      public ImageSegmentationAnnotation.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<ImageSegmentationAnnotation.Builder>
      Throws:
      IOException
    • getAnnotationColorsCount

      public int getAnnotationColorsCount()
      Description copied from interface: ImageSegmentationAnnotationOrBuilder
       The mapping between rgb color and annotation spec. The key is the rgb
       color represented in format of rgb(0, 0, 0). The value is the
       AnnotationSpec.
       
      map<string, .google.cloud.datalabeling.v1beta1.AnnotationSpec> annotation_colors = 1;
      Specified by:
      getAnnotationColorsCount in interface ImageSegmentationAnnotationOrBuilder
    • containsAnnotationColors

      public boolean containsAnnotationColors(String key)
       The mapping between rgb color and annotation spec. The key is the rgb
       color represented in format of rgb(0, 0, 0). The value is the
       AnnotationSpec.
       
      map<string, .google.cloud.datalabeling.v1beta1.AnnotationSpec> annotation_colors = 1;
      Specified by:
      containsAnnotationColors in interface ImageSegmentationAnnotationOrBuilder
    • getAnnotationColors

      @Deprecated public Map<String,AnnotationSpec> getAnnotationColors()
      Deprecated.
      Specified by:
      getAnnotationColors in interface ImageSegmentationAnnotationOrBuilder
    • getAnnotationColorsMap

      public Map<String,AnnotationSpec> getAnnotationColorsMap()
       The mapping between rgb color and annotation spec. The key is the rgb
       color represented in format of rgb(0, 0, 0). The value is the
       AnnotationSpec.
       
      map<string, .google.cloud.datalabeling.v1beta1.AnnotationSpec> annotation_colors = 1;
      Specified by:
      getAnnotationColorsMap in interface ImageSegmentationAnnotationOrBuilder
    • getAnnotationColorsOrDefault

      public AnnotationSpec getAnnotationColorsOrDefault(String key, AnnotationSpec defaultValue)
       The mapping between rgb color and annotation spec. The key is the rgb
       color represented in format of rgb(0, 0, 0). The value is the
       AnnotationSpec.
       
      map<string, .google.cloud.datalabeling.v1beta1.AnnotationSpec> annotation_colors = 1;
      Specified by:
      getAnnotationColorsOrDefault in interface ImageSegmentationAnnotationOrBuilder
    • getAnnotationColorsOrThrow

      public AnnotationSpec getAnnotationColorsOrThrow(String key)
       The mapping between rgb color and annotation spec. The key is the rgb
       color represented in format of rgb(0, 0, 0). The value is the
       AnnotationSpec.
       
      map<string, .google.cloud.datalabeling.v1beta1.AnnotationSpec> annotation_colors = 1;
      Specified by:
      getAnnotationColorsOrThrow in interface ImageSegmentationAnnotationOrBuilder
    • clearAnnotationColors

      public ImageSegmentationAnnotation.Builder clearAnnotationColors()
    • removeAnnotationColors

      public ImageSegmentationAnnotation.Builder removeAnnotationColors(String key)
       The mapping between rgb color and annotation spec. The key is the rgb
       color represented in format of rgb(0, 0, 0). The value is the
       AnnotationSpec.
       
      map<string, .google.cloud.datalabeling.v1beta1.AnnotationSpec> annotation_colors = 1;
    • getMutableAnnotationColors

      @Deprecated public Map<String,AnnotationSpec> getMutableAnnotationColors()
      Deprecated.
      Use alternate mutation accessors instead.
    • putAnnotationColors

      public ImageSegmentationAnnotation.Builder putAnnotationColors(String key, AnnotationSpec value)
       The mapping between rgb color and annotation spec. The key is the rgb
       color represented in format of rgb(0, 0, 0). The value is the
       AnnotationSpec.
       
      map<string, .google.cloud.datalabeling.v1beta1.AnnotationSpec> annotation_colors = 1;
    • putAllAnnotationColors

      public ImageSegmentationAnnotation.Builder putAllAnnotationColors(Map<String,AnnotationSpec> values)
       The mapping between rgb color and annotation spec. The key is the rgb
       color represented in format of rgb(0, 0, 0). The value is the
       AnnotationSpec.
       
      map<string, .google.cloud.datalabeling.v1beta1.AnnotationSpec> annotation_colors = 1;
    • putAnnotationColorsBuilderIfAbsent

      public AnnotationSpec.Builder putAnnotationColorsBuilderIfAbsent(String key)
       The mapping between rgb color and annotation spec. The key is the rgb
       color represented in format of rgb(0, 0, 0). The value is the
       AnnotationSpec.
       
      map<string, .google.cloud.datalabeling.v1beta1.AnnotationSpec> annotation_colors = 1;
    • getMimeType

      public String getMimeType()
       Image format.
       
      string mime_type = 2;
      Specified by:
      getMimeType in interface ImageSegmentationAnnotationOrBuilder
      Returns:
      The mimeType.
    • getMimeTypeBytes

      public com.google.protobuf.ByteString getMimeTypeBytes()
       Image format.
       
      string mime_type = 2;
      Specified by:
      getMimeTypeBytes in interface ImageSegmentationAnnotationOrBuilder
      Returns:
      The bytes for mimeType.
    • setMimeType

      public ImageSegmentationAnnotation.Builder setMimeType(String value)
       Image format.
       
      string mime_type = 2;
      Parameters:
      value - The mimeType to set.
      Returns:
      This builder for chaining.
    • clearMimeType

      public ImageSegmentationAnnotation.Builder clearMimeType()
       Image format.
       
      string mime_type = 2;
      Returns:
      This builder for chaining.
    • setMimeTypeBytes

      public ImageSegmentationAnnotation.Builder setMimeTypeBytes(com.google.protobuf.ByteString value)
       Image format.
       
      string mime_type = 2;
      Parameters:
      value - The bytes for mimeType to set.
      Returns:
      This builder for chaining.
    • getImageBytes

      public com.google.protobuf.ByteString getImageBytes()
       A byte string of a full image's color map.
       
      bytes image_bytes = 3;
      Specified by:
      getImageBytes in interface ImageSegmentationAnnotationOrBuilder
      Returns:
      The imageBytes.
    • setImageBytes

      public ImageSegmentationAnnotation.Builder setImageBytes(com.google.protobuf.ByteString value)
       A byte string of a full image's color map.
       
      bytes image_bytes = 3;
      Parameters:
      value - The imageBytes to set.
      Returns:
      This builder for chaining.
    • clearImageBytes

      public ImageSegmentationAnnotation.Builder clearImageBytes()
       A byte string of a full image's color map.
       
      bytes image_bytes = 3;
      Returns:
      This builder for chaining.