Class: Google::Apis::TranslateV3::DocumentTranslation
- Inherits:
-
Object
- Object
- Google::Apis::TranslateV3::DocumentTranslation
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/translate_v3/classes.rb,
lib/google/apis/translate_v3/representations.rb,
lib/google/apis/translate_v3/representations.rb
Overview
A translated document message.
Instance Attribute Summary collapse
-
#byte_stream_outputs ⇒ Array<String>
The array of translated documents.
-
#detected_language_code ⇒ String
The detected language for the input document.
-
#mime_type ⇒ String
The translated document's mime type.
Instance Method Summary collapse
-
#initialize(**args) ⇒ DocumentTranslation
constructor
A new instance of DocumentTranslation.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ DocumentTranslation
Returns a new instance of DocumentTranslation.
781 782 783 |
# File 'lib/google/apis/translate_v3/classes.rb', line 781 def initialize(**args) update!(**args) end |
Instance Attribute Details
#byte_stream_outputs ⇒ Array<String>
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.
Corresponds to the JSON property byteStreamOutputs
766 767 768 |
# File 'lib/google/apis/translate_v3/classes.rb', line 766 def byte_stream_outputs @byte_stream_outputs end |
#detected_language_code ⇒ String
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.
Corresponds to the JSON property detectedLanguageCode
774 775 776 |
# File 'lib/google/apis/translate_v3/classes.rb', line 774 def detected_language_code @detected_language_code end |
#mime_type ⇒ String
The translated document's mime type.
Corresponds to the JSON property mimeType
779 780 781 |
# File 'lib/google/apis/translate_v3/classes.rb', line 779 def mime_type @mime_type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
786 787 788 789 790 |
# File 'lib/google/apis/translate_v3/classes.rb', line 786 def update!(**args) @byte_stream_outputs = args[:byte_stream_outputs] if args.key?(:byte_stream_outputs) @detected_language_code = args[:detected_language_code] if args.key?(:detected_language_code) @mime_type = args[:mime_type] if args.key?(:mime_type) end |