Class: Google::Apis::TranslateV3::BatchTranslateDocumentRequest
- Inherits:
-
Object
- Object
- Google::Apis::TranslateV3::BatchTranslateDocumentRequest
- 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 BatchTranslateDocument request.
Instance Attribute Summary collapse
-
#format_conversions ⇒ Hash<String,String>
Optional.
-
#glossaries ⇒ Hash<String,Google::Apis::TranslateV3::TranslateTextGlossaryConfig>
Optional.
-
#input_configs ⇒ Array<Google::Apis::TranslateV3::BatchDocumentInputConfig>
Required.
-
#models ⇒ Hash<String,String>
Optional.
-
#output_config ⇒ Google::Apis::TranslateV3::BatchDocumentOutputConfig
Output configuration for BatchTranslateDocument request.
-
#source_language_code ⇒ String
Required.
-
#target_language_codes ⇒ Array<String>
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ BatchTranslateDocumentRequest
constructor
A new instance of BatchTranslateDocumentRequest.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ BatchTranslateDocumentRequest
Returns a new instance of BatchTranslateDocumentRequest.
114 115 116 |
# File 'lib/google/apis/translate_v3/classes.rb', line 114 def initialize(**args) update!(**args) end |
Instance Attribute Details
#format_conversions ⇒ Hash<String,String>
Optional.
Corresponds to the JSON property formatConversions
70 71 72 |
# File 'lib/google/apis/translate_v3/classes.rb', line 70 def format_conversions @format_conversions end |
#glossaries ⇒ Hash<String,Google::Apis::TranslateV3::TranslateTextGlossaryConfig>
Optional. Glossaries to be applied. It's keyed by target language code.
Corresponds to the JSON property glossaries
75 76 77 |
# File 'lib/google/apis/translate_v3/classes.rb', line 75 def glossaries @glossaries end |
#input_configs ⇒ Array<Google::Apis::TranslateV3::BatchDocumentInputConfig>
Required. Input configurations. The total number of files matched should be <=
- The total content size to translate should be <= 100M Unicode codepoints.
The files must use UTF-8 encoding.
Corresponds to the JSON property
inputConfigs
82 83 84 |
# File 'lib/google/apis/translate_v3/classes.rb', line 82 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 the 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-number-or-id/locations/
location-id/
models/
model-id`- General (built-in) models:
projects/project-number-or-
id
/locations/location-id
/models/general/nmt, 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 property
models`
94 95 96 |
# File 'lib/google/apis/translate_v3/classes.rb', line 94 def models @models end |
#output_config ⇒ Google::Apis::TranslateV3::BatchDocumentOutputConfig
Output configuration for BatchTranslateDocument request.
Corresponds to the JSON property outputConfig
99 100 101 |
# File 'lib/google/apis/translate_v3/classes.rb', line 99 def output_config @output_config end |
#source_language_code ⇒ String
Required. The BCP-47 language code of the input document if known, for example,
"en-US" or "sr-Latn". Supported language codes are listed in Language
Support.
Corresponds to the JSON property sourceLanguageCode
106 107 108 |
# File 'lib/google/apis/translate_v3/classes.rb', line 106 def source_language_code @source_language_code end |
#target_language_codes ⇒ Array<String>
Required. The BCP-47 language code to use for translation of the input
document. Specify up to 10 language codes here.
Corresponds to the JSON property targetLanguageCodes
112 113 114 |
# File 'lib/google/apis/translate_v3/classes.rb', line 112 def target_language_codes @target_language_codes end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
119 120 121 122 123 124 125 126 127 |
# File 'lib/google/apis/translate_v3/classes.rb', line 119 def update!(**args) @format_conversions = args[:format_conversions] if args.key?(:format_conversions) @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 |