Class ImageSegmentationAnnotation.Builder (0.163.0)

public static final class ImageSegmentationAnnotation.Builder extends GeneratedMessageV3.Builder<ImageSegmentationAnnotation.Builder> implements ImageSegmentationAnnotationOrBuilder

Image segmentation annotation.

Protobuf type google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public ImageSegmentationAnnotation build()
Returns
Type Description
ImageSegmentationAnnotation

buildPartial()

public ImageSegmentationAnnotation buildPartial()
Returns
Type Description
ImageSegmentationAnnotation

clear()

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

clearAnnotationColors()

public ImageSegmentationAnnotation.Builder clearAnnotationColors()
Returns
Type Description
ImageSegmentationAnnotation.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearImageBytes()

public ImageSegmentationAnnotation.Builder clearImageBytes()

A byte string of a full image's color map.

bytes image_bytes = 3;

Returns
Type Description
ImageSegmentationAnnotation.Builder

This builder for chaining.

clearMimeType()

public ImageSegmentationAnnotation.Builder clearMimeType()

Image format.

string mime_type = 2;

Returns
Type Description
ImageSegmentationAnnotation.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

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

containsAnnotationColors(String key)

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;

Parameter
Name Description
key String
Returns
Type Description
boolean

getAnnotationColors() (deprecated)

public Map<String,AnnotationSpec> getAnnotationColors()
Returns
Type Description
Map<String,AnnotationSpec>

getAnnotationColorsCount()

public int getAnnotationColorsCount()

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;

Returns
Type Description
int

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;

Returns
Type Description
Map<String,AnnotationSpec>

getAnnotationColorsOrDefault(String key, AnnotationSpec defaultValue)

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;

Parameters
Name Description
key String
defaultValue AnnotationSpec
Returns
Type Description
AnnotationSpec

getAnnotationColorsOrThrow(String key)

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;

Parameter
Name Description
key String
Returns
Type Description
AnnotationSpec

getDefaultInstanceForType()

public ImageSegmentationAnnotation getDefaultInstanceForType()
Returns
Type Description
ImageSegmentationAnnotation

getDescriptorForType()

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

getImageBytes()

public ByteString getImageBytes()

A byte string of a full image's color map.

bytes image_bytes = 3;

Returns
Type Description
ByteString

The imageBytes.

getMimeType()

public String getMimeType()

Image format.

string mime_type = 2;

Returns
Type Description
String

The mimeType.

getMimeTypeBytes()

public ByteString getMimeTypeBytes()

Image format.

string mime_type = 2;

Returns
Type Description
ByteString

The bytes for mimeType.

getMutableAnnotationColors() (deprecated)

public Map<String,AnnotationSpec> getMutableAnnotationColors()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,AnnotationSpec>

internalGetFieldAccessorTable()

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

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ImageSegmentationAnnotation other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

putAllAnnotationColors(Map<String,AnnotationSpec> values)

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;

Parameter
Name Description
values Map<String,AnnotationSpec>
Returns
Type Description
ImageSegmentationAnnotation.Builder

putAnnotationColors(String key, AnnotationSpec value)

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;

Parameters
Name Description
key String
value AnnotationSpec
Returns
Type Description
ImageSegmentationAnnotation.Builder

putAnnotationColorsBuilderIfAbsent(String key)

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;

Parameter
Name Description
key String
Returns
Type Description
AnnotationSpec.Builder

removeAnnotationColors(String key)

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;

Parameter
Name Description
key String
Returns
Type Description
ImageSegmentationAnnotation.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setImageBytes(ByteString value)

public ImageSegmentationAnnotation.Builder setImageBytes(ByteString value)

A byte string of a full image's color map.

bytes image_bytes = 3;

Parameter
Name Description
value ByteString

The imageBytes to set.

Returns
Type Description
ImageSegmentationAnnotation.Builder

This builder for chaining.

setMimeType(String value)

public ImageSegmentationAnnotation.Builder setMimeType(String value)

Image format.

string mime_type = 2;

Parameter
Name Description
value String

The mimeType to set.

Returns
Type Description
ImageSegmentationAnnotation.Builder

This builder for chaining.

setMimeTypeBytes(ByteString value)

public ImageSegmentationAnnotation.Builder setMimeTypeBytes(ByteString value)

Image format.

string mime_type = 2;

Parameter
Name Description
value ByteString

The bytes for mimeType to set.

Returns
Type Description
ImageSegmentationAnnotation.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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