Class: Google::Apis::TranslateV3::ReferenceSentenceConfig

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

Overview

Message of caller-provided reference configuration.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ReferenceSentenceConfig

Returns a new instance of ReferenceSentenceConfig.



1855
1856
1857
# File 'lib/google/apis/translate_v3/classes.rb', line 1855

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

Instance Attribute Details

#reference_sentence_pair_listsArray<Google::Apis::TranslateV3::ReferenceSentencePairList>

Reference sentences pair lists. Each list will be used as the references to translate the sentence under "content" field at the corresponding index. Length of the list is required to be equal to the length of "content" field. Corresponds to the JSON property referenceSentencePairLists



1843
1844
1845
# File 'lib/google/apis/translate_v3/classes.rb', line 1843

def reference_sentence_pair_lists
  @reference_sentence_pair_lists
end

#source_language_codeString

Source language code. Corresponds to the JSON property sourceLanguageCode

Returns:

  • (String)


1848
1849
1850
# File 'lib/google/apis/translate_v3/classes.rb', line 1848

def source_language_code
  @source_language_code
end

#target_language_codeString

Target language code. Corresponds to the JSON property targetLanguageCode

Returns:

  • (String)


1853
1854
1855
# File 'lib/google/apis/translate_v3/classes.rb', line 1853

def target_language_code
  @target_language_code
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1860
1861
1862
1863
1864
# File 'lib/google/apis/translate_v3/classes.rb', line 1860

def update!(**args)
  @reference_sentence_pair_lists = args[:reference_sentence_pair_lists] if args.key?(:reference_sentence_pair_lists)
  @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