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.



1967
1968
1969
# File 'lib/google/apis/translate_v3/classes.rb', line 1967

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



1953
1954
1955
# File 'lib/google/apis/translate_v3/classes.rb', line 1953

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)


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

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)


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

def target_language_code
  @target_language_code
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



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

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