Cloud Translation V3 API - Class Google::Cloud::Translate::V3::DetectLanguageRequest (v0.12.0)

Reference documentation and code samples for the Cloud Translation V3 API class Google::Cloud::Translate::V3::DetectLanguageRequest.

The request message for language detection.

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#content

def content() -> ::String
Returns
  • (::String) — The content of the input stored as a string.

#content=

def content=(value) -> ::String
Parameter
  • value (::String) — The content of the input stored as a string.
Returns
  • (::String) — The content of the input stored as a string.

#labels

def labels() -> ::Google::Protobuf::Map{::String => ::String}
Returns
  • (::Google::Protobuf::Map{::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.

#labels=

def labels=(value) -> ::Google::Protobuf::Map{::String => ::String}
Parameter
  • value (::Google::Protobuf::Map{::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.

Returns
  • (::Google::Protobuf::Map{::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.

#mime_type

def mime_type() -> ::String
Returns
  • (::String) — Optional. The format of the source text, for example, "text/html", "text/plain". If left blank, the MIME type defaults to "text/html".

#mime_type=

def mime_type=(value) -> ::String
Parameter
  • value (::String) — Optional. The format of the source text, for example, "text/html", "text/plain". If left blank, the MIME type defaults to "text/html".
Returns
  • (::String) — Optional. The format of the source text, for example, "text/html", "text/plain". If left blank, the MIME type defaults to "text/html".

#model

def model() -> ::String
Returns
  • (::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.

#model=

def model=(value) -> ::String
Parameter
  • value (::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.

Returns
  • (::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.

#parent

def parent() -> ::String
Returns
  • (::String) — Required. Project or location to make a call. Must refer to a caller's project.

    Format: projects/{project-number-or-id}/locations/{location-id} or projects/{project-number-or-id}.

    For global calls, use projects/{project-number-or-id}/locations/global or projects/{project-number-or-id}.

    Only models within the same region (has same location-id) can be used. Otherwise an INVALID_ARGUMENT (400) error is returned.

#parent=

def parent=(value) -> ::String
Parameter
  • value (::String) — Required. Project or location to make a call. Must refer to a caller's project.

    Format: projects/{project-number-or-id}/locations/{location-id} or projects/{project-number-or-id}.

    For global calls, use projects/{project-number-or-id}/locations/global or projects/{project-number-or-id}.

    Only models within the same region (has same location-id) can be used. Otherwise an INVALID_ARGUMENT (400) error is returned.

Returns
  • (::String) — Required. Project or location to make a call. Must refer to a caller's project.

    Format: projects/{project-number-or-id}/locations/{location-id} or projects/{project-number-or-id}.

    For global calls, use projects/{project-number-or-id}/locations/global or projects/{project-number-or-id}.

    Only models within the same region (has same location-id) can be used. Otherwise an INVALID_ARGUMENT (400) error is returned.