Class TranslateDocumentResponse.Builder

    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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
      • setRepeatedField

        public TranslateDocumentResponse.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                                  int index,
                                                                  Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<TranslateDocumentResponse.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.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.
      • 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;
      • 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;
      • 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.
      • 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;
      • setUnknownFields

        public final TranslateDocumentResponse.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<TranslateDocumentResponse.Builder>
      • mergeUnknownFields

        public final TranslateDocumentResponse.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<TranslateDocumentResponse.Builder>