# Google Cloud IoT Core V1 Client - Class CreateDeviceRegistryRequest (1.7.5)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [1.7.5 (latest)](https://docs.cloud.google.com/php/docs/reference/cloud-iot/latest/V1.CreateDeviceRegistryRequest)
- [1.7.4](https://docs.cloud.google.com/php/docs/reference/cloud-iot/1.7.4/V1.CreateDeviceRegistryRequest)
- [1.6.4](https://docs.cloud.google.com/php/docs/reference/cloud-iot/1.6.4/V1.CreateDeviceRegistryRequest)
- [1.5.12](https://docs.cloud.google.com/php/docs/reference/cloud-iot/1.5.12/V1.CreateDeviceRegistryRequest)
Reference documentation and code samples for the Google Cloud IoT Core V1 Client class CreateDeviceRegistryRequest.

Request for `CreateDeviceRegistry`.

Generated from protobuf message `google.cloud.iot.v1.CreateDeviceRegistryRequest`

## Namespace

Google \\ Cloud \\ Iot \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ parent` | `string` Required. The project and cloud region where this device registry must be created. For example, `projects/example-project/locations/us-central1`. |
| `↳ device_registry` | `https://docs.cloud.google.com/php/docs/reference/cloud-iot/latest/V1.DeviceRegistry` Required. The device registry. The field `name` must be empty. The server will generate that field from the device registry `id` provided and the `parent` field. |

### getParent

Required. The project and cloud region where this device registry must be created.

For example, `projects/example-project/locations/us-central1`.

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

### setParent

Required. The project and cloud region where this device registry must be created.

For example, `projects/example-project/locations/us-central1`.

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

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

### getDeviceRegistry

Required. The device registry. The field `name` must be empty. The server will
generate that field from the device registry `id` provided and the
`parent` field.

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

### hasDeviceRegistry

### clearDeviceRegistry

### setDeviceRegistry

Required. The device registry. The field `name` must be empty. The server will
generate that field from the device registry `id` provided and the
`parent` field.

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

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

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The project and cloud region where this device registry must be created. For example, `projects/example-project/locations/us-central1`. Please see Google\\Cloud\\Iot\\V1\\DeviceManagerClient::locationName() for help formatting this field. |
| `deviceRegistry` | `https://docs.cloud.google.com/php/docs/reference/cloud-iot/latest/V1.DeviceRegistry` Required. The device registry. The field `name` must be empty. The server will generate that field from the device registry `id` provided and the `parent` field. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-iot/latest/V1.CreateDeviceRegistryRequest` |   |