Skip to content

Commit 3302f9c

Browse files
feat(translate): update the api
#### translate:v3 The following keys were added: - schemas.GlossaryConfig.properties.contextualTranslationEnabled.type (Total Keys: 1) - schemas.TranslateTextGlossaryConfig.properties.contextualTranslationEnabled.type (Total Keys: 1) #### translate:v3beta1 The following keys were added: - schemas.TranslateTextGlossaryConfig.properties.contextualTranslationEnabled.type (Total Keys: 1)
1 parent 1bd9d5f commit 3302f9c

8 files changed

+52
-19
lines changed

docs/dyn/translate_v3.projects.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ <h3>Method Details</h3>
212212
&quot;A String&quot;,
213213
],
214214
&quot;glossaryConfig&quot;: { # Configures which glossary is used for a specific target language and defines options for applying that glossary. # Optional. Glossary to be applied. The glossary must be within the same region (have the same location-id) as the model, otherwise an INVALID_ARGUMENT (400) error is returned.
215+
&quot;contextualTranslationEnabled&quot;: True or False, # Optional. If set to true, the glossary will be used for contextual translation.
215216
&quot;glossary&quot;: &quot;A String&quot;, # Required. The `glossary` to be applied for this translation. The format depends on the glossary: - User-provided custom glossary: `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`
216217
&quot;ignoreCase&quot;: True or False, # Optional. Indicates match is case insensitive. The default value is `false` if missing.
217218
},
@@ -240,6 +241,7 @@ <h3>Method Details</h3>
240241
{ # A single translation response.
241242
&quot;detectedLanguageCode&quot;: &quot;A String&quot;, # 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.
242243
&quot;glossaryConfig&quot;: { # Configures which glossary is used for a specific target language and defines options for applying that glossary. # The `glossary_config` used for this translation.
244+
&quot;contextualTranslationEnabled&quot;: True or False, # Optional. If set to true, the glossary will be used for contextual translation.
243245
&quot;glossary&quot;: &quot;A String&quot;, # Required. The `glossary` to be applied for this translation. The format depends on the glossary: - User-provided custom glossary: `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`
244246
&quot;ignoreCase&quot;: True or False, # Optional. Indicates match is case insensitive. The default value is `false` if missing.
245247
},
@@ -251,6 +253,7 @@ <h3>Method Details</h3>
251253
{ # A single translation response.
252254
&quot;detectedLanguageCode&quot;: &quot;A String&quot;, # 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.
253255
&quot;glossaryConfig&quot;: { # Configures which glossary is used for a specific target language and defines options for applying that glossary. # The `glossary_config` used for this translation.
256+
&quot;contextualTranslationEnabled&quot;: True or False, # Optional. If set to true, the glossary will be used for contextual translation.
254257
&quot;glossary&quot;: &quot;A String&quot;, # Required. The `glossary` to be applied for this translation. The format depends on the glossary: - User-provided custom glossary: `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`
255258
&quot;ignoreCase&quot;: True or False, # Optional. Indicates match is case insensitive. The default value is `false` if missing.
256259
},

docs/dyn/translate_v3.projects.locations.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ <h3>Method Details</h3>
151151
],
152152
&quot;dataset&quot;: &quot;A String&quot;, # Required. The resource name for the dataset to use for adaptive MT. `projects/{project}/locations/{location-id}/adaptiveMtDatasets/{dataset}`
153153
&quot;glossaryConfig&quot;: { # Configures which glossary is used for a specific target language and defines options for applying that glossary. # Optional. Glossary to be applied. The glossary must be within the same region (have the same location-id) as the model, otherwise an INVALID_ARGUMENT (400) error is returned.
154+
&quot;contextualTranslationEnabled&quot;: True or False, # Optional. If set to true, the glossary will be used for contextual translation.
154155
&quot;glossary&quot;: &quot;A String&quot;, # Required. The `glossary` to be applied for this translation. The format depends on the glossary: - User-provided custom glossary: `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`
155156
&quot;ignoreCase&quot;: True or False, # Optional. Indicates match is case insensitive. The default value is `false` if missing.
156157
},
@@ -211,6 +212,7 @@ <h3>Method Details</h3>
211212
},
212213
&quot;glossaries&quot;: { # Optional. Glossaries to be applied. It&#x27;s keyed by target language code.
213214
&quot;a_key&quot;: { # Configures which glossary is used for a specific target language and defines options for applying that glossary.
215+
&quot;contextualTranslationEnabled&quot;: True or False, # Optional. If set to true, the glossary will be used for contextual translation.
214216
&quot;glossary&quot;: &quot;A String&quot;, # Required. The `glossary` to be applied for this translation. The format depends on the glossary: - User-provided custom glossary: `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`
215217
&quot;ignoreCase&quot;: True or False, # Optional. Indicates match is case insensitive. The default value is `false` if missing.
216218
},
@@ -277,6 +279,7 @@ <h3>Method Details</h3>
277279
{ # The batch translation request.
278280
&quot;glossaries&quot;: { # Optional. Glossaries to be applied for translation. It&#x27;s keyed by target language code.
279281
&quot;a_key&quot;: { # Configures which glossary is used for a specific target language and defines options for applying that glossary.
282+
&quot;contextualTranslationEnabled&quot;: True or False, # Optional. If set to true, the glossary will be used for contextual translation.
280283
&quot;glossary&quot;: &quot;A String&quot;, # Required. The `glossary` to be applied for this translation. The format depends on the glossary: - User-provided custom glossary: `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`
281284
&quot;ignoreCase&quot;: True or False, # Optional. Indicates match is case insensitive. The default value is `false` if missing.
282285
},
@@ -541,6 +544,7 @@ <h3>Method Details</h3>
541544
&quot;enableRotationCorrection&quot;: True or False, # Optional. If true, enable auto rotation correction in DVS.
542545
&quot;enableShadowRemovalNativePdf&quot;: True or False, # Optional. If true, use the text removal server to remove the shadow text on background image for native pdf translation. Shadow removal feature can only be enabled when is_translate_native_pdf_only: false &amp;&amp; pdf_native_only: false
543546
&quot;glossaryConfig&quot;: { # Configures which glossary is used for a specific target language and defines options for applying that glossary. # Optional. Glossary to be applied. The glossary must be within the same region (have the same location-id) as the model, otherwise an INVALID_ARGUMENT (400) error is returned.
547+
&quot;contextualTranslationEnabled&quot;: True or False, # Optional. If set to true, the glossary will be used for contextual translation.
544548
&quot;glossary&quot;: &quot;A String&quot;, # Required. The `glossary` to be applied for this translation. The format depends on the glossary: - User-provided custom glossary: `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`
545549
&quot;ignoreCase&quot;: True or False, # Optional. Indicates match is case insensitive. The default value is `false` if missing.
546550
},
@@ -570,6 +574,7 @@ <h3>Method Details</h3>
570574
&quot;mimeType&quot;: &quot;A String&quot;, # The translated document&#x27;s mime type.
571575
},
572576
&quot;glossaryConfig&quot;: { # Configures which glossary is used for a specific target language and defines options for applying that glossary. # The `glossary_config` used for this translation.
577+
&quot;contextualTranslationEnabled&quot;: True or False, # Optional. If set to true, the glossary will be used for contextual translation.
573578
&quot;glossary&quot;: &quot;A String&quot;, # Required. The `glossary` to be applied for this translation. The format depends on the glossary: - User-provided custom glossary: `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`
574579
&quot;ignoreCase&quot;: True or False, # Optional. Indicates match is case insensitive. The default value is `false` if missing.
575580
},
@@ -598,6 +603,7 @@ <h3>Method Details</h3>
598603
&quot;A String&quot;,
599604
],
600605
&quot;glossaryConfig&quot;: { # Configures which glossary is used for a specific target language and defines options for applying that glossary. # Optional. Glossary to be applied. The glossary must be within the same region (have the same location-id) as the model, otherwise an INVALID_ARGUMENT (400) error is returned.
606+
&quot;contextualTranslationEnabled&quot;: True or False, # Optional. If set to true, the glossary will be used for contextual translation.
601607
&quot;glossary&quot;: &quot;A String&quot;, # Required. The `glossary` to be applied for this translation. The format depends on the glossary: - User-provided custom glossary: `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`
602608
&quot;ignoreCase&quot;: True or False, # Optional. Indicates match is case insensitive. The default value is `false` if missing.
603609
},
@@ -626,6 +632,7 @@ <h3>Method Details</h3>
626632
{ # A single translation response.
627633
&quot;detectedLanguageCode&quot;: &quot;A String&quot;, # 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.
628634
&quot;glossaryConfig&quot;: { # Configures which glossary is used for a specific target language and defines options for applying that glossary. # The `glossary_config` used for this translation.
635+
&quot;contextualTranslationEnabled&quot;: True or False, # Optional. If set to true, the glossary will be used for contextual translation.
629636
&quot;glossary&quot;: &quot;A String&quot;, # Required. The `glossary` to be applied for this translation. The format depends on the glossary: - User-provided custom glossary: `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`
630637
&quot;ignoreCase&quot;: True or False, # Optional. Indicates match is case insensitive. The default value is `false` if missing.
631638
},
@@ -637,6 +644,7 @@ <h3>Method Details</h3>
637644
{ # A single translation response.
638645
&quot;detectedLanguageCode&quot;: &quot;A String&quot;, # 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.
639646
&quot;glossaryConfig&quot;: { # Configures which glossary is used for a specific target language and defines options for applying that glossary. # The `glossary_config` used for this translation.
647+
&quot;contextualTranslationEnabled&quot;: True or False, # Optional. If set to true, the glossary will be used for contextual translation.
640648
&quot;glossary&quot;: &quot;A String&quot;, # Required. The `glossary` to be applied for this translation. The format depends on the glossary: - User-provided custom glossary: `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`
641649
&quot;ignoreCase&quot;: True or False, # Optional. Indicates match is case insensitive. The default value is `false` if missing.
642650
},

docs/dyn/translate_v3.projects.locations.operations.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ <h1><a href="translate_v3.html">Cloud Translation API</a> . <a href="translate_v
7676
<h2>Instance Methods</h2>
7777
<p class="toc_element">
7878
<code><a href="#cancel">cancel(name, body=None, x__xgafv=None)</a></code></p>
79-
<p class="firstline">Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.</p>
79+
<p class="firstline">Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.</p>
8080
<p class="toc_element">
8181
<code><a href="#close">close()</a></code></p>
8282
<p class="firstline">Close httplib2 connections.</p>
@@ -98,7 +98,7 @@ <h2>Instance Methods</h2>
9898
<h3>Method Details</h3>
9999
<div class="method">
100100
<code class="details" id="cancel">cancel(name, body=None, x__xgafv=None)</code>
101-
<pre>Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn&#x27;t support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
101+
<pre>Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn&#x27;t support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.
102102

103103
Args:
104104
name: string, The name of the operation resource to be cancelled. (required)

docs/dyn/translate_v3beta1.projects.html

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,8 @@ <h3>Method Details</h3>
174174
&quot;contents&quot;: [ # Required. The content of the input in string format. We recommend the total content be less than 30k codepoints. The max length of this field is 1024. Use BatchTranslateText for larger text.
175175
&quot;A String&quot;,
176176
],
177-
&quot;glossaryConfig&quot;: { # Configures which glossary should be used for a specific target language, and defines options for applying that glossary. # Optional. Glossary to be applied. The glossary must be within the same region (have the same location-id) as the model, otherwise an INVALID_ARGUMENT (400) error is returned.
177+
&quot;glossaryConfig&quot;: { # ----------------------------------------------------------------------------- Configures which glossary should be used for a specific target language, and defines options for applying that glossary. # Optional. Glossary to be applied. The glossary must be within the same region (have the same location-id) as the model, otherwise an INVALID_ARGUMENT (400) error is returned.
178+
&quot;contextualTranslationEnabled&quot;: True or False, # Optional. If set to true, the glossary will be used for contextual translation.
178179
&quot;glossary&quot;: &quot;A String&quot;, # Required. Specifies the glossary used for this translation. Use this format: projects/*/locations/*/glossaries/*
179180
&quot;ignoreCase&quot;: True or False, # Optional. Indicates match is case-insensitive. Default value is false if missing.
180181
},
@@ -199,7 +200,8 @@ <h3>Method Details</h3>
199200
&quot;glossaryTranslations&quot;: [ # Text translation responses if a glossary is provided in the request. This can be the same as `translations` if no terms apply. This field has the same length as `contents`.
200201
{ # A single translation response.
201202
&quot;detectedLanguageCode&quot;: &quot;A String&quot;, # The BCP-47 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.
202-
&quot;glossaryConfig&quot;: { # Configures which glossary should be used for a specific target language, and defines options for applying that glossary. # The `glossary_config` used for this translation.
203+
&quot;glossaryConfig&quot;: { # ----------------------------------------------------------------------------- Configures which glossary should be used for a specific target language, and defines options for applying that glossary. # The `glossary_config` used for this translation.
204+
&quot;contextualTranslationEnabled&quot;: True or False, # Optional. If set to true, the glossary will be used for contextual translation.
203205
&quot;glossary&quot;: &quot;A String&quot;, # Required. Specifies the glossary used for this translation. Use this format: projects/*/locations/*/glossaries/*
204206
&quot;ignoreCase&quot;: True or False, # Optional. Indicates match is case-insensitive. Default value is false if missing.
205207
},
@@ -210,7 +212,8 @@ <h3>Method Details</h3>
210212
&quot;translations&quot;: [ # Text translation responses with no glossary applied. This field has the same length as `contents`.
211213
{ # A single translation response.
212214
&quot;detectedLanguageCode&quot;: &quot;A String&quot;, # The BCP-47 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.
213-
&quot;glossaryConfig&quot;: { # Configures which glossary should be used for a specific target language, and defines options for applying that glossary. # The `glossary_config` used for this translation.
215+
&quot;glossaryConfig&quot;: { # ----------------------------------------------------------------------------- Configures which glossary should be used for a specific target language, and defines options for applying that glossary. # The `glossary_config` used for this translation.
216+
&quot;contextualTranslationEnabled&quot;: True or False, # Optional. If set to true, the glossary will be used for contextual translation.
214217
&quot;glossary&quot;: &quot;A String&quot;, # Required. Specifies the glossary used for this translation. Use this format: projects/*/locations/*/glossaries/*
215218
&quot;ignoreCase&quot;: True or False, # Optional. Indicates match is case-insensitive. Default value is false if missing.
216219
},

0 commit comments

Comments
 (0)