Class AnnotationSpecSet.Builder (0.165.0)

public static final class AnnotationSpecSet.Builder extends GeneratedMessageV3.Builder<AnnotationSpecSet.Builder> implements AnnotationSpecSetOrBuilder

An AnnotationSpecSet is a collection of label definitions. For example, in image classification tasks, you define a set of possible labels for images as an AnnotationSpecSet. An AnnotationSpecSet is immutable upon creation.

Protobuf type google.cloud.datalabeling.v1beta1.AnnotationSpecSet

Static Methods

getDescriptor()

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

Methods

addAllAnnotationSpecs(Iterable<? extends AnnotationSpec> values)

public AnnotationSpecSet.Builder addAllAnnotationSpecs(Iterable<? extends AnnotationSpec> values)

Required. The array of AnnotationSpecs that you define when you create the AnnotationSpecSet. These are the possible labels for the labeling task.

repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4;

Parameter
Name Description
values Iterable<? extends com.google.cloud.datalabeling.v1beta1.AnnotationSpec>
Returns
Type Description
AnnotationSpecSet.Builder

addAllBlockingResources(Iterable<String> values)

public AnnotationSpecSet.Builder addAllBlockingResources(Iterable<String> values)

Output only. The names of any related resources that are blocking changes to the annotation spec set.

repeated string blocking_resources = 5;

Parameter
Name Description
values Iterable<String>

The blockingResources to add.

Returns
Type Description
AnnotationSpecSet.Builder

This builder for chaining.

addAnnotationSpecs(AnnotationSpec value)

public AnnotationSpecSet.Builder addAnnotationSpecs(AnnotationSpec value)

Required. The array of AnnotationSpecs that you define when you create the AnnotationSpecSet. These are the possible labels for the labeling task.

repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4;

Parameter
Name Description
value AnnotationSpec
Returns
Type Description
AnnotationSpecSet.Builder

addAnnotationSpecs(AnnotationSpec.Builder builderForValue)

public AnnotationSpecSet.Builder addAnnotationSpecs(AnnotationSpec.Builder builderForValue)

Required. The array of AnnotationSpecs that you define when you create the AnnotationSpecSet. These are the possible labels for the labeling task.

repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4;

Parameter
Name Description
builderForValue AnnotationSpec.Builder
Returns
Type Description
AnnotationSpecSet.Builder

addAnnotationSpecs(int index, AnnotationSpec value)

public AnnotationSpecSet.Builder addAnnotationSpecs(int index, AnnotationSpec value)

Required. The array of AnnotationSpecs that you define when you create the AnnotationSpecSet. These are the possible labels for the labeling task.

repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4;

Parameters
Name Description
index int
value AnnotationSpec
Returns
Type Description
AnnotationSpecSet.Builder

addAnnotationSpecs(int index, AnnotationSpec.Builder builderForValue)

public AnnotationSpecSet.Builder addAnnotationSpecs(int index, AnnotationSpec.Builder builderForValue)

Required. The array of AnnotationSpecs that you define when you create the AnnotationSpecSet. These are the possible labels for the labeling task.

repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4;

Parameters
Name Description
index int
builderForValue AnnotationSpec.Builder
Returns
Type Description
AnnotationSpecSet.Builder

addAnnotationSpecsBuilder()

public AnnotationSpec.Builder addAnnotationSpecsBuilder()

Required. The array of AnnotationSpecs that you define when you create the AnnotationSpecSet. These are the possible labels for the labeling task.

repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4;

Returns
Type Description
AnnotationSpec.Builder

addAnnotationSpecsBuilder(int index)

public AnnotationSpec.Builder addAnnotationSpecsBuilder(int index)

Required. The array of AnnotationSpecs that you define when you create the AnnotationSpecSet. These are the possible labels for the labeling task.

repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4;

Parameter
Name Description
index int
Returns
Type Description
AnnotationSpec.Builder

addBlockingResources(String value)

public AnnotationSpecSet.Builder addBlockingResources(String value)

Output only. The names of any related resources that are blocking changes to the annotation spec set.

repeated string blocking_resources = 5;

Parameter
Name Description
value String

The blockingResources to add.

Returns
Type Description
AnnotationSpecSet.Builder

This builder for chaining.

addBlockingResourcesBytes(ByteString value)

public AnnotationSpecSet.Builder addBlockingResourcesBytes(ByteString value)

Output only. The names of any related resources that are blocking changes to the annotation spec set.

repeated string blocking_resources = 5;

Parameter
Name Description
value ByteString

The bytes of the blockingResources to add.

Returns
Type Description
AnnotationSpecSet.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public AnnotationSpecSet build()
Returns
Type Description
AnnotationSpecSet

