Package com.google.cloud.iot.v1
Class DeviceManagerGrpc.DeviceManagerStub
- java.lang.Object
-
- io.grpc.stub.AbstractStub<S>
-
- io.grpc.stub.AbstractAsyncStub<DeviceManagerGrpc.DeviceManagerStub>
-
- com.google.cloud.iot.v1.DeviceManagerGrpc.DeviceManagerStub
-
- Enclosing class:
- DeviceManagerGrpc
public static final class DeviceManagerGrpc.DeviceManagerStub extends io.grpc.stub.AbstractAsyncStub<DeviceManagerGrpc.DeviceManagerStub>
A stub to allow clients to do asynchronous rpc calls to service DeviceManager.Internet of Things (IoT) service. Securely connect and manage IoT devices.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bindDeviceToGateway(BindDeviceToGatewayRequest request, io.grpc.stub.StreamObserver<BindDeviceToGatewayResponse> responseObserver)
Associates the device with the gateway.protected DeviceManagerGrpc.DeviceManagerStub
build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
void
createDevice(CreateDeviceRequest request, io.grpc.stub.StreamObserver<Device> responseObserver)
Creates a device in a device registry.void
createDeviceRegistry(CreateDeviceRegistryRequest request, io.grpc.stub.StreamObserver<DeviceRegistry> responseObserver)
Creates a device registry that contains devices.void
deleteDevice(DeleteDeviceRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver)
Deletes a device.void
deleteDeviceRegistry(DeleteDeviceRegistryRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver)
Deletes a device registry configuration.void
getDevice(GetDeviceRequest request, io.grpc.stub.StreamObserver<Device> responseObserver)
Gets details about a device.void
getDeviceRegistry(GetDeviceRegistryRequest request, io.grpc.stub.StreamObserver<DeviceRegistry> responseObserver)
Gets a device registry configuration.void
getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request, io.grpc.stub.StreamObserver<com.google.iam.v1.Policy> responseObserver)
Gets the access control policy for a resource.void
listDeviceConfigVersions(ListDeviceConfigVersionsRequest request, io.grpc.stub.StreamObserver<ListDeviceConfigVersionsResponse> responseObserver)
Lists the last few versions of the device configuration in descending order (i.e.: newest first).void
listDeviceRegistries(ListDeviceRegistriesRequest request, io.grpc.stub.StreamObserver<ListDeviceRegistriesResponse> responseObserver)
Lists device registries.void
listDevices(ListDevicesRequest request, io.grpc.stub.StreamObserver<ListDevicesResponse> responseObserver)
List devices in a device registry.void
listDeviceStates(ListDeviceStatesRequest request, io.grpc.stub.StreamObserver<ListDeviceStatesResponse> responseObserver)
Lists the last few versions of the device state in descending order (i.e.: newest first).void
modifyCloudToDeviceConfig(ModifyCloudToDeviceConfigRequest request, io.grpc.stub.StreamObserver<DeviceConfig> responseObserver)
Modifies the configuration for the device, which is eventually sent from the Cloud IoT Core servers.void
sendCommandToDevice(SendCommandToDeviceRequest request, io.grpc.stub.StreamObserver<SendCommandToDeviceResponse> responseObserver)
Sends a command to the specified device.void
setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request, io.grpc.stub.StreamObserver<com.google.iam.v1.Policy> responseObserver)
Sets the access control policy on the specified resource.void
testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest request, io.grpc.stub.StreamObserver<com.google.iam.v1.TestIamPermissionsResponse> responseObserver)
Returns permissions that a caller has on the specified resource.void
unbindDeviceFromGateway(UnbindDeviceFromGatewayRequest request, io.grpc.stub.StreamObserver<UnbindDeviceFromGatewayResponse> responseObserver)
Deletes the association between the device and the gateway.void
updateDevice(UpdateDeviceRequest request, io.grpc.stub.StreamObserver<Device> responseObserver)
Updates a device.void
updateDeviceRegistry(UpdateDeviceRegistryRequest request, io.grpc.stub.StreamObserver<DeviceRegistry> responseObserver)
Updates a device registry configuration.
-
-
-
Method Detail
-
build
protected DeviceManagerGrpc.DeviceManagerStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
- Specified by:
build
in classio.grpc.stub.AbstractStub<DeviceManagerGrpc.DeviceManagerStub>
-
createDeviceRegistry
public void createDeviceRegistry(CreateDeviceRegistryRequest request, io.grpc.stub.StreamObserver<DeviceRegistry> responseObserver)
Creates a device registry that contains devices.
-
getDeviceRegistry
public void getDeviceRegistry(GetDeviceRegistryRequest request, io.grpc.stub.StreamObserver<DeviceRegistry> responseObserver)
Gets a device registry configuration.
-
updateDeviceRegistry
public void updateDeviceRegistry(UpdateDeviceRegistryRequest request, io.grpc.stub.StreamObserver<DeviceRegistry> responseObserver)
Updates a device registry configuration.
-
deleteDeviceRegistry
public void deleteDeviceRegistry(DeleteDeviceRegistryRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver)
Deletes a device registry configuration.
-
listDeviceRegistries
public void listDeviceRegistries(ListDeviceRegistriesRequest request, io.grpc.stub.StreamObserver<ListDeviceRegistriesResponse> responseObserver)
Lists device registries.
-
createDevice
public void createDevice(CreateDeviceRequest request, io.grpc.stub.StreamObserver<Device> responseObserver)
Creates a device in a device registry.
-
getDevice
public void getDevice(GetDeviceRequest request, io.grpc.stub.StreamObserver<Device> responseObserver)
Gets details about a device.
-
updateDevice
public void updateDevice(UpdateDeviceRequest request, io.grpc.stub.StreamObserver<Device> responseObserver)
Updates a device.
-
deleteDevice
public void deleteDevice(DeleteDeviceRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver)
Deletes a device.
-
listDevices
public void listDevices(ListDevicesRequest request, io.grpc.stub.StreamObserver<ListDevicesResponse> responseObserver)
List devices in a device registry.
-
modifyCloudToDeviceConfig
public void modifyCloudToDeviceConfig(ModifyCloudToDeviceConfigRequest request, io.grpc.stub.StreamObserver<DeviceConfig> responseObserver)
Modifies the configuration for the device, which is eventually sent from the Cloud IoT Core servers. Returns the modified configuration version and its metadata.
-
listDeviceConfigVersions
public void listDeviceConfigVersions(ListDeviceConfigVersionsRequest request, io.grpc.stub.StreamObserver<ListDeviceConfigVersionsResponse> responseObserver)
Lists the last few versions of the device configuration in descending order (i.e.: newest first).
-
listDeviceStates
public void listDeviceStates(ListDeviceStatesRequest request, io.grpc.stub.StreamObserver<ListDeviceStatesResponse> responseObserver)
Lists the last few versions of the device state in descending order (i.e.: newest first).
-
setIamPolicy
public void setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request, io.grpc.stub.StreamObserver<com.google.iam.v1.Policy> responseObserver)
Sets the access control policy on the specified resource. Replaces any existing policy.
-
getIamPolicy
public void getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request, io.grpc.stub.StreamObserver<com.google.iam.v1.Policy> responseObserver)
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
-
testIamPermissions
public void testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest request, io.grpc.stub.StreamObserver<com.google.iam.v1.TestIamPermissionsResponse> responseObserver)
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.
-
sendCommandToDevice
public void sendCommandToDevice(SendCommandToDeviceRequest request, io.grpc.stub.StreamObserver<SendCommandToDeviceResponse> responseObserver)
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.
-
bindDeviceToGateway
public void bindDeviceToGateway(BindDeviceToGatewayRequest request, io.grpc.stub.StreamObserver<BindDeviceToGatewayResponse> responseObserver)
Associates the device with the gateway.
-
unbindDeviceFromGateway
public void unbindDeviceFromGateway(UnbindDeviceFromGatewayRequest request, io.grpc.stub.StreamObserver<UnbindDeviceFromGatewayResponse> responseObserver)
Deletes the association between the device and the gateway.
-
-