Skip to content

Commit 841a829

Browse files
yoshi-automationsofisl
authored andcommitted
feat(translate): update the API
#### translate:v3 The following keys were added: - schemas.GlossaryConfig.description - schemas.GlossaryConfig.id - schemas.GlossaryConfig.properties.glossary.description - schemas.GlossaryConfig.properties.glossary.type - schemas.GlossaryConfig.properties.ignoreCase.description - schemas.GlossaryConfig.properties.ignoreCase.type - schemas.GlossaryConfig.type The following keys were changed: - resources.projects.resources.locations.resources.glossaries.resources.glossaryEntries.methods.patch.parameters.name.description - schemas.AdaptiveMtTranslateRequest.properties.glossaryConfig.$ref - schemas.Example.properties.name.description - schemas.GlossaryEntry.properties.name.description
1 parent c9e1e37 commit 841a829

File tree

2 files changed

+37
-9
lines changed

2 files changed

+37
-9
lines changed

discovery/translate-v3.json

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1396,7 +1396,7 @@
13961396
],
13971397
"parameters": {
13981398
"name": {
1399-
"description": "Identifier. The resource name of the entry. Format: \"projects/*/locations/*/glossaries/*/glossaryEntries/*\"",
1399+
"description": "Identifier. The resource name of the entry. Format: `projects/*/locations/*/glossaries/*/glossaryEntries/*`",
14001400
"location": "path",
14011401
"pattern": "^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/glossaryEntries/[^/]+$",
14021402
"required": true,
@@ -1707,7 +1707,7 @@
17071707
}
17081708
}
17091709
},
1710-
"revision": "20240718",
1710+
"revision": "20240821",
17111711
"rootUrl": "https://translation.googleapis.com/",
17121712
"schemas": {
17131713
"AdaptiveMtDataset": {
@@ -1829,7 +1829,7 @@
18291829
"type": "string"
18301830
},
18311831
"glossaryConfig": {
1832-
"$ref": "TranslateTextGlossaryConfig",
1832+
"$ref": "GlossaryConfig",
18331833
"description": "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."
18341834
},
18351835
"referenceSentenceConfig": {
@@ -2227,7 +2227,7 @@
22272227
"id": "Example",
22282228
"properties": {
22292229
"name": {
2230-
"description": "Output only. The resource name of the example, in form of `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}/examples/{example_id}'",
2230+
"description": "Output only. The resource name of the example, in form of `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}/examples/{example_id}`",
22312231
"readOnly": true,
22322232
"type": "string"
22332233
},
@@ -2367,6 +2367,21 @@
23672367
},
23682368
"type": "object"
23692369
},
2370+
"GlossaryConfig": {
2371+
"description": "Configures which glossary is used for a specific target language and defines options for applying that glossary.",
2372+
"id": "GlossaryConfig",
2373+
"properties": {
2374+
"glossary": {
2375+
"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}`",
2376+
"type": "string"
2377+
},
2378+
"ignoreCase": {
2379+
"description": "Optional. Indicates match is case insensitive. The default value is `false` if missing.",
2380+
"type": "boolean"
2381+
}
2382+
},
2383+
"type": "object"
2384+
},
23702385
"GlossaryEntry": {
23712386
"description": "Represents a single entry in a glossary.",
23722387
"id": "GlossaryEntry",
@@ -2376,7 +2391,7 @@
23762391
"type": "string"
23772392
},
23782393
"name": {
2379-
"description": "Identifier. The resource name of the entry. Format: \"projects/*/locations/*/glossaries/*/glossaryEntries/*\"",
2394+
"description": "Identifier. The resource name of the entry. Format: `projects/*/locations/*/glossaries/*/glossaryEntries/*`",
23802395
"type": "string"
23812396
},
23822397
"termsPair": {

src/apis/translate/v3.ts

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ export namespace translate_v3 {
222222
/**
223223
* 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.
224224
*/
225-
glossaryConfig?: Schema$TranslateTextGlossaryConfig;
225+
glossaryConfig?: Schema$GlossaryConfig;
226226
/**
227227
* Configuration for caller provided reference sentences.
228228
*/
@@ -516,7 +516,7 @@ export namespace translate_v3 {
516516
*/
517517
export interface Schema$Example {
518518
/**
519-
* Output only. The resource name of the example, in form of `projects/{project-number-or-id\}/locations/{location_id\}/datasets/{dataset_id\}/examples/{example_id\}'
519+
* Output only. The resource name of the example, in form of `projects/{project-number-or-id\}/locations/{location_id\}/datasets/{dataset_id\}/examples/{example_id\}`
520520
*/
521521
name?: string | null;
522522
/**
@@ -631,6 +631,19 @@ export namespace translate_v3 {
631631
*/
632632
submitTime?: string | null;
633633
}
634+
/**
635+
* Configures which glossary is used for a specific target language and defines options for applying that glossary.
636+
*/
637+
export interface Schema$GlossaryConfig {
638+
/**
639+
* 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\}`
640+
*/
641+
glossary?: string | null;
642+
/**
643+
* Optional. Indicates match is case insensitive. The default value is `false` if missing.
644+
*/
645+
ignoreCase?: boolean | null;
646+
}
634647
/**
635648
* Represents a single entry in a glossary.
636649
*/
@@ -640,7 +653,7 @@ export namespace translate_v3 {
640653
*/
641654
description?: string | null;
642655
/**
643-
* Identifier. The resource name of the entry. Format: "projects/x/locations/x/glossaries/x/glossaryEntries/x"
656+
* Identifier. The resource name of the entry. Format: `projects/x/locations/x/glossaries/x/glossaryEntries/x`
644657
*/
645658
name?: string | null;
646659
/**
@@ -5631,7 +5644,7 @@ export namespace translate_v3 {
56315644
export interface Params$Resource$Projects$Locations$Glossaries$Glossaryentries$Patch
56325645
extends StandardParameters {
56335646
/**
5634-
* Identifier. The resource name of the entry. Format: "projects/x/locations/x/glossaries/x/glossaryEntries/x"
5647+
* Identifier. The resource name of the entry. Format: `projects/x/locations/x/glossaries/x/glossaryEntries/x`
56355648
*/
56365649
name?: string;
56375650

0 commit comments

Comments
 (0)