Class Model.Builder

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

public static final class Model.Builder extends com.google.protobuf.GeneratedMessage.Builder<Model.Builder> implements ModelOrBuilder
 A trained translation model.
 
Protobuf type google.cloud.translation.v3.Model
  • 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<Model.Builder>
    • clear

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

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

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

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

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

      public Model.Builder mergeFrom(Model other)
    • isInitialized

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

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

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

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

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

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

      public Model.Builder setNameBytes(com.google.protobuf.ByteString value)
       The resource name of the model, in form of
       `projects/{project-number-or-id}/locations/{location_id}/models/{model_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 model 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 ModelOrBuilder
      Returns:
      The displayName.
    • getDisplayNameBytes

      public com.google.protobuf.ByteString getDisplayNameBytes()
       The name of the model 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 ModelOrBuilder
      Returns:
      The bytes for displayName.
    • setDisplayName

      public Model.Builder setDisplayName(String value)
       The name of the model 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 Model.Builder clearDisplayName()
       The name of the model 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 Model.Builder setDisplayNameBytes(com.google.protobuf.ByteString value)
       The name of the model 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.
    • getDataset

      public String getDataset()
       The dataset from which the model is trained, in form of
       `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}`
       
      string dataset = 3;
      Specified by:
      getDataset in interface ModelOrBuilder
      Returns:
      The dataset.
    • getDatasetBytes

      public com.google.protobuf.ByteString getDatasetBytes()
       The dataset from which the model is trained, in form of
       `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}`
       
      string dataset = 3;
      Specified by:
      getDatasetBytes in interface ModelOrBuilder
      Returns:
      The bytes for dataset.
    • setDataset

      public Model.Builder setDataset(String value)
       The dataset from which the model is trained, in form of
       `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}`
       
      string dataset = 3;
      Parameters:
      value - The dataset to set.
      Returns:
      This builder for chaining.
    • clearDataset

      public Model.Builder clearDataset()
       The dataset from which the model is trained, in form of
       `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}`
       
      string dataset = 3;
      Returns:
      This builder for chaining.
    • setDatasetBytes

      public Model.Builder setDatasetBytes(com.google.protobuf.ByteString value)
       The dataset from which the model is trained, in form of
       `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}`
       
      string dataset = 3;
      Parameters:
      value - The bytes for dataset to set.
      Returns:
      This builder for chaining.
    • getSourceLanguageCode

      public String getSourceLanguageCode()
       Output only. The BCP-47 language code of the source language.
       
      string source_language_code = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getSourceLanguageCode in interface ModelOrBuilder
      Returns:
      The sourceLanguageCode.
    • getSourceLanguageCodeBytes

      public com.google.protobuf.ByteString getSourceLanguageCodeBytes()
       Output only. The BCP-47 language code of the source language.
       
      string source_language_code = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getSourceLanguageCodeBytes in interface ModelOrBuilder
      Returns:
      The bytes for sourceLanguageCode.
    • setSourceLanguageCode

      public Model.Builder setSourceLanguageCode(String value)
       Output only. The BCP-47 language code of the source language.
       
      string source_language_code = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The sourceLanguageCode to set.
      Returns:
      This builder for chaining.
    • clearSourceLanguageCode

      public Model.Builder clearSourceLanguageCode()
       Output only. The BCP-47 language code of the source language.
       
      string source_language_code = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • setSourceLanguageCodeBytes

      public Model.Builder setSourceLanguageCodeBytes(com.google.protobuf.ByteString value)
       Output only. The BCP-47 language code of the source language.
       
      string source_language_code = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The bytes for sourceLanguageCode to set.
      Returns:
      This builder for chaining.
    • getTargetLanguageCode

      public String getTargetLanguageCode()
       Output only. The BCP-47 language code of the target language.
       
      string target_language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getTargetLanguageCode in interface ModelOrBuilder
      Returns:
      The targetLanguageCode.
    • getTargetLanguageCodeBytes

      public com.google.protobuf.ByteString getTargetLanguageCodeBytes()
       Output only. The BCP-47 language code of the target language.
       
      string target_language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getTargetLanguageCodeBytes in interface ModelOrBuilder
      Returns:
      The bytes for targetLanguageCode.
    • setTargetLanguageCode

      public Model.Builder setTargetLanguageCode(String value)
       Output only. The BCP-47 language code of the target language.
       
      string target_language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The targetLanguageCode to set.
      Returns:
      This builder for chaining.
    • clearTargetLanguageCode

      public Model.Builder clearTargetLanguageCode()
       Output only. The BCP-47 language code of the target language.
       
      string target_language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • setTargetLanguageCodeBytes

      public Model.Builder setTargetLanguageCodeBytes(com.google.protobuf.ByteString value)
       Output only. The BCP-47 language code of the target language.
       
      string target_language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The bytes for targetLanguageCode to set.
      Returns:
      This builder for chaining.
    • getTrainExampleCount

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

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

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

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

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

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

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

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

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

      public boolean hasCreateTime()
       Output only. Timestamp when the model resource was created, which is also
       when the training started.
       
      .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasCreateTime in interface ModelOrBuilder
      Returns:
      Whether the createTime field is set.
    • getCreateTime

      public com.google.protobuf.Timestamp getCreateTime()
       Output only. Timestamp when the model resource was created, which is also
       when the training started.
       
      .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTime in interface ModelOrBuilder
      Returns:
      The createTime.
    • setCreateTime

      public Model.Builder setCreateTime(com.google.protobuf.Timestamp value)
       Output only. Timestamp when the model resource was created, which is also
       when the training started.
       
      .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setCreateTime

      public Model.Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue)
       Output only. Timestamp when the model resource was created, which is also
       when the training started.
       
      .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • mergeCreateTime

      public Model.Builder mergeCreateTime(com.google.protobuf.Timestamp value)
       Output only. Timestamp when the model resource was created, which is also
       when the training started.
       
      .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • clearCreateTime

      public Model.Builder clearCreateTime()
       Output only. Timestamp when the model resource was created, which is also
       when the training started.
       
      .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCreateTimeBuilder

      public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder()
       Output only. Timestamp when the model resource was created, which is also
       when the training started.
       
      .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCreateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
       Output only. Timestamp when the model resource was created, which is also
       when the training started.
       
      .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTimeOrBuilder in interface ModelOrBuilder
    • hasUpdateTime

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

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

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

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

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

      public Model.Builder clearUpdateTime()
       Output only. Timestamp when this model 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 model 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 model was last updated.
       
      .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUpdateTimeOrBuilder in interface ModelOrBuilder