Class AdaptiveMtTranslateRequest.Builder

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

public static final class AdaptiveMtTranslateRequest.Builder extends com.google.protobuf.GeneratedMessage.Builder<AdaptiveMtTranslateRequest.Builder> implements AdaptiveMtTranslateRequestOrBuilder
 The request for sending an AdaptiveMt translation query.
 
Protobuf type google.cloud.translation.v3.AdaptiveMtTranslateRequest
  • 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<AdaptiveMtTranslateRequest.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<AdaptiveMtTranslateRequest.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<AdaptiveMtTranslateRequest.Builder>
    • getDefaultInstanceForType

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

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

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

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

    • isInitialized

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

      public AdaptiveMtTranslateRequest.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<AdaptiveMtTranslateRequest.Builder>
      Throws:
      IOException
    • getParent

      public String getParent()
       Required. Location to make a regional call.
      
       Format: `projects/{project-number-or-id}/locations/{location-id}`.
       
      string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getParent in interface AdaptiveMtTranslateRequestOrBuilder
      Returns:
      The parent.
    • getParentBytes

      public com.google.protobuf.ByteString getParentBytes()
       Required. Location to make a regional call.
      
       Format: `projects/{project-number-or-id}/locations/{location-id}`.
       
      string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getParentBytes in interface AdaptiveMtTranslateRequestOrBuilder
      Returns:
      The bytes for parent.
    • setParent

      public AdaptiveMtTranslateRequest.Builder setParent(String value)
       Required. Location to make a regional call.
      
       Format: `projects/{project-number-or-id}/locations/{location-id}`.
       
      string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The parent to set.
      Returns:
      This builder for chaining.
    • clearParent

      public AdaptiveMtTranslateRequest.Builder clearParent()
       Required. Location to make a regional call.
      
       Format: `projects/{project-number-or-id}/locations/{location-id}`.
       
      string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Returns:
      This builder for chaining.
    • setParentBytes

      public AdaptiveMtTranslateRequest.Builder setParentBytes(com.google.protobuf.ByteString value)
       Required. Location to make a regional call.
      
       Format: `projects/{project-number-or-id}/locations/{location-id}`.
       
      string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The bytes for parent to set.
      Returns:
      This builder for chaining.
    • getDataset

      public String getDataset()
       Required. The resource name for the dataset to use for adaptive MT.
       `projects/{project}/locations/{location-id}/adaptiveMtDatasets/{dataset}`
       
      string dataset = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getDataset in interface AdaptiveMtTranslateRequestOrBuilder
      Returns:
      The dataset.
    • getDatasetBytes

      public com.google.protobuf.ByteString getDatasetBytes()
       Required. The resource name for the dataset to use for adaptive MT.
       `projects/{project}/locations/{location-id}/adaptiveMtDatasets/{dataset}`
       
      string dataset = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getDatasetBytes in interface AdaptiveMtTranslateRequestOrBuilder
      Returns:
      The bytes for dataset.
    • setDataset

      public AdaptiveMtTranslateRequest.Builder setDataset(String value)
       Required. The resource name for the dataset to use for adaptive MT.
       `projects/{project}/locations/{location-id}/adaptiveMtDatasets/{dataset}`
       
      string dataset = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The dataset to set.
      Returns:
      This builder for chaining.
    • clearDataset

      public AdaptiveMtTranslateRequest.Builder clearDataset()
       Required. The resource name for the dataset to use for adaptive MT.
       `projects/{project}/locations/{location-id}/adaptiveMtDatasets/{dataset}`
       
      string dataset = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Returns:
      This builder for chaining.
    • setDatasetBytes

      public AdaptiveMtTranslateRequest.Builder setDatasetBytes(com.google.protobuf.ByteString value)
       Required. The resource name for the dataset to use for adaptive MT.
       `projects/{project}/locations/{location-id}/adaptiveMtDatasets/{dataset}`
       
      string dataset = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The bytes for dataset to set.
      Returns:
      This builder for chaining.
    • getContentList

      public com.google.protobuf.ProtocolStringList getContentList()
       Required. The content of the input in string format.
       
      repeated string content = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getContentList in interface AdaptiveMtTranslateRequestOrBuilder
      Returns:
      A list containing the content.
    • getContentCount

      public int getContentCount()
       Required. The content of the input in string format.
       
      repeated string content = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getContentCount in interface AdaptiveMtTranslateRequestOrBuilder
      Returns:
      The count of content.
    • getContent

      public String getContent(int index)
       Required. The content of the input in string format.
       
      repeated string content = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getContent in interface AdaptiveMtTranslateRequestOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The content at the given index.
    • getContentBytes

      public com.google.protobuf.ByteString getContentBytes(int index)
       Required. The content of the input in string format.
       
      repeated string content = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getContentBytes in interface AdaptiveMtTranslateRequestOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the content at the given index.
    • setContent

      public AdaptiveMtTranslateRequest.Builder setContent(int index, String value)
       Required. The content of the input in string format.
       
      repeated string content = 3 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      index - The index to set the value at.
      value - The content to set.
      Returns:
      This builder for chaining.
    • addContent

      public AdaptiveMtTranslateRequest.Builder addContent(String value)
       Required. The content of the input in string format.
       
      repeated string content = 3 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The content to add.
      Returns:
      This builder for chaining.
    • addAllContent

      public AdaptiveMtTranslateRequest.Builder addAllContent(Iterable<String> values)
       Required. The content of the input in string format.
       
      repeated string content = 3 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      values - The content to add.
      Returns:
      This builder for chaining.
    • clearContent

      public AdaptiveMtTranslateRequest.Builder clearContent()
       Required. The content of the input in string format.
       
      repeated string content = 3 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • addContentBytes

      public AdaptiveMtTranslateRequest.Builder addContentBytes(com.google.protobuf.ByteString value)
       Required. The content of the input in string format.
       
      repeated string content = 3 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes of the content to add.
      Returns:
      This builder for chaining.
    • getMimeType

      public String getMimeType()
       The format of the source text.
       
      string mime_type = 4;
      Specified by:
      getMimeType in interface AdaptiveMtTranslateRequestOrBuilder
      Returns:
      The mimeType.
    • getMimeTypeBytes

      public com.google.protobuf.ByteString getMimeTypeBytes()
       The format of the source text.
       
      string mime_type = 4;
      Specified by:
      getMimeTypeBytes in interface AdaptiveMtTranslateRequestOrBuilder
      Returns:
      The bytes for mimeType.
    • setMimeType

      public AdaptiveMtTranslateRequest.Builder setMimeType(String value)
       The format of the source text.
       
      string mime_type = 4;
      Parameters:
      value - The mimeType to set.
      Returns:
      This builder for chaining.
    • clearMimeType

      public AdaptiveMtTranslateRequest.Builder clearMimeType()
       The format of the source text.
       
      string mime_type = 4;
      Returns:
      This builder for chaining.
    • setMimeTypeBytes

      public AdaptiveMtTranslateRequest.Builder setMimeTypeBytes(com.google.protobuf.ByteString value)
       The format of the source text.
       
      string mime_type = 4;
      Parameters:
      value - The bytes for mimeType to set.
      Returns:
      This builder for chaining.
    • hasReferenceSentenceConfig

      public boolean hasReferenceSentenceConfig()
       Configuration for caller provided reference sentences.
       
      optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentenceConfig reference_sentence_config = 6;
      Specified by:
      hasReferenceSentenceConfig in interface AdaptiveMtTranslateRequestOrBuilder
      Returns:
      Whether the referenceSentenceConfig field is set.
    • getReferenceSentenceConfig

      public AdaptiveMtTranslateRequest.ReferenceSentenceConfig getReferenceSentenceConfig()
       Configuration for caller provided reference sentences.
       
      optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentenceConfig reference_sentence_config = 6;
      Specified by:
      getReferenceSentenceConfig in interface AdaptiveMtTranslateRequestOrBuilder
      Returns:
      The referenceSentenceConfig.
    • setReferenceSentenceConfig

       Configuration for caller provided reference sentences.
       
      optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentenceConfig reference_sentence_config = 6;
    • setReferenceSentenceConfig

       Configuration for caller provided reference sentences.
       
      optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentenceConfig reference_sentence_config = 6;
    • mergeReferenceSentenceConfig

       Configuration for caller provided reference sentences.
       
      optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentenceConfig reference_sentence_config = 6;
    • clearReferenceSentenceConfig

      public AdaptiveMtTranslateRequest.Builder clearReferenceSentenceConfig()
       Configuration for caller provided reference sentences.
       
      optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentenceConfig reference_sentence_config = 6;
    • getReferenceSentenceConfigBuilder

      public AdaptiveMtTranslateRequest.ReferenceSentenceConfig.Builder getReferenceSentenceConfigBuilder()
       Configuration for caller provided reference sentences.
       
      optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentenceConfig reference_sentence_config = 6;
    • getReferenceSentenceConfigOrBuilder

      public AdaptiveMtTranslateRequest.ReferenceSentenceConfigOrBuilder getReferenceSentenceConfigOrBuilder()
       Configuration for caller provided reference sentences.
       
      optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentenceConfig reference_sentence_config = 6;
      Specified by:
      getReferenceSentenceConfigOrBuilder in interface AdaptiveMtTranslateRequestOrBuilder
    • hasGlossaryConfig

      public boolean hasGlossaryConfig()
       Optional. Glossary to be applied. The glossary must be
       within the same region (have the same location-id) as the model, otherwise
       an INVALID_ARGUMENT (400) error is returned.
       
      optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.GlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasGlossaryConfig in interface AdaptiveMtTranslateRequestOrBuilder
      Returns:
      Whether the glossaryConfig field is set.
    • getGlossaryConfig

      public AdaptiveMtTranslateRequest.GlossaryConfig getGlossaryConfig()
       Optional. Glossary to be applied. The glossary must be
       within the same region (have the same location-id) as the model, otherwise
       an INVALID_ARGUMENT (400) error is returned.
       
      optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.GlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getGlossaryConfig in interface AdaptiveMtTranslateRequestOrBuilder
      Returns:
      The glossaryConfig.
    • setGlossaryConfig

       Optional. Glossary to be applied. The glossary must be
       within the same region (have the same location-id) as the model, otherwise
       an INVALID_ARGUMENT (400) error is returned.
       
      optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.GlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];
    • setGlossaryConfig

       Optional. Glossary to be applied. The glossary must be
       within the same region (have the same location-id) as the model, otherwise
       an INVALID_ARGUMENT (400) error is returned.
       
      optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.GlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];
    • mergeGlossaryConfig

       Optional. Glossary to be applied. The glossary must be
       within the same region (have the same location-id) as the model, otherwise
       an INVALID_ARGUMENT (400) error is returned.
       
      optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.GlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];
    • clearGlossaryConfig

      public AdaptiveMtTranslateRequest.Builder clearGlossaryConfig()
       Optional. Glossary to be applied. The glossary must be
       within the same region (have the same location-id) as the model, otherwise
       an INVALID_ARGUMENT (400) error is returned.
       
      optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.GlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];
    • getGlossaryConfigBuilder

      public AdaptiveMtTranslateRequest.GlossaryConfig.Builder getGlossaryConfigBuilder()
       Optional. Glossary to be applied. The glossary must be
       within the same region (have the same location-id) as the model, otherwise
       an INVALID_ARGUMENT (400) error is returned.
       
      optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.GlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];
    • getGlossaryConfigOrBuilder

      public AdaptiveMtTranslateRequest.GlossaryConfigOrBuilder getGlossaryConfigOrBuilder()
       Optional. Glossary to be applied. The glossary must be
       within the same region (have the same location-id) as the model, otherwise
       an INVALID_ARGUMENT (400) error is returned.
       
      optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.GlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getGlossaryConfigOrBuilder in interface AdaptiveMtTranslateRequestOrBuilder