Class: Google::Apis::TranslateV3beta1::BatchTranslateTextRequest
- Inherits:
-
Object
- Object
- Google::Apis::TranslateV3beta1::BatchTranslateTextRequest
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/translate_v3beta1/classes.rb,
generated/google/apis/translate_v3beta1/representations.rb,
generated/google/apis/translate_v3beta1/representations.rb
Overview
The batch translation request.
Instance Attribute Summary collapse
-
#glossaries ⇒ Hash<String,Google::Apis::TranslateV3beta1::TranslateTextGlossaryConfig>
Optional.
-
#input_configs ⇒ Array<Google::Apis::TranslateV3beta1::InputConfig>
Required.
-
#models ⇒ Hash<String,String>
Optional.
-
#output_config ⇒ Google::Apis::TranslateV3beta1::OutputConfig
Output configuration for BatchTranslateText request.
-
#source_language_code ⇒ String
Required.
-
#target_language_codes ⇒ Array<String>
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ BatchTranslateTextRequest
constructor
A new instance of BatchTranslateTextRequest.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ BatchTranslateTextRequest
Returns a new instance of BatchTranslateTextRequest
73 74 75 |
# File 'generated/google/apis/translate_v3beta1/classes.rb', line 73 def initialize(**args) update!(**args) end |
Instance Attribute Details
#glossaries ⇒ Hash<String,Google::Apis::TranslateV3beta1::TranslateTextGlossaryConfig>
Optional. Glossaries to be applied for translation.
It's keyed by target language code.
Corresponds to the JSON property glossaries
33 34 35 |
# File 'generated/google/apis/translate_v3beta1/classes.rb', line 33 def glossaries @glossaries end |
#input_configs ⇒ Array<Google::Apis::TranslateV3beta1::InputConfig>
Required. Input configurations.
The total number of files matched should be <= 1000.
The total content size should be <= 100M Unicode codepoints.
The files must use UTF-8 encoding.
Corresponds to the JSON property inputConfigs
41 42 43 |
# File 'generated/google/apis/translate_v3beta1/classes.rb', line 41 def input_configs @input_configs end |
#models ⇒ Hash<String,String>
Optional. The models to use for translation. Map's key is target language code. Map's value is model name. Value can be a built-in general model, or an AutoML Translation model. The value format depends on model type:
- AutoML Translation models:
projects/
project-id/locations/
location-id/models/
model-id`` - General (built-in) models:
projects/
project-id/locations/
location-id/models/general/nmt
,projects/
project-id/locations/
location-id/models/general/base
If the map is empty or a specific model is not requested for a language pair, then default google model (nmt) is used. Corresponds to the JSON propertymodels
56 57 58 |
# File 'generated/google/apis/translate_v3beta1/classes.rb', line 56 def models @models end |
#output_config ⇒ Google::Apis::TranslateV3beta1::OutputConfig
Output configuration for BatchTranslateText request.
Corresponds to the JSON property outputConfig
61 62 63 |
# File 'generated/google/apis/translate_v3beta1/classes.rb', line 61 def output_config @output_config end |
#source_language_code ⇒ String
Required. Source language code.
Corresponds to the JSON property sourceLanguageCode
66 67 68 |
# File 'generated/google/apis/translate_v3beta1/classes.rb', line 66 def source_language_code @source_language_code end |
#target_language_codes ⇒ Array<String>
Required. Specify up to 10 language codes here.
Corresponds to the JSON property targetLanguageCodes
71 72 73 |
# File 'generated/google/apis/translate_v3beta1/classes.rb', line 71 def target_language_codes @target_language_codes end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
78 79 80 81 82 83 84 85 |
# File 'generated/google/apis/translate_v3beta1/classes.rb', line 78 def update!(**args) @glossaries = args[:glossaries] if args.key?(:glossaries) @input_configs = args[:input_configs] if args.key?(:input_configs) @models = args[:models] if args.key?(:models) @output_config = args[:output_config] if args.key?(:output_config) @source_language_code = args[:source_language_code] if args.key?(:source_language_code) @target_language_codes = args[:target_language_codes] if args.key?(:target_language_codes) end |