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

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ LanguagesResource

Returns a new instance of LanguagesResource



41
42
43
# File 'generated/google/apis/translate_v2/classes.rb', line 41

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)


34
35
36
# File 'generated/google/apis/translate_v2/classes.rb', line 34

def language
  @language
end

#nameString

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

Returns:

  • (String)


39
40
41
# File 'generated/google/apis/translate_v2/classes.rb', line 39

def name
  @name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



46
47
48
49
# File 'generated/google/apis/translate_v2/classes.rb', line 46

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