# Cloud IoT v1 API - Class DeviceManagerClient (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.DeviceManagerClient)
- [2.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/2.1.0/Google.Cloud.Iot.V1.DeviceManagerClient)
- [2.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/2.0.0/Google.Cloud.Iot.V1.DeviceManagerClient)
- [1.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/1.2.0/Google.Cloud.Iot.V1.DeviceManagerClient)
- [1.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/1.1.0/Google.Cloud.Iot.V1.DeviceManagerClient)
- [1.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/1.0.0/Google.Cloud.Iot.V1.DeviceManagerClient)

    public abstract class DeviceManagerClient

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

DeviceManager client wrapper, for convenient use.

## Inheritance

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

## 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.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Derived Types

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

## 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

## Remarks

Internet of Things (IoT) service. Securely connect and manage IoT devices.

## Properties

### DefaultEndpoint

    public static string DefaultEndpoint { get; }

The default endpoint for the DeviceManager service, which is a host of "cloudiot.googleapis.com" and a port
of 443.

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

### DefaultScopes

    public static IReadOnlyList<string> DefaultScopes { get; }

The default DeviceManager scopes.

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

**Remarks** The default DeviceManager scopes are:

- <https://www.googleapis.com/auth/cloud-platform>
- <https://www.googleapis.com/auth/cloudiot>

<br />

### GrpcClient

    public virtual DeviceManager.DeviceManagerClient GrpcClient { get; }

The underlying gRPC DeviceManager client

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

### ServiceMetadata

    public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/ServiceMetadata.cs` |   |

## Methods

### BindDeviceToGateway(BindDeviceToGatewayRequest, CallSettings)

    public virtual BindDeviceToGatewayResponse BindDeviceToGateway(BindDeviceToGatewayRequest request, CallSettings callSettings = null)

Associates the device with the gateway.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.BindDeviceToGatewayRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.BindDeviceToGatewayResponse` | The RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    BindDeviceToGatewayRequest request = new BindDeviceToGatewayRequest
    {
        ParentAsRegistryName = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]"),
        GatewayId = "",
        DeviceId = "",
    };
    // Make the request
    BindDeviceToGatewayResponse response = deviceManagerClient.BindDeviceToGateway(request);

### BindDeviceToGateway(RegistryName, string, string, CallSettings)

    public virtual BindDeviceToGatewayResponse BindDeviceToGateway(RegistryName parent, string gatewayId, string deviceId, CallSettings callSettings = null)

Associates the device with the gateway.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName` Required. The name of the registry. For example, `projects/example-project/locations/us-central1/registries/my-registry`. |
| `gatewayId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The value of `gateway_id` can be either the device numeric ID or the user-defined device identifier. |
| `deviceId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The device to associate with the specified gateway. The value of `device_id` can be either the device numeric ID or the user-defined device identifier. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.BindDeviceToGatewayResponse` | The RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    RegistryName parent = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]");
    string gatewayId = "";
    string deviceId = "";
    // Make the request
    BindDeviceToGatewayResponse response = deviceManagerClient.BindDeviceToGateway(parent, gatewayId, deviceId);

### BindDeviceToGateway(string, string, string, CallSettings)

    public virtual BindDeviceToGatewayResponse BindDeviceToGateway(string parent, string gatewayId, string deviceId, CallSettings callSettings = null)

Associates the device with the gateway.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the registry. For example, `projects/example-project/locations/us-central1/registries/my-registry`. |
| `gatewayId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The value of `gateway_id` can be either the device numeric ID or the user-defined device identifier. |
| `deviceId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The device to associate with the specified gateway. The value of `device_id` can be either the device numeric ID or the user-defined device identifier. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.BindDeviceToGatewayResponse` | The RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]";
    string gatewayId = "";
    string deviceId = "";
    // Make the request
    BindDeviceToGatewayResponse response = deviceManagerClient.BindDeviceToGateway(parent, gatewayId, deviceId);

### BindDeviceToGatewayAsync(BindDeviceToGatewayRequest, CallSettings)

    public virtual Task<BindDeviceToGatewayResponse> BindDeviceToGatewayAsync(BindDeviceToGatewayRequest request, CallSettings callSettings = null)

Associates the device with the gateway.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.BindDeviceToGatewayRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.BindDeviceToGatewayResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    BindDeviceToGatewayRequest request = new BindDeviceToGatewayRequest
    {
        ParentAsRegistryName = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]"),
        GatewayId = "",
        DeviceId = "",
    };
    // Make the request
    BindDeviceToGatewayResponse response = await deviceManagerClient.BindDeviceToGatewayAsync(request);

### BindDeviceToGatewayAsync(BindDeviceToGatewayRequest, CancellationToken)

    public virtual Task<BindDeviceToGatewayResponse> BindDeviceToGatewayAsync(BindDeviceToGatewayRequest request, CancellationToken cancellationToken)

Associates the device with the gateway.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.BindDeviceToGatewayRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.BindDeviceToGatewayResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    BindDeviceToGatewayRequest request = new BindDeviceToGatewayRequest
    {
        ParentAsRegistryName = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]"),
        GatewayId = "",
        DeviceId = "",
    };
    // Make the request
    BindDeviceToGatewayResponse response = await deviceManagerClient.BindDeviceToGatewayAsync(request);

### BindDeviceToGatewayAsync(RegistryName, string, string, CallSettings)

    public virtual Task<BindDeviceToGatewayResponse> BindDeviceToGatewayAsync(RegistryName parent, string gatewayId, string deviceId, CallSettings callSettings = null)

Associates the device with the gateway.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName` Required. The name of the registry. For example, `projects/example-project/locations/us-central1/registries/my-registry`. |
| `gatewayId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The value of `gateway_id` can be either the device numeric ID or the user-defined device identifier. |
| `deviceId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The device to associate with the specified gateway. The value of `device_id` can be either the device numeric ID or the user-defined device identifier. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.BindDeviceToGatewayResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    RegistryName parent = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]");
    string gatewayId = "";
    string deviceId = "";
    // Make the request
    BindDeviceToGatewayResponse response = await deviceManagerClient.BindDeviceToGatewayAsync(parent, gatewayId, deviceId);

### BindDeviceToGatewayAsync(RegistryName, string, string, CancellationToken)

    public virtual Task<BindDeviceToGatewayResponse> BindDeviceToGatewayAsync(RegistryName parent, string gatewayId, string deviceId, CancellationToken cancellationToken)

Associates the device with the gateway.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName` Required. The name of the registry. For example, `projects/example-project/locations/us-central1/registries/my-registry`. |
| `gatewayId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The value of `gateway_id` can be either the device numeric ID or the user-defined device identifier. |
| `deviceId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The device to associate with the specified gateway. The value of `device_id` can be either the device numeric ID or the user-defined device identifier. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.BindDeviceToGatewayResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    RegistryName parent = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]");
    string gatewayId = "";
    string deviceId = "";
    // Make the request
    BindDeviceToGatewayResponse response = await deviceManagerClient.BindDeviceToGatewayAsync(parent, gatewayId, deviceId);

### BindDeviceToGatewayAsync(string, string, string, CallSettings)

    public virtual Task<BindDeviceToGatewayResponse> BindDeviceToGatewayAsync(string parent, string gatewayId, string deviceId, CallSettings callSettings = null)

Associates the device with the gateway.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the registry. For example, `projects/example-project/locations/us-central1/registries/my-registry`. |
| `gatewayId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The value of `gateway_id` can be either the device numeric ID or the user-defined device identifier. |
| `deviceId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The device to associate with the specified gateway. The value of `device_id` can be either the device numeric ID or the user-defined device identifier. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.BindDeviceToGatewayResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]";
    string gatewayId = "";
    string deviceId = "";
    // Make the request
    BindDeviceToGatewayResponse response = await deviceManagerClient.BindDeviceToGatewayAsync(parent, gatewayId, deviceId);

### BindDeviceToGatewayAsync(string, string, string, CancellationToken)

    public virtual Task<BindDeviceToGatewayResponse> BindDeviceToGatewayAsync(string parent, string gatewayId, string deviceId, CancellationToken cancellationToken)

Associates the device with the gateway.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the registry. For example, `projects/example-project/locations/us-central1/registries/my-registry`. |
| `gatewayId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The value of `gateway_id` can be either the device numeric ID or the user-defined device identifier. |
| `deviceId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The device to associate with the specified gateway. The value of `device_id` can be either the device numeric ID or the user-defined device identifier. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.BindDeviceToGatewayResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]";
    string gatewayId = "";
    string deviceId = "";
    // Make the request
    BindDeviceToGatewayResponse response = await deviceManagerClient.BindDeviceToGatewayAsync(parent, gatewayId, deviceId);

### Create()

    public static DeviceManagerClient Create()

Synchronously creates a [DeviceManagerClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceManagerClient) using the default credentials, endpoint and
settings. To specify custom credentials or other settings, use [DeviceManagerClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceManagerClientBuilder).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceManagerClient` | The created [DeviceManagerClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceManagerClient). |

### CreateAsync(CancellationToken)

    public static Task<DeviceManagerClient> CreateAsync(CancellationToken cancellationToken = default)

Asynchronously creates a [DeviceManagerClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceManagerClient) using the default credentials, endpoint and
settings. To specify custom credentials or other settings, use [DeviceManagerClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceManagerClientBuilder).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` The [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use while creating the client. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceManagerClient` | The task representing the created [DeviceManagerClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceManagerClient). |

### CreateDevice(CreateDeviceRequest, CallSettings)

    public virtual Device CreateDevice(CreateDeviceRequest request, CallSettings callSettings = null)

Creates a device in a device registry.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.CreateDeviceRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device` | The RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    CreateDeviceRequest request = new CreateDeviceRequest
    {
        ParentAsRegistryName = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]"),
        Device = new Device(),
    };
    // Make the request
    Device response = deviceManagerClient.CreateDevice(request);

### CreateDevice(RegistryName, Device, CallSettings)

    public virtual Device CreateDevice(RegistryName parent, Device device, CallSettings callSettings = null)

Creates a device in a device registry.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName` Required. The name of the device registry where this device should be created. For example, `projects/example-project/locations/us-central1/registries/my-registry`. |
| `device` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device` Required. The device registration details. The field `name` must be empty. The server generates `name` from the device registry `id` and the `parent` field. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device` | The RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    RegistryName parent = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]");
    Device device = new Device();
    // Make the request
    Device response = deviceManagerClient.CreateDevice(parent, device);

### CreateDevice(string, Device, CallSettings)

    public virtual Device CreateDevice(string parent, Device device, CallSettings callSettings = null)

Creates a device in a device registry.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the device registry where this device should be created. For example, `projects/example-project/locations/us-central1/registries/my-registry`. |
| `device` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device` Required. The device registration details. The field `name` must be empty. The server generates `name` from the device registry `id` and the `parent` field. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device` | The RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]";
    Device device = new Device();
    // Make the request
    Device response = deviceManagerClient.CreateDevice(parent, device);

### CreateDeviceAsync(CreateDeviceRequest, CallSettings)

    public virtual Task<Device> CreateDeviceAsync(CreateDeviceRequest request, CallSettings callSettings = null)

Creates a device in a device registry.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.CreateDeviceRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    CreateDeviceRequest request = new CreateDeviceRequest
    {
        ParentAsRegistryName = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]"),
        Device = new Device(),
    };
    // Make the request
    Device response = await deviceManagerClient.CreateDeviceAsync(request);

### CreateDeviceAsync(CreateDeviceRequest, CancellationToken)

    public virtual Task<Device> CreateDeviceAsync(CreateDeviceRequest request, CancellationToken cancellationToken)

Creates a device in a device registry.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.CreateDeviceRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    CreateDeviceRequest request = new CreateDeviceRequest
    {
        ParentAsRegistryName = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]"),
        Device = new Device(),
    };
    // Make the request
    Device response = await deviceManagerClient.CreateDeviceAsync(request);

### CreateDeviceAsync(RegistryName, Device, CallSettings)

    public virtual Task<Device> CreateDeviceAsync(RegistryName parent, Device device, CallSettings callSettings = null)

Creates a device in a device registry.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName` Required. The name of the device registry where this device should be created. For example, `projects/example-project/locations/us-central1/registries/my-registry`. |
| `device` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device` Required. The device registration details. The field `name` must be empty. The server generates `name` from the device registry `id` and the `parent` field. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    RegistryName parent = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]");
    Device device = new Device();
    // Make the request
    Device response = await deviceManagerClient.CreateDeviceAsync(parent, device);

### CreateDeviceAsync(RegistryName, Device, CancellationToken)

    public virtual Task<Device> CreateDeviceAsync(RegistryName parent, Device device, CancellationToken cancellationToken)

Creates a device in a device registry.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName` Required. The name of the device registry where this device should be created. For example, `projects/example-project/locations/us-central1/registries/my-registry`. |
| `device` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device` Required. The device registration details. The field `name` must be empty. The server generates `name` from the device registry `id` and the `parent` field. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    RegistryName parent = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]");
    Device device = new Device();
    // Make the request
    Device response = await deviceManagerClient.CreateDeviceAsync(parent, device);

### CreateDeviceAsync(string, Device, CallSettings)

    public virtual Task<Device> CreateDeviceAsync(string parent, Device device, CallSettings callSettings = null)

Creates a device in a device registry.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the device registry where this device should be created. For example, `projects/example-project/locations/us-central1/registries/my-registry`. |
| `device` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device` Required. The device registration details. The field `name` must be empty. The server generates `name` from the device registry `id` and the `parent` field. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]";
    Device device = new Device();
    // Make the request
    Device response = await deviceManagerClient.CreateDeviceAsync(parent, device);

### CreateDeviceAsync(string, Device, CancellationToken)

    public virtual Task<Device> CreateDeviceAsync(string parent, Device device, CancellationToken cancellationToken)

Creates a device in a device registry.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the device registry where this device should be created. For example, `projects/example-project/locations/us-central1/registries/my-registry`. |
| `device` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device` Required. The device registration details. The field `name` must be empty. The server generates `name` from the device registry `id` and the `parent` field. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]";
    Device device = new Device();
    // Make the request
    Device response = await deviceManagerClient.CreateDeviceAsync(parent, device);

### CreateDeviceRegistry(LocationName, DeviceRegistry, CallSettings)

    public virtual DeviceRegistry CreateDeviceRegistry(LocationName parent, DeviceRegistry deviceRegistry, CallSettings callSettings = null)

Creates a device registry that contains devices.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax/ResourceNames/LocationName.cs` Required. The project and cloud region where this device registry must be created. For example, `projects/example-project/locations/us-central1`. |
| `deviceRegistry` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.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. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceRegistry` | The RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    DeviceRegistry deviceRegistry = new DeviceRegistry();
    // Make the request
    DeviceRegistry response = deviceManagerClient.CreateDeviceRegistry(parent, deviceRegistry);

### CreateDeviceRegistry(CreateDeviceRegistryRequest, CallSettings)

    public virtual DeviceRegistry CreateDeviceRegistry(CreateDeviceRegistryRequest request, CallSettings callSettings = null)

Creates a device registry that contains devices.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.CreateDeviceRegistryRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceRegistry` | The RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    CreateDeviceRegistryRequest request = new CreateDeviceRegistryRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        DeviceRegistry = new DeviceRegistry(),
    };
    // Make the request
    DeviceRegistry response = deviceManagerClient.CreateDeviceRegistry(request);

### CreateDeviceRegistry(string, DeviceRegistry, CallSettings)

    public virtual DeviceRegistry CreateDeviceRegistry(string parent, DeviceRegistry deviceRegistry, CallSettings callSettings = null)

Creates a device registry that contains devices.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The project and cloud region where this device registry must be created. For example, `projects/example-project/locations/us-central1`. |
| `deviceRegistry` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.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. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceRegistry` | The RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    DeviceRegistry deviceRegistry = new DeviceRegistry();
    // Make the request
    DeviceRegistry response = deviceManagerClient.CreateDeviceRegistry(parent, deviceRegistry);

### CreateDeviceRegistryAsync(LocationName, DeviceRegistry, CallSettings)

    public virtual Task<DeviceRegistry> CreateDeviceRegistryAsync(LocationName parent, DeviceRegistry deviceRegistry, CallSettings callSettings = null)

Creates a device registry that contains devices.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax/ResourceNames/LocationName.cs` Required. The project and cloud region where this device registry must be created. For example, `projects/example-project/locations/us-central1`. |
| `deviceRegistry` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.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. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceRegistry` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    DeviceRegistry deviceRegistry = new DeviceRegistry();
    // Make the request
    DeviceRegistry response = await deviceManagerClient.CreateDeviceRegistryAsync(parent, deviceRegistry);

### CreateDeviceRegistryAsync(LocationName, DeviceRegistry, CancellationToken)

    public virtual Task<DeviceRegistry> CreateDeviceRegistryAsync(LocationName parent, DeviceRegistry deviceRegistry, CancellationToken cancellationToken)

Creates a device registry that contains devices.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax/ResourceNames/LocationName.cs` Required. The project and cloud region where this device registry must be created. For example, `projects/example-project/locations/us-central1`. |
| `deviceRegistry` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.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. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceRegistry` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    DeviceRegistry deviceRegistry = new DeviceRegistry();
    // Make the request
    DeviceRegistry response = await deviceManagerClient.CreateDeviceRegistryAsync(parent, deviceRegistry);

### CreateDeviceRegistryAsync(CreateDeviceRegistryRequest, CallSettings)

    public virtual Task<DeviceRegistry> CreateDeviceRegistryAsync(CreateDeviceRegistryRequest request, CallSettings callSettings = null)

Creates a device registry that contains devices.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.CreateDeviceRegistryRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceRegistry` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    CreateDeviceRegistryRequest request = new CreateDeviceRegistryRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        DeviceRegistry = new DeviceRegistry(),
    };
    // Make the request
    DeviceRegistry response = await deviceManagerClient.CreateDeviceRegistryAsync(request);

### CreateDeviceRegistryAsync(CreateDeviceRegistryRequest, CancellationToken)

    public virtual Task<DeviceRegistry> CreateDeviceRegistryAsync(CreateDeviceRegistryRequest request, CancellationToken cancellationToken)

Creates a device registry that contains devices.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.CreateDeviceRegistryRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceRegistry` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    CreateDeviceRegistryRequest request = new CreateDeviceRegistryRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        DeviceRegistry = new DeviceRegistry(),
    };
    // Make the request
    DeviceRegistry response = await deviceManagerClient.CreateDeviceRegistryAsync(request);

### CreateDeviceRegistryAsync(string, DeviceRegistry, CallSettings)

    public virtual Task<DeviceRegistry> CreateDeviceRegistryAsync(string parent, DeviceRegistry deviceRegistry, CallSettings callSettings = null)

Creates a device registry that contains devices.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The project and cloud region where this device registry must be created. For example, `projects/example-project/locations/us-central1`. |
| `deviceRegistry` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.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. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceRegistry` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    DeviceRegistry deviceRegistry = new DeviceRegistry();
    // Make the request
    DeviceRegistry response = await deviceManagerClient.CreateDeviceRegistryAsync(parent, deviceRegistry);

### CreateDeviceRegistryAsync(string, DeviceRegistry, CancellationToken)

    public virtual Task<DeviceRegistry> CreateDeviceRegistryAsync(string parent, DeviceRegistry deviceRegistry, CancellationToken cancellationToken)

Creates a device registry that contains devices.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The project and cloud region where this device registry must be created. For example, `projects/example-project/locations/us-central1`. |
| `deviceRegistry` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.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. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceRegistry` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    DeviceRegistry deviceRegistry = new DeviceRegistry();
    // Make the request
    DeviceRegistry response = await deviceManagerClient.CreateDeviceRegistryAsync(parent, deviceRegistry);

### DeleteDevice(DeleteDeviceRequest, CallSettings)

    public virtual void DeleteDevice(DeleteDeviceRequest request, CallSettings callSettings = null)

Deletes a device.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeleteDeviceRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    DeleteDeviceRequest request = new DeleteDeviceRequest
    {
        DeviceName = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]"),
    };
    // Make the request
    deviceManagerClient.DeleteDevice(request);

### DeleteDevice(DeviceName, CallSettings)

    public virtual void DeleteDevice(DeviceName name, CallSettings callSettings = null)

Deletes a device.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceName` Required. The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    DeviceName name = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
    // Make the request
    deviceManagerClient.DeleteDevice(name);

### DeleteDevice(string, CallSettings)

    public virtual void DeleteDevice(string name, CallSettings callSettings = null)

Deletes a device.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]/devices/[DEVICE]";
    // Make the request
    deviceManagerClient.DeleteDevice(name);

### DeleteDeviceAsync(DeleteDeviceRequest, CallSettings)

    public virtual Task DeleteDeviceAsync(DeleteDeviceRequest request, CallSettings callSettings = null)

Deletes a device.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeleteDeviceRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    DeleteDeviceRequest request = new DeleteDeviceRequest
    {
        DeviceName = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]"),
    };
    // Make the request
    await deviceManagerClient.DeleteDeviceAsync(request);

### DeleteDeviceAsync(DeleteDeviceRequest, CancellationToken)

    public virtual Task DeleteDeviceAsync(DeleteDeviceRequest request, CancellationToken cancellationToken)

Deletes a device.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeleteDeviceRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    DeleteDeviceRequest request = new DeleteDeviceRequest
    {
        DeviceName = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]"),
    };
    // Make the request
    await deviceManagerClient.DeleteDeviceAsync(request);

### DeleteDeviceAsync(DeviceName, CallSettings)

    public virtual Task DeleteDeviceAsync(DeviceName name, CallSettings callSettings = null)

Deletes a device.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceName` Required. The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    DeviceName name = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
    // Make the request
    await deviceManagerClient.DeleteDeviceAsync(name);

### DeleteDeviceAsync(DeviceName, CancellationToken)

    public virtual Task DeleteDeviceAsync(DeviceName name, CancellationToken cancellationToken)

Deletes a device.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceName` Required. The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    DeviceName name = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
    // Make the request
    await deviceManagerClient.DeleteDeviceAsync(name);

### DeleteDeviceAsync(string, CallSettings)

    public virtual Task DeleteDeviceAsync(string name, CallSettings callSettings = null)

Deletes a device.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]/devices/[DEVICE]";
    // Make the request
    await deviceManagerClient.DeleteDeviceAsync(name);

### DeleteDeviceAsync(string, CancellationToken)

    public virtual Task DeleteDeviceAsync(string name, CancellationToken cancellationToken)

Deletes a device.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]/devices/[DEVICE]";
    // Make the request
    await deviceManagerClient.DeleteDeviceAsync(name);

### DeleteDeviceRegistry(DeleteDeviceRegistryRequest, CallSettings)

    public virtual void DeleteDeviceRegistry(DeleteDeviceRegistryRequest request, CallSettings callSettings = null)

Deletes a device registry configuration.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeleteDeviceRegistryRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    DeleteDeviceRegistryRequest request = new DeleteDeviceRegistryRequest
    {
        RegistryName = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]"),
    };
    // Make the request
    deviceManagerClient.DeleteDeviceRegistry(request);

### DeleteDeviceRegistry(RegistryName, CallSettings)

    public virtual void DeleteDeviceRegistry(RegistryName name, CallSettings callSettings = null)

Deletes a device registry configuration.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName` Required. The name of the device registry. For example, `projects/example-project/locations/us-central1/registries/my-registry`. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    RegistryName name = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]");
    // Make the request
    deviceManagerClient.DeleteDeviceRegistry(name);

### DeleteDeviceRegistry(string, CallSettings)

    public virtual void DeleteDeviceRegistry(string name, CallSettings callSettings = null)

Deletes a device registry configuration.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the device registry. For example, `projects/example-project/locations/us-central1/registries/my-registry`. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]";
    // Make the request
    deviceManagerClient.DeleteDeviceRegistry(name);

### DeleteDeviceRegistryAsync(DeleteDeviceRegistryRequest, CallSettings)

    public virtual Task DeleteDeviceRegistryAsync(DeleteDeviceRegistryRequest request, CallSettings callSettings = null)

Deletes a device registry configuration.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeleteDeviceRegistryRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    DeleteDeviceRegistryRequest request = new DeleteDeviceRegistryRequest
    {
        RegistryName = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]"),
    };
    // Make the request
    await deviceManagerClient.DeleteDeviceRegistryAsync(request);

### DeleteDeviceRegistryAsync(DeleteDeviceRegistryRequest, CancellationToken)

    public virtual Task DeleteDeviceRegistryAsync(DeleteDeviceRegistryRequest request, CancellationToken cancellationToken)

Deletes a device registry configuration.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeleteDeviceRegistryRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    DeleteDeviceRegistryRequest request = new DeleteDeviceRegistryRequest
    {
        RegistryName = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]"),
    };
    // Make the request
    await deviceManagerClient.DeleteDeviceRegistryAsync(request);

### DeleteDeviceRegistryAsync(RegistryName, CallSettings)

    public virtual Task DeleteDeviceRegistryAsync(RegistryName name, CallSettings callSettings = null)

Deletes a device registry configuration.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName` Required. The name of the device registry. For example, `projects/example-project/locations/us-central1/registries/my-registry`. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    RegistryName name = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]");
    // Make the request
    await deviceManagerClient.DeleteDeviceRegistryAsync(name);

### DeleteDeviceRegistryAsync(RegistryName, CancellationToken)

    public virtual Task DeleteDeviceRegistryAsync(RegistryName name, CancellationToken cancellationToken)

Deletes a device registry configuration.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName` Required. The name of the device registry. For example, `projects/example-project/locations/us-central1/registries/my-registry`. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    RegistryName name = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]");
    // Make the request
    await deviceManagerClient.DeleteDeviceRegistryAsync(name);

### DeleteDeviceRegistryAsync(string, CallSettings)

    public virtual Task DeleteDeviceRegistryAsync(string name, CallSettings callSettings = null)

Deletes a device registry configuration.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the device registry. For example, `projects/example-project/locations/us-central1/registries/my-registry`. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]";
    // Make the request
    await deviceManagerClient.DeleteDeviceRegistryAsync(name);

### DeleteDeviceRegistryAsync(string, CancellationToken)

    public virtual Task DeleteDeviceRegistryAsync(string name, CancellationToken cancellationToken)

Deletes a device registry configuration.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the device registry. For example, `projects/example-project/locations/us-central1/registries/my-registry`. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]";
    // Make the request
    await deviceManagerClient.DeleteDeviceRegistryAsync(name);

### GetDevice(DeviceName, CallSettings)

    public virtual Device GetDevice(DeviceName name, CallSettings callSettings = null)

Gets details about a device.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceName` Required. The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device` | The RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    DeviceName name = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
    // Make the request
    Device response = deviceManagerClient.GetDevice(name);

### GetDevice(GetDeviceRequest, CallSettings)

    public virtual Device GetDevice(GetDeviceRequest request, CallSettings callSettings = null)

Gets details about a device.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.GetDeviceRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device` | The RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    GetDeviceRequest request = new GetDeviceRequest
    {
        DeviceName = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]"),
        FieldMask = new FieldMask(),
    };
    // Make the request
    Device response = deviceManagerClient.GetDevice(request);

### GetDevice(string, CallSettings)

    public virtual Device GetDevice(string name, CallSettings callSettings = null)

Gets details about a device.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device` | The RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]/devices/[DEVICE]";
    // Make the request
    Device response = deviceManagerClient.GetDevice(name);

### GetDeviceAsync(DeviceName, CallSettings)

    public virtual Task<Device> GetDeviceAsync(DeviceName name, CallSettings callSettings = null)

Gets details about a device.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceName` Required. The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    DeviceName name = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
    // Make the request
    Device response = await deviceManagerClient.GetDeviceAsync(name);

### GetDeviceAsync(DeviceName, CancellationToken)

    public virtual Task<Device> GetDeviceAsync(DeviceName name, CancellationToken cancellationToken)

Gets details about a device.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceName` Required. The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    DeviceName name = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
    // Make the request
    Device response = await deviceManagerClient.GetDeviceAsync(name);

### GetDeviceAsync(GetDeviceRequest, CallSettings)

    public virtual Task<Device> GetDeviceAsync(GetDeviceRequest request, CallSettings callSettings = null)

Gets details about a device.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.GetDeviceRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    GetDeviceRequest request = new GetDeviceRequest
    {
        DeviceName = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]"),
        FieldMask = new FieldMask(),
    };
    // Make the request
    Device response = await deviceManagerClient.GetDeviceAsync(request);

### GetDeviceAsync(GetDeviceRequest, CancellationToken)

    public virtual Task<Device> GetDeviceAsync(GetDeviceRequest request, CancellationToken cancellationToken)

Gets details about a device.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.GetDeviceRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    GetDeviceRequest request = new GetDeviceRequest
    {
        DeviceName = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]"),
        FieldMask = new FieldMask(),
    };
    // Make the request
    Device response = await deviceManagerClient.GetDeviceAsync(request);

### GetDeviceAsync(string, CallSettings)

    public virtual Task<Device> GetDeviceAsync(string name, CallSettings callSettings = null)

Gets details about a device.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]/devices/[DEVICE]";
    // Make the request
    Device response = await deviceManagerClient.GetDeviceAsync(name);

### GetDeviceAsync(string, CancellationToken)

    public virtual Task<Device> GetDeviceAsync(string name, CancellationToken cancellationToken)

Gets details about a device.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]/devices/[DEVICE]";
    // Make the request
    Device response = await deviceManagerClient.GetDeviceAsync(name);

### GetDeviceRegistry(GetDeviceRegistryRequest, CallSettings)

    public virtual DeviceRegistry GetDeviceRegistry(GetDeviceRegistryRequest request, CallSettings callSettings = null)

Gets a device registry configuration.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.GetDeviceRegistryRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceRegistry` | The RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    GetDeviceRegistryRequest request = new GetDeviceRegistryRequest
    {
        RegistryName = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]"),
    };
    // Make the request
    DeviceRegistry response = deviceManagerClient.GetDeviceRegistry(request);

### GetDeviceRegistry(RegistryName, CallSettings)

    public virtual DeviceRegistry GetDeviceRegistry(RegistryName name, CallSettings callSettings = null)

Gets a device registry configuration.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName` Required. The name of the device registry. For example, `projects/example-project/locations/us-central1/registries/my-registry`. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceRegistry` | The RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    RegistryName name = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]");
    // Make the request
    DeviceRegistry response = deviceManagerClient.GetDeviceRegistry(name);

### GetDeviceRegistry(string, CallSettings)

    public virtual DeviceRegistry GetDeviceRegistry(string name, CallSettings callSettings = null)

Gets a device registry configuration.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the device registry. For example, `projects/example-project/locations/us-central1/registries/my-registry`. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceRegistry` | The RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]";
    // Make the request
    DeviceRegistry response = deviceManagerClient.GetDeviceRegistry(name);

### GetDeviceRegistryAsync(GetDeviceRegistryRequest, CallSettings)

    public virtual Task<DeviceRegistry> GetDeviceRegistryAsync(GetDeviceRegistryRequest request, CallSettings callSettings = null)

Gets a device registry configuration.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.GetDeviceRegistryRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceRegistry` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    GetDeviceRegistryRequest request = new GetDeviceRegistryRequest
    {
        RegistryName = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]"),
    };
    // Make the request
    DeviceRegistry response = await deviceManagerClient.GetDeviceRegistryAsync(request);

### GetDeviceRegistryAsync(GetDeviceRegistryRequest, CancellationToken)

    public virtual Task<DeviceRegistry> GetDeviceRegistryAsync(GetDeviceRegistryRequest request, CancellationToken cancellationToken)

Gets a device registry configuration.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.GetDeviceRegistryRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceRegistry` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    GetDeviceRegistryRequest request = new GetDeviceRegistryRequest
    {
        RegistryName = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]"),
    };
    // Make the request
    DeviceRegistry response = await deviceManagerClient.GetDeviceRegistryAsync(request);

### GetDeviceRegistryAsync(RegistryName, CallSettings)

    public virtual Task<DeviceRegistry> GetDeviceRegistryAsync(RegistryName name, CallSettings callSettings = null)

Gets a device registry configuration.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName` Required. The name of the device registry. For example, `projects/example-project/locations/us-central1/registries/my-registry`. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceRegistry` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    RegistryName name = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]");
    // Make the request
    DeviceRegistry response = await deviceManagerClient.GetDeviceRegistryAsync(name);

### GetDeviceRegistryAsync(RegistryName, CancellationToken)

    public virtual Task<DeviceRegistry> GetDeviceRegistryAsync(RegistryName name, CancellationToken cancellationToken)

Gets a device registry configuration.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName` Required. The name of the device registry. For example, `projects/example-project/locations/us-central1/registries/my-registry`. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceRegistry` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    RegistryName name = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]");
    // Make the request
    DeviceRegistry response = await deviceManagerClient.GetDeviceRegistryAsync(name);

### GetDeviceRegistryAsync(string, CallSettings)

    public virtual Task<DeviceRegistry> GetDeviceRegistryAsync(string name, CallSettings callSettings = null)

Gets a device registry configuration.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the device registry. For example, `projects/example-project/locations/us-central1/registries/my-registry`. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceRegistry` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]";
    // Make the request
    DeviceRegistry response = await deviceManagerClient.GetDeviceRegistryAsync(name);

### GetDeviceRegistryAsync(string, CancellationToken)

    public virtual Task<DeviceRegistry> GetDeviceRegistryAsync(string name, CancellationToken cancellationToken)

Gets a device registry configuration.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the device registry. For example, `projects/example-project/locations/us-central1/registries/my-registry`. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceRegistry` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]";
    // Make the request
    DeviceRegistry response = await deviceManagerClient.GetDeviceRegistryAsync(name);

### GetIamPolicy(IResourceName, CallSettings)

    public virtual Policy GetIamPolicy(IResourceName resource, CallSettings callSettings = null)

Gets the access control policy for a resource.
Returns an empty policy if the resource exists and does not have a policy
set.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `resource` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax/IResourceName.cs` REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://github.com/googleapis/google-cloud-dotnet/blob/ff2c06edc86420d5c55db210dfd1c5b6eb7d9bf1/apis/Google.Cloud.Iam.V1/Google.Cloud.Iam.V1/Policy.g.cs` | The RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
    // Make the request
    Policy response = deviceManagerClient.GetIamPolicy(resource);

### GetIamPolicy(GetIamPolicyRequest, CallSettings)

    public virtual Policy GetIamPolicy(GetIamPolicyRequest request, CallSettings callSettings = null)

Gets the access control policy for a resource.
Returns an empty policy if the resource exists and does not have a policy
set.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://github.com/googleapis/google-cloud-dotnet/blob/ff2c06edc86420d5c55db210dfd1c5b6eb7d9bf1/apis/Google.Cloud.Iam.V1/Google.Cloud.Iam.V1/IamPolicy.g.cs` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://github.com/googleapis/google-cloud-dotnet/blob/ff2c06edc86420d5c55db210dfd1c5b6eb7d9bf1/apis/Google.Cloud.Iam.V1/Google.Cloud.Iam.V1/Policy.g.cs` | The RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    GetIamPolicyRequest request = new GetIamPolicyRequest
    {
        ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
        Options = new GetPolicyOptions(),
    };
    // Make the request
    Policy response = deviceManagerClient.GetIamPolicy(request);

### GetIamPolicy(string, CallSettings)

    public virtual Policy GetIamPolicy(string resource, CallSettings callSettings = null)

Gets the access control policy for a resource.
Returns an empty policy if the resource exists and does not have a policy
set.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `resource` | `https://learn.microsoft.com/dotnet/api/system.string` REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://github.com/googleapis/google-cloud-dotnet/blob/ff2c06edc86420d5c55db210dfd1c5b6eb7d9bf1/apis/Google.Cloud.Iam.V1/Google.Cloud.Iam.V1/Policy.g.cs` | The RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    string resource = "a/wildcard/resource";
    // Make the request
    Policy response = deviceManagerClient.GetIamPolicy(resource);

### GetIamPolicyAsync(IResourceName, CallSettings)

    public virtual Task<Policy> GetIamPolicyAsync(IResourceName resource, CallSettings callSettings = null)

Gets the access control policy for a resource.
Returns an empty policy if the resource exists and does not have a policy
set.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `resource` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax/IResourceName.cs` REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://github.com/googleapis/google-cloud-dotnet/blob/ff2c06edc86420d5c55db210dfd1c5b6eb7d9bf1/apis/Google.Cloud.Iam.V1/Google.Cloud.Iam.V1/Policy.g.cs` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
    // Make the request
    Policy response = await deviceManagerClient.GetIamPolicyAsync(resource);

### GetIamPolicyAsync(IResourceName, CancellationToken)

    public virtual Task<Policy> GetIamPolicyAsync(IResourceName resource, CancellationToken cancellationToken)

Gets the access control policy for a resource.
Returns an empty policy if the resource exists and does not have a policy
set.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `resource` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax/IResourceName.cs` REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://github.com/googleapis/google-cloud-dotnet/blob/ff2c06edc86420d5c55db210dfd1c5b6eb7d9bf1/apis/Google.Cloud.Iam.V1/Google.Cloud.Iam.V1/Policy.g.cs` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
    // Make the request
    Policy response = await deviceManagerClient.GetIamPolicyAsync(resource);

### GetIamPolicyAsync(GetIamPolicyRequest, CallSettings)

    public virtual Task<Policy> GetIamPolicyAsync(GetIamPolicyRequest request, CallSettings callSettings = null)

Gets the access control policy for a resource.
Returns an empty policy if the resource exists and does not have a policy
set.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://github.com/googleapis/google-cloud-dotnet/blob/ff2c06edc86420d5c55db210dfd1c5b6eb7d9bf1/apis/Google.Cloud.Iam.V1/Google.Cloud.Iam.V1/IamPolicy.g.cs` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://github.com/googleapis/google-cloud-dotnet/blob/ff2c06edc86420d5c55db210dfd1c5b6eb7d9bf1/apis/Google.Cloud.Iam.V1/Google.Cloud.Iam.V1/Policy.g.cs` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    GetIamPolicyRequest request = new GetIamPolicyRequest
    {
        ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
        Options = new GetPolicyOptions(),
    };
    // Make the request
    Policy response = await deviceManagerClient.GetIamPolicyAsync(request);

### GetIamPolicyAsync(GetIamPolicyRequest, CancellationToken)

    public virtual Task<Policy> GetIamPolicyAsync(GetIamPolicyRequest request, CancellationToken cancellationToken)

Gets the access control policy for a resource.
Returns an empty policy if the resource exists and does not have a policy
set.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://github.com/googleapis/google-cloud-dotnet/blob/ff2c06edc86420d5c55db210dfd1c5b6eb7d9bf1/apis/Google.Cloud.Iam.V1/Google.Cloud.Iam.V1/IamPolicy.g.cs` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://github.com/googleapis/google-cloud-dotnet/blob/ff2c06edc86420d5c55db210dfd1c5b6eb7d9bf1/apis/Google.Cloud.Iam.V1/Google.Cloud.Iam.V1/Policy.g.cs` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    GetIamPolicyRequest request = new GetIamPolicyRequest
    {
        ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
        Options = new GetPolicyOptions(),
    };
    // Make the request
    Policy response = await deviceManagerClient.GetIamPolicyAsync(request);

### GetIamPolicyAsync(string, CallSettings)

    public virtual Task<Policy> GetIamPolicyAsync(string resource, CallSettings callSettings = null)

Gets the access control policy for a resource.
Returns an empty policy if the resource exists and does not have a policy
set.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `resource` | `https://learn.microsoft.com/dotnet/api/system.string` REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://github.com/googleapis/google-cloud-dotnet/blob/ff2c06edc86420d5c55db210dfd1c5b6eb7d9bf1/apis/Google.Cloud.Iam.V1/Google.Cloud.Iam.V1/Policy.g.cs` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    string resource = "a/wildcard/resource";
    // Make the request
    Policy response = await deviceManagerClient.GetIamPolicyAsync(resource);

### GetIamPolicyAsync(string, CancellationToken)

    public virtual Task<Policy> GetIamPolicyAsync(string resource, CancellationToken cancellationToken)

Gets the access control policy for a resource.
Returns an empty policy if the resource exists and does not have a policy
set.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `resource` | `https://learn.microsoft.com/dotnet/api/system.string` REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://github.com/googleapis/google-cloud-dotnet/blob/ff2c06edc86420d5c55db210dfd1c5b6eb7d9bf1/apis/Google.Cloud.Iam.V1/Google.Cloud.Iam.V1/Policy.g.cs` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    string resource = "a/wildcard/resource";
    // Make the request
    Policy response = await deviceManagerClient.GetIamPolicyAsync(resource);

### ListDeviceConfigVersions(DeviceName, CallSettings)

    public virtual ListDeviceConfigVersionsResponse ListDeviceConfigVersions(DeviceName name, CallSettings callSettings = null)

Lists the last few versions of the device configuration in descending
order (i.e.: newest first).

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceName` Required. The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDeviceConfigVersionsResponse` | The RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    DeviceName name = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
    // Make the request
    ListDeviceConfigVersionsResponse response = deviceManagerClient.ListDeviceConfigVersions(name);

### ListDeviceConfigVersions(ListDeviceConfigVersionsRequest, CallSettings)

    public virtual ListDeviceConfigVersionsResponse ListDeviceConfigVersions(ListDeviceConfigVersionsRequest request, CallSettings callSettings = null)

Lists the last few versions of the device configuration in descending
order (i.e.: newest first).

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDeviceConfigVersionsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDeviceConfigVersionsResponse` | The RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    ListDeviceConfigVersionsRequest request = new ListDeviceConfigVersionsRequest
    {
        DeviceName = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]"),
        NumVersions = 0,
    };
    // Make the request
    ListDeviceConfigVersionsResponse response = deviceManagerClient.ListDeviceConfigVersions(request);

### ListDeviceConfigVersions(string, CallSettings)

    public virtual ListDeviceConfigVersionsResponse ListDeviceConfigVersions(string name, CallSettings callSettings = null)

Lists the last few versions of the device configuration in descending
order (i.e.: newest first).

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDeviceConfigVersionsResponse` | The RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]/devices/[DEVICE]";
    // Make the request
    ListDeviceConfigVersionsResponse response = deviceManagerClient.ListDeviceConfigVersions(name);

### ListDeviceConfigVersionsAsync(DeviceName, CallSettings)

    public virtual Task<ListDeviceConfigVersionsResponse> ListDeviceConfigVersionsAsync(DeviceName name, CallSettings callSettings = null)

Lists the last few versions of the device configuration in descending
order (i.e.: newest first).

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceName` Required. The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDeviceConfigVersionsResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    DeviceName name = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
    // Make the request
    ListDeviceConfigVersionsResponse response = await deviceManagerClient.ListDeviceConfigVersionsAsync(name);

### ListDeviceConfigVersionsAsync(DeviceName, CancellationToken)

    public virtual Task<ListDeviceConfigVersionsResponse> ListDeviceConfigVersionsAsync(DeviceName name, CancellationToken cancellationToken)

Lists the last few versions of the device configuration in descending
order (i.e.: newest first).

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceName` Required. The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDeviceConfigVersionsResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    DeviceName name = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
    // Make the request
    ListDeviceConfigVersionsResponse response = await deviceManagerClient.ListDeviceConfigVersionsAsync(name);

### ListDeviceConfigVersionsAsync(ListDeviceConfigVersionsRequest, CallSettings)

    public virtual Task<ListDeviceConfigVersionsResponse> ListDeviceConfigVersionsAsync(ListDeviceConfigVersionsRequest request, CallSettings callSettings = null)

Lists the last few versions of the device configuration in descending
order (i.e.: newest first).

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDeviceConfigVersionsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDeviceConfigVersionsResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    ListDeviceConfigVersionsRequest request = new ListDeviceConfigVersionsRequest
    {
        DeviceName = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]"),
        NumVersions = 0,
    };
    // Make the request
    ListDeviceConfigVersionsResponse response = await deviceManagerClient.ListDeviceConfigVersionsAsync(request);

### ListDeviceConfigVersionsAsync(ListDeviceConfigVersionsRequest, CancellationToken)

    public virtual Task<ListDeviceConfigVersionsResponse> ListDeviceConfigVersionsAsync(ListDeviceConfigVersionsRequest request, CancellationToken cancellationToken)

Lists the last few versions of the device configuration in descending
order (i.e.: newest first).

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDeviceConfigVersionsRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDeviceConfigVersionsResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    ListDeviceConfigVersionsRequest request = new ListDeviceConfigVersionsRequest
    {
        DeviceName = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]"),
        NumVersions = 0,
    };
    // Make the request
    ListDeviceConfigVersionsResponse response = await deviceManagerClient.ListDeviceConfigVersionsAsync(request);

### ListDeviceConfigVersionsAsync(string, CallSettings)

    public virtual Task<ListDeviceConfigVersionsResponse> ListDeviceConfigVersionsAsync(string name, CallSettings callSettings = null)

Lists the last few versions of the device configuration in descending
order (i.e.: newest first).

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDeviceConfigVersionsResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]/devices/[DEVICE]";
    // Make the request
    ListDeviceConfigVersionsResponse response = await deviceManagerClient.ListDeviceConfigVersionsAsync(name);

### ListDeviceConfigVersionsAsync(string, CancellationToken)

    public virtual Task<ListDeviceConfigVersionsResponse> ListDeviceConfigVersionsAsync(string name, CancellationToken cancellationToken)

Lists the last few versions of the device configuration in descending
order (i.e.: newest first).

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDeviceConfigVersionsResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]/devices/[DEVICE]";
    // Make the request
    ListDeviceConfigVersionsResponse response = await deviceManagerClient.ListDeviceConfigVersionsAsync(name);

