Class TranslateDocumentResponse.Builder

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

public static final class TranslateDocumentResponse.Builder extends com.google.protobuf.GeneratedMessage.Builder<TranslateDocumentResponse.Builder> implements TranslateDocumentResponseOrBuilder
 A translated document response message.
 
Protobuf type google.cloud.translation.v3.TranslateDocumentResponse
  • 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<TranslateDocumentResponse.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<TranslateDocumentResponse.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<TranslateDocumentResponse.Builder>
    • getDefaultInstanceForType

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

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

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

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

      public TranslateDocumentResponse.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<TranslateDocumentResponse.Builder>
      Throws:
      IOException
    • hasDocumentTranslation

      public boolean hasDocumentTranslation()
       Translated document.
       
      .google.cloud.translation.v3.DocumentTranslation document_translation = 1;
      Specified by:
      hasDocumentTranslation in interface TranslateDocumentResponseOrBuilder
      Returns:
      Whether the documentTranslation field is set.
    • getDocumentTranslation

      public DocumentTranslation getDocumentTranslation()
       Translated document.
       
      .google.cloud.translation.v3.DocumentTranslation document_translation = 1;
      Specified by:
      getDocumentTranslation in interface TranslateDocumentResponseOrBuilder
      Returns:
      The documentTranslation.
    • setDocumentTranslation

      public TranslateDocumentResponse.Builder setDocumentTranslation(DocumentTranslation value)
       Translated document.
       
      .google.cloud.translation.v3.DocumentTranslation document_translation = 1;
    • setDocumentTranslation

      public TranslateDocumentResponse.Builder setDocumentTranslation(DocumentTranslation.Builder builderForValue)
       Translated document.
       
      .google.cloud.translation.v3.DocumentTranslation document_translation = 1;
    • mergeDocumentTranslation

      public TranslateDocumentResponse.Builder mergeDocumentTranslation(DocumentTranslation value)
       Translated document.
       
      .google.cloud.translation.v3.DocumentTranslation document_translation = 1;
    • clearDocumentTranslation

      public TranslateDocumentResponse.Builder clearDocumentTranslation()
       Translated document.
       
      .google.cloud.translation.v3.DocumentTranslation document_translation = 1;
    • getDocumentTranslationBuilder

      public DocumentTranslation.Builder getDocumentTranslationBuilder()
       Translated document.
       
      .google.cloud.translation.v3.DocumentTranslation document_translation = 1;
    • getDocumentTranslationOrBuilder

      public DocumentTranslationOrBuilder getDocumentTranslationOrBuilder()
       Translated document.
       
      .google.cloud.translation.v3.DocumentTranslation document_translation = 1;
      Specified by:
      getDocumentTranslationOrBuilder in interface TranslateDocumentResponseOrBuilder
    • hasGlossaryDocumentTranslation

      public boolean hasGlossaryDocumentTranslation()
       The document's translation output if a glossary is provided in the request.
       This can be the same as [TranslateDocumentResponse.document_translation]
       if no glossary terms apply.
       
      .google.cloud.translation.v3.DocumentTranslation glossary_document_translation = 2;
      Specified by:
      hasGlossaryDocumentTranslation in interface TranslateDocumentResponseOrBuilder
      Returns:
      Whether the glossaryDocumentTranslation field is set.
    • getGlossaryDocumentTranslation

      public DocumentTranslation getGlossaryDocumentTranslation()
       The document's translation output if a glossary is provided in the request.
       This can be the same as [TranslateDocumentResponse.document_translation]
       if no glossary terms apply.
       
      .google.cloud.translation.v3.DocumentTranslation glossary_document_translation = 2;
      Specified by:
      getGlossaryDocumentTranslation in interface TranslateDocumentResponseOrBuilder
      Returns:
      The glossaryDocumentTranslation.
    • setGlossaryDocumentTranslation

      public TranslateDocumentResponse.Builder setGlossaryDocumentTranslation(DocumentTranslation value)
       The document's translation output if a glossary is provided in the request.
       This can be the same as [TranslateDocumentResponse.document_translation]
       if no glossary terms apply.
       
      .google.cloud.translation.v3.DocumentTranslation glossary_document_translation = 2;
    • setGlossaryDocumentTranslation

      public TranslateDocumentResponse.Builder setGlossaryDocumentTranslation(DocumentTranslation.Builder builderForValue)
       The document's translation output if a glossary is provided in the request.
       This can be the same as [TranslateDocumentResponse.document_translation]
       if no glossary terms apply.
       
      .google.cloud.translation.v3.DocumentTranslation glossary_document_translation = 2;
    • mergeGlossaryDocumentTranslation

      public TranslateDocumentResponse.Builder mergeGlossaryDocumentTranslation(DocumentTranslation value)
       The document's translation output if a glossary is provided in the request.
       This can be the same as [TranslateDocumentResponse.document_translation]
       if no glossary terms apply.
       
      .google.cloud.translation.v3.DocumentTranslation glossary_document_translation = 2;
    • clearGlossaryDocumentTranslation

      public TranslateDocumentResponse.Builder clearGlossaryDocumentTranslation()
       The document's translation output if a glossary is provided in the request.
       This can be the same as [TranslateDocumentResponse.document_translation]
       if no glossary terms apply.
       
      .google.cloud.translation.v3.DocumentTranslation glossary_document_translation = 2;
    • getGlossaryDocumentTranslationBuilder

      public DocumentTranslation.Builder getGlossaryDocumentTranslationBuilder()
       The document's translation output if a glossary is provided in the request.
       This can be the same as [TranslateDocumentResponse.document_translation]
       if no glossary terms apply.
       
      .google.cloud.translation.v3.DocumentTranslation glossary_document_translation = 2;
    • getGlossaryDocumentTranslationOrBuilder

      public DocumentTranslationOrBuilder getGlossaryDocumentTranslationOrBuilder()
       The document's translation output if a glossary is provided in the request.
       This can be the same as [TranslateDocumentResponse.document_translation]
       if no glossary terms apply.
       
      .google.cloud.translation.v3.DocumentTranslation glossary_document_translation = 2;
      Specified by:
      getGlossaryDocumentTranslationOrBuilder in interface TranslateDocumentResponseOrBuilder
    • getModel

      public String getModel()
       Only present when 'model' is present in the request.
       'model' is normalized to have a project number.
      
       For example:
       If the 'model' field in TranslateDocumentRequest is:
       `projects/{project-id}/locations/{location-id}/models/general/nmt` then
       `model` here would be normalized to
       `projects/{project-number}/locations/{location-id}/models/general/nmt`.
       
      string model = 3;
      Specified by:
      getModel in interface TranslateDocumentResponseOrBuilder
      Returns:
      The model.
    • getModelBytes

      public com.google.protobuf.ByteString getModelBytes()
       Only present when 'model' is present in the request.
       'model' is normalized to have a project number.
      
       For example:
       If the 'model' field in TranslateDocumentRequest is:
       `projects/{project-id}/locations/{location-id}/models/general/nmt` then
       `model` here would be normalized to
       `projects/{project-number}/locations/{location-id}/models/general/nmt`.
       
      string model = 3;
      Specified by:
      getModelBytes in interface TranslateDocumentResponseOrBuilder
      Returns:
      The bytes for model.
    • setModel

      public TranslateDocumentResponse.Builder setModel(String value)
       Only present when 'model' is present in the request.
       'model' is normalized to have a project number.
      
       For example:
       If the 'model' field in TranslateDocumentRequest is:
       `projects/{project-id}/locations/{location-id}/models/general/nmt` then
       `model` here would be normalized to
       `projects/{project-number}/locations/{location-id}/models/general/nmt`.
       
      string model = 3;
      Parameters:
      value - The model to set.
      Returns:
      This builder for chaining.
    • clearModel

      public TranslateDocumentResponse.Builder clearModel()
       Only present when 'model' is present in the request.
       'model' is normalized to have a project number.
      
       For example:
       If the 'model' field in TranslateDocumentRequest is:
       `projects/{project-id}/locations/{location-id}/models/general/nmt` then
       `model` here would be normalized to
       `projects/{project-number}/locations/{location-id}/models/general/nmt`.
       
      string model = 3;
      Returns:
      This builder for chaining.
    • setModelBytes

      public TranslateDocumentResponse.Builder setModelBytes(com.google.protobuf.ByteString value)
       Only present when 'model' is present in the request.
       'model' is normalized to have a project number.
      
       For example:
       If the 'model' field in TranslateDocumentRequest is:
       `projects/{project-id}/locations/{location-id}/models/general/nmt` then
       `model` here would be normalized to
       `projects/{project-number}/locations/{location-id}/models/general/nmt`.
       
      string model = 3;
      Parameters:
      value - The bytes for model to set.
      Returns:
      This builder for chaining.
    • hasGlossaryConfig

      public boolean hasGlossaryConfig()
       The `glossary_config` used for this translation.
       
      .google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 4;
      Specified by:
      hasGlossaryConfig in interface TranslateDocumentResponseOrBuilder
      Returns:
      Whether the glossaryConfig field is set.
    • getGlossaryConfig

      public TranslateTextGlossaryConfig getGlossaryConfig()
       The `glossary_config` used for this translation.
       
      .google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 4;
      Specified by:
      getGlossaryConfig in interface TranslateDocumentResponseOrBuilder
      Returns:
      The glossaryConfig.
    • setGlossaryConfig

       The `glossary_config` used for this translation.
       
      .google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 4;
    • setGlossaryConfig

      public TranslateDocumentResponse.Builder setGlossaryConfig(TranslateTextGlossaryConfig.Builder builderForValue)
       The `glossary_config` used for this translation.
       
      .google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 4;
    • mergeGlossaryConfig

       The `glossary_config` used for this translation.
       
      .google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 4;
    • clearGlossaryConfig

      public TranslateDocumentResponse.Builder clearGlossaryConfig()
       The `glossary_config` used for this translation.
       
      .google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 4;
    • getGlossaryConfigBuilder

      public TranslateTextGlossaryConfig.Builder getGlossaryConfigBuilder()
       The `glossary_config` used for this translation.
       
      .google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 4;
    • getGlossaryConfigOrBuilder

      public TranslateTextGlossaryConfigOrBuilder getGlossaryConfigOrBuilder()
       The `glossary_config` used for this translation.
       
      .google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 4;
      Specified by:
      getGlossaryConfigOrBuilder in interface TranslateDocumentResponseOrBuilder