diff --git a/docs/dyn/translate_v3.projects.html b/docs/dyn/translate_v3.projects.html index deb22898a97..c906ab1745e 100644 --- a/docs/dyn/translate_v3.projects.html +++ b/docs/dyn/translate_v3.projects.html @@ -88,6 +88,9 @@

Instance Methods

getSupportedLanguages(parent, displayLanguageCode=None, model=None, x__xgafv=None)

Returns a list of supported languages for translation.

+

+ romanizeText(parent, body=None, x__xgafv=None)

+

Romanize input text written in non-Latin scripts to Latin text.

translateText(parent, body=None, x__xgafv=None)

Translates input text and returns translated text.

@@ -161,6 +164,40 @@

Method Details

} +
+ romanizeText(parent, body=None, x__xgafv=None) +
Romanize input text written in non-Latin scripts to Latin text.
+
+Args:
+  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}`. (required)
+  body: object, The request body.
+    The object takes the form of:
+
+{ # The request message for synchronous romanization.
+  "contents": [ # Required. The content of the input in string format.
+    "A String",
+  ],
+  "sourceLanguageCode": "A String", # Optional. The ISO-639 language code of the input text if known, for example, "hi" or "zh". If the source language isn't specified, the API attempts to identify the source language automatically and returns the source language for each content in the response.
+}
+
+  x__xgafv: string, V1 error format.
+    Allowed values
+      1 - v1 error format
+      2 - v2 error format
+
+Returns:
+  An object of the form:
+
+    { # The response message for synchronous romanization.
+  "romanizations": [ # Text romanization responses. This field has the same length as `contents`.
+    { # A single romanization response.
+      "detectedLanguageCode": "A String", # The ISO-639 language code of source text in the initial request, detected automatically, if no source language was passed within the initial request. If the source language was passed, auto-detection of the language does not occur and this field is empty.
+      "romanizedText": "A String", # Romanized text. If an error occurs during romanization, this field might be excluded from the response.
+    },
+  ],
+}
+
+
translateText(parent, body=None, x__xgafv=None)
Translates input text and returns translated text.
@@ -185,6 +222,9 @@ 

Method Details

"model": "A String", # 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`, For global (non-regionalized) requests, use `location-id` `global`. For example, `projects/{project-number-or-id}/locations/global/models/general/nmt`. If not provided, the default Google model (NMT) will be used "sourceLanguageCode": "A String", # Optional. The ISO-639 language code of the input text if known, for example, "en-US" or "sr-Latn". Supported language codes are listed in Language Support. If the source language isn't specified, the API attempts to identify the source language automatically and returns the source language within the response. "targetLanguageCode": "A String", # Required. The ISO-639 language code to use for translation of the input text, set to one of the language codes listed in Language Support. + "transliterationConfig": { # Confugures transliteration feature on top of translation. # Optional. Transliteration to be applied. + "enableTransliteration": True or False, # If true, source text in romanized form can be translated to the target language. + }, } x__xgafv: string, V1 error format. diff --git a/docs/dyn/translate_v3.projects.locations.html b/docs/dyn/translate_v3.projects.locations.html index f2d0914c9e0..7de6c3c8c7f 100644 --- a/docs/dyn/translate_v3.projects.locations.html +++ b/docs/dyn/translate_v3.projects.locations.html @@ -118,6 +118,9 @@

Instance Methods

list_next()

Retrieves the next page of results.

+

+ romanizeText(parent, body=None, x__xgafv=None)

+

Romanize input text written in non-Latin scripts to Latin text.

translateDocument(parent, body=None, x__xgafv=None)

Translates documents in synchronous mode.

@@ -321,7 +324,7 @@

Method Details

