Class AnnotationSpecSet (0.131.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
TypeDescription
int

BLOCKING_RESOURCES_FIELD_NUMBER

public static final int BLOCKING_RESOURCES_FIELD_NUMBER
Field Value
TypeDescription
int

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
TypeDescription
int

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static AnnotationSpecSet getDefaultInstance()
Returns
TypeDescription
AnnotationSpecSet

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static AnnotationSpecSet.Builder newBuilder()
Returns
TypeDescription
AnnotationSpecSet.Builder

newBuilder(AnnotationSpecSet prototype)

public static AnnotationSpecSet.Builder newBuilder(AnnotationSpecSet prototype)
Parameter
NameDescription
prototypeAnnotationSpecSet
Returns
TypeDescription
AnnotationSpecSet.Builder

parseDelimitedFrom(InputStream input)

public static AnnotationSpecSet parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
AnnotationSpecSet
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AnnotationSpecSet parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AnnotationSpecSet
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static AnnotationSpecSet parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
AnnotationSpecSet
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static AnnotationSpecSet parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AnnotationSpecSet
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static AnnotationSpecSet parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
AnnotationSpecSet
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static AnnotationSpecSet parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AnnotationSpecSet
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static AnnotationSpecSet parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
AnnotationSpecSet
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static AnnotationSpecSet parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AnnotationSpecSet
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static AnnotationSpecSet parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
AnnotationSpecSet
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AnnotationSpecSet parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AnnotationSpecSet
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static AnnotationSpecSet parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
AnnotationSpecSet
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static AnnotationSpecSet parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AnnotationSpecSet
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<AnnotationSpecSet> parser()
Returns
TypeDescription
Parser<AnnotationSpecSet>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
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.

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.

getParserForType()

public Parser<AnnotationSpecSet> getParserForType()
Returns
TypeDescription
Parser<AnnotationSpecSet>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public AnnotationSpecSet.Builder newBuilderForType()
Returns
TypeDescription
AnnotationSpecSet.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected AnnotationSpecSet.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
AnnotationSpecSet.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public AnnotationSpecSet.Builder toBuilder()
Returns
TypeDescription
AnnotationSpecSet.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException