Class DeviceManagerClient (2.0.0)

public abstract class DeviceManagerClient

DeviceManager client wrapper, for convenient use.

Inheritance

Object > DeviceManagerClient

Derived Types

Namespace

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
TypeDescription
System.String

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default DeviceManager scopes.

Property Value
TypeDescription
IReadOnlyList<System.String>
Remarks

GrpcClient

public virtual DeviceManager.DeviceManagerClient GrpcClient { get; }

The underlying gRPC DeviceManager client

Property Value
TypeDescription
DeviceManager.DeviceManagerClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

Methods

BindDeviceToGateway(BindDeviceToGatewayRequest, CallSettings)

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

Associates the device with the gateway.

Parameters
NameDescription
requestBindDeviceToGatewayRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
parentRegistryName

Required. The name of the registry. For example, projects/example-project/locations/us-central1/registries/my-registry.

gatewayIdSystem.String

Required. The value of gateway_id can be either the device numeric ID or the user-defined device identifier.

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
parentSystem.String

Required. The name of the registry. For example, projects/example-project/locations/us-central1/registries/my-registry.

gatewayIdSystem.String

Required. The value of gateway_id can be either the device numeric ID or the user-defined device identifier.

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestBindDeviceToGatewayRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<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
NameDescription
requestBindDeviceToGatewayRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<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
NameDescription
parentRegistryName

Required. The name of the registry. For example, projects/example-project/locations/us-central1/registries/my-registry.

gatewayIdSystem.String

Required. The value of gateway_id can be either the device numeric ID or the user-defined device identifier.

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<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
NameDescription
parentRegistryName

Required. The name of the registry. For example, projects/example-project/locations/us-central1/registries/my-registry.

gatewayIdSystem.String

Required. The value of gateway_id can be either the device numeric ID or the user-defined device identifier.

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<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
NameDescription
parentSystem.String

Required. The name of the registry. For example, projects/example-project/locations/us-central1/registries/my-registry.

gatewayIdSystem.String

Required. The value of gateway_id can be either the device numeric ID or the user-defined device identifier.

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<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
NameDescription
parentSystem.String

Required. The name of the registry. For example, projects/example-project/locations/us-central1/registries/my-registry.

gatewayIdSystem.String

Required. The value of gateway_id can be either the device numeric ID or the user-defined device identifier.

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<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 using the default credentials, endpoint and settings. To specify custom credentials or other settings, use DeviceManagerClientBuilder.

Returns
TypeDescription
DeviceManagerClient

The created DeviceManagerClient.

CreateAsync(CancellationToken)

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

Asynchronously creates a DeviceManagerClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use DeviceManagerClientBuilder.

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
Task<DeviceManagerClient>

The task representing the created DeviceManagerClient.

CreateDevice(CreateDeviceRequest, CallSettings)

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

Creates a device in a device registry.

Parameters
NameDescription
requestCreateDeviceRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
parentRegistryName

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

deviceDevice

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
parentSystem.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.

deviceDevice

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestCreateDeviceRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<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
NameDescription
requestCreateDeviceRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<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
NameDescription
parentRegistryName

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

deviceDevice

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<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
NameDescription
parentRegistryName

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

deviceDevice

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<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
NameDescription
parentSystem.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.

deviceDevice

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<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
NameDescription
parentSystem.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.

deviceDevice

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<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
NameDescription
parentLocationName

Required. The project and cloud region where this device registry must be created. For example, projects/example-project/locations/us-central1.

deviceRegistryDeviceRegistry

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestCreateDeviceRegistryRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
parentSystem.String

Required. The project and cloud region where this device registry must be created. For example, projects/example-project/locations/us-central1.

deviceRegistryDeviceRegistry

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
parentLocationName

Required. The project and cloud region where this device registry must be created. For example, projects/example-project/locations/us-central1.

deviceRegistryDeviceRegistry

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<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
NameDescription
parentLocationName

Required. The project and cloud region where this device registry must be created. For example, projects/example-project/locations/us-central1.

deviceRegistryDeviceRegistry

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.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<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
NameDescription
requestCreateDeviceRegistryRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<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
NameDescription
requestCreateDeviceRegistryRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<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
NameDescription
parentSystem.String

Required. The project and cloud region where this device registry must be created. For example, projects/example-project/locations/us-central1.

deviceRegistryDeviceRegistry

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<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
NameDescription
parentSystem.String

Required. The project and cloud region where this device registry must be created. For example, projects/example-project/locations/us-central1.

