Class: Google::Apis::TranslateV3::RomanizeTextRequest

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

The request message for synchronous romanization.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ RomanizeTextRequest

Returns a new instance of RomanizeTextRequest.



2070
2071
2072
# File 'lib/google/apis/translate_v3/classes.rb', line 2070

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

Instance Attribute Details

#contentsArray<String>

Required. The content of the input in string format. Corresponds to the JSON property contents

Returns:

  • (Array<String>)


2059
2060
2061
# File 'lib/google/apis/translate_v3/classes.rb', line 2059

def contents
  @contents
end

#source_language_codeString

Optional. The ISO-639 language code of the input text if known, for example, " hi" or "zh". Supported language codes are listed in Language Support. 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

Returns:

  • (String)


2068
2069
2070
# File 'lib/google/apis/translate_v3/classes.rb', line 2068

def source_language_code
  @source_language_code
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2075
2076
2077
2078
# File 'lib/google/apis/translate_v3/classes.rb', line 2075

def update!(**args)
  @contents = args[:contents] if args.key?(:contents)
  @source_language_code = args[:source_language_code] if args.key?(:source_language_code)
end