schemas
Creates, updates, deletes, gets or lists a schemas
resource.
Overview
Name | schemas |
Type | Resource |
Id | google.discoveryengine.schemas |
Fields
The following fields are returned by SELECT
queries:
- projects_locations_collections_data_stores_schemas_get
- projects_locations_collections_data_stores_schemas_list
- projects_locations_data_stores_schemas_get
- projects_locations_data_stores_schemas_list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Immutable. The full resource name of the schema, in the format of projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema} . This field must be a UTF-8 encoded string with a length limit of 1024 characters. |
jsonSchema | string | The JSON representation of the schema. |
structSchema | object | The structured representation of the schema. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Immutable. The full resource name of the schema, in the format of projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema} . This field must be a UTF-8 encoded string with a length limit of 1024 characters. |
jsonSchema | string | The JSON representation of the schema. |
structSchema | object | The structured representation of the schema. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Immutable. The full resource name of the schema, in the format of projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema} . This field must be a UTF-8 encoded string with a length limit of 1024 characters. |
jsonSchema | string | The JSON representation of the schema. |
structSchema | object | The structured representation of the schema. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Immutable. The full resource name of the schema, in the format of projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema} . This field must be a UTF-8 encoded string with a length limit of 1024 characters. |
jsonSchema | string | The JSON representation of the schema. |
structSchema | object | The structured representation of the schema. |
Methods
The following methods are available for this resource:
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 |
---|---|---|
collectionsId | string | |
dataStoresId | string | |
locationsId | string | |
projectsId | string | |
schemasId | string | |
allowMissing | boolean | |
pageSize | integer (int32) | |
pageToken | string | |
schemaId | string |
SELECT
examples
- projects_locations_collections_data_stores_schemas_get
- projects_locations_collections_data_stores_schemas_list
- projects_locations_data_stores_schemas_get
- projects_locations_data_stores_schemas_list
Gets a Schema.
SELECT
name,
jsonSchema,
structSchema
FROM google.discoveryengine.schemas
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND collectionsId = '{{ collectionsId }}' -- required
AND dataStoresId = '{{ dataStoresId }}' -- required
AND schemasId = '{{ schemasId }}' -- required;
Gets a list of Schemas.
SELECT
name,
jsonSchema,
structSchema
FROM google.discoveryengine.schemas
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND collectionsId = '{{ collectionsId }}' -- required
AND dataStoresId = '{{ dataStoresId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
Gets a Schema.
SELECT
name,
jsonSchema,
structSchema
FROM google.discoveryengine.schemas
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND dataStoresId = '{{ dataStoresId }}' -- required
AND schemasId = '{{ schemasId }}' -- required;
Gets a list of Schemas.
SELECT
name,
jsonSchema,
structSchema
FROM google.discoveryengine.schemas
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND dataStoresId = '{{ dataStoresId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
INSERT
examples
- projects_locations_collections_data_stores_schemas_create
- projects_locations_data_stores_schemas_create
- Manifest
Creates a Schema.
INSERT INTO google.discoveryengine.schemas (
data__structSchema,
data__jsonSchema,
data__name,
projectsId,
locationsId,
collectionsId,
dataStoresId,
schemaId
)
SELECT
'{{ structSchema }}',
'{{ jsonSchema }}',
'{{ name }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ collectionsId }}',
'{{ dataStoresId }}',
'{{ schemaId }}'
RETURNING
name,
done,
error,
metadata,
response
;
Creates a Schema.
INSERT INTO google.discoveryengine.schemas (
data__structSchema,
data__jsonSchema,
data__name,
projectsId,
locationsId,
dataStoresId,
schemaId
)
SELECT
'{{ structSchema }}',
'{{ jsonSchema }}',
'{{ name }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ dataStoresId }}',
'{{ schemaId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: schemas
props:
- name: projectsId
value: string
description: Required parameter for the schemas resource.
- name: locationsId
value: string
description: Required parameter for the schemas resource.
- name: collectionsId
value: string
description: Required parameter for the schemas resource.
- name: dataStoresId
value: string
description: Required parameter for the schemas resource.
- name: structSchema
value: object
description: >
The structured representation of the schema.
- name: jsonSchema
value: string
description: >
The JSON representation of the schema.
- name: name
value: string
description: >
Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.
- name: schemaId
value: string
UPDATE
examples
- projects_locations_collections_data_stores_schemas_patch
- projects_locations_data_stores_schemas_patch
Updates a Schema.
UPDATE google.discoveryengine.schemas
SET
data__structSchema = '{{ structSchema }}',
data__jsonSchema = '{{ jsonSchema }}',
data__name = '{{ name }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND collectionsId = '{{ collectionsId }}' --required
AND dataStoresId = '{{ dataStoresId }}' --required
AND schemasId = '{{ schemasId }}' --required
AND allowMissing = {{ allowMissing}}
RETURNING
name,
done,
error,
metadata,
response;
Updates a Schema.
UPDATE google.discoveryengine.schemas
SET
data__structSchema = '{{ structSchema }}',
data__jsonSchema = '{{ jsonSchema }}',
data__name = '{{ name }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND dataStoresId = '{{ dataStoresId }}' --required
AND schemasId = '{{ schemasId }}' --required
AND allowMissing = {{ allowMissing}}
RETURNING
name,
done,
error,
metadata,
response;
DELETE
examples
- projects_locations_collections_data_stores_schemas_delete
- projects_locations_data_stores_schemas_delete
Deletes a Schema.
DELETE FROM google.discoveryengine.schemas
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND collectionsId = '{{ collectionsId }}' --required
AND dataStoresId = '{{ dataStoresId }}' --required
AND schemasId = '{{ schemasId }}' --required;
Deletes a Schema.
DELETE FROM google.discoveryengine.schemas
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND dataStoresId = '{{ dataStoresId }}' --required
AND schemasId = '{{ schemasId }}' --required;