Class: Google::Apis::TranslateV3::TranslateTextResponse

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ TranslateTextResponse

Returns a new instance of TranslateTextResponse.



1162
1163
1164
# File 'lib/google/apis/translate_v3/classes.rb', line 1162

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

Instance Attribute Details

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

Text translation responses if a glossary is provided in the request. This can be the same as translations if no terms apply. This field has the same length as contents. Corresponds to the JSON property glossaryTranslations



1154
1155
1156
# File 'lib/google/apis/translate_v3/classes.rb', line 1154

def glossary_translations
  @glossary_translations
end

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

Text translation responses with no glossary applied. This field has the same length as contents. Corresponds to the JSON property translations



1160
1161
1162
# File 'lib/google/apis/translate_v3/classes.rb', line 1160

def translations
  @translations
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1167
1168
1169
1170
# File 'lib/google/apis/translate_v3/classes.rb', line 1167

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