Skip to main content

glossaries

Creates, updates, deletes, gets or lists a glossaries resource.

Overview

Nameglossaries
TypeResource
Idgoogle.translate.glossaries

Fields

NameDatatypeDescription
namestringRequired. The resource name of the glossary. Glossary names have the form projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}.
displayNamestringOptional. The display name of the glossary.
endTimestringOutput only. When the glossary creation was finished.
entryCountintegerOutput only. The number of entries defined in the glossary.
inputConfigobjectInput configuration for glossaries.
languageCodesSetobjectUsed with equivalent term set glossaries.
languagePairobjectUsed with unidirectional glossaries.
submitTimestringOutput only. When CreateGlossary was called.

Methods

NameAccessible byRequired ParamsDescription
projects_locations_glossaries_getSELECTglossariesId, locationsId, projectsIdGets a glossary. Returns NOT_FOUND, if the glossary doesn't exist.
projects_locations_glossaries_listSELECTlocationsId, projectsIdLists glossaries in a project. Returns NOT_FOUND, if the project doesn't exist.
projects_locations_glossaries_createINSERTlocationsId, projectsIdCreates a glossary and returns the long-running operation. Returns NOT_FOUND, if the project doesn't exist.
projects_locations_glossaries_deleteDELETEglossariesId, locationsId, projectsIdDeletes a glossary, or cancels glossary construction if the glossary isn't created yet. Returns NOT_FOUND, if the glossary doesn't exist.
projects_locations_glossaries_patchUPDATEglossariesId, locationsId, projectsIdUpdates a glossary. A LRO is used since the update can be async if the glossary's entry file is updated.

SELECT examples

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 locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new glossaries resource.

/*+ create */
INSERT INTO google.translate.glossaries (
locationsId,
projectsId,
name,
languagePair,
languageCodesSet,
inputConfig,
displayName
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ languagePair }}',
'{{ languageCodesSet }}',
'{{ inputConfig }}',
'{{ displayName }}'
;

UPDATE example

Updates a glossaries resource.

/*+ update */
UPDATE google.translate.glossaries
SET
name = '{{ name }}',
languagePair = '{{ languagePair }}',
languageCodesSet = '{{ languageCodesSet }}',
inputConfig = '{{ inputConfig }}',
displayName = '{{ displayName }}'
WHERE
glossariesId = '{{ glossariesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified glossaries resource.

/*+ delete */
DELETE FROM google.translate.glossaries
WHERE glossariesId = '{{ glossariesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';