### ListDeviceRegistries(LocationName, string, int?, CallSettings)

    public virtual PagedEnumerable<ListDeviceRegistriesResponse, DeviceRegistry> ListDeviceRegistries(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists device registries.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax/ResourceNames/LocationName.cs` Required. The project and cloud region path. For example, `projects/example-project/locations/us-central1`. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax/PagedEnumerable.cshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDeviceRegistriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceRegistry` | A pageable sequence of [DeviceRegistry](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceRegistry) resources. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    // Make the request
    PagedEnumerable<ListDeviceRegistriesResponse, DeviceRegistry> response = deviceManagerClient.ListDeviceRegistries(parent);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (DeviceRegistry item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (ListDeviceRegistriesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (DeviceRegistry item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<DeviceRegistry> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (DeviceRegistry item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListDeviceRegistries(ListDeviceRegistriesRequest, CallSettings)

    public virtual PagedEnumerable<ListDeviceRegistriesResponse, DeviceRegistry> ListDeviceRegistries(ListDeviceRegistriesRequest request, CallSettings callSettings = null)

Lists device registries.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDeviceRegistriesRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax/PagedEnumerable.cshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDeviceRegistriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceRegistry` | A pageable sequence of [DeviceRegistry](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceRegistry) resources. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    ListDeviceRegistriesRequest request = new ListDeviceRegistriesRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    };
    // Make the request
    PagedEnumerable<ListDeviceRegistriesResponse, DeviceRegistry> response = deviceManagerClient.ListDeviceRegistries(request);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (DeviceRegistry item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (ListDeviceRegistriesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (DeviceRegistry item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<DeviceRegistry> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (DeviceRegistry item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListDeviceRegistries(string, string, int?, CallSettings)

    public virtual PagedEnumerable<ListDeviceRegistriesResponse, DeviceRegistry> ListDeviceRegistries(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists device registries.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The project and cloud region path. For example, `projects/example-project/locations/us-central1`. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax/PagedEnumerable.cshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDeviceRegistriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceRegistry` | A pageable sequence of [DeviceRegistry](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceRegistry) resources. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    // Make the request
    PagedEnumerable<ListDeviceRegistriesResponse, DeviceRegistry> response = deviceManagerClient.ListDeviceRegistries(parent);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (DeviceRegistry item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (ListDeviceRegistriesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (DeviceRegistry item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<DeviceRegistry> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (DeviceRegistry item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListDeviceRegistriesAsync(LocationName, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListDeviceRegistriesResponse, DeviceRegistry> ListDeviceRegistriesAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists device registries.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax/ResourceNames/LocationName.cs` Required. The project and cloud region path. For example, `projects/example-project/locations/us-central1`. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax/PagedAsyncEnumerable.cshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDeviceRegistriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceRegistry` | A pageable asynchronous sequence of [DeviceRegistry](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceRegistry) resources. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    // Make the request
    PagedAsyncEnumerable<ListDeviceRegistriesResponse, DeviceRegistry> response = deviceManagerClient.ListDeviceRegistriesAsync(parent);

    // Iterate over all response items, lazily performing RPCs as required
    await response.ForEachAsync((DeviceRegistry item) =>
    {
        // Do something with each item
        Console.WriteLine(item);
    });

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await response.AsRawResponses().ForEachAsync((ListDeviceRegistriesResponse page) =>
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (DeviceRegistry item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    });

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<DeviceRegistry> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (DeviceRegistry item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListDeviceRegistriesAsync(ListDeviceRegistriesRequest, CallSettings)

    public virtual PagedAsyncEnumerable<ListDeviceRegistriesResponse, DeviceRegistry> ListDeviceRegistriesAsync(ListDeviceRegistriesRequest request, CallSettings callSettings = null)

Lists device registries.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDeviceRegistriesRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax/PagedAsyncEnumerable.cshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDeviceRegistriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceRegistry` | A pageable asynchronous sequence of [DeviceRegistry](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceRegistry) resources. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    ListDeviceRegistriesRequest request = new ListDeviceRegistriesRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    };
    // Make the request
    PagedAsyncEnumerable<ListDeviceRegistriesResponse, DeviceRegistry> response = deviceManagerClient.ListDeviceRegistriesAsync(request);

    // Iterate over all response items, lazily performing RPCs as required
    await response.ForEachAsync((DeviceRegistry item) =>
    {
        // Do something with each item
        Console.WriteLine(item);
    });

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await response.AsRawResponses().ForEachAsync((ListDeviceRegistriesResponse page) =>
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (DeviceRegistry item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    });

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<DeviceRegistry> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (DeviceRegistry item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListDeviceRegistriesAsync(string, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListDeviceRegistriesResponse, DeviceRegistry> ListDeviceRegistriesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists device registries.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The project and cloud region path. For example, `projects/example-project/locations/us-central1`. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax/PagedAsyncEnumerable.cshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDeviceRegistriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceRegistry` | A pageable asynchronous sequence of [DeviceRegistry](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceRegistry) resources. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    // Make the request
    PagedAsyncEnumerable<ListDeviceRegistriesResponse, DeviceRegistry> response = deviceManagerClient.ListDeviceRegistriesAsync(parent);

    // Iterate over all response items, lazily performing RPCs as required
    await response.ForEachAsync((DeviceRegistry item) =>
    {
        // Do something with each item
        Console.WriteLine(item);
    });

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await response.AsRawResponses().ForEachAsync((ListDeviceRegistriesResponse page) =>
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (DeviceRegistry item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    });

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<DeviceRegistry> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (DeviceRegistry item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListDevices(ListDevicesRequest, CallSettings)

    public virtual PagedEnumerable<ListDevicesResponse, Device> ListDevices(ListDevicesRequest request, CallSettings callSettings = null)

List devices in a device registry.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDevicesRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax/PagedEnumerable.cshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDevicesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device` | A pageable sequence of [Device](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device) resources. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    ListDevicesRequest request = new ListDevicesRequest
    {
        ParentAsRegistryName = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]"),
        DeviceNumIds = { 0UL, },
        DeviceIds = { "", },
        FieldMask = new FieldMask(),
        GatewayListOptions = new GatewayListOptions(),
    };
    // Make the request
    PagedEnumerable<ListDevicesResponse, Device> response = deviceManagerClient.ListDevices(request);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (Device item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (ListDevicesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (Device item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<Device> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (Device item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListDevices(RegistryName, string, int?, CallSettings)

    public virtual PagedEnumerable<ListDevicesResponse, Device> ListDevices(RegistryName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

List devices in a device registry.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName` Required. The device registry path. Required. For example, `projects/my-project/locations/us-central1/registries/my-registry`. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax/PagedEnumerable.cshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDevicesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device` | A pageable sequence of [Device](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device) resources. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    RegistryName parent = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]");
    // Make the request
    PagedEnumerable<ListDevicesResponse, Device> response = deviceManagerClient.ListDevices(parent);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (Device item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (ListDevicesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (Device item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<Device> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (Device item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListDevices(string, string, int?, CallSettings)

    public virtual PagedEnumerable<ListDevicesResponse, Device> ListDevices(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

List devices in a device registry.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The device registry path. Required. For example, `projects/my-project/locations/us-central1/registries/my-registry`. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax/PagedEnumerable.cshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDevicesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device` | A pageable sequence of [Device](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device) resources. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]";
    // Make the request
    PagedEnumerable<ListDevicesResponse, Device> response = deviceManagerClient.ListDevices(parent);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (Device item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (ListDevicesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (Device item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<Device> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (Device item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListDevicesAsync(ListDevicesRequest, CallSettings)

    public virtual PagedAsyncEnumerable<ListDevicesResponse, Device> ListDevicesAsync(ListDevicesRequest request, CallSettings callSettings = null)

List devices in a device registry.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDevicesRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax/PagedAsyncEnumerable.cshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDevicesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device` | A pageable asynchronous sequence of [Device](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device) resources. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    ListDevicesRequest request = new ListDevicesRequest
    {
        ParentAsRegistryName = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]"),
        DeviceNumIds = { 0UL, },
        DeviceIds = { "", },
        FieldMask = new FieldMask(),
        GatewayListOptions = new GatewayListOptions(),
    };
    // Make the request
    PagedAsyncEnumerable<ListDevicesResponse, Device> response = deviceManagerClient.ListDevicesAsync(request);

    // Iterate over all response items, lazily performing RPCs as required
    await response.ForEachAsync((Device item) =>
    {
        // Do something with each item
        Console.WriteLine(item);
    });

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await response.AsRawResponses().ForEachAsync((ListDevicesResponse page) =>
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (Device item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    });

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<Device> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (Device item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListDevicesAsync(RegistryName, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListDevicesResponse, Device> ListDevicesAsync(RegistryName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

List devices in a device registry.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName` Required. The device registry path. Required. For example, `projects/my-project/locations/us-central1/registries/my-registry`. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax/PagedAsyncEnumerable.cshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDevicesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device` | A pageable asynchronous sequence of [Device](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device) resources. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    RegistryName parent = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]");
    // Make the request
    PagedAsyncEnumerable<ListDevicesResponse, Device> response = deviceManagerClient.ListDevicesAsync(parent);

    // Iterate over all response items, lazily performing RPCs as required
    await response.ForEachAsync((Device item) =>
    {
        // Do something with each item
        Console.WriteLine(item);
    });

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await response.AsRawResponses().ForEachAsync((ListDevicesResponse page) =>
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (Device item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    });

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<Device> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (Device item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListDevicesAsync(string, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListDevicesResponse, Device> ListDevicesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

List devices in a device registry.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The device registry path. Required. For example, `projects/my-project/locations/us-central1/registries/my-registry`. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax/PagedAsyncEnumerable.cshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDevicesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device` | A pageable asynchronous sequence of [Device](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device) resources. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]";
    // Make the request
    PagedAsyncEnumerable<ListDevicesResponse, Device> response = deviceManagerClient.ListDevicesAsync(parent);

    // Iterate over all response items, lazily performing RPCs as required
    await response.ForEachAsync((Device item) =>
    {
        // Do something with each item
        Console.WriteLine(item);
    });

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await response.AsRawResponses().ForEachAsync((ListDevicesResponse page) =>
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (Device item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    });

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<Device> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (Device item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListDeviceStates(DeviceName, CallSettings)

    public virtual ListDeviceStatesResponse ListDeviceStates(DeviceName name, CallSettings callSettings = null)

Lists the last few versions of the device state in descending order (i.e.:
newest first).

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceName` Required. The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDeviceStatesResponse` | The RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    DeviceName name = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
    // Make the request
    ListDeviceStatesResponse response = deviceManagerClient.ListDeviceStates(name);

### ListDeviceStates(ListDeviceStatesRequest, CallSettings)

    public virtual ListDeviceStatesResponse ListDeviceStates(ListDeviceStatesRequest request, CallSettings callSettings = null)

Lists the last few versions of the device state in descending order (i.e.:
newest first).

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDeviceStatesRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDeviceStatesResponse` | The RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    ListDeviceStatesRequest request = new ListDeviceStatesRequest
    {
        DeviceName = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]"),
        NumStates = 0,
    };
    // Make the request
    ListDeviceStatesResponse response = deviceManagerClient.ListDeviceStates(request);

### ListDeviceStates(string, CallSettings)

    public virtual ListDeviceStatesResponse ListDeviceStates(string name, CallSettings callSettings = null)

Lists the last few versions of the device state in descending order (i.e.:
newest first).

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDeviceStatesResponse` | The RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]/devices/[DEVICE]";
    // Make the request
    ListDeviceStatesResponse response = deviceManagerClient.ListDeviceStates(name);

### ListDeviceStatesAsync(DeviceName, CallSettings)

    public virtual Task<ListDeviceStatesResponse> ListDeviceStatesAsync(DeviceName name, CallSettings callSettings = null)

Lists the last few versions of the device state in descending order (i.e.:
newest first).

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceName` Required. The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDeviceStatesResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    DeviceName name = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
    // Make the request
    ListDeviceStatesResponse response = await deviceManagerClient.ListDeviceStatesAsync(name);

### ListDeviceStatesAsync(DeviceName, CancellationToken)

    public virtual Task<ListDeviceStatesResponse> ListDeviceStatesAsync(DeviceName name, CancellationToken cancellationToken)

Lists the last few versions of the device state in descending order (i.e.:
newest first).

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceName` Required. The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDeviceStatesResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    DeviceName name = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
    // Make the request
    ListDeviceStatesResponse response = await deviceManagerClient.ListDeviceStatesAsync(name);

### ListDeviceStatesAsync(ListDeviceStatesRequest, CallSettings)

    public virtual Task<ListDeviceStatesResponse> ListDeviceStatesAsync(ListDeviceStatesRequest request, CallSettings callSettings = null)

Lists the last few versions of the device state in descending order (i.e.:
newest first).

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDeviceStatesRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDeviceStatesResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    ListDeviceStatesRequest request = new ListDeviceStatesRequest
    {
        DeviceName = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]"),
        NumStates = 0,
    };
    // Make the request
    ListDeviceStatesResponse response = await deviceManagerClient.ListDeviceStatesAsync(request);

### ListDeviceStatesAsync(ListDeviceStatesRequest, CancellationToken)

    public virtual Task<ListDeviceStatesResponse> ListDeviceStatesAsync(ListDeviceStatesRequest request, CancellationToken cancellationToken)

Lists the last few versions of the device state in descending order (i.e.:
newest first).

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDeviceStatesRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDeviceStatesResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    ListDeviceStatesRequest request = new ListDeviceStatesRequest
    {
        DeviceName = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]"),
        NumStates = 0,
    };
    // Make the request
    ListDeviceStatesResponse response = await deviceManagerClient.ListDeviceStatesAsync(request);

### ListDeviceStatesAsync(string, CallSettings)

    public virtual Task<ListDeviceStatesResponse> ListDeviceStatesAsync(string name, CallSettings callSettings = null)

Lists the last few versions of the device state in descending order (i.e.:
newest first).

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDeviceStatesResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]/devices/[DEVICE]";
    // Make the request
    ListDeviceStatesResponse response = await deviceManagerClient.ListDeviceStatesAsync(name);

### ListDeviceStatesAsync(string, CancellationToken)

    public virtual Task<ListDeviceStatesResponse> ListDeviceStatesAsync(string name, CancellationToken cancellationToken)

Lists the last few versions of the device state in descending order (i.e.:
newest first).

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ListDeviceStatesResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]/devices/[DEVICE]";
    // Make the request
    ListDeviceStatesResponse response = await deviceManagerClient.ListDeviceStatesAsync(name);

### ModifyCloudToDeviceConfig(DeviceName, ByteString, CallSettings)

    public virtual DeviceConfig ModifyCloudToDeviceConfig(DeviceName name, ByteString binaryData, CallSettings callSettings = null)

Modifies the configuration for the device, which is eventually sent from
the Cloud IoT Core servers. Returns the modified configuration version and
its metadata.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceName` Required. The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. |
| `binaryData` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.ByteString.html` Required. The configuration data for the device. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceConfig` | The RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    DeviceName name = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
    ByteString binaryData = ByteString.Empty;
    // Make the request
    DeviceConfig response = deviceManagerClient.ModifyCloudToDeviceConfig(name, binaryData);

### ModifyCloudToDeviceConfig(ModifyCloudToDeviceConfigRequest, CallSettings)

    public virtual DeviceConfig ModifyCloudToDeviceConfig(ModifyCloudToDeviceConfigRequest request, CallSettings callSettings = null)

Modifies the configuration for the device, which is eventually sent from
the Cloud IoT Core servers. Returns the modified configuration version and
its metadata.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ModifyCloudToDeviceConfigRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceConfig` | The RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    ModifyCloudToDeviceConfigRequest request = new ModifyCloudToDeviceConfigRequest
    {
        DeviceName = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]"),
        VersionToUpdate = 0L,
        BinaryData = ByteString.Empty,
    };
    // Make the request
    DeviceConfig response = deviceManagerClient.ModifyCloudToDeviceConfig(request);

### ModifyCloudToDeviceConfig(string, ByteString, CallSettings)

    public virtual DeviceConfig ModifyCloudToDeviceConfig(string name, ByteString binaryData, CallSettings callSettings = null)

Modifies the configuration for the device, which is eventually sent from
the Cloud IoT Core servers. Returns the modified configuration version and
its metadata.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. |
| `binaryData` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.ByteString.html` Required. The configuration data for the device. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceConfig` | The RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]/devices/[DEVICE]";
    ByteString binaryData = ByteString.Empty;
    // Make the request
    DeviceConfig response = deviceManagerClient.ModifyCloudToDeviceConfig(name, binaryData);

### ModifyCloudToDeviceConfigAsync(DeviceName, ByteString, CallSettings)

    public virtual Task<DeviceConfig> ModifyCloudToDeviceConfigAsync(DeviceName name, ByteString binaryData, CallSettings callSettings = null)

Modifies the configuration for the device, which is eventually sent from
the Cloud IoT Core servers. Returns the modified configuration version and
its metadata.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceName` Required. The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. |
| `binaryData` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.ByteString.html` Required. The configuration data for the device. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceConfig` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    DeviceName name = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
    ByteString binaryData = ByteString.Empty;
    // Make the request
    DeviceConfig response = await deviceManagerClient.ModifyCloudToDeviceConfigAsync(name, binaryData);

### ModifyCloudToDeviceConfigAsync(DeviceName, ByteString, CancellationToken)

    public virtual Task<DeviceConfig> ModifyCloudToDeviceConfigAsync(DeviceName name, ByteString binaryData, CancellationToken cancellationToken)

Modifies the configuration for the device, which is eventually sent from
the Cloud IoT Core servers. Returns the modified configuration version and
its metadata.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceName` Required. The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. |
| `binaryData` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.ByteString.html` Required. The configuration data for the device. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceConfig` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    DeviceName name = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
    ByteString binaryData = ByteString.Empty;
    // Make the request
    DeviceConfig response = await deviceManagerClient.ModifyCloudToDeviceConfigAsync(name, binaryData);

### ModifyCloudToDeviceConfigAsync(ModifyCloudToDeviceConfigRequest, CallSettings)

    public virtual Task<DeviceConfig> ModifyCloudToDeviceConfigAsync(ModifyCloudToDeviceConfigRequest request, CallSettings callSettings = null)

Modifies the configuration for the device, which is eventually sent from
the Cloud IoT Core servers. Returns the modified configuration version and
its metadata.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ModifyCloudToDeviceConfigRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceConfig` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    ModifyCloudToDeviceConfigRequest request = new ModifyCloudToDeviceConfigRequest
    {
        DeviceName = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]"),
        VersionToUpdate = 0L,
        BinaryData = ByteString.Empty,
    };
    // Make the request
    DeviceConfig response = await deviceManagerClient.ModifyCloudToDeviceConfigAsync(request);

### ModifyCloudToDeviceConfigAsync(ModifyCloudToDeviceConfigRequest, CancellationToken)

    public virtual Task<DeviceConfig> ModifyCloudToDeviceConfigAsync(ModifyCloudToDeviceConfigRequest request, CancellationToken cancellationToken)

Modifies the configuration for the device, which is eventually sent from
the Cloud IoT Core servers. Returns the modified configuration version and
its metadata.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.ModifyCloudToDeviceConfigRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceConfig` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    ModifyCloudToDeviceConfigRequest request = new ModifyCloudToDeviceConfigRequest
    {
        DeviceName = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]"),
        VersionToUpdate = 0L,
        BinaryData = ByteString.Empty,
    };
    // Make the request
    DeviceConfig response = await deviceManagerClient.ModifyCloudToDeviceConfigAsync(request);

### ModifyCloudToDeviceConfigAsync(string, ByteString, CallSettings)

    public virtual Task<DeviceConfig> ModifyCloudToDeviceConfigAsync(string name, ByteString binaryData, CallSettings callSettings = null)

Modifies the configuration for the device, which is eventually sent from
the Cloud IoT Core servers. Returns the modified configuration version and
its metadata.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. |
| `binaryData` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.ByteString.html` Required. The configuration data for the device. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceConfig` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]/devices/[DEVICE]";
    ByteString binaryData = ByteString.Empty;
    // Make the request
    DeviceConfig response = await deviceManagerClient.ModifyCloudToDeviceConfigAsync(name, binaryData);

### ModifyCloudToDeviceConfigAsync(string, ByteString, CancellationToken)

    public virtual Task<DeviceConfig> ModifyCloudToDeviceConfigAsync(string name, ByteString binaryData, CancellationToken cancellationToken)

Modifies the configuration for the device, which is eventually sent from
the Cloud IoT Core servers. Returns the modified configuration version and
its metadata.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. |
| `binaryData` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.ByteString.html` Required. The configuration data for the device. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceConfig` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]/devices/[DEVICE]";
    ByteString binaryData = ByteString.Empty;
    // Make the request
    DeviceConfig response = await deviceManagerClient.ModifyCloudToDeviceConfigAsync(name, binaryData);

### SendCommandToDevice(DeviceName, ByteString, CallSettings)

    public virtual SendCommandToDeviceResponse SendCommandToDevice(DeviceName name, ByteString binaryData, CallSettings callSettings = null)

Sends a command to the specified device. In order for a device to be able
to receive commands, it must:
1) be connected to Cloud IoT Core using the MQTT protocol, and
2) be subscribed to the group of MQTT topics specified by
/devices/{device-id}/commands/#. This subscription will receive commands
at the top-level topic /devices/{device-id}/commands as well as commands
for subfolders, like /devices/{device-id}/commands/subfolder.
Note that subscribing to specific subfolders is not supported.
If the command could not be delivered to the device, this method will
return an error; in particular, if the device is not subscribed, this
method will return FAILED_PRECONDITION. Otherwise, this method will
return OK. If the subscription is QoS 1, at least once delivery will be
guaranteed; for QoS 0, no acknowledgment will be expected from the device.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceName` Required. The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. |
| `binaryData` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.ByteString.html` Required. The command data to send to the device. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.SendCommandToDeviceResponse` | The RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    DeviceName name = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
    ByteString binaryData = ByteString.Empty;
    // Make the request
    SendCommandToDeviceResponse response = deviceManagerClient.SendCommandToDevice(name, binaryData);

### SendCommandToDevice(DeviceName, ByteString, string, CallSettings)

    public virtual SendCommandToDeviceResponse SendCommandToDevice(DeviceName name, ByteString binaryData, string subfolder, CallSettings callSettings = null)

Sends a command to the specified device. In order for a device to be able
to receive commands, it must:
1) be connected to Cloud IoT Core using the MQTT protocol, and
2) be subscribed to the group of MQTT topics specified by
/devices/{device-id}/commands/#. This subscription will receive commands
at the top-level topic /devices/{device-id}/commands as well as commands
for subfolders, like /devices/{device-id}/commands/subfolder.
Note that subscribing to specific subfolders is not supported.
If the command could not be delivered to the device, this method will
return an error; in particular, if the device is not subscribed, this
method will return FAILED_PRECONDITION. Otherwise, this method will
return OK. If the subscription is QoS 1, at least once delivery will be
guaranteed; for QoS 0, no acknowledgment will be expected from the device.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceName` Required. The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. |
| `binaryData` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.ByteString.html` Required. The command data to send to the device. |
| `subfolder` | `https://learn.microsoft.com/dotnet/api/system.string` Optional subfolder for the command. If empty, the command will be delivered to the /devices/{device-id}/commands topic, otherwise it will be delivered to the /devices/{device-id}/commands/{subfolder} topic. Multi-level subfolders are allowed. This field must not have more than 256 characters, and must not contain any MQTT wildcards ("+" or "#") or null characters. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.SendCommandToDeviceResponse` | The RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    DeviceName name = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
    ByteString binaryData = ByteString.Empty;
    string subfolder = "";
    // Make the request
    SendCommandToDeviceResponse response = deviceManagerClient.SendCommandToDevice(name, binaryData, subfolder);

### SendCommandToDevice(SendCommandToDeviceRequest, CallSettings)

    public virtual SendCommandToDeviceResponse SendCommandToDevice(SendCommandToDeviceRequest request, CallSettings callSettings = null)

Sends a command to the specified device. In order for a device to be able
to receive commands, it must:
1) be connected to Cloud IoT Core using the MQTT protocol, and
2) be subscribed to the group of MQTT topics specified by
/devices/{device-id}/commands/#. This subscription will receive commands
at the top-level topic /devices/{device-id}/commands as well as commands
for subfolders, like /devices/{device-id}/commands/subfolder.
Note that subscribing to specific subfolders is not supported.
If the command could not be delivered to the device, this method will
return an error; in particular, if the device is not subscribed, this
method will return FAILED_PRECONDITION. Otherwise, this method will
return OK. If the subscription is QoS 1, at least once delivery will be
guaranteed; for QoS 0, no acknowledgment will be expected from the device.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.SendCommandToDeviceRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.SendCommandToDeviceResponse` | The RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    SendCommandToDeviceRequest request = new SendCommandToDeviceRequest
    {
        DeviceName = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]"),
        BinaryData = ByteString.Empty,
        Subfolder = "",
    };
    // Make the request
    SendCommandToDeviceResponse response = deviceManagerClient.SendCommandToDevice(request);

### SendCommandToDevice(string, ByteString, CallSettings)

    public virtual SendCommandToDeviceResponse SendCommandToDevice(string name, ByteString binaryData, CallSettings callSettings = null)

Sends a command to the specified device. In order for a device to be able
to receive commands, it must:
1) be connected to Cloud IoT Core using the MQTT protocol, and
2) be subscribed to the group of MQTT topics specified by
/devices/{device-id}/commands/#. This subscription will receive commands
at the top-level topic /devices/{device-id}/commands as well as commands
for subfolders, like /devices/{device-id}/commands/subfolder.
Note that subscribing to specific subfolders is not supported.
If the command could not be delivered to the device, this method will
return an error; in particular, if the device is not subscribed, this
method will return FAILED_PRECONDITION. Otherwise, this method will
return OK. If the subscription is QoS 1, at least once delivery will be
guaranteed; for QoS 0, no acknowledgment will be expected from the device.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. |
| `binaryData` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.ByteString.html` Required. The command data to send to the device. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.SendCommandToDeviceResponse` | The RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]/devices/[DEVICE]";
    ByteString binaryData = ByteString.Empty;
    // Make the request
    SendCommandToDeviceResponse response = deviceManagerClient.SendCommandToDevice(name, binaryData);

### SendCommandToDevice(string, ByteString, string, CallSettings)

    public virtual SendCommandToDeviceResponse SendCommandToDevice(string name, ByteString binaryData, string subfolder, CallSettings callSettings = null)

Sends a command to the specified device. In order for a device to be able
to receive commands, it must:
1) be connected to Cloud IoT Core using the MQTT protocol, and
2) be subscribed to the group of MQTT topics specified by
/devices/{device-id}/commands/#. This subscription will receive commands
at the top-level topic /devices/{device-id}/commands as well as commands
for subfolders, like /devices/{device-id}/commands/subfolder.
Note that subscribing to specific subfolders is not supported.
If the command could not be delivered to the device, this method will
return an error; in particular, if the device is not subscribed, this
method will return FAILED_PRECONDITION. Otherwise, this method will
return OK. If the subscription is QoS 1, at least once delivery will be
guaranteed; for QoS 0, no acknowledgment will be expected from the device.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. |
| `binaryData` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.ByteString.html` Required. The command data to send to the device. |
| `subfolder` | `https://learn.microsoft.com/dotnet/api/system.string` Optional subfolder for the command. If empty, the command will be delivered to the /devices/{device-id}/commands topic, otherwise it will be delivered to the /devices/{device-id}/commands/{subfolder} topic. Multi-level subfolders are allowed. This field must not have more than 256 characters, and must not contain any MQTT wildcards ("+" or "#") or null characters. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.SendCommandToDeviceResponse` | The RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]/devices/[DEVICE]";
    ByteString binaryData = ByteString.Empty;
    string subfolder = "";
    // Make the request
    SendCommandToDeviceResponse response = deviceManagerClient.SendCommandToDevice(name, binaryData, subfolder);

### SendCommandToDeviceAsync(DeviceName, ByteString, CallSettings)

    public virtual Task<SendCommandToDeviceResponse> SendCommandToDeviceAsync(DeviceName name, ByteString binaryData, CallSettings callSettings = null)

Sends a command to the specified device. In order for a device to be able
to receive commands, it must:
1) be connected to Cloud IoT Core using the MQTT protocol, and
2) be subscribed to the group of MQTT topics specified by
/devices/{device-id}/commands/#. This subscription will receive commands
at the top-level topic /devices/{device-id}/commands as well as commands
for subfolders, like /devices/{device-id}/commands/subfolder.
Note that subscribing to specific subfolders is not supported.
If the command could not be delivered to the device, this method will
return an error; in particular, if the device is not subscribed, this
method will return FAILED_PRECONDITION. Otherwise, this method will
return OK. If the subscription is QoS 1, at least once delivery will be
guaranteed; for QoS 0, no acknowledgment will be expected from the device.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceName` Required. The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. |
| `binaryData` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.ByteString.html` Required. The command data to send to the device. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.SendCommandToDeviceResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    DeviceName name = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
    ByteString binaryData = ByteString.Empty;
    // Make the request
    SendCommandToDeviceResponse response = await deviceManagerClient.SendCommandToDeviceAsync(name, binaryData);

### SendCommandToDeviceAsync(DeviceName, ByteString, string, CallSettings)

    public virtual Task<SendCommandToDeviceResponse> SendCommandToDeviceAsync(DeviceName name, ByteString binaryData, string subfolder, CallSettings callSettings = null)

Sends a command to the specified device. In order for a device to be able
to receive commands, it must:
1) be connected to Cloud IoT Core using the MQTT protocol, and
2) be subscribed to the group of MQTT topics specified by
/devices/{device-id}/commands/#. This subscription will receive commands
at the top-level topic /devices/{device-id}/commands as well as commands
for subfolders, like /devices/{device-id}/commands/subfolder.
Note that subscribing to specific subfolders is not supported.
If the command could not be delivered to the device, this method will
return an error; in particular, if the device is not subscribed, this
method will return FAILED_PRECONDITION. Otherwise, this method will
return OK. If the subscription is QoS 1, at least once delivery will be
guaranteed; for QoS 0, no acknowledgment will be expected from the device.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceName` Required. The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. |
| `binaryData` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.ByteString.html` Required. The command data to send to the device. |
| `subfolder` | `https://learn.microsoft.com/dotnet/api/system.string` Optional subfolder for the command. If empty, the command will be delivered to the /devices/{device-id}/commands topic, otherwise it will be delivered to the /devices/{device-id}/commands/{subfolder} topic. Multi-level subfolders are allowed. This field must not have more than 256 characters, and must not contain any MQTT wildcards ("+" or "#") or null characters. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.SendCommandToDeviceResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    DeviceName name = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
    ByteString binaryData = ByteString.Empty;
    string subfolder = "";
    // Make the request
    SendCommandToDeviceResponse response = await deviceManagerClient.SendCommandToDeviceAsync(name, binaryData, subfolder);

### SendCommandToDeviceAsync(DeviceName, ByteString, string, CancellationToken)

    public virtual Task<SendCommandToDeviceResponse> SendCommandToDeviceAsync(DeviceName name, ByteString binaryData, string subfolder, CancellationToken cancellationToken)

Sends a command to the specified device. In order for a device to be able
to receive commands, it must:
1) be connected to Cloud IoT Core using the MQTT protocol, and
2) be subscribed to the group of MQTT topics specified by
/devices/{device-id}/commands/#. This subscription will receive commands
at the top-level topic /devices/{device-id}/commands as well as commands
for subfolders, like /devices/{device-id}/commands/subfolder.
Note that subscribing to specific subfolders is not supported.
If the command could not be delivered to the device, this method will
return an error; in particular, if the device is not subscribed, this
method will return FAILED_PRECONDITION. Otherwise, this method will
return OK. If the subscription is QoS 1, at least once delivery will be
guaranteed; for QoS 0, no acknowledgment will be expected from the device.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceName` Required. The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. |
| `binaryData` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.ByteString.html` Required. The command data to send to the device. |
| `subfolder` | `https://learn.microsoft.com/dotnet/api/system.string` Optional subfolder for the command. If empty, the command will be delivered to the /devices/{device-id}/commands topic, otherwise it will be delivered to the /devices/{device-id}/commands/{subfolder} topic. Multi-level subfolders are allowed. This field must not have more than 256 characters, and must not contain any MQTT wildcards ("+" or "#") or null characters. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.SendCommandToDeviceResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    DeviceName name = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
    ByteString binaryData = ByteString.Empty;
    string subfolder = "";
    // Make the request
    SendCommandToDeviceResponse response = await deviceManagerClient.SendCommandToDeviceAsync(name, binaryData, subfolder);

