Class: Google::Apis::TranslateV3beta1::SupportedLanguage
- Inherits:
-
Object
- Object
- Google::Apis::TranslateV3beta1::SupportedLanguage
- 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
Overview
A single supported language response corresponds to information related to one supported language.
Instance Attribute Summary collapse
-
#display_name ⇒ String
Human readable name of the language localized in the display language specified in the request.
-
#language_code ⇒ String
Supported language code, generally consisting of its ISO 639-1 identifier, for example, 'en', 'ja'.
-
#support_source ⇒ Boolean
(also: #support_source?)
Can be used as source language.
-
#support_target ⇒ Boolean
(also: #support_target?)
Can be used as target language.
Instance Method Summary collapse
-
#initialize(**args) ⇒ SupportedLanguage
constructor
A new instance of SupportedLanguage.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ SupportedLanguage
Returns a new instance of SupportedLanguage.
684 685 686 |
# File 'generated/google/apis/translate_v3beta1/classes.rb', line 684 def initialize(**args) update!(**args) end |
Instance Attribute Details
#display_name ⇒ String
Human readable name of the language localized in the display language
specified in the request.
Corresponds to the JSON property displayName
663 664 665 |
# File 'generated/google/apis/translate_v3beta1/classes.rb', line 663 def display_name @display_name end |
#language_code ⇒ String
Supported language code, generally consisting of its ISO 639-1 identifier, for
example, 'en', 'ja'. In certain cases, BCP-47 codes including language and
region identifiers are returned (for example, 'zh-TW' and 'zh-CN')
Corresponds to the JSON property languageCode
670 671 672 |
# File 'generated/google/apis/translate_v3beta1/classes.rb', line 670 def language_code @language_code end |
#support_source ⇒ Boolean Also known as: support_source?
Can be used as source language.
Corresponds to the JSON property supportSource
675 676 677 |
# File 'generated/google/apis/translate_v3beta1/classes.rb', line 675 def support_source @support_source end |
#support_target ⇒ Boolean Also known as: support_target?
Can be used as target language.
Corresponds to the JSON property supportTarget
681 682 683 |
# File 'generated/google/apis/translate_v3beta1/classes.rb', line 681 def support_target @support_target end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
689 690 691 692 693 694 |
# File 'generated/google/apis/translate_v3beta1/classes.rb', line 689 def update!(**args) @display_name = args[:display_name] if args.key?(:display_name) @language_code = args[:language_code] if args.key?(:language_code) @support_source = args[:support_source] if args.key?(:support_source) @support_target = args[:support_target] if args.key?(:support_target) end |