Class: Google::Apis::TranslateV3::DetectLanguageRequest
- Inherits:
-
Object
- Object
- Google::Apis::TranslateV3::DetectLanguageRequest
- 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 message for language detection.
Instance Attribute Summary collapse
-
#content ⇒ String
The content of the input stored as a string.
-
#document_input_config ⇒ Google::Apis::TranslateV3::DocumentInputConfig
A document translation request input config.
-
#labels ⇒ Hash<String,String>
Optional.
-
#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.
Constructor Details
#initialize(**args) ⇒ DetectLanguageRequest
Returns a new instance of DetectLanguageRequest.
646 647 648 |
# File 'lib/google/apis/translate_v3/classes.rb', line 646 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
614 615 616 |
# File 'lib/google/apis/translate_v3/classes.rb', line 614 def content @content end |
#document_input_config ⇒ Google::Apis::TranslateV3::DocumentInputConfig
A document translation request input config.
Corresponds to the JSON property documentInputConfig
619 620 621 |
# File 'lib/google/apis/translate_v3/classes.rb', line 619 def document_input_config @document_input_config end |
#labels ⇒ Hash<String,String>
Optional. The labels with user-defined metadata for the request. Label keys
and values can be no longer than 63 characters (Unicode codepoints), can only
contain lowercase letters, numeric characters, underscores and dashes.
International characters are allowed. Label values are optional. Label keys
must start with a letter. See https://cloud.google.com/translate/docs/advanced/
labels for more information.
Corresponds to the JSON property labels
629 630 631 |
# File 'lib/google/apis/translate_v3/classes.rb', line 629 def labels @labels 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
635 636 637 |
# File 'lib/google/apis/translate_v3/classes.rb', line 635 def mime_type @mime_type end |
#model ⇒ String
Optional. The language detection model to be used. Format: projects/project-
number-or-id/locations/location-id/models/language-detection/model-id`
Only one language detection model is currently supported:projects/project-
number-or-id/locations/location-id/models/language-detection/default. If
not specified, the default model is used.
Corresponds to the JSON propertymodel`
644 645 646 |
# File 'lib/google/apis/translate_v3/classes.rb', line 644 def model @model end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
651 652 653 654 655 656 657 |
# File 'lib/google/apis/translate_v3/classes.rb', line 651 def update!(**args) @content = args[:content] if args.key?(:content) @document_input_config = args[:document_input_config] if args.key?(:document_input_config) @labels = args[:labels] if args.key?(:labels) @mime_type = args[:mime_type] if args.key?(:mime_type) @model = args[:model] if args.key?(:model) end |