Class: Google::Apis::TranslateV3beta1::DocumentTranslation

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/translate_v3beta1/classes.rb,
lib/google/apis/translate_v3beta1/representations.rb,
lib/google/apis/translate_v3beta1/representations.rb

Overview

A translated document message.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ DocumentTranslation

Returns a new instance of DocumentTranslation.



417
418
419
# File 'lib/google/apis/translate_v3beta1/classes.rb', line 417

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#byte_stream_outputsArray<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

Returns:

  • (Array<String>)


402
403
404
# File 'lib/google/apis/translate_v3beta1/classes.rb', line 402

def byte_stream_outputs
  @byte_stream_outputs
end

#detected_language_codeString

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

Returns:

  • (String)


410
411
412
# File 'lib/google/apis/translate_v3beta1/classes.rb', line 410

def detected_language_code
  @detected_language_code
end

#mime_typeString

The translated document's mime type. Corresponds to the JSON property mimeType

Returns:

  • (String)


415
416
417
# File 'lib/google/apis/translate_v3beta1/classes.rb', line 415

def mime_type
  @mime_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



422
423
424
425
426
# File 'lib/google/apis/translate_v3beta1/classes.rb', line 422

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