[BindServiceMethod(typeof(DeviceManager), "BindService")]
public abstract class DeviceManager.DeviceManagerBase
Reference 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 | BindDeviceToGatewayRequest The request received from the client. |
context | ServerCallContext The 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 | CreateDeviceRequest The request received from the client. |
context | ServerCallContext The 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 | CreateDeviceRegistryRequest The request received from the client. |
context | ServerCallContext The 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 | DeleteDeviceRequest The request received from the client. |
context | ServerCallContext The 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 | DeleteDeviceRegistryRequest The request received from the client. |
context | ServerCallContext The 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 | GetDeviceRequest The request received from the client. |
context | ServerCallContext The 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 | GetDeviceRegistryRequest The request received from the client. |
context | ServerCallContext The 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 | GetIamPolicyRequest The request received from the client. |
context | ServerCallContext The 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 | ListDeviceConfigVersionsRequest The request received from the client. |
context | ServerCallContext The 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 | ListDeviceRegistriesRequest The request received from the client. |
context | ServerCallContext The 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 | ListDevicesRequest The request received from the client. |
context | ServerCallContext The 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 | ListDeviceStatesRequest The request received from the client. |
context | ServerCallContext The 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 | ModifyCloudToDeviceConfigRequest The request received from the client. |
context | ServerCallContext The 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 | SendCommandToDeviceRequest The request received from the client. |
context | ServerCallContext The 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 | SetIamPolicyRequest The request received from the client. |
context | ServerCallContext The 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 | TestIamPermissionsRequest The request received from the client. |
context | ServerCallContext The 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 | UnbindDeviceFromGatewayRequest The request received from the client. |
context | ServerCallContext The 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 | UpdateDeviceRequest The request received from the client. |
context | ServerCallContext The 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 | UpdateDeviceRegistryRequest The request received from the client. |
context | ServerCallContext The 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). |