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.
Required. The name of the device registry where this device should be created.
For example,
projects/example-project/locations/us-central1/registries/my-registry.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eThis document provides reference documentation for the \u003ccode\u003eCreateDeviceRequest\u003c/code\u003e class within the Google Cloud IoT v1 API for .NET.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eCreateDeviceRequest\u003c/code\u003e is used to request the creation of a new device and includes the device registration details, which are required.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of the \u003ccode\u003eCreateDeviceRequest\u003c/code\u003e is 2.2.0, with several earlier versions (down to 1.0.0) also listed.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eCreateDeviceRequest\u003c/code\u003e implements \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e interfaces, and inherits from \u003ccode\u003eobject\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe class requires two properties: \u003ccode\u003eDevice\u003c/code\u003e containing the registration details and \u003ccode\u003eParent\u003c/code\u003e, the name of the device registry where the device will be created.\u003c/p\u003e\n"]]],[],null,["# Cloud IoT v1 API - Class CreateDeviceRequest (2.2.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.2.0 (latest)](/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.CreateDeviceRequest)\n- [2.1.0](/dotnet/docs/reference/Google.Cloud.Iot.V1/2.1.0/Google.Cloud.Iot.V1.CreateDeviceRequest)\n- [2.0.0](/dotnet/docs/reference/Google.Cloud.Iot.V1/2.0.0/Google.Cloud.Iot.V1.CreateDeviceRequest)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.Iot.V1/1.2.0/Google.Cloud.Iot.V1.CreateDeviceRequest)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.Iot.V1/1.1.0/Google.Cloud.Iot.V1.CreateDeviceRequest)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.Iot.V1/1.0.0/Google.Cloud.Iot.V1.CreateDeviceRequest) \n\n public sealed class CreateDeviceRequest : IMessage\u003cCreateDeviceRequest\u003e, IEquatable\u003cCreateDeviceRequest\u003e, IDeepCloneable\u003cCreateDeviceRequest\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Cloud IoT v1 API class CreateDeviceRequest.\n\nRequest for `CreateDevice`. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e CreateDeviceRequest \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[CreateDeviceRequest](/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.CreateDeviceRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[CreateDeviceRequest](/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](/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) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Iot.V1](/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.Iot.V1.dll\n\nConstructors\n------------\n\n### CreateDeviceRequest()\n\n public CreateDeviceRequest()\n\n### CreateDeviceRequest(CreateDeviceRequest)\n\n public CreateDeviceRequest(CreateDeviceRequest other)\n\nProperties\n----------\n\n### Device\n\n public Device Device { get; set; }\n\nRequired. The device registration details. The field `name` must be empty. The server\ngenerates `name` from the device registry `id` and the\n`parent` field.\n\n### Parent\n\n public string Parent { get; set; }\n\nRequired. The name of the device registry where this device should be created.\nFor example,\n`projects/example-project/locations/us-central1/registries/my-registry`.\n\n### ParentAsRegistryName\n\n public RegistryName ParentAsRegistryName { get; set; }\n\n[RegistryName](/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName)-typed view over the [Parent](/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.CreateDeviceRequest#Google_Cloud_Iot_V1_CreateDeviceRequest_Parent) resource name property."]]