Class AnnotationSpecSet.Builder (0.123.7)

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
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.cloud.datalabeling.v1beta1.AnnotationSpec>
Returns
TypeDescription
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
NameDescription
valuesIterable<String>

The blockingResources to add.

Returns
TypeDescription
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
NameDescription
valueAnnotationSpec
Returns
TypeDescription
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
NameDescription
builderForValueAnnotationSpec.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueAnnotationSpec
Returns
TypeDescription
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
NameDescription
indexint
builderForValueAnnotationSpec.Builder
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
valueString

The blockingResources to add.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes of the blockingResources to add.

Returns
TypeDescription
AnnotationSpecSet.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public AnnotationSpecSet build()
Returns
TypeDescription
AnnotationSpecSet

buildPartial()

public AnnotationSpecSet buildPartial()
Returns
TypeDescription
AnnotationSpecSet

clear()

public AnnotationSpecSet.Builder clear()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
AnnotationSpecSet.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public AnnotationSpecSet.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
AnnotationSpecSet.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

public AnnotationSpecSet.Builder clone()
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ProtocolStringList

A list containing the blockingResources.

getDefaultInstanceForType()

public AnnotationSpecSet getDefaultInstanceForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for name.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(AnnotationSpecSet other)

public AnnotationSpecSet.Builder mergeFrom(AnnotationSpecSet other)
Parameter
NameDescription
otherAnnotationSpecSet
Returns
TypeDescription
AnnotationSpecSet.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final AnnotationSpecSet.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
valueAnnotationSpec
Returns
TypeDescription
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
NameDescription
indexint
builderForValueAnnotationSpec.Builder
Returns
TypeDescription
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
NameDescription
indexint

The index to set the value at.

valueString

The blockingResources to set.

Returns
TypeDescription
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
NameDescription
valueString

The description to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for description to set.

Returns
TypeDescription
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
NameDescription
valueString

The displayName to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for displayName to set.

Returns
TypeDescription
AnnotationSpecSet.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

The name to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for name to set.

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

setUnknownFields(UnknownFieldSet unknownFields)

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