### SendCommandToDeviceAsync(DeviceName, ByteString, CancellationToken)

    public virtual Task<SendCommandToDeviceResponse> SendCommandToDeviceAsync(DeviceName name, ByteString binaryData, CancellationToken cancellationToken)

Sends a command to the specified device. In order for a device to be able
to receive commands, it must:
1) be connected to Cloud IoT Core using the MQTT protocol, and
2) be subscribed to the group of MQTT topics specified by
/devices/{device-id}/commands/#. This subscription will receive commands
at the top-level topic /devices/{device-id}/commands as well as commands
for subfolders, like /devices/{device-id}/commands/subfolder.
Note that subscribing to specific subfolders is not supported.
If the command could not be delivered to the device, this method will
return an error; in particular, if the device is not subscribed, this
method will return FAILED_PRECONDITION. Otherwise, this method will
return OK. If the subscription is QoS 1, at least once delivery will be
guaranteed; for QoS 0, no acknowledgment will be expected from the device.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceName` Required. The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. |
| `binaryData` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.ByteString.html` Required. The command data to send to the device. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.SendCommandToDeviceResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    DeviceName name = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]");
    ByteString binaryData = ByteString.Empty;
    // Make the request
    SendCommandToDeviceResponse response = await deviceManagerClient.SendCommandToDeviceAsync(name, binaryData);

