Class: Google::Apis::TranslateV3beta1::LanguageCodePair
- Inherits:
-
Object
- Object
- Google::Apis::TranslateV3beta1::LanguageCodePair
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/translate_v3beta1/classes.rb,
lib/google/apis/translate_v3beta1/representations.rb,
lib/google/apis/translate_v3beta1/representations.rb more...
Overview
Used with unidirectional glossaries.
Instance Attribute Summary collapse
-
#source_language_code ⇒ String
Required.
-
#target_language_code ⇒ String
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ LanguageCodePair
constructor
A new instance of LanguageCodePair.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ LanguageCodePair
Returns a new instance of LanguageCodePair.
616 617 618 |
# File 'lib/google/apis/translate_v3beta1/classes.rb', line 616 def initialize(**args) update!(**args) end |
Instance Attribute Details
#source_language_code ⇒ String
Required. The BCP-47 language code of the input text, for example, "en-US".
Expected to be an exact match for GlossaryTerm.language_code.
Corresponds to the JSON property sourceLanguageCode
608 609 610 |
# File 'lib/google/apis/translate_v3beta1/classes.rb', line 608 def source_language_code @source_language_code end |
#target_language_code ⇒ String
Required. The BCP-47 language code for translation output, for example, "zh-CN"
. Expected to be an exact match for GlossaryTerm.language_code.
Corresponds to the JSON property targetLanguageCode
614 615 616 |
# File 'lib/google/apis/translate_v3beta1/classes.rb', line 614 def target_language_code @target_language_code end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
621 622 623 624 |
# File 'lib/google/apis/translate_v3beta1/classes.rb', line 621 def update!(**args) @source_language_code = args[:source_language_code] if args.key?(:source_language_code) @target_language_code = args[:target_language_code] if args.key?(:target_language_code) end |