buildPartial()

public AnnotationSpecSet buildPartial()
Returns
Type Description
AnnotationSpecSet

clear()

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

clearAnnotationSpecs()

public AnnotationSpecSet.Builder clearAnnotationSpecs()

Required. The array of AnnotationSpecs that you define when you create the AnnotationSpecSet. These are the possible labels for the labeling task.

repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4;

Returns
Type Description
AnnotationSpecSet.Builder

clearBlockingResources()

public AnnotationSpecSet.Builder clearBlockingResources()

Output only. The names of any related resources that are blocking changes to the annotation spec set.

repeated string blocking_resources = 5;

Returns
Type Description
AnnotationSpecSet.Builder

This builder for chaining.

clearDescription()

public AnnotationSpecSet.Builder clearDescription()

Optional. User-provided description of the annotation specification set. The description can be up to 10,000 characters long.

string description = 3;

Returns
Type Description
AnnotationSpecSet.Builder

This builder for chaining.

clearDisplayName()

public AnnotationSpecSet.Builder clearDisplayName()

Required. The display name for AnnotationSpecSet that you define when you create it. Maximum of 64 characters.

string display_name = 2;

Returns
Type Description
AnnotationSpecSet.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearName()

public AnnotationSpecSet.Builder clearName()

Output only. The AnnotationSpecSet resource name in the following format:

"projects/<var>{project_id}</var>/annotationSpecSets/<var>{annotation_spec_set_id}</var>"

string name = 1;

Returns
Type Description
AnnotationSpecSet.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

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

getAnnotationSpecs(int index)

public AnnotationSpec getAnnotationSpecs(int index)

Required. The array of AnnotationSpecs that you define when you create the AnnotationSpecSet. These are the possible labels for the labeling task.

repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4;

Parameter
Name Description
index int
Returns
Type Description
AnnotationSpec

getAnnotationSpecsBuilder(int index)

public AnnotationSpec.Builder getAnnotationSpecsBuilder(int index)

Required. The array of AnnotationSpecs that you define when you create the AnnotationSpecSet. These are the possible labels for the labeling task.

repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4;

Parameter
Name Description
index int
Returns
Type Description
AnnotationSpec.Builder

getAnnotationSpecsBuilderList()

public List<AnnotationSpec.Builder> getAnnotationSpecsBuilderList()

Required. The array of AnnotationSpecs that you define when you create the AnnotationSpecSet. These are the possible labels for the labeling task.

repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4;

Returns
Type Description
List<Builder>

getAnnotationSpecsCount()

public int getAnnotationSpecsCount()

Required. The array of AnnotationSpecs that you define when you create the AnnotationSpecSet. These are the possible labels for the labeling task.

repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4;

Returns
Type Description
int

getAnnotationSpecsList()

public List<AnnotationSpec> getAnnotationSpecsList()

Required. The array of AnnotationSpecs that you define when you create the AnnotationSpecSet. These are the possible labels for the labeling task.

repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4;

Returns
Type Description
List<AnnotationSpec>

getAnnotationSpecsOrBuilder(int index)

public AnnotationSpecOrBuilder getAnnotationSpecsOrBuilder(int index)

Required. The array of AnnotationSpecs that you define when you create the AnnotationSpecSet. These are the possible labels for the labeling task.

repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4;

Parameter
Name Description
index int
Returns
Type Description
AnnotationSpecOrBuilder

getAnnotationSpecsOrBuilderList()

public List<? extends AnnotationSpecOrBuilder> getAnnotationSpecsOrBuilderList()

Required. The array of AnnotationSpecs that you define when you create the AnnotationSpecSet. These are the possible labels for the labeling task.

repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4;

Returns
Type Description
List<? extends com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder>

getBlockingResources(int index)

public String getBlockingResources(int index)

Output only. The names of any related resources that are blocking changes to the annotation spec set.

repeated string blocking_resources = 5;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The blockingResources at the given index.

getBlockingResourcesBytes(int index)

public ByteString getBlockingResourcesBytes(int index)

Output only. The names of any related resources that are blocking changes to the annotation spec set.

repeated string blocking_resources = 5;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the blockingResources at the given index.

getBlockingResourcesCount()

public int getBlockingResourcesCount()

Output only. The names of any related resources that are blocking changes to the annotation spec set.

repeated string blocking_resources = 5;

Returns
Type Description
int

The count of blockingResources.

getBlockingResourcesList()

public ProtocolStringList getBlockingResourcesList()

Output only. The names of any related resources that are blocking changes to the annotation spec set.

repeated string blocking_resources = 5;

Returns
Type Description
ProtocolStringList

A list containing the blockingResources.

getDefaultInstanceForType()

