Skip to content

Commit

Permalink
feat(translate): update the API
Browse files Browse the repository at this point in the history
#### 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
  • Loading branch information
yoshi-automation authored and sofisl committed Aug 27, 2024
1 parent c9e1e37 commit 841a829
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 9 deletions.
25 changes: 20 additions & 5 deletions discovery/translate-v3.json
Original file line number Diff line number Diff line change
Expand Up @@ -1396,7 +1396,7 @@
],
"parameters": {
"name": {
"description": "Identifier. The resource name of the entry. Format: \"projects/*/locations/*/glossaries/*/glossaryEntries/*\"",
"description": "Identifier. The resource name of the entry. Format: `projects/*/locations/*/glossaries/*/glossaryEntries/*`",
"location": "path",
"pattern": "^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/glossaryEntries/[^/]+$",
"required": true,
Expand Down Expand Up @@ -1707,7 +1707,7 @@
}
}
},
"revision": "20240718",
"revision": "20240821",
"rootUrl": "https://translation.googleapis.com/",
"schemas": {
"AdaptiveMtDataset": {
Expand Down Expand Up @@ -1829,7 +1829,7 @@
"type": "string"
},
"glossaryConfig": {
"$ref": "TranslateTextGlossaryConfig",
"$ref": "GlossaryConfig",
"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."
},
"referenceSentenceConfig": {
Expand Down Expand Up @@ -2227,7 +2227,7 @@
"id": "Example",
"properties": {
"name": {
"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}'",
"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}`",
"readOnly": true,
"type": "string"
},
Expand Down Expand Up @@ -2367,6 +2367,21 @@
},
"type": "object"
},
"GlossaryConfig": {
"description": "Configures which glossary is used for a specific target language and defines options for applying that glossary.",
"id": "GlossaryConfig",
"properties": {
"glossary": {
"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}`",
"type": "string"
},
"ignoreCase": {
"description": "Optional. Indicates match is case insensitive. The default value is `false` if missing.",
"type": "boolean"
}
},
"type": "object"
},
"GlossaryEntry": {
"description": "Represents a single entry in a glossary.",
"id": "GlossaryEntry",
Expand All @@ -2376,7 +2391,7 @@
"type": "string"
},
"name": {
"description": "Identifier. The resource name of the entry. Format: \"projects/*/locations/*/glossaries/*/glossaryEntries/*\"",
"description": "Identifier. The resource name of the entry. Format: `projects/*/locations/*/glossaries/*/glossaryEntries/*`",
"type": "string"
},
"termsPair": {
Expand Down
21 changes: 17 additions & 4 deletions src/apis/translate/v3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export namespace translate_v3 {
/**
* 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.
*/
glossaryConfig?: Schema$TranslateTextGlossaryConfig;
glossaryConfig?: Schema$GlossaryConfig;
/**
* Configuration for caller provided reference sentences.
*/
Expand Down Expand Up @@ -516,7 +516,7 @@ export namespace translate_v3 {
*/
export interface Schema$Example {
/**
* 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\}'
* 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\}`
*/
name?: string | null;
/**
Expand Down Expand Up @@ -631,6 +631,19 @@ export namespace translate_v3 {
*/
submitTime?: string | null;
}
/**
* Configures which glossary is used for a specific target language and defines options for applying that glossary.
*/
export interface Schema$GlossaryConfig {
/**
* 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\}`
*/
glossary?: string | null;
/**
* Optional. Indicates match is case insensitive. The default value is `false` if missing.
*/
ignoreCase?: boolean | null;
}
/**
* Represents a single entry in a glossary.
*/
Expand All @@ -640,7 +653,7 @@ export namespace translate_v3 {
*/
description?: string | null;
/**
* Identifier. The resource name of the entry. Format: "projects/x/locations/x/glossaries/x/glossaryEntries/x"
* Identifier. The resource name of the entry. Format: `projects/x/locations/x/glossaries/x/glossaryEntries/x`
*/
name?: string | null;
/**
Expand Down Expand Up @@ -5631,7 +5644,7 @@ export namespace translate_v3 {
export interface Params$Resource$Projects$Locations$Glossaries$Glossaryentries$Patch
extends StandardParameters {
/**
* Identifier. The resource name of the entry. Format: "projects/x/locations/x/glossaries/x/glossaryEntries/x"
* Identifier. The resource name of the entry. Format: `projects/x/locations/x/glossaries/x/glossaryEntries/x`
*/
name?: string;

Expand Down

0 comments on commit 841a829

Please sign in to comment.