Class: Google::Apis::TranslateV3beta1::LanguageCodePair

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

Overview

Used with unidirectional glossaries.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ LanguageCodePair

Returns a new instance of LanguageCodePair.



378
379
380
# File 'generated/google/apis/translate_v3beta1/classes.rb', line 378

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

Instance Attribute Details

#source_language_codeString

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

Returns:

  • (String)


370
371
372
# File 'generated/google/apis/translate_v3beta1/classes.rb', line 370

def source_language_code
  @source_language_code
end

#target_language_codeString

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

Returns:

  • (String)


376
377
378
# File 'generated/google/apis/translate_v3beta1/classes.rb', line 376

def target_language_code
  @target_language_code
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



383
384
385
386
# File 'generated/google/apis/translate_v3beta1/classes.rb', line 383

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