Class Instruction.Builder (0.162.0)

public static final class Instruction.Builder extends GeneratedMessageV3.Builder<Instruction.Builder> 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 Methods

getDescriptor()

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

Methods

addAllBlockingResources(Iterable<String> values)

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

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

repeated string blocking_resources = 10;

Parameter
Name Description
values Iterable<String>

The blockingResources to add.

Returns
Type Description
Instruction.Builder

This builder for chaining.

addBlockingResources(String value)

public Instruction.Builder addBlockingResources(String value)

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

repeated string blocking_resources = 10;

Parameter
Name Description
value String

The blockingResources to add.

Returns
Type Description
Instruction.Builder

This builder for chaining.

addBlockingResourcesBytes(ByteString value)

public Instruction.Builder addBlockingResourcesBytes(ByteString value)

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

repeated string blocking_resources = 10;

Parameter
Name Description
value ByteString

The bytes of the blockingResources to add.

Returns
Type Description
Instruction.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Instruction build()
Returns
Type Description
Instruction

buildPartial()

public Instruction buildPartial()
Returns
Type Description
Instruction

clear()

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

clearBlockingResources()

public Instruction.Builder clearBlockingResources()

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

repeated string blocking_resources = 10;

Returns
Type Description
Instruction.Builder

This builder for chaining.

clearCreateTime()

public Instruction.Builder clearCreateTime()

Output only. Creation time of instruction.

.google.protobuf.Timestamp create_time = 4;

Returns
Type Description
Instruction.Builder

clearCsvInstruction() (deprecated)

public Instruction.Builder clearCsvInstruction()

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
Type Description
Instruction.Builder

clearDataType()

public Instruction.Builder clearDataType()

Required. The data type of this instruction.

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

Returns
Type Description
Instruction.Builder

This builder for chaining.

clearDescription()

public Instruction.Builder clearDescription()

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

string description = 3;

Returns
Type Description
Instruction.Builder

This builder for chaining.

clearDisplayName()

public Instruction.Builder clearDisplayName()

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

string display_name = 2;

Returns
Type Description
Instruction.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearName()

public Instruction.Builder clearName()

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

string name = 1;

Returns
Type Description
Instruction.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearPdfInstruction()

public Instruction.Builder clearPdfInstruction()

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

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

Returns
Type Description
Instruction.Builder

clearUpdateTime()

public Instruction.Builder clearUpdateTime()

Output only. Last update time of instruction.

.google.protobuf.Timestamp update_time = 5;

Returns
Type Description
Instruction.Builder

clone()

public Instruction.Builder clone()
Returns
Type Description
Instruction.Builder
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
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 instruction.

repeated string blocking_resources = 10;

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

repeated string blocking_resources = 10;

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

repeated string blocking_resources = 10;

Returns
Type Description
ProtocolStringList

A list containing the blockingResources.

getCreateTime()

public Timestamp getCreateTime()

Output only. Creation time of instruction.

.google.protobuf.Timestamp create_time = 4;

Returns
Type Description
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. Creation time of instruction.

.google.protobuf.Timestamp create_time = 4;

Returns
Type Description
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. Creation time of instruction.

.google.protobuf.Timestamp create_time = 4;

Returns
Type Description
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
Type Description
CsvInstruction

The csvInstruction.

getCsvInstructionBuilder() (deprecated)

public CsvInstruction.Builder getCsvInstructionBuilder()

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
Type Description
CsvInstruction.Builder

getCsvInstructionOrBuilder() (deprecated)

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
Type Description
CsvInstructionOrBuilder

getDataType()

public DataType getDataType()

Required. The data type of this instruction.

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

Returns
Type Description
DataType

The dataType.

getDataTypeValue()

public int getDataTypeValue()

Required. The data type of this instruction.

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

Returns
Type Description
int

The enum numeric value on the wire for dataType.

getDefaultInstanceForType()

public Instruction getDefaultInstanceForType()
Returns
Type Description
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
Type Description
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
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 of the instruction. Maximum of 64 characters.

string display_name = 2;

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

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

string display_name = 2;

Returns
Type Description
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
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

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

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

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
Type Description
PdfInstruction

The pdfInstruction.

getPdfInstructionBuilder()

public PdfInstruction.Builder getPdfInstructionBuilder()

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

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

Returns
Type Description
PdfInstruction.Builder

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
Type Description
PdfInstructionOrBuilder

getUpdateTime()

public Timestamp getUpdateTime()

Output only. Last update time of instruction.

.google.protobuf.Timestamp update_time = 5;

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeBuilder()

public Timestamp.Builder getUpdateTimeBuilder()

Output only. Last update time of instruction.

.google.protobuf.Timestamp update_time = 5;

Returns
Type Description
Builder

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. Last update time of instruction.

.google.protobuf.Timestamp update_time = 5;

Returns
Type Description
TimestampOrBuilder

hasCreateTime()

public boolean hasCreateTime()

