Class: Google::Apis::TranslateV2::LanguagesResource

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ LanguagesResource

Returns a new instance of LanguagesResource.



154
155
156
# File 'generated/google/apis/translate_v2/classes.rb', line 154

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

Instance Attribute Details

#languageString

Supported language code, generally consisting of its ISO 639-1 identifier. (E.g. 'en', 'ja'). In certain cases, BCP-47 codes including language + region identifiers are returned (e.g. 'zh-TW' and 'zh-CH') Corresponds to the JSON property language

Returns:

  • (String)


147
148
149
# File 'generated/google/apis/translate_v2/classes.rb', line 147

def language
  @language
end

#nameString

Human readable name of the language localized to the target language. Corresponds to the JSON property name

Returns:

  • (String)


152
153
154
# File 'generated/google/apis/translate_v2/classes.rb', line 152

def name
  @name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



159
160
161
162
# File 'generated/google/apis/translate_v2/classes.rb', line 159

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