Class: Google::Apis::TranslateV3::RefineTextRequest
- Inherits:
-
Object
- Object
- Google::Apis::TranslateV3::RefineTextRequest
- 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
-
#refinement_entries ⇒ Array<Google::Apis::TranslateV3::RefinementEntry>
Required.
-
#source_language_code ⇒ String
Required.
-
#target_language_code ⇒ String
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ RefineTextRequest
constructor
A new instance of RefineTextRequest.
-
#update!(**args) ⇒ Object
Update properties of this object.
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_entries ⇒ Array<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_code ⇒ String
Required. The BCP-47 language code of the source text in the request, for
example, "en-US".
Corresponds to the JSON property sourceLanguageCode
1959 1960 1961 |
# File 'lib/google/apis/translate_v3/classes.rb', line 1959 def source_language_code @source_language_code end |
#target_language_code ⇒ String
Required. The BCP-47 language code for translation output, for example, "zh-CN"
.
Corresponds to the JSON property targetLanguageCode
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 |