Reference documentation and code samples for the Cloud Translation V3 Client class DetectLanguageRequest.
The request message for language detection.
Generated from protobuf message google.cloud.translation.v3.DetectLanguageRequest
Namespace
Google \ Cloud \ Translate \ V3Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ parent
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.
↳ 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.
↳ content
string
The content of the input stored as a string.
↳ 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".
↳ labels
array| Google\Protobuf\Internal\MapField
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.
getParent
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.
string
setParent
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.
var
string
$this
getModel
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.
string
setModel
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.
var
string
$this
getContent
The content of the input stored as a string.
string
hasContent
setContent
The content of the input stored as a string.
var
string
$this
getMimeType
Optional. The format of the source text, for example, "text/html", "text/plain". If left blank, the MIME type defaults to "text/html".
string
setMimeType
Optional. The format of the source text, for example, "text/html", "text/plain". If left blank, the MIME type defaults to "text/html".
var
string
$this
getLabels
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.
setLabels
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.
$this
getSource
string
static::build
parent
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. Please see Google\Cloud\Translate\V3\TranslationServiceClient::locationName() for help formatting this field.
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.
mimeType
string
Optional. The format of the source text, for example, "text/html", "text/plain". If left blank, the MIME type defaults to "text/html".
content
string
The content of the input stored as a string.