Class: Google::Apis::TranslateV3beta1::DetectLanguageRequest
- Inherits:
-
Object
- Object
- Google::Apis::TranslateV3beta1::DetectLanguageRequest
- 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 request message for language detection.
Instance Attribute Summary collapse
-
#content ⇒ String
The content of the input stored as a string.
-
#mime_type ⇒ String
Optional.
-
#model ⇒ String
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ DetectLanguageRequest
constructor
A new instance of DetectLanguageRequest.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ DetectLanguageRequest
Returns a new instance of DetectLanguageRequest
128 129 130 |
# File 'generated/google/apis/translate_v3beta1/classes.rb', line 128 def initialize(**args) update!(**args) end |
Instance Attribute Details
#content ⇒ String
The content of the input stored as a string.
Corresponds to the JSON property content
108 109 110 |
# File 'generated/google/apis/translate_v3beta1/classes.rb', line 108 def content @content end |
#mime_type ⇒ String
Optional. The format of the source text, for example, "text/html",
"text/plain". If left blank, the MIME type defaults to "text/html".
Corresponds to the JSON property mimeType
114 115 116 |
# File 'generated/google/apis/translate_v3beta1/classes.rb', line 114 def mime_type @mime_type end |
#model ⇒ String
Optional. The language detection model to be used.
Format:
projects/
project-id/locations/
location-id/models/language-detection/
model-id`
Only one language detection model is currently supported:
projects/project-id
/locations/location-id
/models/language-detection/
default.
If not specified, the default model is used.
Corresponds to the JSON property
model`
126 127 128 |
# File 'generated/google/apis/translate_v3beta1/classes.rb', line 126 def model @model end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
133 134 135 136 137 |
# File 'generated/google/apis/translate_v3beta1/classes.rb', line 133 def update!(**args) @content = args[:content] if args.key?(:content) @mime_type = args[:mime_type] if args.key?(:mime_type) @model = args[:model] if args.key?(:model) end |