deviceRegistryDeviceRegistry

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.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<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
NameDescription
requestDeleteDeviceRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

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
NameDescription
nameDeviceName

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

callSettingsCallSettings

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
NameDescription
nameSystem.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}.

callSettingsCallSettings

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
NameDescription
requestDeleteDeviceRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestDeleteDeviceRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
nameDeviceName

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
nameDeviceName

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
nameSystem.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}.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
nameSystem.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}.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
requestDeleteDeviceRegistryRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

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
NameDescription
nameRegistryName

Required. The name of the device registry. For example, projects/example-project/locations/us-central1/registries/my-registry.

callSettingsCallSettings

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
NameDescription
nameSystem.String

Required. The name of the device registry. For example, projects/example-project/locations/us-central1/registries/my-registry.

callSettingsCallSettings

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
NameDescription
requestDeleteDeviceRegistryRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestDeleteDeviceRegistryRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
nameRegistryName

Required. The name of the device registry. For example, projects/example-project/locations/us-central1/registries/my-registry.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
nameRegistryName

Required. The name of the device registry. For example, projects/example-project/locations/us-central1/registries/my-registry.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
nameSystem.String

Required. The name of the device registry. For example, projects/example-project/locations/us-central1/registries/my-registry.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
nameSystem.String

Required. The name of the device registry. For example, projects/example-project/locations/us-central1/registries/my-registry.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
nameDeviceName

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestGetDeviceRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
nameSystem.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}.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
nameDeviceName

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<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
NameDescription
nameDeviceName

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<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
NameDescription
requestGetDeviceRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<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
NameDescription
requestGetDeviceRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<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
NameDescription
nameSystem.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}.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<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
NameDescription
nameSystem.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}.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<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
NameDescription
requestGetDeviceRegistryRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
nameRegistryName

Required. The name of the device registry. For example, projects/example-project/locations/us-central1/registries/my-registry.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
nameSystem.String

Required. The name of the device registry. For example, projects/example-project/locations/us-central1/registries/my-registry.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestGetDeviceRegistryRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<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
NameDescription
requestGetDeviceRegistryRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<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
NameDescription
nameRegistryName

Required. The name of the device registry. For example, projects/example-project/locations/us-central1/registries/my-registry.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<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
NameDescription
nameRegistryName

Required. The name of the device registry. For example, projects/example-project/locations/us-central1/registries/my-registry.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<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
NameDescription
nameSystem.String

Required. The name of the device registry. For example, projects/example-project/locations/us-central1/registries/my-registry.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<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
NameDescription
nameSystem.String

Required. The name of the device registry. For example, projects/example-project/locations/us-central1/registries/my-registry.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<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
NameDescription
resourceIResourceName

REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Policy

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
NameDescription
requestGetIamPolicyRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Policy

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
NameDescription
resourceSystem.String

REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Policy

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
NameDescription
resourceIResourceName

REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Policy>

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
NameDescription
resourceIResourceName

REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Policy>

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
NameDescription
requestGetIamPolicyRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Policy>

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
NameDescription
requestGetIamPolicyRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Policy>

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
NameDescription
resourceSystem.String

REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Policy>

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
NameDescription
resourceSystem.String

REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Policy>

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
NameDescription
nameDeviceName

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestListDeviceConfigVersionsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
nameSystem.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}.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
nameDeviceName

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<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
NameDescription
nameDeviceName

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<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
NameDescription
requestListDeviceConfigVersionsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<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
NameDescription
requestListDeviceConfigVersionsRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<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
NameDescription
nameSystem.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}.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<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
NameDescription
nameSystem.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}.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<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, Nullable<Int32>, CallSettings)

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

Lists device registries.

Parameters
NameDescription
parentLocationName

Required. The project and cloud region path. For example, projects/example-project/locations/us-central1.

pageTokenSystem.String

The token returned from the previous request. A value of null or an empty string retrieves the first page.

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListDeviceRegistriesResponse, DeviceRegistry>

A pageable sequence of 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
NameDescription
requestListDeviceRegistriesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListDeviceRegistriesResponse, DeviceRegistry>

A pageable sequence of 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, Nullable<Int32>, CallSettings)

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

Lists device registries.

Parameters
NameDescription
parentSystem.String

Required. The project and cloud region path. For example, projects/example-project/locations/us-central1.

pageTokenSystem.String

The token returned from the previous request. A value of null or an empty string retrieves the first page.

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListDeviceRegistriesResponse, DeviceRegistry>

A pageable sequence of 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, Nullable<Int32>, CallSettings)

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

Lists device registries.

