# Cloud IoT v1 API - Class CreateDeviceRequest (2.2.0)

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

- [2.2.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.CreateDeviceRequest)
- [2.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/2.1.0/Google.Cloud.Iot.V1.CreateDeviceRequest)
- [2.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/2.0.0/Google.Cloud.Iot.V1.CreateDeviceRequest)
- [1.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/1.2.0/Google.Cloud.Iot.V1.CreateDeviceRequest)
- [1.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/1.1.0/Google.Cloud.Iot.V1.CreateDeviceRequest)
- [1.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/1.0.0/Google.Cloud.Iot.V1.CreateDeviceRequest)

    public sealed class CreateDeviceRequest : IMessage<CreateDeviceRequest>, IEquatable<CreateDeviceRequest>, IDeepCloneable<CreateDeviceRequest>, IBufferMessage, IMessage

Reference documentation and code samples for the Cloud IoT v1 API class CreateDeviceRequest.

Request for `CreateDevice`.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> CreateDeviceRequest

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[CreateDeviceRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.CreateDeviceRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[CreateDeviceRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.CreateDeviceRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[CreateDeviceRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.CreateDeviceRequest), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Iot.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1)

## Assembly

Google.Cloud.Iot.V1.dll

## Constructors

### CreateDeviceRequest()

    public CreateDeviceRequest()

### CreateDeviceRequest(CreateDeviceRequest)

    public CreateDeviceRequest(CreateDeviceRequest other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.CreateDeviceRequest` |

## Properties

### Device

    public Device Device { get; set; }

Required. The device registration details. The field `name` must be empty. The server
generates `name` from the device registry `id` and the
`parent` field.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device` |   |

### Parent

    public string Parent { get; set; }

Required. The name of the device registry where this device should be created.
For example,
`projects/example-project/locations/us-central1/registries/my-registry`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### ParentAsRegistryName

    public RegistryName ParentAsRegistryName { get; set; }

[RegistryName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName)-typed view over the [Parent](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.CreateDeviceRequest#Google_Cloud_Iot_V1_CreateDeviceRequest_Parent) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName` |   |