# Google Cloud Managed Kafka Schema Registry V1 Client - Class SchemaVersion (0.3.0)

0.3.0 (latest) 0.2.2 0.1.1 Reference documentation and code samples for the Google Cloud Managed Kafka Schema Registry V1 Client class SchemaVersion.

Version of a schema.

Generated from protobuf message `google.cloud.managedkafka.schemaregistry.v1.SchemaVersion`

## Namespace

Google \\ Cloud \\ ManagedKafka \\ SchemaRegistry \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ subject` | `string` Required. The subject of the version. |
| `↳ version_id` | `int` Required. The version ID |
| `↳ schema_id` | `int` Required. The schema ID. |
| `↳ schema_type` | `int` Optional. The schema type of the schema. |
| `↳ schema_payload` | `string` Required. The schema payload. |
| `↳ references` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-managedkafka-schemaregistry/latest/V1.Schema.SchemaReference>` Optional. The schema references used by the schema. |

### getSubject

Required. The subject of the version.

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

### setSubject

Required. The subject of the version.

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

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

### getVersionId

Required. The version ID

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setVersionId

Required. The version ID

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

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

### getSchemaId

Required. The schema ID.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setSchemaId

Required. The schema ID.

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

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

### getSchemaType

Optional. The schema type of the schema.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [SchemaType](https://docs.cloud.google.com/php/docs/reference/cloud-managedkafka-schemaregistry/latest/V1.Schema.SchemaType). |

### setSchemaType

Optional. The schema type of the schema.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [SchemaType](https://docs.cloud.google.com/php/docs/reference/cloud-managedkafka-schemaregistry/latest/V1.Schema.SchemaType). |

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

### getSchemaPayload

Required. The schema payload.

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

### setSchemaPayload

Required. The schema payload.

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

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

### getReferences

Optional. The schema references used by the schema.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-managedkafka-schemaregistry/latest/V1.Schema.SchemaReference>` |   |

### setReferences

Optional. The schema references used by the schema.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-managedkafka-schemaregistry/latest/V1.Schema.SchemaReference>` |

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