glossaries
Creates, updates, deletes, gets or lists a glossaries
resource.
Overview
Name | glossaries |
Type | Resource |
Id | google.translate.glossaries |
Fields
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 | Output only. When the glossary creation was finished. |
entryCount | integer | Output only. The number of entries defined in the glossary. |
inputConfig | object | Input configuration for glossaries. |
languageCodesSet | object | Used with equivalent term set glossaries. |
languagePair | object | Used with unidirectional glossaries. |
submitTime | string | Output only. When CreateGlossary was called. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
projects_locations_glossaries_get | SELECT | glossariesId, locationsId, projectsId | Gets a glossary. Returns NOT_FOUND, if the glossary doesn't exist. |
projects_locations_glossaries_list | SELECT | locationsId, projectsId | Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't exist. |
projects_locations_glossaries_create | INSERT | locationsId, projectsId | Creates a glossary and returns the long-running operation. Returns NOT_FOUND, if the project doesn't exist. |
projects_locations_glossaries_delete | DELETE | glossariesId, locationsId, projectsId | Deletes 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_patch | UPDATE | glossariesId, locationsId, projectsId | Updates 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.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.translate.glossaries (
locationsId,
projectsId,
name,
languagePair,
languageCodesSet,
inputConfig,
displayName
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ languagePair }}',
'{{ languageCodesSet }}',
'{{ inputConfig }}',
'{{ displayName }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: languagePair
value:
- name: sourceLanguageCode
value: string
- name: targetLanguageCode
value: string
- name: languageCodesSet
value:
- name: languageCodes
value:
- string
- name: inputConfig
value:
- name: gcsSource
value:
- name: inputUri
value: string
- name: entryCount
value: integer
- name: submitTime
value: string
- name: endTime
value: string
- name: displayName
value: string
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 }}';