Parameters
NameDescription
parentLocationName

Required. The project and cloud region path. For example, projects/example-project/locations/us-central1.

pageTokenSystem.String

The token returned from the previous request. A value of null or an empty string retrieves the first page.

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListDeviceRegistriesResponse, DeviceRegistry>

A pageable asynchronous sequence of 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
NameDescription
requestListDeviceRegistriesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListDeviceRegistriesResponse, DeviceRegistry>

A pageable asynchronous sequence of 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, Nullable<Int32>, CallSettings)

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

Lists device registries.

Parameters
NameDescription
parentSystem.String

Required. The project and cloud region path. For example, projects/example-project/locations/us-central1.

pageTokenSystem.String

The token returned from the previous request. A value of null or an empty string retrieves the first page.

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListDeviceRegistriesResponse, DeviceRegistry>

A pageable asynchronous sequence of 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
NameDescription
requestListDevicesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListDevicesResponse, Device>

A pageable sequence of 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, Nullable<Int32>, 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
NameDescription
parentRegistryName

Required. The device registry path. Required. For example, projects/my-project/locations/us-central1/registries/my-registry.

pageTokenSystem.String

The token returned from the previous request. A value of null or an empty string retrieves the first page.

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListDevicesResponse, Device>

A pageable sequence of 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, Nullable<Int32>, 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
NameDescription
parentSystem.String

Required. The device registry path. Required. For example, projects/my-project/locations/us-central1/registries/my-registry.

pageTokenSystem.String

The token returned from the previous request. A value of null or an empty string retrieves the first page.

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListDevicesResponse, Device>

A pageable sequence of 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
NameDescription
requestListDevicesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListDevicesResponse, Device>

A pageable asynchronous sequence of 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, Nullable<Int32>, 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
NameDescription
parentRegistryName

Required. The device registry path. Required. For example, projects/my-project/locations/us-central1/registries/my-registry.

pageTokenSystem.String

The token returned from the previous request. A value of null or an empty string retrieves the first page.

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListDevicesResponse, Device>

A pageable asynchronous sequence of 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, Nullable<Int32>, 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
NameDescription
parentSystem.String

Required. The device registry path. Required. For example, projects/my-project/locations/us-central1/registries/my-registry.

pageTokenSystem.String

The token returned from the previous request. A value of null or an empty string retrieves the first page.

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListDevicesResponse, Device>

A pageable asynchronous sequence of 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
NameDescription
nameDeviceName

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestListDeviceStatesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
nameSystem.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}.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
nameDeviceName

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<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
NameDescription
nameDeviceName

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<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
NameDescription
requestListDeviceStatesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<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
NameDescription
requestListDeviceStatesRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<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
NameDescription
nameSystem.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}.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<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
NameDescription
nameSystem.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}.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<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
NameDescription
nameDeviceName

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

binaryDataByteString

Required. The configuration data for the device.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestModifyCloudToDeviceConfigRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
nameSystem.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}.

binaryDataByteString

Required. The configuration data for the device.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
nameDeviceName

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

binaryDataByteString

Required. The configuration data for the device.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<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
NameDescription
nameDeviceName

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

binaryDataByteString

Required. The configuration data for the device.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<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
NameDescription
requestModifyCloudToDeviceConfigRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<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
NameDescription
requestModifyCloudToDeviceConfigRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<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
NameDescription
nameSystem.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}.

binaryDataByteString

Required. The configuration data for the device.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<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
NameDescription
nameSystem.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}.

binaryDataByteString

Required. The configuration data for the device.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<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
NameDescription
nameDeviceName

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

binaryDataByteString

Required. The command data to send to the device.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
nameDeviceName

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

binaryDataByteString

Required. The command data to send to the device.

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestSendCommandToDeviceRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
nameSystem.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}.

binaryDataByteString

Required. The command data to send to the device.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
nameSystem.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}.

binaryDataByteString

Required. The command data to send to the device.

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
nameDeviceName

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

binaryDataByteString

Required. The command data to send to the device.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<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
NameDescription
nameDeviceName

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

binaryDataByteString

Required. The command data to send to the device.

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<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
NameDescription
nameDeviceName

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

binaryDataByteString

Required. The command data to send to the device.

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<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
NameDescription
nameDeviceName

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

binaryDataByteString

Required. The command data to send to the device.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<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
NameDescription
requestSendCommandToDeviceRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<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
NameDescription
requestSendCommandToDeviceRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<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
NameDescription
nameSystem.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}.

binaryDataByteString

