Class DocumentTranslation.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<DocumentTranslation.Builder>
      • clear

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

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

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

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

        public DocumentTranslation.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<DocumentTranslation.Builder>
      • setField

        public DocumentTranslation.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                    Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<DocumentTranslation.Builder>
      • clearField

        public DocumentTranslation.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<DocumentTranslation.Builder>
      • clearOneof

        public DocumentTranslation.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<DocumentTranslation.Builder>
      • setRepeatedField

        public DocumentTranslation.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<DocumentTranslation.Builder>
      • addRepeatedField

        public DocumentTranslation.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                            Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<DocumentTranslation.Builder>
      • mergeFrom

        public DocumentTranslation.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<DocumentTranslation.Builder>
      • isInitialized

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

        public DocumentTranslation.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<DocumentTranslation.Builder>
        Throws:
        IOException
      • getByteStreamOutputsList

        public List<com.google.protobuf.ByteString> getByteStreamOutputsList()
         The array of translated documents. It is expected to be size 1 for now. We
         may produce multiple translated documents in the future for other type of
         file formats.
         
        repeated bytes byte_stream_outputs = 1;
        Specified by:
        getByteStreamOutputsList in interface DocumentTranslationOrBuilder
        Returns:
        A list containing the byteStreamOutputs.
      • getByteStreamOutputsCount

        public int getByteStreamOutputsCount()
         The array of translated documents. It is expected to be size 1 for now. We
         may produce multiple translated documents in the future for other type of
         file formats.
         
        repeated bytes byte_stream_outputs = 1;
        Specified by:
        getByteStreamOutputsCount in interface DocumentTranslationOrBuilder
        Returns:
        The count of byteStreamOutputs.
      • getByteStreamOutputs

        public com.google.protobuf.ByteString getByteStreamOutputs​(int index)
         The array of translated documents. It is expected to be size 1 for now. We
         may produce multiple translated documents in the future for other type of
         file formats.
         
        repeated bytes byte_stream_outputs = 1;
        Specified by:
        getByteStreamOutputs in interface DocumentTranslationOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The byteStreamOutputs at the given index.
      • setByteStreamOutputs

        public DocumentTranslation.Builder setByteStreamOutputs​(int index,
                                                                com.google.protobuf.ByteString value)
         The array of translated documents. It is expected to be size 1 for now. We
         may produce multiple translated documents in the future for other type of
         file formats.
         
        repeated bytes byte_stream_outputs = 1;
        Parameters:
        index - The index to set the value at.
        value - The byteStreamOutputs to set.
        Returns:
        This builder for chaining.
      • addByteStreamOutputs

        public DocumentTranslation.Builder addByteStreamOutputs​(com.google.protobuf.ByteString value)
         The array of translated documents. It is expected to be size 1 for now. We
         may produce multiple translated documents in the future for other type of
         file formats.
         
        repeated bytes byte_stream_outputs = 1;
        Parameters:
        value - The byteStreamOutputs to add.
        Returns:
        This builder for chaining.
      • addAllByteStreamOutputs

        public DocumentTranslation.Builder addAllByteStreamOutputs​(Iterable<? extends com.google.protobuf.ByteString> values)
         The array of translated documents. It is expected to be size 1 for now. We
         may produce multiple translated documents in the future for other type of
         file formats.
         
        repeated bytes byte_stream_outputs = 1;
        Parameters:
        values - The byteStreamOutputs to add.
        Returns:
        This builder for chaining.
      • clearByteStreamOutputs

        public DocumentTranslation.Builder clearByteStreamOutputs()
         The array of translated documents. It is expected to be size 1 for now. We
         may produce multiple translated documents in the future for other type of
         file formats.
         
        repeated bytes byte_stream_outputs = 1;
        Returns:
        This builder for chaining.
      • getMimeTypeBytes

        public com.google.protobuf.ByteString getMimeTypeBytes()
         The translated document's mime type.
         
        string mime_type = 2;
        Specified by:
        getMimeTypeBytes in interface DocumentTranslationOrBuilder
        Returns:
        The bytes for mimeType.
      • setMimeType

        public DocumentTranslation.Builder setMimeType​(String value)
         The translated document's mime type.
         
        string mime_type = 2;
        Parameters:
        value - The mimeType to set.
        Returns:
        This builder for chaining.
      • clearMimeType

        public DocumentTranslation.Builder clearMimeType()
         The translated document's mime type.
         
        string mime_type = 2;
        Returns:
        This builder for chaining.
      • setMimeTypeBytes

        public DocumentTranslation.Builder setMimeTypeBytes​(com.google.protobuf.ByteString value)
         The translated document's mime type.
         
        string mime_type = 2;
        Parameters:
        value - The bytes for mimeType to set.
        Returns:
        This builder for chaining.
      • getDetectedLanguageCode

        public String getDetectedLanguageCode()
         The detected language for the input document.
         If the user did not provide the source language for the input document,
         this field will have the language code automatically detected. If the
         source language was passed, auto-detection of the language does not occur
         and this field is empty.
         
        string detected_language_code = 3;
        Specified by:
        getDetectedLanguageCode in interface DocumentTranslationOrBuilder
        Returns:
        The detectedLanguageCode.
      • getDetectedLanguageCodeBytes

        public com.google.protobuf.ByteString getDetectedLanguageCodeBytes()
         The detected language for the input document.
         If the user did not provide the source language for the input document,
         this field will have the language code automatically detected. If the
         source language was passed, auto-detection of the language does not occur
         and this field is empty.
         
        string detected_language_code = 3;
        Specified by:
        getDetectedLanguageCodeBytes in interface DocumentTranslationOrBuilder
        Returns:
        The bytes for detectedLanguageCode.
      • setDetectedLanguageCode

        public DocumentTranslation.Builder setDetectedLanguageCode​(String value)
         The detected language for the input document.
         If the user did not provide the source language for the input document,
         this field will have the language code automatically detected. If the
         source language was passed, auto-detection of the language does not occur
         and this field is empty.
         
        string detected_language_code = 3;
        Parameters:
        value - The detectedLanguageCode to set.
        Returns:
        This builder for chaining.
      • clearDetectedLanguageCode

        public DocumentTranslation.Builder clearDetectedLanguageCode()
         The detected language for the input document.
         If the user did not provide the source language for the input document,
         this field will have the language code automatically detected. If the
         source language was passed, auto-detection of the language does not occur
         and this field is empty.
         
        string detected_language_code = 3;
        Returns:
        This builder for chaining.
      • setDetectedLanguageCodeBytes

        public DocumentTranslation.Builder setDetectedLanguageCodeBytes​(com.google.protobuf.ByteString value)
         The detected language for the input document.
         If the user did not provide the source language for the input document,
         this field will have the language code automatically detected. If the
         source language was passed, auto-detection of the language does not occur
         and this field is empty.
         
        string detected_language_code = 3;
        Parameters:
        value - The bytes for detectedLanguageCode to set.
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final DocumentTranslation.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<DocumentTranslation.Builder>
      • mergeUnknownFields

        public final DocumentTranslation.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<DocumentTranslation.Builder>