# Google Cloud Managed Kafka Schema Registry V1 Client - Class SchemaSubject (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 SchemaSubject.

Subject defines the evolution scope of schemas as a holder of schema
versions.

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

## Namespace

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

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` The name of the subject. Structured like: `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}` or `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}` Subject name {subject} can contain the following: \* \* Up to 255 UTF-8 bytes. \* \* Allowed characters: letters (uppercase or lowercase), numbers, and the following special characters: `.`, `-`, `_`, `+`, `%`, and `~`. |
| `↳ versions` | `string[]` The versions of the subject. |

### getName

The name of the subject. Structured like:
`projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}`
or
`projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}`
Subject name {subject} can contain the following:

- Up to 255 UTF-8 bytes.

- Allowed characters: letters (uppercase or lowercase), numbers, and the
  following special characters: `.`, `-`, `_`, `+`, `%`, and `~`.

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

### setName

The name of the subject. Structured like:
`projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}`
or
`projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}`
Subject name {subject} can contain the following:

- Up to 255 UTF-8 bytes.

- Allowed characters: letters (uppercase or lowercase), numbers, and the
  following special characters: `.`, `-`, `_`, `+`, `%`, and `~`.

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

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

### getVersions

The versions of the subject.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setVersions

The versions of the subject.

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

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