Class AnnotationSpecSet (0.169.0)

public final class AnnotationSpecSet extends GeneratedMessageV3 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 Fields

ANNOTATION_SPECS_FIELD_NUMBER

public static final int ANNOTATION_SPECS_FIELD_NUMBER
Field Value
Type Description
int

BLOCKING_RESOURCES_FIELD_NUMBER

public static final int BLOCKING_RESOURCES_FIELD_NUMBER
Field Value
Type Description
int

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
Type Description
int

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static AnnotationSpecSet getDefaultInstance()
Returns
Type Description
AnnotationSpecSet

getDescriptor()

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

newBuilder()

public static AnnotationSpecSet.Builder newBuilder()
Returns
Type Description
AnnotationSpecSet.Builder

newBuilder(AnnotationSpecSet prototype)

public static AnnotationSpecSet.Builder newBuilder(AnnotationSpecSet prototype)
Parameter
Name Description
prototype AnnotationSpecSet
Returns
Type Description
AnnotationSpecSet.Builder

parseDelimitedFrom(InputStream input)

public static AnnotationSpecSet parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
AnnotationSpecSet
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AnnotationSpecSet parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AnnotationSpecSet
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static AnnotationSpecSet parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
AnnotationSpecSet
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static AnnotationSpecSet parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AnnotationSpecSet
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static AnnotationSpecSet parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
AnnotationSpecSet
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static AnnotationSpecSet parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AnnotationSpecSet
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static AnnotationSpecSet parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
AnnotationSpecSet
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static AnnotationSpecSet parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AnnotationSpecSet
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static AnnotationSpecSet parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
AnnotationSpecSet
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AnnotationSpecSet parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AnnotationSpecSet
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static AnnotationSpecSet parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
AnnotationSpecSet
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static AnnotationSpecSet parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AnnotationSpecSet
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<AnnotationSpecSet> parser()
Returns
Type Description
Parser<AnnotationSpecSet>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
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

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.

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.

getParserForType()

public Parser<AnnotationSpecSet> getParserForType()
Returns
Type Description
Parser<AnnotationSpecSet>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public AnnotationSpecSet.Builder newBuilderForType()
Returns
Type Description
AnnotationSpecSet.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected AnnotationSpecSet.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
AnnotationSpecSet.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public AnnotationSpecSet.Builder toBuilder()
Returns
Type Description
AnnotationSpecSet.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException