Class DeviceManagerClientImpl (1.2.0)

public sealed class DeviceManagerClientImpl : DeviceManagerClient

DeviceManager client wrapper implementation, for convenient use.

Inheritance

Object > DeviceManagerClient > DeviceManagerClientImpl

Namespace

Google.Cloud.Iot.V1

Assembly

Google.Cloud.Iot.V1.dll

Remarks

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

Constructors

DeviceManagerClientImpl(DeviceManager.DeviceManagerClient, DeviceManagerSettings)

public DeviceManagerClientImpl(DeviceManager.DeviceManagerClient grpcClient, DeviceManagerSettings settings)

Constructs a client wrapper for the DeviceManager service, with the specified gRPC client and settings.

Parameters
NameDescription
grpcClientDeviceManager.DeviceManagerClient

The underlying gRPC client.

settingsDeviceManagerSettings

The base DeviceManagerSettings used within this client.

Properties

GrpcClient

public override DeviceManager.DeviceManagerClient GrpcClient { get; }

The underlying gRPC DeviceManager client

Property Value
TypeDescription
DeviceManager.DeviceManagerClient
Overrides

Methods

BindDeviceToGateway(BindDeviceToGatewayRequest, CallSettings)

public override 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.

Overrides

BindDeviceToGatewayAsync(BindDeviceToGatewayRequest, CallSettings)

public override 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.

Overrides

CreateDevice(CreateDeviceRequest, CallSettings)

public override 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.

Overrides

CreateDeviceAsync(CreateDeviceRequest, CallSettings)

public override 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.

Overrides

CreateDeviceRegistry(CreateDeviceRegistryRequest, CallSettings)

public override 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.

Overrides

CreateDeviceRegistryAsync(CreateDeviceRegistryRequest, CallSettings)

public override 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.

Overrides

DeleteDevice(DeleteDeviceRequest, CallSettings)

public override 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.

Overrides

DeleteDeviceAsync(DeleteDeviceRequest, CallSettings)

public override 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.

Overrides

DeleteDeviceRegistry(DeleteDeviceRegistryRequest, CallSettings)

public override 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.

Overrides

DeleteDeviceRegistryAsync(DeleteDeviceRegistryRequest, CallSettings)

public override 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.

Overrides

GetDevice(GetDeviceRequest, CallSettings)

public override 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.

Overrides

GetDeviceAsync(GetDeviceRequest, CallSettings)

public override 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.

Overrides

GetDeviceRegistry(GetDeviceRegistryRequest, CallSettings)

public override 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.

Overrides

GetDeviceRegistryAsync(GetDeviceRegistryRequest, CallSettings)

public override 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.

Overrides

GetIamPolicy(GetIamPolicyRequest, CallSettings)

public override 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.

Overrides

GetIamPolicyAsync(GetIamPolicyRequest, CallSettings)

public override 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.

Overrides

ListDeviceConfigVersions(ListDeviceConfigVersionsRequest, CallSettings)

public override 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.

Overrides

ListDeviceConfigVersionsAsync(ListDeviceConfigVersionsRequest, CallSettings)

public override 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.

Overrides

ListDeviceRegistries(ListDeviceRegistriesRequest, CallSettings)

public override 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.

Overrides

ListDeviceRegistriesAsync(ListDeviceRegistriesRequest, CallSettings)

public override 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.

Overrides

ListDevices(ListDevicesRequest, CallSettings)

public override 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.

Overrides

ListDevicesAsync(ListDevicesRequest, CallSettings)

public override 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.

Overrides

ListDeviceStates(ListDeviceStatesRequest, CallSettings)

public override 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.

Overrides

ListDeviceStatesAsync(ListDeviceStatesRequest, CallSettings)

public override 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.

Overrides

ModifyCloudToDeviceConfig(ModifyCloudToDeviceConfigRequest, CallSettings)

public override 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.

Overrides

ModifyCloudToDeviceConfigAsync(ModifyCloudToDeviceConfigRequest, CallSettings)

public override 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.

Overrides

SendCommandToDevice(SendCommandToDeviceRequest, CallSettings)

public override 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.

Overrides

SendCommandToDeviceAsync(SendCommandToDeviceRequest, CallSettings)

public override 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.

Overrides

SetIamPolicy(SetIamPolicyRequest, CallSettings)

public override 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.

Overrides

SetIamPolicyAsync(SetIamPolicyRequest, CallSettings)

public override 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.

Overrides

TestIamPermissions(TestIamPermissionsRequest, CallSettings)

public override 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.

Overrides

TestIamPermissionsAsync(TestIamPermissionsRequest, CallSettings)

public override 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.

Overrides

UnbindDeviceFromGateway(UnbindDeviceFromGatewayRequest, CallSettings)

public override 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.

Overrides

UnbindDeviceFromGatewayAsync(UnbindDeviceFromGatewayRequest, CallSettings)

public override 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.

Overrides

UpdateDevice(UpdateDeviceRequest, CallSettings)

public override 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.

Overrides

UpdateDeviceAsync(UpdateDeviceRequest, CallSettings)

public override 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.

Overrides

UpdateDeviceRegistry(UpdateDeviceRegistryRequest, CallSettings)

public override 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.

Overrides

UpdateDeviceRegistryAsync(UpdateDeviceRegistryRequest, CallSettings)

public override 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.

Overrides