Class Annotation.Builder (0.5.0)

public static final class Annotation.Builder extends GeneratedMessageV3.Builder<Annotation.Builder> implements AnnotationOrBuilder

An annotation is a resource in asset. It represents a key-value mapping of content in asset.

Protobuf type google.cloud.visionai.v1.Annotation

Implements

AnnotationOrBuilder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Annotation build()
Returns
Type Description
Annotation

buildPartial()

public Annotation buildPartial()
Returns
Type Description
Annotation

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearName()

public Annotation.Builder clearName()

Resource name of the annotation. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}

string name = 1;

Returns
Type Description
Annotation.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearUserSpecifiedAnnotation()

public Annotation.Builder clearUserSpecifiedAnnotation()

User provided annotation.

.google.cloud.visionai.v1.UserSpecifiedAnnotation user_specified_annotation = 2;

Returns
Type Description
Annotation.Builder

clone()

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

getDefaultInstanceForType()

public Annotation getDefaultInstanceForType()
Returns
Type Description
Annotation

getDescriptorForType()

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

getName()

public String getName()

Resource name of the annotation. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Resource name of the annotation. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

getUserSpecifiedAnnotation()

public UserSpecifiedAnnotation getUserSpecifiedAnnotation()

User provided annotation.

.google.cloud.visionai.v1.UserSpecifiedAnnotation user_specified_annotation = 2;

Returns
Type Description
UserSpecifiedAnnotation

The userSpecifiedAnnotation.

getUserSpecifiedAnnotationBuilder()

public UserSpecifiedAnnotation.Builder getUserSpecifiedAnnotationBuilder()

User provided annotation.

.google.cloud.visionai.v1.UserSpecifiedAnnotation user_specified_annotation = 2;

Returns
Type Description
UserSpecifiedAnnotation.Builder

getUserSpecifiedAnnotationOrBuilder()

public UserSpecifiedAnnotationOrBuilder getUserSpecifiedAnnotationOrBuilder()

User provided annotation.

.google.cloud.visionai.v1.UserSpecifiedAnnotation user_specified_annotation = 2;

Returns
Type Description
UserSpecifiedAnnotationOrBuilder

hasUserSpecifiedAnnotation()

public boolean hasUserSpecifiedAnnotation()

User provided annotation.

.google.cloud.visionai.v1.UserSpecifiedAnnotation user_specified_annotation = 2;

Returns
Type Description
boolean

Whether the userSpecifiedAnnotation field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Annotation other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

mergeUserSpecifiedAnnotation(UserSpecifiedAnnotation value)

public Annotation.Builder mergeUserSpecifiedAnnotation(UserSpecifiedAnnotation value)

User provided annotation.

.google.cloud.visionai.v1.UserSpecifiedAnnotation user_specified_annotation = 2;

Parameter
Name Description
value UserSpecifiedAnnotation
Returns
Type Description
Annotation.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setName(String value)

public Annotation.Builder setName(String value)

Resource name of the annotation. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}

string name = 1;

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Annotation.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Annotation.Builder setNameBytes(ByteString value)

Resource name of the annotation. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}

string name = 1;

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Annotation.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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

setUserSpecifiedAnnotation(UserSpecifiedAnnotation value)

public Annotation.Builder setUserSpecifiedAnnotation(UserSpecifiedAnnotation value)

User provided annotation.

.google.cloud.visionai.v1.UserSpecifiedAnnotation user_specified_annotation = 2;

Parameter
Name Description
value UserSpecifiedAnnotation
Returns
Type Description
Annotation.Builder

setUserSpecifiedAnnotation(UserSpecifiedAnnotation.Builder builderForValue)

public Annotation.Builder setUserSpecifiedAnnotation(UserSpecifiedAnnotation.Builder builderForValue)

User provided annotation.

.google.cloud.visionai.v1.UserSpecifiedAnnotation user_specified_annotation = 2;

Parameter
Name Description
builderForValue UserSpecifiedAnnotation.Builder
Returns
Type Description
Annotation.Builder