Class ImageSegmentationAnnotation.Builder (0.123.3)

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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public ImageSegmentationAnnotation.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
ImageSegmentationAnnotation.Builder
Overrides

build()

public ImageSegmentationAnnotation build()
Returns
TypeDescription
ImageSegmentationAnnotation

buildPartial()

public ImageSegmentationAnnotation buildPartial()
Returns
TypeDescription
ImageSegmentationAnnotation

clear()

public ImageSegmentationAnnotation.Builder clear()
Returns
TypeDescription
ImageSegmentationAnnotation.Builder
Overrides

clearAnnotationColors()

public ImageSegmentationAnnotation.Builder clearAnnotationColors()
Returns
TypeDescription
ImageSegmentationAnnotation.Builder

clearField(Descriptors.FieldDescriptor field)

public ImageSegmentationAnnotation.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
ImageSegmentationAnnotation.Builder
Overrides

clearImageBytes()

public ImageSegmentationAnnotation.Builder clearImageBytes()

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

bytes image_bytes = 3;

Returns
TypeDescription
ImageSegmentationAnnotation.Builder

This builder for chaining.

clearMimeType()

public ImageSegmentationAnnotation.Builder clearMimeType()

Image format.

string mime_type = 2;

Returns
TypeDescription
ImageSegmentationAnnotation.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public ImageSegmentationAnnotation.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
ImageSegmentationAnnotation.Builder
Overrides

clone()

public ImageSegmentationAnnotation.Builder clone()
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
boolean

getAnnotationColors()

public Map<String,AnnotationSpec> getAnnotationColors()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
keyString
defaultValueAnnotationSpec
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
AnnotationSpec

getDefaultInstanceForType()

public ImageSegmentationAnnotation getDefaultInstanceForType()
Returns
TypeDescription
ImageSegmentationAnnotation

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getImageBytes()

public ByteString getImageBytes()

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

bytes image_bytes = 3;

Returns
TypeDescription
ByteString

The imageBytes.

getMimeType()

public String getMimeType()

Image format.

string mime_type = 2;

Returns
TypeDescription
String

The mimeType.

getMimeTypeBytes()

public ByteString getMimeTypeBytes()

Image format.

string mime_type = 2;

Returns
TypeDescription
ByteString

The bytes for mimeType.

getMutableAnnotationColors()

public Map<String,AnnotationSpec> getMutableAnnotationColors()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,AnnotationSpec>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(ImageSegmentationAnnotation other)

public ImageSegmentationAnnotation.Builder mergeFrom(ImageSegmentationAnnotation other)
Parameter
NameDescription
otherImageSegmentationAnnotation
Returns
TypeDescription
ImageSegmentationAnnotation.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public ImageSegmentationAnnotation.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ImageSegmentationAnnotation.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public ImageSegmentationAnnotation.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
ImageSegmentationAnnotation.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ImageSegmentationAnnotation.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valuesMap<String,AnnotationSpec>
Returns
TypeDescription
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
NameDescription
keyString
valueAnnotationSpec
Returns
TypeDescription
ImageSegmentationAnnotation.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
NameDescription
keyString
Returns
TypeDescription
ImageSegmentationAnnotation.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public ImageSegmentationAnnotation.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueByteString

The imageBytes to set.

Returns
TypeDescription
ImageSegmentationAnnotation.Builder

This builder for chaining.

setMimeType(String value)

public ImageSegmentationAnnotation.Builder setMimeType(String value)

Image format.

string mime_type = 2;

Parameter
NameDescription
valueString

The mimeType to set.

Returns
TypeDescription
ImageSegmentationAnnotation.Builder

This builder for chaining.

setMimeTypeBytes(ByteString value)

public ImageSegmentationAnnotation.Builder setMimeTypeBytes(ByteString value)

Image format.

string mime_type = 2;

Parameter
NameDescription
valueByteString

The bytes for mimeType to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
ImageSegmentationAnnotation.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final ImageSegmentationAnnotation.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
ImageSegmentationAnnotation.Builder
Overrides