public AnnotationSpecSet getDefaultInstanceForType()
Returns
Type Description
AnnotationSpecSet

getDescription()

public String getDescription()

Optional. User-provided description of the annotation specification set. The description can be up to 10,000 characters long.

string description = 3;

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Optional. User-provided description of the annotation specification set. The description can be up to 10,000 characters long.

string description = 3;

Returns
Type Description
ByteString

The bytes for description.

getDescriptorForType()

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

getDisplayName()

public String getDisplayName()

Required. The display name for AnnotationSpecSet that you define when you create it. Maximum of 64 characters.

string display_name = 2;

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Required. The display name for AnnotationSpecSet that you define when you create it. Maximum of 64 characters.

string display_name = 2;

Returns
Type Description
ByteString

The bytes for displayName.

getName()

public String getName()

Output only. The AnnotationSpecSet resource name in the following format:

"projects/<var>{project_id}</var>/annotationSpecSets/<var>{annotation_spec_set_id}</var>"

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Output only. The AnnotationSpecSet resource name in the following format:

"projects/<var>{project_id}</var>/annotationSpecSets/<var>{annotation_spec_set_id}</var>"

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(AnnotationSpecSet other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeAnnotationSpecs(int index)

public AnnotationSpecSet.Builder removeAnnotationSpecs(int index)

Required. The array of AnnotationSpecs that you define when you create the AnnotationSpecSet. These are the possible labels for the labeling task.

repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4;

Parameter
Name Description
index int
Returns
Type Description
AnnotationSpecSet.Builder

setAnnotationSpecs(int index, AnnotationSpec value)

public AnnotationSpecSet.Builder setAnnotationSpecs(int index, AnnotationSpec value)

Required. The array of AnnotationSpecs that you define when you create the AnnotationSpecSet. These are the possible labels for the labeling task.

repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4;

Parameters
Name Description
index int
value AnnotationSpec
Returns
Type Description
AnnotationSpecSet.Builder

setAnnotationSpecs(int index, AnnotationSpec.Builder builderForValue)

public AnnotationSpecSet.Builder setAnnotationSpecs(int index, AnnotationSpec.Builder builderForValue)

Required. The array of AnnotationSpecs that you define when you create the AnnotationSpecSet. These are the possible labels for the labeling task.

repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4;

Parameters
Name Description
index int
builderForValue AnnotationSpec.Builder
Returns
Type Description
AnnotationSpecSet.Builder

setBlockingResources(int index, String value)

public AnnotationSpecSet.Builder setBlockingResources(int index, String value)

Output only. The names of any related resources that are blocking changes to the annotation spec set.

repeated string blocking_resources = 5;

Parameters
Name Description
index int

The index to set the value at.

value String

The blockingResources to set.

Returns
Type Description
AnnotationSpecSet.Builder

This builder for chaining.

setDescription(String value)

public AnnotationSpecSet.Builder setDescription(String value)

Optional. User-provided description of the annotation specification set. The description can be up to 10,000 characters long.

string description = 3;

Parameter
Name Description
value String

The description to set.

Returns
Type Description
AnnotationSpecSet.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public AnnotationSpecSet.Builder setDescriptionBytes(ByteString value)

Optional. User-provided description of the annotation specification set. The description can be up to 10,000 characters long.

string description = 3;

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
AnnotationSpecSet.Builder

This builder for chaining.

setDisplayName(String value)

public AnnotationSpecSet.Builder setDisplayName(String value)

Required. The display name for AnnotationSpecSet that you define when you create it. Maximum of 64 characters.

string display_name = 2;

Parameter
Name Description
value String

The displayName to set.

Returns
Type Description
AnnotationSpecSet.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public AnnotationSpecSet.Builder setDisplayNameBytes(ByteString value)

Required. The display name for AnnotationSpecSet that you define when you create it. Maximum of 64 characters.

string display_name = 2;

Parameter
Name Description
value ByteString

The bytes for displayName to set.

Returns
Type Description
AnnotationSpecSet.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setName(String value)

public AnnotationSpecSet.Builder setName(String value)

Output only. The AnnotationSpecSet resource name in the following format:

"projects/<var>{project_id}</var>/annotationSpecSets/<var>{annotation_spec_set_id}</var>"

string name = 1;

Parameter
Name Description
value String

The name to set.

Returns
Type Description
AnnotationSpecSet.Builder

This builder for chaining.

setNameBytes(ByteString value)

public AnnotationSpecSet.Builder setNameBytes(ByteString value)

Output only. The AnnotationSpecSet resource name in the following format:

"projects/<var>{project_id}</var>/annotationSpecSets/<var>{annotation_spec_set_id}</var>"

string name = 1;

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
AnnotationSpecSet.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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