Returns: An object of the form: - { # A resource that represents Google Cloud Platform location. + { # A resource that represents a Google Cloud location. "displayName": "A String", # The friendly name for this location, typically a nearby city name. For example, "Tokyo". "labels": { # Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"} "a_key": "A String", @@ -381,7 +384,7 @@

Method Details

{ # The response message for Locations.ListLocations. "locations": [ # A list of locations that matches the specified filter in the request. - { # A resource that represents Google Cloud Platform location. + { # A resource that represents a Google Cloud location. "displayName": "A String", # The friendly name for this location, typically a nearby city name. For example, "Tokyo". "labels": { # Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"} "a_key": "A String", @@ -411,6 +414,40 @@

Method Details

+
+ romanizeText(parent, body=None, x__xgafv=None) +
Romanize input text written in non-Latin scripts to Latin text.
+
+Args:
+  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}`. (required)
+  body: object, The request body.
+    The object takes the form of:
+
+{ # The request message for synchronous romanization.
+  "contents": [ # Required. The content of the input in string format.
+    "A String",
+  ],
+  "sourceLanguageCode": "A String", # Optional. The ISO-639 language code of the input text if known, for example, "hi" or "zh". If the source language isn't specified, the API attempts to identify the source language automatically and returns the source language for each content in the response.
+}
+
+  x__xgafv: string, V1 error format.
+    Allowed values
+      1 - v1 error format
+      2 - v2 error format
+
+Returns:
+  An object of the form:
+
+    { # The response message for synchronous romanization.
+  "romanizations": [ # Text romanization responses. This field has the same length as `contents`.
+    { # A single romanization response.
+      "detectedLanguageCode": "A String", # The ISO-639 language code of source text in the initial request, detected automatically, if no source language was passed within the initial request. If the source language was passed, auto-detection of the language does not occur and this field is empty.
+      "romanizedText": "A String", # Romanized text. If an error occurs during romanization, this field might be excluded from the response.
+    },
+  ],
+}
+
+
translateDocument(parent, body=None, x__xgafv=None)
Translates documents in synchronous mode.
@@ -505,6 +542,9 @@ 

Method Details

"model": "A String", # 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`, For global (non-regionalized) requests, use `location-id` `global`. For example, `projects/{project-number-or-id}/locations/global/models/general/nmt`. If not provided, the default Google model (NMT) will be used "sourceLanguageCode": "A String", # Optional. The ISO-639 language code of the input text if known, for example, "en-US" or "sr-Latn". Supported language codes are listed in Language Support. If the source language isn't specified, the API attempts to identify the source language automatically and returns the source language within the response. "targetLanguageCode": "A String", # Required. The ISO-639 language code to use for translation of the input text, set to one of the language codes listed in Language Support. + "transliterationConfig": { # Confugures transliteration feature on top of translation. # Optional. Transliteration to be applied. + "enableTransliteration": True or False, # If true, source text in romanized form can be translated to the target language. + }, } x__xgafv: string, V1 error format. diff --git a/docs/dyn/translate_v3beta1.projects.locations.html b/docs/dyn/translate_v3beta1.projects.locations.html index 844994512e9..6d6945bdd98 100644 --- a/docs/dyn/translate_v3beta1.projects.locations.html +++ b/docs/dyn/translate_v3beta1.projects.locations.html @@ -311,7 +311,7 @@

Method Details

Returns: An object of the form: - { # A resource that represents Google Cloud Platform location. + { # A resource that represents a Google Cloud location. "displayName": "A String", # The friendly name for this location, typically a nearby city name. For example, "Tokyo". "labels": { # Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"} "a_key": "A String", @@ -371,7 +371,7 @@

Method Details

{ # The response message for Locations.ListLocations. "locations": [ # A list of locations that matches the specified filter in the request. - { # A resource that represents Google Cloud Platform location. + { # A resource that represents a Google Cloud location. "displayName": "A String", # The friendly name for this location, typically a nearby city name. For example, "Tokyo". "labels": { # Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"} "a_key": "A String", diff --git a/googleapiclient/discovery_cache/documents/translate.v3.json b/googleapiclient/discovery_cache/documents/translate.v3.json index a83fee6f901..8e058d2d099 100644 --- a/googleapiclient/discovery_cache/documents/translate.v3.json +++ b/googleapiclient/discovery_cache/documents/translate.v3.json @@ -175,6 +175,35 @@ "https://www.googleapis.com/auth/cloud-translation" ] }, + "romanizeText": { + "description": "Romanize input text written in non-Latin scripts to Latin text.", + "flatPath": "v3/projects/{projectsId}:romanizeText", + "httpMethod": "POST", + "id": "translate.projects.romanizeText", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "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}`.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3/{+parent}:romanizeText", + "request": { + "$ref": "RomanizeTextRequest" + }, + "response": { + "$ref": "RomanizeTextResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-translation" + ] + }, "translateText": { "description": "Translates input text and returns translated text.", "flatPath": "v3/projects/{projectsId}:translateText", @@ -397,6 +426,35 @@ "https://www.googleapis.com/auth/cloud-translation" ] }, + "romanizeText": { + "description": "Romanize input text written in non-Latin scripts to Latin text.", + "flatPath": "v3/projects/{projectsId}/locations/{locationsId}:romanizeText", + "httpMethod": "POST", + "id": "translate.projects.locations.romanizeText", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "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}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3/{+parent}:romanizeText", + "request": { + "$ref": "RomanizeTextRequest" + }, + "response": { + "$ref": "RomanizeTextResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-translation" + ] + }, "translateDocument": { "description": "Translates documents in synchronous mode.", "flatPath": "v3/projects/{projectsId}/locations/{locationsId}:translateDocument", @@ -1286,7 +1344,7 @@ } } }, - "revision": "20230414", + "revision": "20230519", "rootUrl": "https://translation.googleapis.com/", "schemas": { "BatchDocumentInputConfig": { @@ -2029,7 +2087,7 @@ "type": "object" }, "Location": { - "description": "A resource that represents Google Cloud Platform location.", + "description": "A resource that represents a Google Cloud location.", "id": "Location", "properties": { "displayName": { @@ -2167,6 +2225,53 @@ }, "type": "object" }, + "Romanization": { + "description": "A single romanization response.", + "id": "Romanization", + "properties": { + "detectedLanguageCode": { + "description": "The ISO-639 language code of source text in the initial request, detected automatically, if no source language was passed within the initial request. If the source language was passed, auto-detection of the language does not occur and this field is empty.", + "type": "string" + }, + "romanizedText": { + "description": "Romanized text. If an error occurs during romanization, this field might be excluded from the response.", + "type": "string" + } + }, + "type": "object" + }, + "RomanizeTextRequest": { + "description": "The request message for synchronous romanization.", + "id": "RomanizeTextRequest", + "properties": { + "contents": { + "description": "Required. The content of the input in string format.", + "items": { + "type": "string" + }, + "type": "array" + }, + "sourceLanguageCode": { + "description": "Optional. The ISO-639 language code of the input text if known, for example, \"hi\" or \"zh\". If the source language isn't specified, the API attempts to identify the source language automatically and returns the source language for each content in the response.", + "type": "string" + } + }, + "type": "object" + }, + "RomanizeTextResponse": { + "description": "The response message for synchronous romanization.", + "id": "RomanizeTextResponse", + "properties": { + "romanizations": { + "description": "Text romanization responses. This field has the same length as `contents`.", + "items": { + "$ref": "Romanization" + }, + "type": "array" + } + }, + "type": "object" + }, "Status": { "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", "id": "Status", @@ -2360,6 +2465,10 @@ "targetLanguageCode": { "description": "Required. The ISO-639 language code to use for translation of the input text, set to one of the language codes listed in Language Support.", "type": "string" + }, + "transliterationConfig": { + "$ref": "TransliterationConfig", + "description": "Optional. Transliteration to be applied." } }, "type": "object" @@ -2407,6 +2516,17 @@ }, "type": "object" }, + "TransliterationConfig": { + "description": "Confugures transliteration feature on top of translation.", + "id": "TransliterationConfig", + "properties": { + "enableTransliteration": { + "description": "If true, source text in romanized form can be translated to the target language.", + "type": "boolean" + } + }, + "type": "object" + }, "WaitOperationRequest": { "description": "The request message for Operations.WaitOperation.", "id": "WaitOperationRequest", diff --git a/googleapiclient/discovery_cache/documents/translate.v3beta1.json b/googleapiclient/discovery_cache/documents/translate.v3beta1.json index d174097446e..8bc9310ae05 100644 --- a/googleapiclient/discovery_cache/documents/translate.v3beta1.json +++ b/googleapiclient/discovery_cache/documents/translate.v3beta1.json @@ -744,7 +744,7 @@ } } }, - "revision": "20230414", + "revision": "20230519", "rootUrl": "https://translation.googleapis.com/", "schemas": { "BatchDocumentInputConfig": { @@ -1176,7 +1176,7 @@ "type": "object" }, "Location": { - "description": "A resource that represents Google Cloud Platform location.", + "description": "A resource that represents a Google Cloud location.", "id": "Location", "properties": { "displayName": {