### SendCommandToDeviceAsync(SendCommandToDeviceRequest, CallSettings)

    public virtual Task<SendCommandToDeviceResponse> SendCommandToDeviceAsync(SendCommandToDeviceRequest request, CallSettings callSettings = null)

Sends a command to the specified device. In order for a device to be able
to receive commands, it must:
1) be connected to Cloud IoT Core using the MQTT protocol, and
2) be subscribed to the group of MQTT topics specified by
/devices/{device-id}/commands/#. This subscription will receive commands
at the top-level topic /devices/{device-id}/commands as well as commands
for subfolders, like /devices/{device-id}/commands/subfolder.
Note that subscribing to specific subfolders is not supported.
If the command could not be delivered to the device, this method will
return an error; in particular, if the device is not subscribed, this
method will return FAILED_PRECONDITION. Otherwise, this method will
return OK. If the subscription is QoS 1, at least once delivery will be
guaranteed; for QoS 0, no acknowledgment will be expected from the device.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.SendCommandToDeviceRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.SendCommandToDeviceResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    SendCommandToDeviceRequest request = new SendCommandToDeviceRequest
    {
        DeviceName = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]"),
        BinaryData = ByteString.Empty,
        Subfolder = "",
    };
    // Make the request
    SendCommandToDeviceResponse response = await deviceManagerClient.SendCommandToDeviceAsync(request);

### SendCommandToDeviceAsync(SendCommandToDeviceRequest, CancellationToken)

    public virtual Task<SendCommandToDeviceResponse> SendCommandToDeviceAsync(SendCommandToDeviceRequest request, CancellationToken cancellationToken)

Sends a command to the specified device. In order for a device to be able
to receive commands, it must:
1) be connected to Cloud IoT Core using the MQTT protocol, and
2) be subscribed to the group of MQTT topics specified by
/devices/{device-id}/commands/#. This subscription will receive commands
at the top-level topic /devices/{device-id}/commands as well as commands
for subfolders, like /devices/{device-id}/commands/subfolder.
Note that subscribing to specific subfolders is not supported.
If the command could not be delivered to the device, this method will
return an error; in particular, if the device is not subscribed, this
method will return FAILED_PRECONDITION. Otherwise, this method will
return OK. If the subscription is QoS 1, at least once delivery will be
guaranteed; for QoS 0, no acknowledgment will be expected from the device.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.SendCommandToDeviceRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.SendCommandToDeviceResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    SendCommandToDeviceRequest request = new SendCommandToDeviceRequest
    {
        DeviceName = DeviceName.FromProjectLocationRegistryDevice("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]"),
        BinaryData = ByteString.Empty,
        Subfolder = "",
    };
    // Make the request
    SendCommandToDeviceResponse response = await deviceManagerClient.SendCommandToDeviceAsync(request);

### SendCommandToDeviceAsync(string, ByteString, CallSettings)

    public virtual Task<SendCommandToDeviceResponse> SendCommandToDeviceAsync(string name, ByteString binaryData, CallSettings callSettings = null)

Sends a command to the specified device. In order for a device to be able
to receive commands, it must:
1) be connected to Cloud IoT Core using the MQTT protocol, and
2) be subscribed to the group of MQTT topics specified by
/devices/{device-id}/commands/#. This subscription will receive commands
at the top-level topic /devices/{device-id}/commands as well as commands
for subfolders, like /devices/{device-id}/commands/subfolder.
Note that subscribing to specific subfolders is not supported.
If the command could not be delivered to the device, this method will
return an error; in particular, if the device is not subscribed, this
method will return FAILED_PRECONDITION. Otherwise, this method will
return OK. If the subscription is QoS 1, at least once delivery will be
guaranteed; for QoS 0, no acknowledgment will be expected from the device.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. |
| `binaryData` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.ByteString.html` Required. The command data to send to the device. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.SendCommandToDeviceResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]/devices/[DEVICE]";
    ByteString binaryData = ByteString.Empty;
    // Make the request
    SendCommandToDeviceResponse response = await deviceManagerClient.SendCommandToDeviceAsync(name, binaryData);

### SendCommandToDeviceAsync(string, ByteString, string, CallSettings)

    public virtual Task<SendCommandToDeviceResponse> SendCommandToDeviceAsync(string name, ByteString binaryData, string subfolder, CallSettings callSettings = null)

Sends a command to the specified device. In order for a device to be able
to receive commands, it must:
1) be connected to Cloud IoT Core using the MQTT protocol, and
2) be subscribed to the group of MQTT topics specified by
/devices/{device-id}/commands/#. This subscription will receive commands
at the top-level topic /devices/{device-id}/commands as well as commands
for subfolders, like /devices/{device-id}/commands/subfolder.
Note that subscribing to specific subfolders is not supported.
If the command could not be delivered to the device, this method will
return an error; in particular, if the device is not subscribed, this
method will return FAILED_PRECONDITION. Otherwise, this method will
return OK. If the subscription is QoS 1, at least once delivery will be
guaranteed; for QoS 0, no acknowledgment will be expected from the device.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. |
| `binaryData` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.ByteString.html` Required. The command data to send to the device. |
| `subfolder` | `https://learn.microsoft.com/dotnet/api/system.string` Optional subfolder for the command. If empty, the command will be delivered to the /devices/{device-id}/commands topic, otherwise it will be delivered to the /devices/{device-id}/commands/{subfolder} topic. Multi-level subfolders are allowed. This field must not have more than 256 characters, and must not contain any MQTT wildcards ("+" or "#") or null characters. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.SendCommandToDeviceResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]/devices/[DEVICE]";
    ByteString binaryData = ByteString.Empty;
    string subfolder = "";
    // Make the request
    SendCommandToDeviceResponse response = await deviceManagerClient.SendCommandToDeviceAsync(name, binaryData, subfolder);

### SendCommandToDeviceAsync(string, ByteString, string, CancellationToken)

    public virtual Task<SendCommandToDeviceResponse> SendCommandToDeviceAsync(string name, ByteString binaryData, string subfolder, CancellationToken cancellationToken)

Sends a command to the specified device. In order for a device to be able
to receive commands, it must:
1) be connected to Cloud IoT Core using the MQTT protocol, and
2) be subscribed to the group of MQTT topics specified by
/devices/{device-id}/commands/#. This subscription will receive commands
at the top-level topic /devices/{device-id}/commands as well as commands
for subfolders, like /devices/{device-id}/commands/subfolder.
Note that subscribing to specific subfolders is not supported.
If the command could not be delivered to the device, this method will
return an error; in particular, if the device is not subscribed, this
method will return FAILED_PRECONDITION. Otherwise, this method will
return OK. If the subscription is QoS 1, at least once delivery will be
guaranteed; for QoS 0, no acknowledgment will be expected from the device.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. |
| `binaryData` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.ByteString.html` Required. The command data to send to the device. |
| `subfolder` | `https://learn.microsoft.com/dotnet/api/system.string` Optional subfolder for the command. If empty, the command will be delivered to the /devices/{device-id}/commands topic, otherwise it will be delivered to the /devices/{device-id}/commands/{subfolder} topic. Multi-level subfolders are allowed. This field must not have more than 256 characters, and must not contain any MQTT wildcards ("+" or "#") or null characters. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.SendCommandToDeviceResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]/devices/[DEVICE]";
    ByteString binaryData = ByteString.Empty;
    string subfolder = "";
    // Make the request
    SendCommandToDeviceResponse response = await deviceManagerClient.SendCommandToDeviceAsync(name, binaryData, subfolder);

### SendCommandToDeviceAsync(string, ByteString, CancellationToken)

    public virtual Task<SendCommandToDeviceResponse> SendCommandToDeviceAsync(string name, ByteString binaryData, CancellationToken cancellationToken)

Sends a command to the specified device. In order for a device to be able
to receive commands, it must:
1) be connected to Cloud IoT Core using the MQTT protocol, and
2) be subscribed to the group of MQTT topics specified by
/devices/{device-id}/commands/#. This subscription will receive commands
at the top-level topic /devices/{device-id}/commands as well as commands
for subfolders, like /devices/{device-id}/commands/subfolder.
Note that subscribing to specific subfolders is not supported.
If the command could not be delivered to the device, this method will
return an error; in particular, if the device is not subscribed, this
method will return FAILED_PRECONDITION. Otherwise, this method will
return OK. If the subscription is QoS 1, at least once delivery will be
guaranteed; for QoS 0, no acknowledgment will be expected from the device.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. |
| `binaryData` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.ByteString.html` Required. The command data to send to the device. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.SendCommandToDeviceResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]/devices/[DEVICE]";
    ByteString binaryData = ByteString.Empty;
    // Make the request
    SendCommandToDeviceResponse response = await deviceManagerClient.SendCommandToDeviceAsync(name, binaryData);

### SetIamPolicy(IResourceName, Policy, CallSettings)

    public virtual Policy SetIamPolicy(IResourceName resource, Policy policy, CallSettings callSettings = null)

Sets the access control policy on the specified resource. Replaces any
existing policy.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `resource` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax/IResourceName.cs` REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. |
| `policy` | `https://github.com/googleapis/google-cloud-dotnet/blob/ff2c06edc86420d5c55db210dfd1c5b6eb7d9bf1/apis/Google.Cloud.Iam.V1/Google.Cloud.Iam.V1/Policy.g.cs` REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://github.com/googleapis/google-cloud-dotnet/blob/ff2c06edc86420d5c55db210dfd1c5b6eb7d9bf1/apis/Google.Cloud.Iam.V1/Google.Cloud.Iam.V1/Policy.g.cs` | The RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
    Policy policy = new Policy();
    // Make the request
    Policy response = deviceManagerClient.SetIamPolicy(resource, policy);

### SetIamPolicy(SetIamPolicyRequest, CallSettings)

    public virtual Policy SetIamPolicy(SetIamPolicyRequest request, CallSettings callSettings = null)

Sets the access control policy on the specified resource. Replaces any
existing policy.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://github.com/googleapis/google-cloud-dotnet/blob/ff2c06edc86420d5c55db210dfd1c5b6eb7d9bf1/apis/Google.Cloud.Iam.V1/Google.Cloud.Iam.V1/IamPolicy.g.cs` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://github.com/googleapis/google-cloud-dotnet/blob/ff2c06edc86420d5c55db210dfd1c5b6eb7d9bf1/apis/Google.Cloud.Iam.V1/Google.Cloud.Iam.V1/Policy.g.cs` | The RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    SetIamPolicyRequest request = new SetIamPolicyRequest
    {
        ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
        Policy = new Policy(),
        UpdateMask = new FieldMask(),
    };
    // Make the request
    Policy response = deviceManagerClient.SetIamPolicy(request);

### SetIamPolicy(string, Policy, CallSettings)

    public virtual Policy SetIamPolicy(string resource, Policy policy, CallSettings callSettings = null)

Sets the access control policy on the specified resource. Replaces any
existing policy.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `resource` | `https://learn.microsoft.com/dotnet/api/system.string` REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. |
| `policy` | `https://github.com/googleapis/google-cloud-dotnet/blob/ff2c06edc86420d5c55db210dfd1c5b6eb7d9bf1/apis/Google.Cloud.Iam.V1/Google.Cloud.Iam.V1/Policy.g.cs` REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://github.com/googleapis/google-cloud-dotnet/blob/ff2c06edc86420d5c55db210dfd1c5b6eb7d9bf1/apis/Google.Cloud.Iam.V1/Google.Cloud.Iam.V1/Policy.g.cs` | The RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    string resource = "a/wildcard/resource";
    Policy policy = new Policy();
    // Make the request
    Policy response = deviceManagerClient.SetIamPolicy(resource, policy);

### SetIamPolicyAsync(IResourceName, Policy, CallSettings)

    public virtual Task<Policy> SetIamPolicyAsync(IResourceName resource, Policy policy, CallSettings callSettings = null)

Sets the access control policy on the specified resource. Replaces any
existing policy.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `resource` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax/IResourceName.cs` REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. |
| `policy` | `https://github.com/googleapis/google-cloud-dotnet/blob/ff2c06edc86420d5c55db210dfd1c5b6eb7d9bf1/apis/Google.Cloud.Iam.V1/Google.Cloud.Iam.V1/Policy.g.cs` REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://github.com/googleapis/google-cloud-dotnet/blob/ff2c06edc86420d5c55db210dfd1c5b6eb7d9bf1/apis/Google.Cloud.Iam.V1/Google.Cloud.Iam.V1/Policy.g.cs` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
    Policy policy = new Policy();
    // Make the request
    Policy response = await deviceManagerClient.SetIamPolicyAsync(resource, policy);

### SetIamPolicyAsync(IResourceName, Policy, CancellationToken)

    public virtual Task<Policy> SetIamPolicyAsync(IResourceName resource, Policy policy, CancellationToken cancellationToken)

