[BindServiceMethod(typeof(DeviceManager), "BindService")]
public abstract class DeviceManager.DeviceManagerBaseReference documentation and code samples for the Cloud IoT v1 API class DeviceManager.DeviceManagerBase.
Base class for server-side implementations of DeviceManager
Namespace
Google.Cloud.Iot.V1Assembly
Google.Cloud.Iot.V1.dll
Methods
BindDeviceToGateway(BindDeviceToGatewayRequest, ServerCallContext)
public virtual Task<BindDeviceToGatewayResponse> BindDeviceToGateway(BindDeviceToGatewayRequest request, ServerCallContext context)Associates the device with the gateway.
| Parameters | |
|---|---|
| Name | Description |
request |
BindDeviceToGatewayRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskBindDeviceToGatewayResponse |
The response to send back to the client (wrapped by a task). |
CreateDevice(CreateDeviceRequest, ServerCallContext)
public virtual Task<Device> CreateDevice(CreateDeviceRequest request, ServerCallContext context)Creates a device in a device registry.
| Parameters | |
|---|---|
| Name | Description |
request |
CreateDeviceRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskDevice |
The response to send back to the client (wrapped by a task). |
CreateDeviceRegistry(CreateDeviceRegistryRequest, ServerCallContext)
public virtual Task<DeviceRegistry> CreateDeviceRegistry(CreateDeviceRegistryRequest request, ServerCallContext context)Creates a device registry that contains devices.
| Parameters | |
|---|---|
| Name | Description |
request |
CreateDeviceRegistryRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskDeviceRegistry |
The response to send back to the client (wrapped by a task). |
DeleteDevice(DeleteDeviceRequest, ServerCallContext)
public virtual Task<Empty> DeleteDevice(DeleteDeviceRequest request, ServerCallContext context)Deletes a device.
| Parameters | |
|---|---|
| Name | Description |
request |
DeleteDeviceRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskEmpty |
The response to send back to the client (wrapped by a task). |
DeleteDeviceRegistry(DeleteDeviceRegistryRequest, ServerCallContext)
public virtual Task<Empty> DeleteDeviceRegistry(DeleteDeviceRegistryRequest request, ServerCallContext context)Deletes a device registry configuration.
| Parameters | |
|---|---|
| Name | Description |
request |
DeleteDeviceRegistryRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskEmpty |
The response to send back to the client (wrapped by a task). |
GetDevice(GetDeviceRequest, ServerCallContext)
public virtual Task<Device> GetDevice(GetDeviceRequest request, ServerCallContext context)Gets details about a device.
| Parameters | |
|---|---|
| Name | Description |
request |
GetDeviceRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskDevice |
The response to send back to the client (wrapped by a task). |
GetDeviceRegistry(GetDeviceRegistryRequest, ServerCallContext)
public virtual Task<DeviceRegistry> GetDeviceRegistry(GetDeviceRegistryRequest request, ServerCallContext context)Gets a device registry configuration.
| Parameters | |
|---|---|
| Name | Description |
request |
GetDeviceRegistryRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskDeviceRegistry |
The response to send back to the client (wrapped by a task). |
GetIamPolicy(GetIamPolicyRequest, ServerCallContext)
public virtual Task<Policy> GetIamPolicy(GetIamPolicyRequest request, ServerCallContext context)Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
| Parameters | |
|---|---|
| Name | Description |
request |
GetIamPolicyRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskPolicy |
The response to send back to the client (wrapped by a task). |
ListDeviceConfigVersions(ListDeviceConfigVersionsRequest, ServerCallContext)
public virtual Task<ListDeviceConfigVersionsResponse> ListDeviceConfigVersions(ListDeviceConfigVersionsRequest request, ServerCallContext context)Lists the last few versions of the device configuration in descending order (i.e.: newest first).
| Parameters | |
|---|---|
| Name | Description |
request |
ListDeviceConfigVersionsRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskListDeviceConfigVersionsResponse |
The response to send back to the client (wrapped by a task). |
ListDeviceRegistries(ListDeviceRegistriesRequest, ServerCallContext)
public virtual Task<ListDeviceRegistriesResponse> ListDeviceRegistries(ListDeviceRegistriesRequest request, ServerCallContext context)Lists device registries.
| Parameters | |
|---|---|
| Name | Description |
request |
ListDeviceRegistriesRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskListDeviceRegistriesResponse |
The response to send back to the client (wrapped by a task). |
ListDevices(ListDevicesRequest, ServerCallContext)
public virtual Task<ListDevicesResponse> ListDevices(ListDevicesRequest request, ServerCallContext context)List devices in a device registry.
| Parameters | |
|---|---|
| Name | Description |
request |
ListDevicesRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskListDevicesResponse |
The response to send back to the client (wrapped by a task). |
ListDeviceStates(ListDeviceStatesRequest, ServerCallContext)
public virtual Task<ListDeviceStatesResponse> ListDeviceStates(ListDeviceStatesRequest request, ServerCallContext context)Lists the last few versions of the device state in descending order (i.e.: newest first).
| Parameters | |
|---|---|
| Name | Description |
request |
ListDeviceStatesRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskListDeviceStatesResponse |
The response to send back to the client (wrapped by a task). |
ModifyCloudToDeviceConfig(ModifyCloudToDeviceConfigRequest, ServerCallContext)
public virtual Task<DeviceConfig> ModifyCloudToDeviceConfig(ModifyCloudToDeviceConfigRequest request, ServerCallContext context)Modifies the configuration for the device, which is eventually sent from the Cloud IoT Core servers. Returns the modified configuration version and its metadata.
| Parameters | |
|---|---|
| Name | Description |
request |
ModifyCloudToDeviceConfigRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskDeviceConfig |
The response to send back to the client (wrapped by a task). |
SendCommandToDevice(SendCommandToDeviceRequest, ServerCallContext)
public virtual Task<SendCommandToDeviceResponse> SendCommandToDevice(SendCommandToDeviceRequest request, ServerCallContext context)Sends a command to the specified device. In order for a device to be able to receive commands, it must: 1) be connected to Cloud IoT Core using the MQTT protocol, and 2) be subscribed to the group of MQTT topics specified by /devices/{device-id}/commands/#. This subscription will receive commands at the top-level topic /devices/{device-id}/commands as well as commands for subfolders, like /devices/{device-id}/commands/subfolder. Note that subscribing to specific subfolders is not supported. If the command could not be delivered to the device, this method will return an error; in particular, if the device is not subscribed, this method will return FAILED_PRECONDITION. Otherwise, this method will return OK. If the subscription is QoS 1, at least once delivery will be guaranteed; for QoS 0, no acknowledgment will be expected from the device.
| Parameters | |
|---|---|
| Name | Description |
request |
SendCommandToDeviceRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskSendCommandToDeviceResponse |
The response to send back to the client (wrapped by a task). |
SetIamPolicy(SetIamPolicyRequest, ServerCallContext)
public virtual Task<Policy> SetIamPolicy(SetIamPolicyRequest request, ServerCallContext context)Sets the access control policy on the specified resource. Replaces any existing policy.
| Parameters | |
|---|---|
| Name | Description |
request |
SetIamPolicyRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskPolicy |
The response to send back to the client (wrapped by a task). |
TestIamPermissions(TestIamPermissionsRequest, ServerCallContext)
public virtual Task<TestIamPermissionsResponse> TestIamPermissions(TestIamPermissionsRequest request, ServerCallContext context)Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
| Parameters | |
|---|---|
| Name | Description |
request |
TestIamPermissionsRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskTestIamPermissionsResponse |
The response to send back to the client (wrapped by a task). |
UnbindDeviceFromGateway(UnbindDeviceFromGatewayRequest, ServerCallContext)
public virtual Task<UnbindDeviceFromGatewayResponse> UnbindDeviceFromGateway(UnbindDeviceFromGatewayRequest request, ServerCallContext context)Deletes the association between the device and the gateway.
| Parameters | |
|---|---|
| Name | Description |
request |
UnbindDeviceFromGatewayRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskUnbindDeviceFromGatewayResponse |
The response to send back to the client (wrapped by a task). |
UpdateDevice(UpdateDeviceRequest, ServerCallContext)
public virtual Task<Device> UpdateDevice(UpdateDeviceRequest request, ServerCallContext context)Updates a device.
| Parameters | |
|---|---|
| Name | Description |
request |
UpdateDeviceRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskDevice |
The response to send back to the client (wrapped by a task). |
UpdateDeviceRegistry(UpdateDeviceRegistryRequest, ServerCallContext)
public virtual Task<DeviceRegistry> UpdateDeviceRegistry(UpdateDeviceRegistryRequest request, ServerCallContext context)Updates a device registry configuration.
| Parameters | |
|---|---|
| Name | Description |
request |
UpdateDeviceRegistryRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskDeviceRegistry |
The response to send back to the client (wrapped by a task). |