Output only. Creation time of instruction.

.google.protobuf.Timestamp create_time = 4;

Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
boolean

Whether the updateTime field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeCreateTime(Timestamp value)

public Instruction.Builder mergeCreateTime(Timestamp value)

Output only. Creation time of instruction.

.google.protobuf.Timestamp create_time = 4;

Parameter
Name Description
value Timestamp
Returns
Type Description
Instruction.Builder

mergeCsvInstruction(CsvInstruction value) (deprecated)

public Instruction.Builder mergeCsvInstruction(CsvInstruction value)

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];

Parameter
Name Description
value CsvInstruction
Returns
Type Description
Instruction.Builder

mergeFrom(Instruction other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergePdfInstruction(PdfInstruction value)

public Instruction.Builder mergePdfInstruction(PdfInstruction value)

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

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

Parameter
Name Description
value PdfInstruction
Returns
Type Description
Instruction.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

mergeUpdateTime(Timestamp value)

public Instruction.Builder mergeUpdateTime(Timestamp value)

Output only. Last update time of instruction.

.google.protobuf.Timestamp update_time = 5;

Parameter
Name Description
value Timestamp
Returns
Type Description
Instruction.Builder

setBlockingResources(int index, String value)

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

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

repeated string blocking_resources = 10;

Parameters
Name Description
index int

The index to set the value at.

value String

The blockingResources to set.

Returns
Type Description
Instruction.Builder

This builder for chaining.

setCreateTime(Timestamp value)

public Instruction.Builder setCreateTime(Timestamp value)

Output only. Creation time of instruction.

.google.protobuf.Timestamp create_time = 4;

Parameter
Name Description
value Timestamp
Returns
Type Description
Instruction.Builder

setCreateTime(Timestamp.Builder builderForValue)

public Instruction.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. Creation time of instruction.

.google.protobuf.Timestamp create_time = 4;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Instruction.Builder

setCsvInstruction(CsvInstruction value) (deprecated)

public Instruction.Builder setCsvInstruction(CsvInstruction value)

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];

Parameter
Name Description
value CsvInstruction
Returns
Type Description
Instruction.Builder

setCsvInstruction(CsvInstruction.Builder builderForValue) (deprecated)

public Instruction.Builder setCsvInstruction(CsvInstruction.Builder builderForValue)

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];

Parameter
Name Description
builderForValue CsvInstruction.Builder
Returns
Type Description
Instruction.Builder

setDataType(DataType value)

public Instruction.Builder setDataType(DataType value)

Required. The data type of this instruction.

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

Parameter
Name Description
value DataType

The dataType to set.

Returns
Type Description
Instruction.Builder

This builder for chaining.

setDataTypeValue(int value)

public Instruction.Builder setDataTypeValue(int value)

Required. The data type of this instruction.

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

Parameter
Name Description
value int

The enum numeric value on the wire for dataType to set.

Returns
Type Description
Instruction.Builder

This builder for chaining.

setDescription(String value)

public Instruction.Builder setDescription(String value)

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

string description = 3;

Parameter
Name Description
value String

The description to set.

Returns
Type Description
Instruction.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public Instruction.Builder setDescriptionBytes(ByteString value)

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

string description = 3;

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
Instruction.Builder

This builder for chaining.

setDisplayName(String value)

public Instruction.Builder setDisplayName(String value)

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

string display_name = 2;

Parameter
Name Description
value String

The displayName to set.

Returns
Type Description
Instruction.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public Instruction.Builder setDisplayNameBytes(ByteString value)

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

string display_name = 2;

Parameter
Name Description
value ByteString

The bytes for displayName to set.

Returns
Type Description
Instruction.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setName(String value)

public Instruction.Builder setName(String value)

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

string name = 1;

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Instruction.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Instruction.Builder setNameBytes(ByteString value)

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

string name = 1;

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Instruction.Builder

This builder for chaining.

setPdfInstruction(PdfInstruction value)

public Instruction.Builder setPdfInstruction(PdfInstruction value)

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

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

Parameter
Name Description
value PdfInstruction
Returns
Type Description
Instruction.Builder

setPdfInstruction(PdfInstruction.Builder builderForValue)

public Instruction.Builder setPdfInstruction(PdfInstruction.Builder builderForValue)

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

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

Parameter
Name Description
builderForValue PdfInstruction.Builder
Returns
Type Description
Instruction.Builder

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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

setUpdateTime(Timestamp value)

public Instruction.Builder setUpdateTime(Timestamp value)

Output only. Last update time of instruction.

.google.protobuf.Timestamp update_time = 5;

Parameter
Name Description
value Timestamp
Returns
Type Description
Instruction.Builder

setUpdateTime(Timestamp.Builder builderForValue)

public Instruction.Builder setUpdateTime(Timestamp.Builder builderForValue)

Output only. Last update time of instruction.

.google.protobuf.Timestamp update_time = 5;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Instruction.Builder