Class: Google::Apis::TranslateV3beta1::TranslateTextResponse

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ TranslateTextResponse

Returns a new instance of TranslateTextResponse



823
824
825
# File 'generated/google/apis/translate_v3beta1/classes.rb', line 823

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

Instance Attribute Details

#glossary_translationsArray<Google::Apis::TranslateV3beta1::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



814
815
816
# File 'generated/google/apis/translate_v3beta1/classes.rb', line 814

def glossary_translations
  @glossary_translations
end

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

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



821
822
823
# File 'generated/google/apis/translate_v3beta1/classes.rb', line 821

def translations
  @translations
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



828
829
830
831
# File 'generated/google/apis/translate_v3beta1/classes.rb', line 828

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