Class: Google::Apis::TranslateV3::RefineTextRequest

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

Request message for RefineText.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ RefineTextRequest

Returns a new instance of RefineTextRequest.



1973
1974
1975
# File 'lib/google/apis/translate_v3/classes.rb', line 1973

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

Instance Attribute Details

#refinement_entriesArray<Google::Apis::TranslateV3::RefinementEntry>

Required. The source texts and original translations in the source and target languages. Corresponds to the JSON property refinementEntries



1959
1960
1961
# File 'lib/google/apis/translate_v3/classes.rb', line 1959

def refinement_entries
  @refinement_entries
end

#source_language_codeString

Required. The BCP-47 language code of the source text in the request, for example, "en-US". Corresponds to the JSON property sourceLanguageCode

Returns:

  • (String)


1965
1966
1967
# File 'lib/google/apis/translate_v3/classes.rb', line 1965

def source_language_code
  @source_language_code
end

#target_language_codeString

Required. The BCP-47 language code for translation output, for example, "zh-CN" . Corresponds to the JSON property targetLanguageCode

Returns:

  • (String)


1971
1972
1973
# File 'lib/google/apis/translate_v3/classes.rb', line 1971

def target_language_code
  @target_language_code
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1978
1979
1980
1981
1982
# File 'lib/google/apis/translate_v3/classes.rb', line 1978

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