Skip to content

Commit b2cc28c

Browse files
yoshi-automationsofisl
authored andcommitted
feat(translate): update the API
#### translate:v3beta1 The following keys were added: - schemas.TranslateTextGlossaryConfig.properties.contextualTranslationEnabled.description - schemas.TranslateTextGlossaryConfig.properties.contextualTranslationEnabled.type The following keys were changed: - resources.projects.resources.locations.methods.batchTranslateDocument.scopes - resources.projects.resources.locations.methods.batchTranslateText.scopes - resources.projects.resources.locations.resources.glossaries.methods.create.scopes - resources.projects.resources.locations.resources.operations.methods.cancel.description - schemas.TranslateTextGlossaryConfig.description #### translate:v3 The following keys were added: - schemas.GlossaryConfig.properties.contextualTranslationEnabled.description - schemas.GlossaryConfig.properties.contextualTranslationEnabled.type - schemas.TranslateTextGlossaryConfig.properties.contextualTranslationEnabled.description - schemas.TranslateTextGlossaryConfig.properties.contextualTranslationEnabled.type The following keys were changed: - resources.projects.resources.locations.methods.batchTranslateDocument.scopes - resources.projects.resources.locations.methods.batchTranslateText.scopes - resources.projects.resources.locations.resources.operations.methods.cancel.description
1 parent 4e61224 commit b2cc28c

File tree

4 files changed

+42
-13
lines changed

4 files changed

+42
-13
lines changed

