Class Instruction (0.140.0)

public final class Instruction extends GeneratedMessageV3 implements InstructionOrBuilder

Instruction of how to perform the labeling task for human operators. Currently only PDF instruction is supported.

Protobuf type google.cloud.datalabeling.v1beta1.Instruction

Static Fields

BLOCKING_RESOURCES_FIELD_NUMBER

public static final int BLOCKING_RESOURCES_FIELD_NUMBER
Field Value
TypeDescription
int

CREATE_TIME_FIELD_NUMBER

public static final int CREATE_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

CSV_INSTRUCTION_FIELD_NUMBER

public static final int CSV_INSTRUCTION_FIELD_NUMBER
Field Value
TypeDescription
int

DATA_TYPE_FIELD_NUMBER

public static final int DATA_TYPE_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

PDF_INSTRUCTION_FIELD_NUMBER

public static final int PDF_INSTRUCTION_FIELD_NUMBER
Field Value
TypeDescription
int

UPDATE_TIME_FIELD_NUMBER

public static final int UPDATE_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Instruction getDefaultInstance()
Returns
TypeDescription
Instruction

getDescriptor()

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

newBuilder()

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

newBuilder(Instruction prototype)

public static Instruction.Builder newBuilder(Instruction prototype)
Parameter
NameDescription
prototypeInstruction
Returns
TypeDescription
Instruction.Builder

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getBlockingResources(int index)

public String getBlockingResources(int index)

Output only. The names of any related resources that are blocking changes to the instruction.

repeated string blocking_resources = 10;

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 instruction.

repeated string blocking_resources = 10;

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 instruction.

repeated string blocking_resources = 10;

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 instruction.

repeated string blocking_resources = 10;

Returns
TypeDescription
ProtocolStringList

A list containing the blockingResources.

getCreateTime()

public Timestamp getCreateTime()

Output only. Creation time of instruction.

.google.protobuf.Timestamp create_time = 4;

Returns
TypeDescription
Timestamp

The createTime.

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. Creation time of instruction.

.google.protobuf.Timestamp create_time = 4;

Returns
TypeDescription
TimestampOrBuilder

getCsvInstruction() (deprecated)

public CsvInstruction getCsvInstruction()

Deprecated. google.cloud.datalabeling.v1beta1.Instruction.csv_instruction is deprecated. See google/cloud/datalabeling/v1beta1/instruction.proto;l=64

Deprecated: this instruction format is not supported any more. Instruction from a CSV file, such as for classification task. The CSV file should have exact two columns, in the following format:

  • The first column is labeled data, such as an image reference, text.
  • The second column is comma separated labels associated with data.

.google.cloud.datalabeling.v1beta1.CsvInstruction csv_instruction = 7 [deprecated = true];

Returns
TypeDescription
CsvInstruction

The csvInstruction.

getCsvInstructionOrBuilder()

public CsvInstructionOrBuilder getCsvInstructionOrBuilder()

Deprecated: this instruction format is not supported any more. Instruction from a CSV file, such as for classification task. The CSV file should have exact two columns, in the following format:

  • The first column is labeled data, such as an image reference, text.
  • The second column is comma separated labels associated with data.

.google.cloud.datalabeling.v1beta1.CsvInstruction csv_instruction = 7 [deprecated = true];

Returns
TypeDescription
CsvInstructionOrBuilder

getDataType()

public DataType getDataType()

Required. The data type of this instruction.

.google.cloud.datalabeling.v1beta1.DataType data_type = 6;

Returns
TypeDescription
DataType

The dataType.

getDataTypeValue()

public int getDataTypeValue()

Required. The data type of this instruction.

.google.cloud.datalabeling.v1beta1.DataType data_type = 6;

Returns
TypeDescription
int

The enum numeric value on the wire for dataType.

getDefaultInstanceForType()

public Instruction getDefaultInstanceForType()
Returns
TypeDescription
Instruction

getDescription()

public String getDescription()

Optional. User-provided description of the instruction. The description can be up to 10000 characters long.

string description = 3;

Returns
TypeDescription
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Optional. User-provided description of the instruction. The description can be up to 10000 characters long.

string description = 3;

Returns
TypeDescription
ByteString

The bytes for description.

getDisplayName()

public String getDisplayName()

Required. The display name of the instruction. Maximum of 64 characters.

string display_name = 2;

Returns
TypeDescription
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Required. The display name of the instruction. Maximum of 64 characters.

string display_name = 2;

Returns
TypeDescription
ByteString

The bytes for displayName.

getName()

public String getName()

Output only. Instruction resource name, format: projects/{project_id}/instructions/{instruction_id}

string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

Output only. Instruction resource name, format: projects/{project_id}/instructions/{instruction_id}

string name = 1;

Returns
TypeDescription
ByteString

The bytes for name.

getParserForType()

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

getPdfInstruction()

public PdfInstruction getPdfInstruction()

Instruction from a PDF document. The PDF should be in a Cloud Storage bucket.

.google.cloud.datalabeling.v1beta1.PdfInstruction pdf_instruction = 9;

Returns
TypeDescription
PdfInstruction

The pdfInstruction.

getPdfInstructionOrBuilder()

public PdfInstructionOrBuilder getPdfInstructionOrBuilder()

Instruction from a PDF document. The PDF should be in a Cloud Storage bucket.

.google.cloud.datalabeling.v1beta1.PdfInstruction pdf_instruction = 9;

Returns
TypeDescription
PdfInstructionOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUpdateTime()

public Timestamp getUpdateTime()

Output only. Last update time of instruction.

.google.protobuf.Timestamp update_time = 5;

Returns
TypeDescription
Timestamp

The updateTime.

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. Last update time of instruction.

.google.protobuf.Timestamp update_time = 5;

Returns
TypeDescription
TimestampOrBuilder

hasCreateTime()

public boolean hasCreateTime()

Output only. Creation time of instruction.

.google.protobuf.Timestamp create_time = 4;

Returns
TypeDescription
boolean

Whether the createTime field is set.

hasCsvInstruction() (deprecated)

public boolean hasCsvInstruction()

Deprecated. google.cloud.datalabeling.v1beta1.Instruction.csv_instruction is deprecated. See google/cloud/datalabeling/v1beta1/instruction.proto;l=64

Deprecated: this instruction format is not supported any more. Instruction from a CSV file, such as for classification task. The CSV file should have exact two columns, in the following format:

  • The first column is labeled data, such as an image reference, text.
  • The second column is comma separated labels associated with data.

.google.cloud.datalabeling.v1beta1.CsvInstruction csv_instruction = 7 [deprecated = true];

Returns
TypeDescription
boolean

Whether the csvInstruction field is set.

hasPdfInstruction()

public boolean hasPdfInstruction()

Instruction from a PDF document. The PDF should be in a Cloud Storage bucket.

.google.cloud.datalabeling.v1beta1.PdfInstruction pdf_instruction = 9;

Returns
TypeDescription
boolean

Whether the pdfInstruction field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. Last update time of instruction.

.google.protobuf.Timestamp update_time = 5;

Returns
TypeDescription
boolean

Whether the updateTime field is set.

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 Instruction.Builder newBuilderForType()
Returns
TypeDescription
Instruction.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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