Class Instruction.Builder (0.152.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
TypeDescription
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
NameDescription
valuesIterable<String>

The blockingResources to add.

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

The blockingResources to add.

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

The bytes of the blockingResources to add.

Returns
TypeDescription
Instruction.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Instruction build()
Returns
TypeDescription
Instruction

buildPartial()

public Instruction buildPartial()
Returns
TypeDescription
Instruction

clear()

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

This builder for chaining.

clearCreateTime()

public Instruction.Builder clearCreateTime()

Output only. Creation time of instruction.

.google.protobuf.Timestamp create_time = 4;

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

clearDataType()

public Instruction.Builder clearDataType()

Required. The data type of this instruction.

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

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

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Instruction.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Instruction.Builder
Overrides

clearName()

public Instruction.Builder clearName()

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

string name = 1;

Returns
TypeDescription
Instruction.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Instruction.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
Instruction.Builder

clearUpdateTime()

public Instruction.Builder clearUpdateTime()

Output only. Last update time of instruction.

.google.protobuf.Timestamp update_time = 5;

Returns
TypeDescription
Instruction.Builder

clone()

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

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. Creation time of instruction.

.google.protobuf.Timestamp create_time = 4;

Returns
TypeDescription
Builder

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.

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

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

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.

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.

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
TypeDescription
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
TypeDescription
PdfInstructionOrBuilder

getUpdateTime()

public Timestamp getUpdateTime()

Output only. Last update time of instruction.

.google.protobuf.Timestamp update_time = 5;

Returns
TypeDescription
Timestamp

The updateTime.

getUpdateTimeBuilder()

public Timestamp.Builder getUpdateTimeBuilder()

Output only. Last update time of instruction.

.google.protobuf.Timestamp update_time = 5;

Returns
TypeDescription
Builder

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.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeCreateTime(Timestamp value)

public Instruction.Builder mergeCreateTime(Timestamp value)

Output only. Creation time of instruction.

.google.protobuf.Timestamp create_time = 4;

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
valueCsvInstruction
Returns
TypeDescription
Instruction.Builder

mergeFrom(Instruction other)

public Instruction.Builder mergeFrom(Instruction other)
Parameter
NameDescription
otherInstruction
Returns
TypeDescription
Instruction.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public Instruction.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
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
NameDescription
valuePdfInstruction
Returns
TypeDescription
Instruction.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

The index to set the value at.

valueString

The blockingResources to set.

Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
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
NameDescription
valueCsvInstruction
Returns
TypeDescription
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
NameDescription
builderForValueCsvInstruction.Builder
Returns
TypeDescription
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
NameDescription
valueDataType

The dataType to set.

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

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

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

The description to set.

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

The bytes for description to set.

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

The displayName to set.

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

The bytes for displayName to set.

Returns
TypeDescription
Instruction.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

The name to set.

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

The bytes for name to set.

Returns
TypeDescription
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
NameDescription
valuePdfInstruction
Returns
TypeDescription
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
NameDescription
builderForValuePdfInstruction.Builder
Returns
TypeDescription
Instruction.Builder

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

public Instruction.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Instruction.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Instruction.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
Instruction.Builder