Class: Google::Apis::TranslateV3::RomanizeTextRequest
- Inherits:
-
Object
- Object
- Google::Apis::TranslateV3::RomanizeTextRequest
- 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
The request message for synchronous romanization.
Instance Attribute Summary collapse
-
#contents ⇒ Array<String>
Required.
-
#source_language_code ⇒ String
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ RomanizeTextRequest
constructor
A new instance of RomanizeTextRequest.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ RomanizeTextRequest
Returns a new instance of RomanizeTextRequest.
1927 1928 1929 |
# File 'lib/google/apis/translate_v3/classes.rb', line 1927 def initialize(**args) update!(**args) end |
Instance Attribute Details
#contents ⇒ Array<String>
Required. The content of the input in string format.
Corresponds to the JSON property contents
1917 1918 1919 |
# File 'lib/google/apis/translate_v3/classes.rb', line 1917 def contents @contents end |
#source_language_code ⇒ String
Optional. The ISO-639 language code of the input text if known, for example, "
hi" or "zh". If the source language isn't specified, the API attempts to
identify the source language automatically and returns the source language for
each content in the response.
Corresponds to the JSON property sourceLanguageCode
1925 1926 1927 |
# File 'lib/google/apis/translate_v3/classes.rb', line 1925 def source_language_code @source_language_code end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1932 1933 1934 1935 |
# File 'lib/google/apis/translate_v3/classes.rb', line 1932 def update!(**args) @contents = args[:contents] if args.key?(:contents) @source_language_code = args[:source_language_code] if args.key?(:source_language_code) end |