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

SchemaMode represents the mode of a schema registry or a specific subject.

Four modes are supported:

- NONE: deprecated. This was the default mode for a subject, but now the default is unset (which means use the global schema registry setting)
- READONLY: The schema registry is in read-only mode.
- READWRITE: The schema registry is in read-write mode, which allows limited write operations on the schema.
- IMPORT: The schema registry is in import mode, which allows more editing operations on the schema for data importing purposes.

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

## Namespace

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

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ mode` | `int` Required. The mode type of a schema registry (READWRITE by default) or of a subject (unset by default, which means use the global schema registry setting). |

### getMode

Required. The mode type of a schema registry (READWRITE by default) or of a
subject (unset by default, which means use the global schema registry
setting).

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

### setMode

Required. The mode type of a schema registry (READWRITE by default) or of a
subject (unset by default, which means use the global schema registry
setting).

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

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