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.



189
190
191
# File 'lib/google/apis/translate_v3/classes.rb', line 189

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

Instance Attribute Details

#contentArray<String>

Required. The content of the input in string format. For now only one sentence per request is supported. Corresponds to the JSON property content

Returns:

  • (Array<String>)


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

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)


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

def dataset
  @dataset
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



194
195
196
197
# File 'lib/google/apis/translate_v3/classes.rb', line 194

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