Class Instruction.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Instruction.Builder>
com.google.cloud.datalabeling.v1beta1.Instruction.Builder
All Implemented Interfaces:
InstructionOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
Instruction

public static final class Instruction.Builder extends com.google.protobuf.GeneratedMessage.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
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<Instruction.Builder>
    • clear

      public Instruction.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<Instruction.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<Instruction.Builder>
    • getDefaultInstanceForType

      public Instruction getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public Instruction build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public Instruction buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public Instruction.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Instruction.Builder>
    • mergeFrom

      public Instruction.Builder mergeFrom(Instruction other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<Instruction.Builder>
    • mergeFrom

      public Instruction.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Instruction.Builder>
      Throws:
      IOException
    • getName

      public String getName()
       Output only. Instruction resource name, format:
       projects/{project_id}/instructions/{instruction_id}
       
      string name = 1;
      Specified by:
      getName in interface InstructionOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Output only. Instruction resource name, format:
       projects/{project_id}/instructions/{instruction_id}
       
      string name = 1;
      Specified by:
      getNameBytes in interface InstructionOrBuilder
      Returns:
      The bytes for name.
    • setName

      public Instruction.Builder setName(String value)
       Output only. Instruction resource name, format:
       projects/{project_id}/instructions/{instruction_id}
       
      string name = 1;
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public Instruction.Builder clearName()
       Output only. Instruction resource name, format:
       projects/{project_id}/instructions/{instruction_id}
       
      string name = 1;
      Returns:
      This builder for chaining.
    • setNameBytes

      public Instruction.Builder setNameBytes(com.google.protobuf.ByteString value)
       Output only. Instruction resource name, format:
       projects/{project_id}/instructions/{instruction_id}
       
      string name = 1;
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getDisplayName

      public String getDisplayName()
       Required. The display name of the instruction. Maximum of 64 characters.
       
      string display_name = 2;
      Specified by:
      getDisplayName in interface InstructionOrBuilder
      Returns:
      The displayName.
    • getDisplayNameBytes

      public com.google.protobuf.ByteString getDisplayNameBytes()
       Required. The display name of the instruction. Maximum of 64 characters.
       
      string display_name = 2;
      Specified by:
      getDisplayNameBytes in interface InstructionOrBuilder
      Returns:
      The bytes for displayName.
    • setDisplayName

      public Instruction.Builder setDisplayName(String value)
       Required. The display name of the instruction. Maximum of 64 characters.
       
      string display_name = 2;
      Parameters:
      value - The displayName to set.
      Returns:
      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:
      This builder for chaining.
    • setDisplayNameBytes

      public Instruction.Builder setDisplayNameBytes(com.google.protobuf.ByteString value)
       Required. The display name of the instruction. Maximum of 64 characters.
       
      string display_name = 2;
      Parameters:
      value - The bytes for displayName to set.
      Returns:
      This builder for chaining.
    • getDescription

      public String getDescription()
       Optional. User-provided description of the instruction.
       The description can be up to 10000 characters long.
       
      string description = 3;
      Specified by:
      getDescription in interface InstructionOrBuilder
      Returns:
      The description.
    • getDescriptionBytes

      public com.google.protobuf.ByteString getDescriptionBytes()
       Optional. User-provided description of the instruction.
       The description can be up to 10000 characters long.
       
      string description = 3;
      Specified by:
      getDescriptionBytes in interface InstructionOrBuilder
      Returns:
      The bytes for description.
    • setDescription

      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;
      Parameters:
      value - The description to set.
      Returns:
      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:
      This builder for chaining.
    • setDescriptionBytes

      public Instruction.Builder setDescriptionBytes(com.google.protobuf.ByteString value)
       Optional. User-provided description of the instruction.
       The description can be up to 10000 characters long.
       
      string description = 3;
      Parameters:
      value - The bytes for description to set.
      Returns:
      This builder for chaining.
    • hasCreateTime

      public boolean hasCreateTime()
       Output only. Creation time of instruction.
       
      .google.protobuf.Timestamp create_time = 4;
      Specified by:
      hasCreateTime in interface InstructionOrBuilder
      Returns:
      Whether the createTime field is set.
    • getCreateTime

      public com.google.protobuf.Timestamp getCreateTime()
       Output only. Creation time of instruction.
       
      .google.protobuf.Timestamp create_time = 4;
      Specified by:
      getCreateTime in interface InstructionOrBuilder
      Returns:
      The createTime.
    • setCreateTime

      public Instruction.Builder setCreateTime(com.google.protobuf.Timestamp value)
       Output only. Creation time of instruction.
       
      .google.protobuf.Timestamp create_time = 4;
    • setCreateTime

      public Instruction.Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue)
       Output only. Creation time of instruction.
       
      .google.protobuf.Timestamp create_time = 4;
    • mergeCreateTime

      public Instruction.Builder mergeCreateTime(com.google.protobuf.Timestamp value)
       Output only. Creation time of instruction.
       
      .google.protobuf.Timestamp create_time = 4;
    • clearCreateTime

      public Instruction.Builder clearCreateTime()
       Output only. Creation time of instruction.
       
      .google.protobuf.Timestamp create_time = 4;
    • getCreateTimeBuilder

      public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder()
       Output only. Creation time of instruction.
       
      .google.protobuf.Timestamp create_time = 4;
    • getCreateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
       Output only. Creation time of instruction.
       
      .google.protobuf.Timestamp create_time = 4;
      Specified by:
      getCreateTimeOrBuilder in interface InstructionOrBuilder
    • hasUpdateTime

      public boolean hasUpdateTime()
       Output only. Last update time of instruction.
       
      .google.protobuf.Timestamp update_time = 5;
      Specified by:
      hasUpdateTime in interface InstructionOrBuilder
      Returns:
      Whether the updateTime field is set.
    • getUpdateTime

      public com.google.protobuf.Timestamp getUpdateTime()
       Output only. Last update time of instruction.
       
      .google.protobuf.Timestamp update_time = 5;
      Specified by:
      getUpdateTime in interface InstructionOrBuilder
      Returns:
      The updateTime.
    • setUpdateTime

      public Instruction.Builder setUpdateTime(com.google.protobuf.Timestamp value)
       Output only. Last update time of instruction.
       
      .google.protobuf.Timestamp update_time = 5;
    • setUpdateTime

      public Instruction.Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue)
       Output only. Last update time of instruction.
       
      .google.protobuf.Timestamp update_time = 5;
    • mergeUpdateTime

      public Instruction.Builder mergeUpdateTime(com.google.protobuf.Timestamp value)
       Output only. Last update time of instruction.
       
      .google.protobuf.Timestamp update_time = 5;
    • clearUpdateTime

      public Instruction.Builder clearUpdateTime()
       Output only. Last update time of instruction.
       
      .google.protobuf.Timestamp update_time = 5;
    • getUpdateTimeBuilder

      public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder()
       Output only. Last update time of instruction.
       
      .google.protobuf.Timestamp update_time = 5;
    • getUpdateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder()
       Output only. Last update time of instruction.
       
      .google.protobuf.Timestamp update_time = 5;
      Specified by:
      getUpdateTimeOrBuilder in interface InstructionOrBuilder
    • getDataTypeValue

      public int getDataTypeValue()
       Required. The data type of this instruction.
       
      .google.cloud.datalabeling.v1beta1.DataType data_type = 6;
      Specified by:
      getDataTypeValue in interface InstructionOrBuilder
      Returns:
      The enum numeric value on the wire for dataType.
    • setDataTypeValue

      public Instruction.Builder setDataTypeValue(int value)
       Required. The data type of this instruction.
       
      .google.cloud.datalabeling.v1beta1.DataType data_type = 6;
      Parameters:
      value - The enum numeric value on the wire for dataType to set.
      Returns:
      This builder for chaining.
    • getDataType

      public DataType getDataType()
       Required. The data type of this instruction.
       
      .google.cloud.datalabeling.v1beta1.DataType data_type = 6;
      Specified by:
      getDataType in interface InstructionOrBuilder
      Returns:
      The dataType.
    • setDataType

      public Instruction.Builder setDataType(DataType value)
       Required. The data type of this instruction.
       
      .google.cloud.datalabeling.v1beta1.DataType data_type = 6;
      Parameters:
      value - The dataType to set.
      Returns:
      This builder for chaining.
    • clearDataType

      public Instruction.Builder clearDataType()
       Required. The data type of this instruction.
       
      .google.cloud.datalabeling.v1beta1.DataType data_type = 6;
      Returns:
      This builder for chaining.
    • 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];
      Specified by:
      hasCsvInstruction in interface InstructionOrBuilder
      Returns:
      Whether the csvInstruction field is set.
    • 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];
      Specified by:
      getCsvInstruction in interface InstructionOrBuilder
      Returns:
      The csvInstruction.
    • setCsvInstruction

      @Deprecated public Instruction.Builder setCsvInstruction(CsvInstruction value)
      Deprecated.
       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];
    • setCsvInstruction

      @Deprecated public Instruction.Builder setCsvInstruction(CsvInstruction.Builder builderForValue)
      Deprecated.
       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];
    • mergeCsvInstruction

      @Deprecated public Instruction.Builder mergeCsvInstruction(CsvInstruction value)
      Deprecated.
       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];
    • clearCsvInstruction

      @Deprecated public Instruction.Builder clearCsvInstruction()
      Deprecated.
       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];
    • getCsvInstructionBuilder

      @Deprecated public CsvInstruction.Builder getCsvInstructionBuilder()
      Deprecated.
       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];
    • getCsvInstructionOrBuilder

      @Deprecated public CsvInstructionOrBuilder getCsvInstructionOrBuilder()
      Deprecated.
       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];
      Specified by:
      getCsvInstructionOrBuilder in interface InstructionOrBuilder
    • 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;
      Specified by:
      hasPdfInstruction in interface InstructionOrBuilder
      Returns:
      Whether the pdfInstruction field is set.
    • 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;
      Specified by:
      getPdfInstruction in interface InstructionOrBuilder
      Returns:
      The pdfInstruction.
    • setPdfInstruction

      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;
    • setPdfInstruction

      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;
    • mergePdfInstruction

      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;
    • 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;
    • 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;
    • 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;
      Specified by:
      getPdfInstructionOrBuilder in interface InstructionOrBuilder
    • getBlockingResourcesList

      public com.google.protobuf.ProtocolStringList getBlockingResourcesList()
       Output only. The names of any related resources that are blocking changes
       to the instruction.
       
      repeated string blocking_resources = 10;
      Specified by:
      getBlockingResourcesList in interface InstructionOrBuilder
      Returns:
      A list containing the blockingResources.
    • getBlockingResourcesCount

      public int getBlockingResourcesCount()
       Output only. The names of any related resources that are blocking changes
       to the instruction.
       
      repeated string blocking_resources = 10;
      Specified by:
      getBlockingResourcesCount in interface InstructionOrBuilder
      Returns:
      The count of blockingResources.
    • getBlockingResources

      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;
      Specified by:
      getBlockingResources in interface InstructionOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The blockingResources at the given index.
    • getBlockingResourcesBytes

      public com.google.protobuf.ByteString getBlockingResourcesBytes(int index)
       Output only. The names of any related resources that are blocking changes
       to the instruction.
       
      repeated string blocking_resources = 10;
      Specified by:
      getBlockingResourcesBytes in interface InstructionOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the blockingResources at the given index.
    • setBlockingResources

      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:
      index - The index to set the value at.
      value - The blockingResources to set.
      Returns:
      This builder for chaining.
    • addBlockingResources

      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;
      Parameters:
      value - The blockingResources to add.
      Returns:
      This builder for chaining.
    • addAllBlockingResources

      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;
      Parameters:
      values - The blockingResources to add.
      Returns:
      This builder for chaining.
    • 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:
      This builder for chaining.
    • addBlockingResourcesBytes

      public Instruction.Builder addBlockingResourcesBytes(com.google.protobuf.ByteString value)
       Output only. The names of any related resources that are blocking changes
       to the instruction.
       
      repeated string blocking_resources = 10;
      Parameters:
      value - The bytes of the blockingResources to add.
      Returns:
      This builder for chaining.