discovery/translate-v3.json

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,8 @@
291291
"$ref": "Operation"
292292
},
293293
"scopes": [
294-
"https://www.googleapis.com/auth/cloud-platform"
294+
"https://www.googleapis.com/auth/cloud-platform",
295+
"https://www.googleapis.com/auth/cloud-translation"
295296
]
296297
},
297298
"batchTranslateText": {
@@ -319,7 +320,8 @@
319320
"$ref": "Operation"
320321
},
321322
"scopes": [
322-
"https://www.googleapis.com/auth/cloud-platform"
323+
"https://www.googleapis.com/auth/cloud-platform",
324+
"https://www.googleapis.com/auth/cloud-translation"
323325
]
324326
},
325327
"detectLanguage": {
@@ -1550,7 +1552,7 @@
15501552
"operations": {
15511553
"methods": {
15521554
"cancel": {
1553-
"description": "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`.",
1555+
"description": "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`.",
15541556
"flatPath": "v3/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel",
15551557
"httpMethod": "POST",
15561558
"id": "translate.projects.locations.operations.cancel",
@@ -1708,7 +1710,7 @@
17081710
}
17091711
}
17101712
},
1711-
"revision": "20240912",
1713+
"revision": "20241218",
17121714
"rootUrl": "https://translation.googleapis.com/",
17131715
"schemas": {
17141716
"AdaptiveMtDataset": {
@@ -2372,6 +2374,10 @@
23722374
"description": "Configures which glossary is used for a specific target language and defines options for applying that glossary.",
23732375
"id": "GlossaryConfig",
23742376
"properties": {
2377+
"contextualTranslationEnabled": {
2378+
"description": "Optional. If set to true, the glossary will be used for contextual translation.",
2379+
"type": "boolean"
2380+
},
23752381
"glossary": {
23762382
"description": "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}`",
23772383
"type": "string"
@@ -3123,6 +3129,10 @@
31233129
"description": "Configures which glossary is used for a specific target language and defines options for applying that glossary.",
31243130
"id": "TranslateTextGlossaryConfig",
31253131
"properties": {
3132+
"contextualTranslationEnabled": {
3133+
"description": "Optional. If set to true, the glossary will be used for contextual translation.",
3134+
"type": "boolean"
3135+
},
31263136
"glossary": {
31273137
"description": "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}`",
31283138
"type": "string"

discovery/translate-v3beta1.json

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,8 @@
233233
"$ref": "Operation"
234234
},
235235
"scopes": [
236-
"https://www.googleapis.com/auth/cloud-platform"
236+
"https://www.googleapis.com/auth/cloud-platform",
237+
"https://www.googleapis.com/auth/cloud-translation"
237238
]
238239
},
239240
"batchTranslateText": {
@@ -261,7 +262,8 @@
261262
"$ref": "Operation"
262263
},
263264
"scopes": [
264-
"https://www.googleapis.com/auth/cloud-platform"
265+
"https://www.googleapis.com/auth/cloud-platform",
266+
"https://www.googleapis.com/auth/cloud-translation"
265267
]
266268
},
267269
"detectLanguage": {
@@ -484,7 +486,8 @@
484486
"$ref": "Operation"
485487
},
486488
"scopes": [
487-
"https://www.googleapis.com/auth/cloud-platform"
489+
"https://www.googleapis.com/auth/cloud-platform",
490+
"https://www.googleapis.com/auth/cloud-translation"
488491
]
489492
},
490493
"delete": {
@@ -586,7 +589,7 @@
586589
"operations": {
587590
"methods": {
588591
"cancel": {
589-
"description": "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`.",
592+
"description": "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`.",
590593
"flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel",
591594
"httpMethod": "POST",
592595
"id": "translate.projects.locations.operations.cancel",
@@ -744,7 +747,7 @@
744747
}
745748
}
746749
},
747-
"revision": "20230922",
750+
"revision": "20241218",
748751
"rootUrl": "https://translation.googleapis.com/",
749752
"schemas": {
750753
"BatchDocumentInputConfig": {
@@ -1401,9 +1404,13 @@
14011404
"type": "object"
14021405
},
14031406
"TranslateTextGlossaryConfig": {
1404-
"description": "Configures which glossary should be used for a specific target language, and defines options for applying that glossary.",
1407+
"description": "----------------------------------------------------------------------------- Configures which glossary should be used for a specific target language, and defines options for applying that glossary.",
14051408
"id": "TranslateTextGlossaryConfig",
14061409
"properties": {
1410+
"contextualTranslationEnabled": {
1411+
"description": "Optional. If set to true, the glossary will be used for contextual translation.",
1412+
"type": "boolean"
1413+
},
14071414
"glossary": {
14081415
"description": "Required. Specifies the glossary used for this translation. Use this format: projects/*/locations/*/glossaries/*",
14091416
"type": "string"

src/apis/translate/v3.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,10 @@ export namespace translate_v3 {
635635
* Configures which glossary is used for a specific target language and defines options for applying that glossary.
636636
*/
637637
export interface Schema$GlossaryConfig {
638+
/**
639+
* Optional. If set to true, the glossary will be used for contextual translation.
640+
*/
641+
contextualTranslationEnabled?: boolean | null;
638642
/**
639643
* 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\}`
640644
*/
@@ -1217,6 +1221,10 @@ export namespace translate_v3 {
12171221
* Configures which glossary is used for a specific target language and defines options for applying that glossary.
12181222
*/
12191223
export interface Schema$TranslateTextGlossaryConfig {
1224+
/**
1225+
* Optional. If set to true, the glossary will be used for contextual translation.
1226+
*/
1227+
contextualTranslationEnabled?: boolean | null;
12201228
/**
12211229
* 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\}`
12221230
*/
@@ -6063,7 +6071,7 @@ export namespace translate_v3 {
60636071
}
60646072

60656073
/**
6066-
* 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`.
6074+
* 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`.
60676075
*
60686076
* @param params - Parameters for request
60696077
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.

src/apis/translate/v3beta1.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -629,9 +629,13 @@ export namespace translate_v3beta1 {
629629
model?: string | null;
630630
}
631631
/**
632-
* Configures which glossary should be used for a specific target language, and defines options for applying that glossary.
632+
* ----------------------------------------------------------------------------- Configures which glossary should be used for a specific target language, and defines options for applying that glossary.
633633
*/
634634
export interface Schema$TranslateTextGlossaryConfig {
635+
/**
636+
* Optional. If set to true, the glossary will be used for contextual translation.
637+
*/
638+
contextualTranslationEnabled?: boolean | null;
635639
/**
636640
* Required. Specifies the glossary used for this translation. Use this format: projects/x/locations/x/glossaries/x
637641
*/
@@ -2309,7 +2313,7 @@ export namespace translate_v3beta1 {
23092313
}
23102314

23112315
/**
2312-
* 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`.
2316+
* 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`.
23132317
*
23142318
* @param params - Parameters for request
23152319
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.

0 commit comments

Comments
 (0)