glossaries
Creates, updates, deletes, gets or lists a glossaries
resource.
Overview
Name | glossaries |
Type | Resource |
Id | google.translate.glossaries |
Fields
The following fields are returned by SELECT
queries:
- projects_locations_glossaries_get
- projects_locations_glossaries_list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Required. The resource name of the glossary. Glossary names have the form projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id} . |
displayName | string | Optional. The display name of the glossary. |
endTime | string (google-datetime) | Output only. When the glossary creation was finished. |
entryCount | integer (int32) | Output only. The number of entries defined in the glossary. |
inputConfig | object | Required. Provides examples to build the glossary from. Total glossary must not exceed 10M Unicode codepoints. (id: GlossaryInputConfig) |
languageCodesSet | object | Used with equivalent term set glossaries. (id: LanguageCodesSet) |
languagePair | object | Used with unidirectional glossaries. (id: LanguageCodePair) |
submitTime | string (google-datetime) | Output only. When CreateGlossary was called. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Required. The resource name of the glossary. Glossary names have the form projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id} . |
displayName | string | Optional. The display name of the glossary. |
endTime | string (google-datetime) | Output only. When the glossary creation was finished. |
entryCount | integer (int32) | Output only. The number of entries defined in the glossary. |
inputConfig | object | Required. Provides examples to build the glossary from. Total glossary must not exceed 10M Unicode codepoints. (id: GlossaryInputConfig) |
languageCodesSet | object | Used with equivalent term set glossaries. (id: LanguageCodesSet) |
languagePair | object | Used with unidirectional glossaries. (id: LanguageCodePair) |
submitTime | string (google-datetime) | Output only. When CreateGlossary was called. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
projects_locations_glossaries_get | select | projectsId , locationsId , glossariesId | Gets a glossary. Returns NOT_FOUND, if the glossary doesn't exist. | |
projects_locations_glossaries_list | select | projectsId , locationsId | pageSize , pageToken , filter | Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't exist. |
projects_locations_glossaries_create | insert | projectsId , locationsId | Creates a glossary and returns the long-running operation. Returns NOT_FOUND, if the project doesn't exist. | |
projects_locations_glossaries_patch | update | projectsId , locationsId , glossariesId | updateMask | Updates a glossary. A LRO is used since the update can be async if the glossary's entry file is updated. |
projects_locations_glossaries_delete | delete | projectsId , locationsId , glossariesId | Deletes a glossary, or cancels glossary construction if the glossary isn't created yet. Returns NOT_FOUND, if the glossary doesn't exist. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
glossariesId | string | |
locationsId | string | |
projectsId | string | |
filter | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- projects_locations_glossaries_get
- projects_locations_glossaries_list
Gets a glossary. Returns NOT_FOUND, if the glossary doesn't exist.
SELECT
name,
displayName,
endTime,
entryCount,
inputConfig,
languageCodesSet,
languagePair,
submitTime
FROM google.translate.glossaries
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND glossariesId = '{{ glossariesId }}' -- required;
Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't exist.
SELECT
name,
displayName,
endTime,
entryCount,
inputConfig,
languageCodesSet,
languagePair,
submitTime
FROM google.translate.glossaries
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}';
INSERT
examples
- projects_locations_glossaries_create
- Manifest
Creates a glossary and returns the long-running operation. Returns NOT_FOUND, if the project doesn't exist.
INSERT INTO google.translate.glossaries (
data__name,
data__languagePair,
data__languageCodesSet,
data__inputConfig,
data__displayName,
projectsId,
locationsId
)
SELECT
'{{ name }}',
'{{ languagePair }}',
'{{ languageCodesSet }}',
'{{ inputConfig }}',
'{{ displayName }}',
'{{ projectsId }}',
'{{ locationsId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: glossaries
props:
- name: projectsId
value: string
description: Required parameter for the glossaries resource.
- name: locationsId
value: string
description: Required parameter for the glossaries resource.
- name: name
value: string
description: >
Required. The resource name of the glossary. Glossary names have the form `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`.
- name: languagePair
value: object
description: >
Used with unidirectional glossaries.
- name: languageCodesSet
value: object
description: >
Used with equivalent term set glossaries.
- name: inputConfig
value: object
description: >
Required. Provides examples to build the glossary from. Total glossary must not exceed 10M Unicode codepoints.
- name: displayName
value: string
description: >
Optional. The display name of the glossary.
UPDATE
examples
- projects_locations_glossaries_patch
Updates a glossary. A LRO is used since the update can be async if the glossary's entry file is updated.
UPDATE google.translate.glossaries
SET
data__name = '{{ name }}',
data__languagePair = '{{ languagePair }}',
data__languageCodesSet = '{{ languageCodesSet }}',
data__inputConfig = '{{ inputConfig }}',
data__displayName = '{{ displayName }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND glossariesId = '{{ glossariesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;
DELETE
examples
- projects_locations_glossaries_delete
Deletes a glossary, or cancels glossary construction if the glossary isn't created yet. Returns NOT_FOUND, if the glossary doesn't exist.
DELETE FROM google.translate.glossaries
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND glossariesId = '{{ glossariesId }}' --required;