Required. The command data to send to the device.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<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
NameDescription
nameSystem.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}.

binaryDataByteString

Required. The command data to send to the device.

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<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
NameDescription
nameSystem.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}.

binaryDataByteString

Required. The command data to send to the device.

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<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
NameDescription
nameSystem.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}.

binaryDataByteString

Required. The command data to send to the device.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<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
NameDescription
resourceIResourceName

REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

policyPolicy

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Policy

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
NameDescription
requestSetIamPolicyRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Policy

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
NameDescription
resourceSystem.String

REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

policyPolicy

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Policy

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
NameDescription
resourceIResourceName

REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

policyPolicy

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Policy>

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
NameDescription
resourceIResourceName

REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

policyPolicy

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.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Policy>

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
NameDescription
requestSetIamPolicyRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Policy>

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
NameDescription
requestSetIamPolicyRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Policy>

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
NameDescription
resourceSystem.String

REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

policyPolicy

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Policy>

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
NameDescription
resourceSystem.String

REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

policyPolicy

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.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Policy>

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() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Returns
TypeDescription
Task

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(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
NameDescription
resourceIResourceName

REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TestIamPermissionsResponse

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
NameDescription
requestTestIamPermissionsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TestIamPermissionsResponse

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
NameDescription
resourceSystem.String

REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TestIamPermissionsResponse

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
NameDescription
resourceIResourceName

REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<TestIamPermissionsResponse>

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
NameDescription
resourceIResourceName

REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<TestIamPermissionsResponse>

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
NameDescription
requestTestIamPermissionsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<TestIamPermissionsResponse>

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
NameDescription
requestTestIamPermissionsRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<TestIamPermissionsResponse>

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
NameDescription
resourceSystem.String

REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<TestIamPermissionsResponse>

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
NameDescription
resourceSystem.String

REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<TestIamPermissionsResponse>

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
NameDescription
parentRegistryName

Required. The name of the registry. For example, projects/example-project/locations/us-central1/registries/my-registry.

gatewayIdSystem.String

Required. The value of gateway_id can be either the device numeric ID or the user-defined device identifier.

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestUnbindDeviceFromGatewayRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
parentSystem.String

Required. The name of the registry. For example, projects/example-project/locations/us-central1/registries/my-registry.

gatewayIdSystem.String

Required. The value of gateway_id can be either the device numeric ID or the user-defined device identifier.

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
parentRegistryName

Required. The name of the registry. For example, projects/example-project/locations/us-central1/registries/my-registry.

gatewayIdSystem.String

Required. The value of gateway_id can be either the device numeric ID or the user-defined device identifier.

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<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
NameDescription
parentRegistryName

Required. The name of the registry. For example, projects/example-project/locations/us-central1/registries/my-registry.

gatewayIdSystem.String

Required. The value of gateway_id can be either the device numeric ID or the user-defined device identifier.

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<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
NameDescription
requestUnbindDeviceFromGatewayRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<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
NameDescription
requestUnbindDeviceFromGatewayRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<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
NameDescription
parentSystem.String

Required. The name of the registry. For example, projects/example-project/locations/us-central1/registries/my-registry.

gatewayIdSystem.String

Required. The value of gateway_id can be either the device numeric ID or the user-defined device identifier.

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<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
NameDescription
parentSystem.String

Required. The name of the registry. For example, projects/example-project/locations/us-central1/registries/my-registry.

gatewayIdSystem.String

Required. The value of gateway_id can be either the device numeric ID or the user-defined device identifier.

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<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
NameDescription
deviceDevice

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/device0or projects/p0/locations/us-central1/registries/registry0/devices/{num_id}.

updateMaskFieldMask

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestUpdateDeviceRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
deviceDevice

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/device0or projects/p0/locations/us-central1/registries/registry0/devices/{num_id}.

updateMaskFieldMask

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<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
NameDescription
deviceDevice

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/device0or projects/p0/locations/us-central1/registries/registry0/devices/{num_id}.

updateMaskFieldMask

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<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
NameDescription
requestUpdateDeviceRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<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
NameDescription
requestUpdateDeviceRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<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
NameDescription
deviceRegistryDeviceRegistry

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.

updateMaskFieldMask

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestUpdateDeviceRegistryRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
deviceRegistryDeviceRegistry

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.

updateMaskFieldMask

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<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
NameDescription
deviceRegistryDeviceRegistry

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.

updateMaskFieldMask

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.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<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
NameDescription
requestUpdateDeviceRegistryRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<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
NameDescription
requestUpdateDeviceRegistryRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<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);