123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651 |
- syntax = "proto3";
- package google.cloud.iot.v1;
- import "google/api/annotations.proto";
- import "google/api/client.proto";
- import "google/api/field_behavior.proto";
- import "google/api/resource.proto";
- import "google/cloud/iot/v1/resources.proto";
- import "google/iam/v1/iam_policy.proto";
- import "google/iam/v1/policy.proto";
- import "google/protobuf/empty.proto";
- import "google/protobuf/field_mask.proto";
- option cc_enable_arenas = true;
- option go_package = "google.golang.org/genproto/googleapis/cloud/iot/v1;iot";
- option java_multiple_files = true;
- option java_outer_classname = "DeviceManagerProto";
- option java_package = "com.google.cloud.iot.v1";
- service DeviceManager {
- option (google.api.default_host) = "cloudiot.googleapis.com";
- option (google.api.oauth_scopes) =
- "https://www.googleapis.com/auth/cloud-platform,"
- "https://www.googleapis.com/auth/cloudiot";
-
- rpc CreateDeviceRegistry(CreateDeviceRegistryRequest) returns (DeviceRegistry) {
- option (google.api.http) = {
- post: "/v1/{parent=projects/*/locations/*}/registries"
- body: "device_registry"
- };
- option (google.api.method_signature) = "parent,device_registry";
- }
-
- rpc GetDeviceRegistry(GetDeviceRegistryRequest) returns (DeviceRegistry) {
- option (google.api.http) = {
- get: "/v1/{name=projects/*/locations/*/registries/*}"
- };
- option (google.api.method_signature) = "name";
- }
-
- rpc UpdateDeviceRegistry(UpdateDeviceRegistryRequest) returns (DeviceRegistry) {
- option (google.api.http) = {
- patch: "/v1/{device_registry.name=projects/*/locations/*/registries/*}"
- body: "device_registry"
- };
- option (google.api.method_signature) = "device_registry,update_mask";
- }
-
- rpc DeleteDeviceRegistry(DeleteDeviceRegistryRequest) returns (google.protobuf.Empty) {
- option (google.api.http) = {
- delete: "/v1/{name=projects/*/locations/*/registries/*}"
- };
- option (google.api.method_signature) = "name";
- }
-
- rpc ListDeviceRegistries(ListDeviceRegistriesRequest) returns (ListDeviceRegistriesResponse) {
- option (google.api.http) = {
- get: "/v1/{parent=projects/*/locations/*}/registries"
- };
- option (google.api.method_signature) = "parent";
- }
-
- rpc CreateDevice(CreateDeviceRequest) returns (Device) {
- option (google.api.http) = {
- post: "/v1/{parent=projects/*/locations/*/registries/*}/devices"
- body: "device"
- };
- option (google.api.method_signature) = "parent,device";
- }
-
- rpc GetDevice(GetDeviceRequest) returns (Device) {
- option (google.api.http) = {
- get: "/v1/{name=projects/*/locations/*/registries/*/devices/*}"
- additional_bindings {
- get: "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}"
- }
- };
- option (google.api.method_signature) = "name";
- }
-
- rpc UpdateDevice(UpdateDeviceRequest) returns (Device) {
- option (google.api.http) = {
- patch: "/v1/{device.name=projects/*/locations/*/registries/*/devices/*}"
- body: "device"
- additional_bindings {
- patch: "/v1/{device.name=projects/*/locations/*/registries/*/groups/*/devices/*}"
- body: "device"
- }
- };
- option (google.api.method_signature) = "device,update_mask";
- }
-
- rpc DeleteDevice(DeleteDeviceRequest) returns (google.protobuf.Empty) {
- option (google.api.http) = {
- delete: "/v1/{name=projects/*/locations/*/registries/*/devices/*}"
- };
- option (google.api.method_signature) = "name";
- }
-
- rpc ListDevices(ListDevicesRequest) returns (ListDevicesResponse) {
- option (google.api.http) = {
- get: "/v1/{parent=projects/*/locations/*/registries/*}/devices"
- additional_bindings {
- get: "/v1/{parent=projects/*/locations/*/registries/*/groups/*}/devices"
- }
- };
- option (google.api.method_signature) = "parent";
- }
-
-
-
- rpc ModifyCloudToDeviceConfig(ModifyCloudToDeviceConfigRequest) returns (DeviceConfig) {
- option (google.api.http) = {
- post: "/v1/{name=projects/*/locations/*/registries/*/devices/*}:modifyCloudToDeviceConfig"
- body: "*"
- additional_bindings {
- post: "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}:modifyCloudToDeviceConfig"
- body: "*"
- }
- };
- option (google.api.method_signature) = "name,binary_data";
- }
-
-
- rpc ListDeviceConfigVersions(ListDeviceConfigVersionsRequest) returns (ListDeviceConfigVersionsResponse) {
- option (google.api.http) = {
- get: "/v1/{name=projects/*/locations/*/registries/*/devices/*}/configVersions"
- additional_bindings {
- get: "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}/configVersions"
- }
- };
- option (google.api.method_signature) = "name";
- }
-
-
- rpc ListDeviceStates(ListDeviceStatesRequest) returns (ListDeviceStatesResponse) {
- option (google.api.http) = {
- get: "/v1/{name=projects/*/locations/*/registries/*/devices/*}/states"
- additional_bindings {
- get: "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}/states"
- }
- };
- option (google.api.method_signature) = "name";
- }
-
-
- rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) {
- option (google.api.http) = {
- post: "/v1/{resource=projects/*/locations/*/registries/*}:setIamPolicy"
- body: "*"
- additional_bindings {
- post: "/v1/{resource=projects/*/locations/*/registries/*/groups/*}:setIamPolicy"
- body: "*"
- }
- };
- option (google.api.method_signature) = "resource,policy";
- }
-
-
-
- rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) {
- option (google.api.http) = {
- post: "/v1/{resource=projects/*/locations/*/registries/*}:getIamPolicy"
- body: "*"
- additional_bindings {
- post: "/v1/{resource=projects/*/locations/*/registries/*/groups/*}:getIamPolicy"
- body: "*"
- }
- };
- option (google.api.method_signature) = "resource";
- }
-
-
-
- rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) {
- option (google.api.http) = {
- post: "/v1/{resource=projects/*/locations/*/registries/*}:testIamPermissions"
- body: "*"
- additional_bindings {
- post: "/v1/{resource=projects/*/locations/*/registries/*/groups/*}:testIamPermissions"
- body: "*"
- }
- };
- option (google.api.method_signature) = "resource,permissions";
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
- rpc SendCommandToDevice(SendCommandToDeviceRequest) returns (SendCommandToDeviceResponse) {
- option (google.api.http) = {
- post: "/v1/{name=projects/*/locations/*/registries/*/devices/*}:sendCommandToDevice"
- body: "*"
- additional_bindings {
- post: "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}:sendCommandToDevice"
- body: "*"
- }
- };
- option (google.api.method_signature) = "name,binary_data";
- option (google.api.method_signature) = "name,binary_data,subfolder";
- }
-
- rpc BindDeviceToGateway(BindDeviceToGatewayRequest) returns (BindDeviceToGatewayResponse) {
- option (google.api.http) = {
- post: "/v1/{parent=projects/*/locations/*/registries/*}:bindDeviceToGateway"
- body: "*"
- additional_bindings {
- post: "/v1/{parent=projects/*/locations/*/registries/*/groups/*}:bindDeviceToGateway"
- body: "*"
- }
- };
- option (google.api.method_signature) = "parent,gateway_id,device_id";
- }
-
- rpc UnbindDeviceFromGateway(UnbindDeviceFromGatewayRequest) returns (UnbindDeviceFromGatewayResponse) {
- option (google.api.http) = {
- post: "/v1/{parent=projects/*/locations/*/registries/*}:unbindDeviceFromGateway"
- body: "*"
- additional_bindings {
- post: "/v1/{parent=projects/*/locations/*/registries/*/groups/*}:unbindDeviceFromGateway"
- body: "*"
- }
- };
- option (google.api.method_signature) = "parent,gateway_id,device_id";
- }
- }
- message CreateDeviceRegistryRequest {
-
-
- string parent = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {
- type: "locations.googleapis.com/Location"
- }
- ];
-
-
-
- DeviceRegistry device_registry = 2 [(google.api.field_behavior) = REQUIRED];
- }
- message GetDeviceRegistryRequest {
-
-
- string name = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {
- type: "cloudiot.googleapis.com/Registry"
- }
- ];
- }
- message DeleteDeviceRegistryRequest {
-
-
- string name = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {
- type: "cloudiot.googleapis.com/Registry"
- }
- ];
- }
- message UpdateDeviceRegistryRequest {
-
-
-
- DeviceRegistry device_registry = 1 [(google.api.field_behavior) = REQUIRED];
-
-
-
-
-
- google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
- }
- message ListDeviceRegistriesRequest {
-
-
- string parent = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {
- type: "locations.googleapis.com/Location"
- }
- ];
-
-
-
-
- int32 page_size = 2;
-
-
-
- string page_token = 3;
- }
- message ListDeviceRegistriesResponse {
-
- repeated DeviceRegistry device_registries = 1;
-
-
-
- string next_page_token = 2;
- }
- message CreateDeviceRequest {
-
-
-
- string parent = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {
- type: "cloudiot.googleapis.com/Registry"
- }
- ];
-
-
-
- Device device = 2 [(google.api.field_behavior) = REQUIRED];
- }
- message GetDeviceRequest {
-
-
-
- string name = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {
- type: "cloudiot.googleapis.com/Device"
- }
- ];
-
-
-
- google.protobuf.FieldMask field_mask = 2;
- }
- message UpdateDeviceRequest {
-
-
-
-
- Device device = 2 [(google.api.field_behavior) = REQUIRED];
-
-
-
-
- google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = REQUIRED];
- }
- message DeleteDeviceRequest {
-
-
-
- string name = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {
- type: "cloudiot.googleapis.com/Device"
- }
- ];
- }
- message ListDevicesRequest {
-
-
- string parent = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {
- type: "cloudiot.googleapis.com/Registry"
- }
- ];
-
-
- repeated uint64 device_num_ids = 2;
-
-
- repeated string device_ids = 3;
-
-
-
-
- google.protobuf.FieldMask field_mask = 4;
-
- GatewayListOptions gateway_list_options = 6;
-
-
-
-
- int32 page_size = 100;
-
-
-
- string page_token = 101;
- }
- message GatewayListOptions {
-
-
- oneof filter {
-
-
-
- GatewayType gateway_type = 1;
-
-
-
-
- string associations_gateway_id = 2;
-
-
-
-
- string associations_device_id = 3;
- }
- }
- message ListDevicesResponse {
-
- repeated Device devices = 1;
-
-
- string next_page_token = 2;
- }
- message ModifyCloudToDeviceConfigRequest {
-
-
-
- string name = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {
- type: "cloudiot.googleapis.com/Device"
- }
- ];
-
-
-
-
-
- int64 version_to_update = 2;
-
- bytes binary_data = 3 [(google.api.field_behavior) = REQUIRED];
- }
- message ListDeviceConfigVersionsRequest {
-
-
-
- string name = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {
- type: "cloudiot.googleapis.com/Device"
- }
- ];
-
-
-
- int32 num_versions = 2;
- }
- message ListDeviceConfigVersionsResponse {
-
-
- repeated DeviceConfig device_configs = 1;
- }
- message ListDeviceStatesRequest {
-
-
-
- string name = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {
- type: "cloudiot.googleapis.com/Device"
- }
- ];
-
-
-
- int32 num_states = 2;
- }
- message ListDeviceStatesResponse {
-
-
- repeated DeviceState device_states = 1;
- }
- message SendCommandToDeviceRequest {
-
-
-
- string name = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {
- type: "cloudiot.googleapis.com/Device"
- }
- ];
-
- bytes binary_data = 2 [(google.api.field_behavior) = REQUIRED];
-
-
-
-
-
- string subfolder = 3;
- }
- message SendCommandToDeviceResponse {
- }
- message BindDeviceToGatewayRequest {
-
-
- string parent = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {
- type: "cloudiot.googleapis.com/Registry"
- }
- ];
-
-
- string gateway_id = 2 [(google.api.field_behavior) = REQUIRED];
-
-
-
- string device_id = 3 [(google.api.field_behavior) = REQUIRED];
- }
- message BindDeviceToGatewayResponse {
- }
- message UnbindDeviceFromGatewayRequest {
-
-
- string parent = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {
- type: "cloudiot.googleapis.com/Registry"
- }
- ];
-
-
- string gateway_id = 2 [(google.api.field_behavior) = REQUIRED];
-
-
-
- string device_id = 3 [(google.api.field_behavior) = REQUIRED];
- }
- message UnbindDeviceFromGatewayResponse {
- }
|