Sets the access control policy on the specified resource. Replaces any
existing policy.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `resource` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax/IResourceName.cs` REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. |
| `policy` | `https://github.com/googleapis/google-cloud-dotnet/blob/ff2c06edc86420d5c55db210dfd1c5b6eb7d9bf1/apis/Google.Cloud.Iam.V1/Google.Cloud.Iam.V1/Policy.g.cs` REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://github.com/googleapis/google-cloud-dotnet/blob/ff2c06edc86420d5c55db210dfd1c5b6eb7d9bf1/apis/Google.Cloud.Iam.V1/Google.Cloud.Iam.V1/Policy.g.cs` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
    Policy policy = new Policy();
    // Make the request
    Policy response = await deviceManagerClient.SetIamPolicyAsync(resource, policy);

### SetIamPolicyAsync(SetIamPolicyRequest, CallSettings)

    public virtual Task<Policy> SetIamPolicyAsync(SetIamPolicyRequest request, CallSettings callSettings = null)

Sets the access control policy on the specified resource. Replaces any
existing policy.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://github.com/googleapis/google-cloud-dotnet/blob/ff2c06edc86420d5c55db210dfd1c5b6eb7d9bf1/apis/Google.Cloud.Iam.V1/Google.Cloud.Iam.V1/IamPolicy.g.cs` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://github.com/googleapis/google-cloud-dotnet/blob/ff2c06edc86420d5c55db210dfd1c5b6eb7d9bf1/apis/Google.Cloud.Iam.V1/Google.Cloud.Iam.V1/Policy.g.cs` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    SetIamPolicyRequest request = new SetIamPolicyRequest
    {
        ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
        Policy = new Policy(),
        UpdateMask = new FieldMask(),
    };
    // Make the request
    Policy response = await deviceManagerClient.SetIamPolicyAsync(request);

### SetIamPolicyAsync(SetIamPolicyRequest, CancellationToken)

    public virtual Task<Policy> SetIamPolicyAsync(SetIamPolicyRequest request, CancellationToken cancellationToken)

Sets the access control policy on the specified resource. Replaces any
existing policy.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://github.com/googleapis/google-cloud-dotnet/blob/ff2c06edc86420d5c55db210dfd1c5b6eb7d9bf1/apis/Google.Cloud.Iam.V1/Google.Cloud.Iam.V1/IamPolicy.g.cs` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://github.com/googleapis/google-cloud-dotnet/blob/ff2c06edc86420d5c55db210dfd1c5b6eb7d9bf1/apis/Google.Cloud.Iam.V1/Google.Cloud.Iam.V1/Policy.g.cs` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    SetIamPolicyRequest request = new SetIamPolicyRequest
    {
        ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
        Policy = new Policy(),
        UpdateMask = new FieldMask(),
    };
    // Make the request
    Policy response = await deviceManagerClient.SetIamPolicyAsync(request);

### SetIamPolicyAsync(string, Policy, CallSettings)

    public virtual Task<Policy> SetIamPolicyAsync(string resource, Policy policy, CallSettings callSettings = null)

Sets the access control policy on the specified resource. Replaces any
existing policy.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `resource` | `https://learn.microsoft.com/dotnet/api/system.string` REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. |
| `policy` | `https://github.com/googleapis/google-cloud-dotnet/blob/ff2c06edc86420d5c55db210dfd1c5b6eb7d9bf1/apis/Google.Cloud.Iam.V1/Google.Cloud.Iam.V1/Policy.g.cs` REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://github.com/googleapis/google-cloud-dotnet/blob/ff2c06edc86420d5c55db210dfd1c5b6eb7d9bf1/apis/Google.Cloud.Iam.V1/Google.Cloud.Iam.V1/Policy.g.cs` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    string resource = "a/wildcard/resource";
    Policy policy = new Policy();
    // Make the request
    Policy response = await deviceManagerClient.SetIamPolicyAsync(resource, policy);

### SetIamPolicyAsync(string, Policy, CancellationToken)

    public virtual Task<Policy> SetIamPolicyAsync(string resource, Policy policy, CancellationToken cancellationToken)

Sets the access control policy on the specified resource. Replaces any
existing policy.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `resource` | `https://learn.microsoft.com/dotnet/api/system.string` REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. |
| `policy` | `https://github.com/googleapis/google-cloud-dotnet/blob/ff2c06edc86420d5c55db210dfd1c5b6eb7d9bf1/apis/Google.Cloud.Iam.V1/Google.Cloud.Iam.V1/Policy.g.cs` REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://github.com/googleapis/google-cloud-dotnet/blob/ff2c06edc86420d5c55db210dfd1c5b6eb7d9bf1/apis/Google.Cloud.Iam.V1/Google.Cloud.Iam.V1/Policy.g.cs` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    string resource = "a/wildcard/resource";
    Policy policy = new Policy();
    // Make the request
    Policy response = await deviceManagerClient.SetIamPolicyAsync(resource, policy);

### ShutdownDefaultChannelsAsync()

    public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceManagerClient#Google_Cloud_Iot_V1_DeviceManagerClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceManagerClient#Google_Cloud_Iot_V1_DeviceManagerClient_CreateAsync_System_Threading_CancellationToken_). Channels which weren't automatically created are not
affected.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A task representing the asynchronous shutdown operation. |

**Remarks** After calling this method, further calls to [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceManagerClient#Google_Cloud_Iot_V1_DeviceManagerClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceManagerClient#Google_Cloud_Iot_V1_DeviceManagerClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down
by another call to this method.

### TestIamPermissions(IResourceName, IEnumerable\<string\>, CallSettings)

    public virtual TestIamPermissionsResponse TestIamPermissions(IResourceName resource, IEnumerable<string> permissions, CallSettings callSettings = null)

Returns permissions that a caller has on the specified resource.
If the resource does not exist, this will return an empty set of
permissions, not a NOT_FOUND error.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `resource` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax/IResourceName.cs` REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. |
| `permissions` | `https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1https://learn.microsoft.com/dotnet/api/system.string` The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.* ') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://github.com/googleapis/google-cloud-dotnet/blob/ff2c06edc86420d5c55db210dfd1c5b6eb7d9bf1/apis/Google.Cloud.Iam.V1/Google.Cloud.Iam.V1/IamPolicy.g.cs` | The RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
    IEnumerable<string> permissions = new string[] { "", };
    // Make the request
    TestIamPermissionsResponse response = deviceManagerClient.TestIamPermissions(resource, permissions);

### TestIamPermissions(TestIamPermissionsRequest, CallSettings)

    public virtual TestIamPermissionsResponse TestIamPermissions(TestIamPermissionsRequest request, CallSettings callSettings = null)

Returns permissions that a caller has on the specified resource.
If the resource does not exist, this will return an empty set of
permissions, not a NOT_FOUND error.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://github.com/googleapis/google-cloud-dotnet/blob/ff2c06edc86420d5c55db210dfd1c5b6eb7d9bf1/apis/Google.Cloud.Iam.V1/Google.Cloud.Iam.V1/IamPolicy.g.cs` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://github.com/googleapis/google-cloud-dotnet/blob/ff2c06edc86420d5c55db210dfd1c5b6eb7d9bf1/apis/Google.Cloud.Iam.V1/Google.Cloud.Iam.V1/IamPolicy.g.cs` | The RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    TestIamPermissionsRequest request = new TestIamPermissionsRequest
    {
        ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
        Permissions = { "", },
    };
    // Make the request
    TestIamPermissionsResponse response = deviceManagerClient.TestIamPermissions(request);

### TestIamPermissions(string, IEnumerable\<string\>, CallSettings)

    public virtual TestIamPermissionsResponse TestIamPermissions(string resource, IEnumerable<string> permissions, CallSettings callSettings = null)

Returns permissions that a caller has on the specified resource.
If the resource does not exist, this will return an empty set of
permissions, not a NOT_FOUND error.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `resource` | `https://learn.microsoft.com/dotnet/api/system.string` REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. |
| `permissions` | `https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1https://learn.microsoft.com/dotnet/api/system.string` The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.* ') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://github.com/googleapis/google-cloud-dotnet/blob/ff2c06edc86420d5c55db210dfd1c5b6eb7d9bf1/apis/Google.Cloud.Iam.V1/Google.Cloud.Iam.V1/IamPolicy.g.cs` | The RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    string resource = "a/wildcard/resource";
    IEnumerable<string> permissions = new string[] { "", };
    // Make the request
    TestIamPermissionsResponse response = deviceManagerClient.TestIamPermissions(resource, permissions);

### TestIamPermissionsAsync(IResourceName, IEnumerable\<string\>, CallSettings)

    public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(IResourceName resource, IEnumerable<string> permissions, CallSettings callSettings = null)

Returns permissions that a caller has on the specified resource.
If the resource does not exist, this will return an empty set of
permissions, not a NOT_FOUND error.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `resource` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax/IResourceName.cs` REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. |
| `permissions` | `https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1https://learn.microsoft.com/dotnet/api/system.string` The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.* ') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://github.com/googleapis/google-cloud-dotnet/blob/ff2c06edc86420d5c55db210dfd1c5b6eb7d9bf1/apis/Google.Cloud.Iam.V1/Google.Cloud.Iam.V1/IamPolicy.g.cs` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
    IEnumerable<string> permissions = new string[] { "", };
    // Make the request
    TestIamPermissionsResponse response = await deviceManagerClient.TestIamPermissionsAsync(resource, permissions);

### TestIamPermissionsAsync(IResourceName, IEnumerable\<string\>, CancellationToken)

    public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(IResourceName resource, IEnumerable<string> permissions, CancellationToken cancellationToken)

Returns permissions that a caller has on the specified resource.
If the resource does not exist, this will return an empty set of
permissions, not a NOT_FOUND error.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `resource` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax/IResourceName.cs` REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. |
| `permissions` | `https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1https://learn.microsoft.com/dotnet/api/system.string` The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.* ') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://github.com/googleapis/google-cloud-dotnet/blob/ff2c06edc86420d5c55db210dfd1c5b6eb7d9bf1/apis/Google.Cloud.Iam.V1/Google.Cloud.Iam.V1/IamPolicy.g.cs` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
    IEnumerable<string> permissions = new string[] { "", };
    // Make the request
    TestIamPermissionsResponse response = await deviceManagerClient.TestIamPermissionsAsync(resource, permissions);

### TestIamPermissionsAsync(TestIamPermissionsRequest, CallSettings)

    public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsRequest request, CallSettings callSettings = null)

Returns permissions that a caller has on the specified resource.
If the resource does not exist, this will return an empty set of
permissions, not a NOT_FOUND error.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://github.com/googleapis/google-cloud-dotnet/blob/ff2c06edc86420d5c55db210dfd1c5b6eb7d9bf1/apis/Google.Cloud.Iam.V1/Google.Cloud.Iam.V1/IamPolicy.g.cs` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://github.com/googleapis/google-cloud-dotnet/blob/ff2c06edc86420d5c55db210dfd1c5b6eb7d9bf1/apis/Google.Cloud.Iam.V1/Google.Cloud.Iam.V1/IamPolicy.g.cs` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    TestIamPermissionsRequest request = new TestIamPermissionsRequest
    {
        ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
        Permissions = { "", },
    };
    // Make the request
    TestIamPermissionsResponse response = await deviceManagerClient.TestIamPermissionsAsync(request);

### TestIamPermissionsAsync(TestIamPermissionsRequest, CancellationToken)

    public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsRequest request, CancellationToken cancellationToken)

Returns permissions that a caller has on the specified resource.
If the resource does not exist, this will return an empty set of
permissions, not a NOT_FOUND error.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://github.com/googleapis/google-cloud-dotnet/blob/ff2c06edc86420d5c55db210dfd1c5b6eb7d9bf1/apis/Google.Cloud.Iam.V1/Google.Cloud.Iam.V1/IamPolicy.g.cs` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://github.com/googleapis/google-cloud-dotnet/blob/ff2c06edc86420d5c55db210dfd1c5b6eb7d9bf1/apis/Google.Cloud.Iam.V1/Google.Cloud.Iam.V1/IamPolicy.g.cs` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    TestIamPermissionsRequest request = new TestIamPermissionsRequest
    {
        ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
        Permissions = { "", },
    };
    // Make the request
    TestIamPermissionsResponse response = await deviceManagerClient.TestIamPermissionsAsync(request);

### TestIamPermissionsAsync(string, IEnumerable\<string\>, CallSettings)

    public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(string resource, IEnumerable<string> permissions, CallSettings callSettings = null)

Returns permissions that a caller has on the specified resource.
If the resource does not exist, this will return an empty set of
permissions, not a NOT_FOUND error.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `resource` | `https://learn.microsoft.com/dotnet/api/system.string` REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. |
| `permissions` | `https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1https://learn.microsoft.com/dotnet/api/system.string` The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.* ') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://github.com/googleapis/google-cloud-dotnet/blob/ff2c06edc86420d5c55db210dfd1c5b6eb7d9bf1/apis/Google.Cloud.Iam.V1/Google.Cloud.Iam.V1/IamPolicy.g.cs` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    string resource = "a/wildcard/resource";
    IEnumerable<string> permissions = new string[] { "", };
    // Make the request
    TestIamPermissionsResponse response = await deviceManagerClient.TestIamPermissionsAsync(resource, permissions);

### TestIamPermissionsAsync(string, IEnumerable\<string\>, CancellationToken)

    public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(string resource, IEnumerable<string> permissions, CancellationToken cancellationToken)

Returns permissions that a caller has on the specified resource.
If the resource does not exist, this will return an empty set of
permissions, not a NOT_FOUND error.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `resource` | `https://learn.microsoft.com/dotnet/api/system.string` REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. |
| `permissions` | `https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1https://learn.microsoft.com/dotnet/api/system.string` The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.* ') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://github.com/googleapis/google-cloud-dotnet/blob/ff2c06edc86420d5c55db210dfd1c5b6eb7d9bf1/apis/Google.Cloud.Iam.V1/Google.Cloud.Iam.V1/IamPolicy.g.cs` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    string resource = "a/wildcard/resource";
    IEnumerable<string> permissions = new string[] { "", };
    // Make the request
    TestIamPermissionsResponse response = await deviceManagerClient.TestIamPermissionsAsync(resource, permissions);

### UnbindDeviceFromGateway(RegistryName, string, string, CallSettings)

    public virtual UnbindDeviceFromGatewayResponse UnbindDeviceFromGateway(RegistryName parent, string gatewayId, string deviceId, CallSettings callSettings = null)

Deletes the association between the device and the gateway.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName` Required. The name of the registry. For example, `projects/example-project/locations/us-central1/registries/my-registry`. |
| `gatewayId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The value of `gateway_id` can be either the device numeric ID or the user-defined device identifier. |
| `deviceId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The device to disassociate from the specified gateway. The value of `device_id` can be either the device numeric ID or the user-defined device identifier. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.UnbindDeviceFromGatewayResponse` | The RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    RegistryName parent = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]");
    string gatewayId = "";
    string deviceId = "";
    // Make the request
    UnbindDeviceFromGatewayResponse response = deviceManagerClient.UnbindDeviceFromGateway(parent, gatewayId, deviceId);

### UnbindDeviceFromGateway(UnbindDeviceFromGatewayRequest, CallSettings)

    public virtual UnbindDeviceFromGatewayResponse UnbindDeviceFromGateway(UnbindDeviceFromGatewayRequest request, CallSettings callSettings = null)

