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.



1825
1826
1827
# File 'lib/google/apis/translate_v3/classes.rb', line 1825

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



1813
1814
1815
# File 'lib/google/apis/translate_v3/classes.rb', line 1813

def reference_sentence_pair_lists
  @reference_sentence_pair_lists
end

#source_language_codeString

Source language code. Corresponds to the JSON property sourceLanguageCode

Returns:

  • (String)


1818
1819
1820
# File 'lib/google/apis/translate_v3/classes.rb', line 1818

def source_language_code
  @source_language_code
end

#target_language_codeString

Target language code. Corresponds to the JSON property targetLanguageCode

Returns:

  • (String)


1823
1824
1825
# File 'lib/google/apis/translate_v3/classes.rb', line 1823

def target_language_code
  @target_language_code
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1830
1831
1832
1833
1834
# File 'lib/google/apis/translate_v3/classes.rb', line 1830

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