# Google Cloud Vision Ai V1 Client - Class DataSchema (0.3.0)

0.3.0 (latest) 0.2.0 0.1.0 Reference documentation and code samples for the Google Cloud Vision Ai V1 Client class DataSchema.

Data schema indicates how the user specified annotation is interpreted in the
system.

Generated from protobuf message `google.cloud.visionai.v1.DataSchema`

## Namespace

Google \\ Cloud \\ VisionAI \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Resource name of the data schema in the form of: `projects/{project_number}/locations/{location}/corpora/{corpus}/dataSchemas/{data_schema}` where {data_schema} part should be the same as the `key` field below. |
| `↳ key` | `string` Required. The key of this data schema. This key should be matching the key of user specified annotation and unique inside corpus. This value can be up to 63 characters, and valid characters are /\[a-z\]\[0-9\]-/. The first character must be a letter, the last could be a letter or a number. |
| `↳ schema_details` | `https://docs.cloud.google.com/php/docs/reference/cloud-visionai/latest/V1.DataSchemaDetails` The schema details mapping to the key. |

### getName

Resource name of the data schema in the form of:
`projects/{project_number}/locations/{location}/corpora/{corpus}/dataSchemas/{data_schema}`
where {data_schema} part should be the same as the `key` field below.

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

### setName

Resource name of the data schema in the form of:
`projects/{project_number}/locations/{location}/corpora/{corpus}/dataSchemas/{data_schema}`
where {data_schema} part should be the same as the `key` field below.

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

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

### getKey

Required. The key of this data schema. This key should be matching the key
of user specified annotation and unique inside corpus. This value can be up
to 63 characters, and valid characters are /\[a-z\]\[0-9\]-/. The first
character must be a letter, the last could be a letter or a number.

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

### setKey

Required. The key of this data schema. This key should be matching the key
of user specified annotation and unique inside corpus. This value can be up
to 63 characters, and valid characters are /\[a-z\]\[0-9\]-/. The first
character must be a letter, the last could be a letter or a number.

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

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

### getSchemaDetails

The schema details mapping to the key.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-visionai/latest/V1.DataSchemaDetails|null` |   |

### hasSchemaDetails

### clearSchemaDetails

### setSchemaDetails

The schema details mapping to the key.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-visionai/latest/V1.DataSchemaDetails` |

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