# Google Cloud Discovery Engine V1 Client - Class Schema (1.11.1)

1.11.1 (latest) 1.11.0 1.10.1 1.9.1 1.8.0 1.7.0 1.6.1 1.5.1 1.4.0 1.3.3 1.2.0 1.1.0 1.0.0 0.11.3 0.8.0 0.7.1 0.6.0 0.5.0 0.4.0 0.3.0 0.2.0 0.1.1 Reference documentation and code samples for the Google Cloud Discovery Engine V1 Client class Schema.

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

Generated from protobuf message `google.cloud.discoveryengine.v1.Schema`

## Namespace

Google \\ Cloud \\ DiscoveryEngine \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ struct_schema` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Struct` The structured representation of the schema. |
| `↳ json_schema` | `string` The JSON representation of the schema. |
| `↳ 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. |

### getStructSchema

The structured representation of the schema.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Struct|null` |   |

### hasStructSchema

### setStructSchema

The structured representation of the schema.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Struct` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getJsonSchema

The JSON representation of the schema.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### hasJsonSchema

### setJsonSchema

The JSON representation of the schema.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getName

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.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setName

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.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSchema

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |