class Google::Apis::TranslateV3beta1::DetectLanguageRequest

The request message for language detection.

Attributes

content[RW]

The content of the input stored as a string. Corresponds to the JSON property `content` @return [String]

labels[RW]

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 cloud.google.com/translate/docs/labels for more information. Corresponds to the JSON property `labels` @return [Hash<String,String>]

mime_type[RW]

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` @return [String]

model[RW]

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 property `model` @return [String]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/translate_v3beta1/classes.rb, line 241
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/translate_v3beta1/classes.rb, line 246
def update!(**args)
  @content = args[:content] if args.key?(:content)
  @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