Deletes the association between the device and the gateway.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.UnbindDeviceFromGatewayRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.UnbindDeviceFromGatewayResponse` | The RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    UnbindDeviceFromGatewayRequest request = new UnbindDeviceFromGatewayRequest
    {
        ParentAsRegistryName = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]"),
        GatewayId = "",
        DeviceId = "",
    };
    // Make the request
    UnbindDeviceFromGatewayResponse response = deviceManagerClient.UnbindDeviceFromGateway(request);

### UnbindDeviceFromGateway(string, string, string, CallSettings)

    public virtual UnbindDeviceFromGatewayResponse UnbindDeviceFromGateway(string parent, string gatewayId, string deviceId, CallSettings callSettings = null)

Deletes the association between the device and the gateway.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the registry. For example, `projects/example-project/locations/us-central1/registries/my-registry`. |
| `gatewayId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The value of `gateway_id` can be either the device numeric ID or the user-defined device identifier. |
| `deviceId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The device to disassociate from the specified gateway. The value of `device_id` can be either the device numeric ID or the user-defined device identifier. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.UnbindDeviceFromGatewayResponse` | The RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]";
    string gatewayId = "";
    string deviceId = "";
    // Make the request
    UnbindDeviceFromGatewayResponse response = deviceManagerClient.UnbindDeviceFromGateway(parent, gatewayId, deviceId);

### UnbindDeviceFromGatewayAsync(RegistryName, string, string, CallSettings)

    public virtual Task<UnbindDeviceFromGatewayResponse> UnbindDeviceFromGatewayAsync(RegistryName parent, string gatewayId, string deviceId, CallSettings callSettings = null)

Deletes the association between the device and the gateway.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName` Required. The name of the registry. For example, `projects/example-project/locations/us-central1/registries/my-registry`. |
| `gatewayId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The value of `gateway_id` can be either the device numeric ID or the user-defined device identifier. |
| `deviceId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The device to disassociate from the specified gateway. The value of `device_id` can be either the device numeric ID or the user-defined device identifier. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.UnbindDeviceFromGatewayResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    RegistryName parent = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]");
    string gatewayId = "";
    string deviceId = "";
    // Make the request
    UnbindDeviceFromGatewayResponse response = await deviceManagerClient.UnbindDeviceFromGatewayAsync(parent, gatewayId, deviceId);

### UnbindDeviceFromGatewayAsync(RegistryName, string, string, CancellationToken)

    public virtual Task<UnbindDeviceFromGatewayResponse> UnbindDeviceFromGatewayAsync(RegistryName parent, string gatewayId, string deviceId, CancellationToken cancellationToken)

Deletes the association between the device and the gateway.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName` Required. The name of the registry. For example, `projects/example-project/locations/us-central1/registries/my-registry`. |
| `gatewayId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The value of `gateway_id` can be either the device numeric ID or the user-defined device identifier. |
| `deviceId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The device to disassociate from the specified gateway. The value of `device_id` can be either the device numeric ID or the user-defined device identifier. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.UnbindDeviceFromGatewayResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    RegistryName parent = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]");
    string gatewayId = "";
    string deviceId = "";
    // Make the request
    UnbindDeviceFromGatewayResponse response = await deviceManagerClient.UnbindDeviceFromGatewayAsync(parent, gatewayId, deviceId);

### UnbindDeviceFromGatewayAsync(UnbindDeviceFromGatewayRequest, CallSettings)

    public virtual Task<UnbindDeviceFromGatewayResponse> UnbindDeviceFromGatewayAsync(UnbindDeviceFromGatewayRequest request, CallSettings callSettings = null)

Deletes the association between the device and the gateway.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.UnbindDeviceFromGatewayRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.UnbindDeviceFromGatewayResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    UnbindDeviceFromGatewayRequest request = new UnbindDeviceFromGatewayRequest
    {
        ParentAsRegistryName = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]"),
        GatewayId = "",
        DeviceId = "",
    };
    // Make the request
    UnbindDeviceFromGatewayResponse response = await deviceManagerClient.UnbindDeviceFromGatewayAsync(request);

### UnbindDeviceFromGatewayAsync(UnbindDeviceFromGatewayRequest, CancellationToken)

    public virtual Task<UnbindDeviceFromGatewayResponse> UnbindDeviceFromGatewayAsync(UnbindDeviceFromGatewayRequest request, CancellationToken cancellationToken)

Deletes the association between the device and the gateway.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.UnbindDeviceFromGatewayRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.UnbindDeviceFromGatewayResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    UnbindDeviceFromGatewayRequest request = new UnbindDeviceFromGatewayRequest
    {
        ParentAsRegistryName = RegistryName.FromProjectLocationRegistry("[PROJECT]", "[LOCATION]", "[REGISTRY]"),
        GatewayId = "",
        DeviceId = "",
    };
    // Make the request
    UnbindDeviceFromGatewayResponse response = await deviceManagerClient.UnbindDeviceFromGatewayAsync(request);

### UnbindDeviceFromGatewayAsync(string, string, string, CallSettings)

    public virtual Task<UnbindDeviceFromGatewayResponse> UnbindDeviceFromGatewayAsync(string parent, string gatewayId, string deviceId, CallSettings callSettings = null)

Deletes the association between the device and the gateway.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the registry. For example, `projects/example-project/locations/us-central1/registries/my-registry`. |
| `gatewayId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The value of `gateway_id` can be either the device numeric ID or the user-defined device identifier. |
| `deviceId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The device to disassociate from the specified gateway. The value of `device_id` can be either the device numeric ID or the user-defined device identifier. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.UnbindDeviceFromGatewayResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]";
    string gatewayId = "";
    string deviceId = "";
    // Make the request
    UnbindDeviceFromGatewayResponse response = await deviceManagerClient.UnbindDeviceFromGatewayAsync(parent, gatewayId, deviceId);

### UnbindDeviceFromGatewayAsync(string, string, string, CancellationToken)

    public virtual Task<UnbindDeviceFromGatewayResponse> UnbindDeviceFromGatewayAsync(string parent, string gatewayId, string deviceId, CancellationToken cancellationToken)

Deletes the association between the device and the gateway.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the registry. For example, `projects/example-project/locations/us-central1/registries/my-registry`. |
| `gatewayId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The value of `gateway_id` can be either the device numeric ID or the user-defined device identifier. |
| `deviceId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The device to disassociate from the specified gateway. The value of `device_id` can be either the device numeric ID or the user-defined device identifier. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.UnbindDeviceFromGatewayResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]/registries/[REGISTRY]";
    string gatewayId = "";
    string deviceId = "";
    // Make the request
    UnbindDeviceFromGatewayResponse response = await deviceManagerClient.UnbindDeviceFromGatewayAsync(parent, gatewayId, deviceId);

### UpdateDevice(Device, FieldMask, CallSettings)

    public virtual Device UpdateDevice(Device device, FieldMask updateMask, CallSettings callSettings = null)

Updates a device.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `device` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device` Required. The new values for the device. The `id` and `num_id` fields must be empty, and the field `name` must specify the name path. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0`or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. |
| `updateMask` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.FieldMask.html` Required. Only updates the `device` fields indicated by this mask. The field mask must not be empty, and it must not contain fields that are immutable or only set by the server. Mutable top-level fields: `credentials`, `blocked`, and `metadata` |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device` | The RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    Device device = new Device();
    FieldMask updateMask = new FieldMask();
    // Make the request
    Device response = deviceManagerClient.UpdateDevice(device, updateMask);

### UpdateDevice(UpdateDeviceRequest, CallSettings)

    public virtual Device UpdateDevice(UpdateDeviceRequest request, CallSettings callSettings = null)

Updates a device.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.UpdateDeviceRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device` | The RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    UpdateDeviceRequest request = new UpdateDeviceRequest
    {
        Device = new Device(),
        UpdateMask = new FieldMask(),
    };
    // Make the request
    Device response = deviceManagerClient.UpdateDevice(request);

### UpdateDeviceAsync(Device, FieldMask, CallSettings)

    public virtual Task<Device> UpdateDeviceAsync(Device device, FieldMask updateMask, CallSettings callSettings = null)

Updates a device.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `device` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device` Required. The new values for the device. The `id` and `num_id` fields must be empty, and the field `name` must specify the name path. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0`or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. |
| `updateMask` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.FieldMask.html` Required. Only updates the `device` fields indicated by this mask. The field mask must not be empty, and it must not contain fields that are immutable or only set by the server. Mutable top-level fields: `credentials`, `blocked`, and `metadata` |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    Device device = new Device();
    FieldMask updateMask = new FieldMask();
    // Make the request
    Device response = await deviceManagerClient.UpdateDeviceAsync(device, updateMask);

### UpdateDeviceAsync(Device, FieldMask, CancellationToken)

    public virtual Task<Device> UpdateDeviceAsync(Device device, FieldMask updateMask, CancellationToken cancellationToken)

Updates a device.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `device` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device` Required. The new values for the device. The `id` and `num_id` fields must be empty, and the field `name` must specify the name path. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0`or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. |
| `updateMask` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.FieldMask.html` Required. Only updates the `device` fields indicated by this mask. The field mask must not be empty, and it must not contain fields that are immutable or only set by the server. Mutable top-level fields: `credentials`, `blocked`, and `metadata` |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    Device device = new Device();
    FieldMask updateMask = new FieldMask();
    // Make the request
    Device response = await deviceManagerClient.UpdateDeviceAsync(device, updateMask);

### UpdateDeviceAsync(UpdateDeviceRequest, CallSettings)

    public virtual Task<Device> UpdateDeviceAsync(UpdateDeviceRequest request, CallSettings callSettings = null)

Updates a device.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.UpdateDeviceRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    UpdateDeviceRequest request = new UpdateDeviceRequest
    {
        Device = new Device(),
        UpdateMask = new FieldMask(),
    };
    // Make the request
    Device response = await deviceManagerClient.UpdateDeviceAsync(request);

### UpdateDeviceAsync(UpdateDeviceRequest, CancellationToken)

    public virtual Task<Device> UpdateDeviceAsync(UpdateDeviceRequest request, CancellationToken cancellationToken)

Updates a device.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.UpdateDeviceRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.Device` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    UpdateDeviceRequest request = new UpdateDeviceRequest
    {
        Device = new Device(),
        UpdateMask = new FieldMask(),
    };
    // Make the request
    Device response = await deviceManagerClient.UpdateDeviceAsync(request);

### UpdateDeviceRegistry(DeviceRegistry, FieldMask, CallSettings)

    public virtual DeviceRegistry UpdateDeviceRegistry(DeviceRegistry deviceRegistry, FieldMask updateMask, CallSettings callSettings = null)

Updates a device registry configuration.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `deviceRegistry` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceRegistry` Required. The new values for the device registry. The `id` field must be empty, and the `name` field must indicate the path of the resource. For example, `projects/example-project/locations/us-central1/registries/my-registry`. |
| `updateMask` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.FieldMask.html` Required. Only updates the `device_registry` fields indicated by this mask. The field mask must not be empty, and it must not contain fields that are immutable or only set by the server. Mutable top-level fields: `event_notification_config`, `http_config`, `mqtt_config`, and `state_notification_config`. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceRegistry` | The RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    DeviceRegistry deviceRegistry = new DeviceRegistry();
    FieldMask updateMask = new FieldMask();
    // Make the request
    DeviceRegistry response = deviceManagerClient.UpdateDeviceRegistry(deviceRegistry, updateMask);

### UpdateDeviceRegistry(UpdateDeviceRegistryRequest, CallSettings)

    public virtual DeviceRegistry UpdateDeviceRegistry(UpdateDeviceRegistryRequest request, CallSettings callSettings = null)

Updates a device registry configuration.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.UpdateDeviceRegistryRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceRegistry` | The RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = DeviceManagerClient.Create();
    // Initialize request argument(s)
    UpdateDeviceRegistryRequest request = new UpdateDeviceRegistryRequest
    {
        DeviceRegistry = new DeviceRegistry(),
        UpdateMask = new FieldMask(),
    };
    // Make the request
    DeviceRegistry response = deviceManagerClient.UpdateDeviceRegistry(request);

### UpdateDeviceRegistryAsync(DeviceRegistry, FieldMask, CallSettings)

    public virtual Task<DeviceRegistry> UpdateDeviceRegistryAsync(DeviceRegistry deviceRegistry, FieldMask updateMask, CallSettings callSettings = null)

Updates a device registry configuration.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `deviceRegistry` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceRegistry` Required. The new values for the device registry. The `id` field must be empty, and the `name` field must indicate the path of the resource. For example, `projects/example-project/locations/us-central1/registries/my-registry`. |
| `updateMask` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.FieldMask.html` Required. Only updates the `device_registry` fields indicated by this mask. The field mask must not be empty, and it must not contain fields that are immutable or only set by the server. Mutable top-level fields: `event_notification_config`, `http_config`, `mqtt_config`, and `state_notification_config`. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceRegistry` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    DeviceRegistry deviceRegistry = new DeviceRegistry();
    FieldMask updateMask = new FieldMask();
    // Make the request
    DeviceRegistry response = await deviceManagerClient.UpdateDeviceRegistryAsync(deviceRegistry, updateMask);

### UpdateDeviceRegistryAsync(DeviceRegistry, FieldMask, CancellationToken)

    public virtual Task<DeviceRegistry> UpdateDeviceRegistryAsync(DeviceRegistry deviceRegistry, FieldMask updateMask, CancellationToken cancellationToken)

Updates a device registry configuration.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `deviceRegistry` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceRegistry` Required. The new values for the device registry. The `id` field must be empty, and the `name` field must indicate the path of the resource. For example, `projects/example-project/locations/us-central1/registries/my-registry`. |
| `updateMask` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.FieldMask.html` Required. Only updates the `device_registry` fields indicated by this mask. The field mask must not be empty, and it must not contain fields that are immutable or only set by the server. Mutable top-level fields: `event_notification_config`, `http_config`, `mqtt_config`, and `state_notification_config`. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceRegistry` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    DeviceRegistry deviceRegistry = new DeviceRegistry();
    FieldMask updateMask = new FieldMask();
    // Make the request
    DeviceRegistry response = await deviceManagerClient.UpdateDeviceRegistryAsync(deviceRegistry, updateMask);

### UpdateDeviceRegistryAsync(UpdateDeviceRegistryRequest, CallSettings)

    public virtual Task<DeviceRegistry> UpdateDeviceRegistryAsync(UpdateDeviceRegistryRequest request, CallSettings callSettings = null)

Updates a device registry configuration.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.UpdateDeviceRegistryRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax.Grpc/CallSettings.cs` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceRegistry` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    UpdateDeviceRegistryRequest request = new UpdateDeviceRegistryRequest
    {
        DeviceRegistry = new DeviceRegistry(),
        UpdateMask = new FieldMask(),
    };
    // Make the request
    DeviceRegistry response = await deviceManagerClient.UpdateDeviceRegistryAsync(request);

### UpdateDeviceRegistryAsync(UpdateDeviceRegistryRequest, CancellationToken)

    public virtual Task<DeviceRegistry> UpdateDeviceRegistryAsync(UpdateDeviceRegistryRequest request, CancellationToken cancellationToken)

Updates a device registry configuration.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.UpdateDeviceRegistryRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceRegistry` | A Task containing the RPC response. |

**Example**

    // Create client
    DeviceManagerClient deviceManagerClient = await DeviceManagerClient.CreateAsync();
    // Initialize request argument(s)
    UpdateDeviceRegistryRequest request = new UpdateDeviceRegistryRequest
    {
        DeviceRegistry = new DeviceRegistry(),
        UpdateMask = new FieldMask(),
    };
    // Make the request
    DeviceRegistry response = await deviceManagerClient.UpdateDeviceRegistryAsync(request);