Class Dataset.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Dataset.Builder>
com.google.cloud.translate.v3.Dataset.Builder
All Implemented Interfaces:
DatasetOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
Dataset

public static final class Dataset.Builder extends com.google.protobuf.GeneratedMessage.Builder<Dataset.Builder> implements DatasetOrBuilder
 A dataset that hosts the examples (sentence pairs) used for translation
 models.
 
Protobuf type google.cloud.translation.v3.Dataset
  • 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<Dataset.Builder>
    • clear

      public Dataset.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<Dataset.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<Dataset.Builder>
    • getDefaultInstanceForType

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

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

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

      public Dataset.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<Dataset.Builder>
    • mergeFrom

      public Dataset.Builder mergeFrom(Dataset other)
    • isInitialized

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

      public Dataset.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<Dataset.Builder>
      Throws:
      IOException
    • getName

      public String getName()
       The resource name of the dataset, in form of
       `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}`
       
      string name = 1;
      Specified by:
      getName in interface DatasetOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       The resource name of the dataset, in form of
       `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}`
       
      string name = 1;
      Specified by:
      getNameBytes in interface DatasetOrBuilder
      Returns:
      The bytes for name.
    • setName

      public Dataset.Builder setName(String value)
       The resource name of the dataset, in form of
       `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}`
       
      string name = 1;
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public Dataset.Builder clearName()
       The resource name of the dataset, in form of
       `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}`
       
      string name = 1;
      Returns:
      This builder for chaining.
    • setNameBytes

      public Dataset.Builder setNameBytes(com.google.protobuf.ByteString value)
       The resource name of the dataset, in form of
       `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}`
       
      string name = 1;
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getDisplayName

      public String getDisplayName()
       The name of the dataset to show in the interface. The name can be
       up to 32 characters long and can consist only of ASCII Latin letters A-Z
       and a-z, underscores (_), and ASCII digits 0-9.
       
      string display_name = 2;
      Specified by:
      getDisplayName in interface DatasetOrBuilder
      Returns:
      The displayName.
    • getDisplayNameBytes

      public com.google.protobuf.ByteString getDisplayNameBytes()
       The name of the dataset to show in the interface. The name can be
       up to 32 characters long and can consist only of ASCII Latin letters A-Z
       and a-z, underscores (_), and ASCII digits 0-9.
       
      string display_name = 2;
      Specified by:
      getDisplayNameBytes in interface DatasetOrBuilder
      Returns:
      The bytes for displayName.
    • setDisplayName

      public Dataset.Builder setDisplayName(String value)
       The name of the dataset to show in the interface. The name can be
       up to 32 characters long and can consist only of ASCII Latin letters A-Z
       and a-z, underscores (_), and ASCII digits 0-9.
       
      string display_name = 2;
      Parameters:
      value - The displayName to set.
      Returns:
      This builder for chaining.
    • clearDisplayName

      public Dataset.Builder clearDisplayName()
       The name of the dataset to show in the interface. The name can be
       up to 32 characters long and can consist only of ASCII Latin letters A-Z
       and a-z, underscores (_), and ASCII digits 0-9.
       
      string display_name = 2;
      Returns:
      This builder for chaining.
    • setDisplayNameBytes

      public Dataset.Builder setDisplayNameBytes(com.google.protobuf.ByteString value)
       The name of the dataset to show in the interface. The name can be
       up to 32 characters long and can consist only of ASCII Latin letters A-Z
       and a-z, underscores (_), and ASCII digits 0-9.
       
      string display_name = 2;
      Parameters:
      value - The bytes for displayName to set.
      Returns:
      This builder for chaining.
    • getSourceLanguageCode

      public String getSourceLanguageCode()
       The BCP-47 language code of the source language.
       
      string source_language_code = 3;
      Specified by:
      getSourceLanguageCode in interface DatasetOrBuilder
      Returns:
      The sourceLanguageCode.
    • getSourceLanguageCodeBytes

      public com.google.protobuf.ByteString getSourceLanguageCodeBytes()
       The BCP-47 language code of the source language.
       
      string source_language_code = 3;
      Specified by:
      getSourceLanguageCodeBytes in interface DatasetOrBuilder
      Returns:
      The bytes for sourceLanguageCode.
    • setSourceLanguageCode

      public Dataset.Builder setSourceLanguageCode(String value)
       The BCP-47 language code of the source language.
       
      string source_language_code = 3;
      Parameters:
      value - The sourceLanguageCode to set.
      Returns:
      This builder for chaining.
    • clearSourceLanguageCode

      public Dataset.Builder clearSourceLanguageCode()
       The BCP-47 language code of the source language.
       
      string source_language_code = 3;
      Returns:
      This builder for chaining.
    • setSourceLanguageCodeBytes

      public Dataset.Builder setSourceLanguageCodeBytes(com.google.protobuf.ByteString value)
       The BCP-47 language code of the source language.
       
      string source_language_code = 3;
      Parameters:
      value - The bytes for sourceLanguageCode to set.
      Returns:
      This builder for chaining.
    • getTargetLanguageCode

      public String getTargetLanguageCode()
       The BCP-47 language code of the target language.
       
      string target_language_code = 4;
      Specified by:
      getTargetLanguageCode in interface DatasetOrBuilder
      Returns:
      The targetLanguageCode.
    • getTargetLanguageCodeBytes

      public com.google.protobuf.ByteString getTargetLanguageCodeBytes()
       The BCP-47 language code of the target language.
       
      string target_language_code = 4;
      Specified by:
      getTargetLanguageCodeBytes in interface DatasetOrBuilder
      Returns:
      The bytes for targetLanguageCode.
    • setTargetLanguageCode

      public Dataset.Builder setTargetLanguageCode(String value)
       The BCP-47 language code of the target language.
       
      string target_language_code = 4;
      Parameters:
      value - The targetLanguageCode to set.
      Returns:
      This builder for chaining.
    • clearTargetLanguageCode

      public Dataset.Builder clearTargetLanguageCode()
       The BCP-47 language code of the target language.
       
      string target_language_code = 4;
      Returns:
      This builder for chaining.
    • setTargetLanguageCodeBytes

      public Dataset.Builder setTargetLanguageCodeBytes(com.google.protobuf.ByteString value)
       The BCP-47 language code of the target language.
       
      string target_language_code = 4;
      Parameters:
      value - The bytes for targetLanguageCode to set.
      Returns:
      This builder for chaining.
    • getExampleCount

      public int getExampleCount()
       Output only. The number of examples in the dataset.
       
      int32 example_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getExampleCount in interface DatasetOrBuilder
      Returns:
      The exampleCount.
    • setExampleCount

      public Dataset.Builder setExampleCount(int value)
       Output only. The number of examples in the dataset.
       
      int32 example_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The exampleCount to set.
      Returns:
      This builder for chaining.
    • clearExampleCount

      public Dataset.Builder clearExampleCount()
       Output only. The number of examples in the dataset.
       
      int32 example_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • getTrainExampleCount

      public int getTrainExampleCount()
       Output only. Number of training examples (sentence pairs).
       
      int32 train_example_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getTrainExampleCount in interface DatasetOrBuilder
      Returns:
      The trainExampleCount.
    • setTrainExampleCount

      public Dataset.Builder setTrainExampleCount(int value)
       Output only. Number of training examples (sentence pairs).
       
      int32 train_example_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The trainExampleCount to set.
      Returns:
      This builder for chaining.
    • clearTrainExampleCount

      public Dataset.Builder clearTrainExampleCount()
       Output only. Number of training examples (sentence pairs).
       
      int32 train_example_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • getValidateExampleCount

      public int getValidateExampleCount()
       Output only. Number of validation examples (sentence pairs).
       
      int32 validate_example_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getValidateExampleCount in interface DatasetOrBuilder
      Returns:
      The validateExampleCount.
    • setValidateExampleCount

      public Dataset.Builder setValidateExampleCount(int value)
       Output only. Number of validation examples (sentence pairs).
       
      int32 validate_example_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The validateExampleCount to set.
      Returns:
      This builder for chaining.
    • clearValidateExampleCount

      public Dataset.Builder clearValidateExampleCount()
       Output only. Number of validation examples (sentence pairs).
       
      int32 validate_example_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • getTestExampleCount

      public int getTestExampleCount()
       Output only. Number of test examples (sentence pairs).
       
      int32 test_example_count = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getTestExampleCount in interface DatasetOrBuilder
      Returns:
      The testExampleCount.
    • setTestExampleCount

      public Dataset.Builder setTestExampleCount(int value)
       Output only. Number of test examples (sentence pairs).
       
      int32 test_example_count = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The testExampleCount to set.
      Returns:
      This builder for chaining.
    • clearTestExampleCount

      public Dataset.Builder clearTestExampleCount()
       Output only. Number of test examples (sentence pairs).
       
      int32 test_example_count = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • hasCreateTime

      public boolean hasCreateTime()
       Output only. Timestamp when this dataset was created.
       
      .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasCreateTime in interface DatasetOrBuilder
      Returns:
      Whether the createTime field is set.
    • getCreateTime

      public com.google.protobuf.Timestamp getCreateTime()
       Output only. Timestamp when this dataset was created.
       
      .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTime in interface DatasetOrBuilder
      Returns:
      The createTime.
    • setCreateTime

      public Dataset.Builder setCreateTime(com.google.protobuf.Timestamp value)
       Output only. Timestamp when this dataset was created.
       
      .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setCreateTime

      public Dataset.Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue)
       Output only. Timestamp when this dataset was created.
       
      .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • mergeCreateTime

      public Dataset.Builder mergeCreateTime(com.google.protobuf.Timestamp value)
       Output only. Timestamp when this dataset was created.
       
      .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • clearCreateTime

      public Dataset.Builder clearCreateTime()
       Output only. Timestamp when this dataset was created.
       
      .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCreateTimeBuilder

      public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder()
       Output only. Timestamp when this dataset was created.
       
      .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCreateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
       Output only. Timestamp when this dataset was created.
       
      .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTimeOrBuilder in interface DatasetOrBuilder
    • hasUpdateTime

      public boolean hasUpdateTime()
       Output only. Timestamp when this dataset was last updated.
       
      .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasUpdateTime in interface DatasetOrBuilder
      Returns:
      Whether the updateTime field is set.
    • getUpdateTime

      public com.google.protobuf.Timestamp getUpdateTime()
       Output only. Timestamp when this dataset was last updated.
       
      .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUpdateTime in interface DatasetOrBuilder
      Returns:
      The updateTime.
    • setUpdateTime

      public Dataset.Builder setUpdateTime(com.google.protobuf.Timestamp value)
       Output only. Timestamp when this dataset was last updated.
       
      .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setUpdateTime

      public Dataset.Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue)
       Output only. Timestamp when this dataset was last updated.
       
      .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • mergeUpdateTime

      public Dataset.Builder mergeUpdateTime(com.google.protobuf.Timestamp value)
       Output only. Timestamp when this dataset was last updated.
       
      .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • clearUpdateTime

      public Dataset.Builder clearUpdateTime()
       Output only. Timestamp when this dataset was last updated.
       
      .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getUpdateTimeBuilder

      public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder()
       Output only. Timestamp when this dataset was last updated.
       
      .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getUpdateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder()
       Output only. Timestamp when this dataset was last updated.
       
      .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUpdateTimeOrBuilder in interface DatasetOrBuilder