Class: Google::Apis::TranslateV3::AdaptiveMtTranslateResponse

Inherits:
Object
  • Object
show all
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

An AdaptiveMtTranslate response.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AdaptiveMtTranslateResponse

Returns a new instance of AdaptiveMtTranslateResponse.



238
239
240
# File 'lib/google/apis/translate_v3/classes.rb', line 238

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

Instance Attribute Details

#glossary_translationsArray<Google::Apis::TranslateV3::AdaptiveMtTranslation>

Text translation response if a glossary is provided in the request. This could be the same as 'translation' above if no terms apply. Corresponds to the JSON property glossaryTranslations



226
227
228
# File 'lib/google/apis/translate_v3/classes.rb', line 226

def glossary_translations
  @glossary_translations
end

#language_codeString

Output only. The translation's language code. Corresponds to the JSON property languageCode

Returns:

  • (String)


231
232
233
# File 'lib/google/apis/translate_v3/classes.rb', line 231

def language_code
  @language_code
end

#translationsArray<Google::Apis::TranslateV3::AdaptiveMtTranslation>

Output only. The translation. Corresponds to the JSON property translations



236
237
238
# File 'lib/google/apis/translate_v3/classes.rb', line 236

def translations
  @translations
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



243
244
245
246
247
# File 'lib/google/apis/translate_v3/classes.rb', line 243

def update!(**args)
  @glossary_translations = args[:glossary_translations] if args.key?(:glossary_translations)
  @language_code = args[:language_code] if args.key?(:language_code)
  @translations = args[:translations] if args.key?(:translations)
end