Class: Google::Apis::TranslateV3::AdaptiveMtTranslateRequest

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 for sending an AdaptiveMt translation query.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AdaptiveMtTranslateRequest

Returns a new instance of AdaptiveMtTranslateRequest.



199
200
201
# File 'lib/google/apis/translate_v3/classes.rb', line 199

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

Instance Attribute Details

#contentArray<String>

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

Returns:

  • (Array<String>)


180
181
182
# File 'lib/google/apis/translate_v3/classes.rb', line 180

def content
  @content
end

#datasetString

Required. The resource name for the dataset to use for adaptive MT. projects/ project/locations/location-id/adaptiveMtDatasets/dataset` Corresponds to the JSON propertydataset`

Returns:

  • (String)


186
187
188
# File 'lib/google/apis/translate_v3/classes.rb', line 186

def dataset
  @dataset
end

#glossary_configGoogle::Apis::TranslateV3::TranslateTextGlossaryConfig

Configures which glossary is used for a specific target language and defines options for applying that glossary. Corresponds to the JSON property glossaryConfig



192
193
194
# File 'lib/google/apis/translate_v3/classes.rb', line 192

def glossary_config
  @glossary_config
end

#reference_sentence_configGoogle::Apis::TranslateV3::ReferenceSentenceConfig

Message of caller-provided reference configuration. Corresponds to the JSON property referenceSentenceConfig



197
198
199
# File 'lib/google/apis/translate_v3/classes.rb', line 197

def reference_sentence_config
  @reference_sentence_config
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



204
205
206
207
208
209
# File 'lib/google/apis/translate_v3/classes.rb', line 204

def update!(**args)
  @content = args[:content] if args.key?(:content)
  @dataset = args[:dataset] if args.key?(:dataset)
  @glossary_config = args[:glossary_config] if args.key?(:glossary_config)
  @reference_sentence_config = args[:reference_sentence_config] if args.key?(:reference_sentence_config)
end