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

Request for updating schema registry or subject mode.

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

## Namespace

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

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Required. The resource name of the mode. The format is \* \* projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/mode/{subject}: mode for a schema registry, or \* \* projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/mode/{subject}: mode for a specific subject in a specific context |
| `↳ mode` | `int` Required. The mode type. |

### getName

Required. The resource name of the mode. The format is

- projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/mode/{subject}: mode for a schema registry, or
- projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/mode/{subject}: mode for a specific subject in a specific context

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

### setName

Required. The resource name of the mode. The format is

- projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/mode/{subject}: mode for a schema registry, or
- projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/mode/{subject}: mode for a specific subject in a specific context

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

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

### getMode

Required. The mode type.

| **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.

| **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` |   |

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. The resource name of the mode. The format is - projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/mode/{subject}: mode for a schema registry, or - projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/mode/{subject}: mode for a specific subject in a specific context Please see ManagedSchemaRegistryClient::schemaModeName() for help formatting this field. |
| `mode` | `int` Required. The mode type. For allowed values, use constants defined on [SchemaMode\\ModeType](https://docs.cloud.google.com/php/docs/reference/cloud-managedkafka-schemaregistry/latest/V1.SchemaMode.ModeType) |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-managedkafka-schemaregistry/latest/V1.UpdateSchemaModeRequest` |   |