- [Resource: Schema](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.dataStores.schemas#Schema)
  - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.dataStores.schemas#Schema.SCHEMA_REPRESENTATION)
- [Methods](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.dataStores.schemas#METHODS_SUMMARY)

## Resource: Schema

Defines the structure and layout of a type of document data.

| JSON representation |
|---|
| ``` { "name": string, // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "structSchema": { object }, "jsonSchema": string // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| `name` | `string` Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. |
| Schema representation. One of `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.dataStores.schemas#Schema.FIELDS.struct_schema` or `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.dataStores.schemas#Schema.FIELDS.json_schema` should be provided otherwise an `INVALID_ARGUMENT` error is thrown. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `structSchema` | ``object (`https://protobuf.dev/reference/protobuf/google.protobuf#struct` format)`` The structured representation of the schema. |
| `jsonSchema` | `string` The JSON representation of the schema. |
| End of mutually exclusive fields. ||

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.dataStores.schemas/create` | Creates a `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.dataStores.schemas#Schema`. |
| ### `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.dataStores.schemas/delete` | Deletes a `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.dataStores.schemas#Schema`. |
| ### `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.dataStores.schemas/get` | Gets a `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.dataStores.schemas#Schema`. |
| ### `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.dataStores.schemas/list` | Gets a list of `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.dataStores.schemas#Schema`s. |
| ### `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.dataStores.schemas/patch` | Updates a `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.collections.dataStores.schemas#Schema`. |