Class TranslateTextRequest (2.0.4)

The request message for synchronous translation.

Optional. The format of the source text, for example, “text/html”, “text/plain”. If left blank, the MIME type defaults to “text/html”.

Required. The BCP-47 language code to use for translation of the input text, set to one of the language codes listed in Language Support.

Optional. The model type requested for this translation. The format depends on model type: - AutoML Translation models: projects/{project-number-or- id}/locations/{location-id}/models/{model-id} - General (built-in) models: projects/{project-number-or- id}/locations/{location-id}/models/general/nmt, projects/{project-number-or-id}/locations/{location- id}/models/general/base For global (non-regionalized) requests, use location-id global. For example, projects/{project-number-or- id}/locations/global/models/general/nmt. If missing, the system decides which google base model to use.

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/labels for more information.

Classes

LabelsEntry

API documentation for translate_v3.types.TranslateTextRequest.LabelsEntry class.