xref: /aosp_15_r20/external/googleapis/google/cloud/iot/v1/device_manager.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2020 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package google.cloud.iot.v1;
18
19import "google/api/annotations.proto";
20import "google/api/client.proto";
21import "google/api/field_behavior.proto";
22import "google/api/resource.proto";
23import "google/cloud/iot/v1/resources.proto";
24import "google/iam/v1/iam_policy.proto";
25import "google/iam/v1/policy.proto";
26import "google/protobuf/empty.proto";
27import "google/protobuf/field_mask.proto";
28
29option cc_enable_arenas = true;
30option go_package = "cloud.google.com/go/iot/apiv1/iotpb;iotpb";
31option java_multiple_files = true;
32option java_outer_classname = "DeviceManagerProto";
33option java_package = "com.google.cloud.iot.v1";
34
35// Internet of Things (IoT) service. Securely connect and manage IoT devices.
36service DeviceManager {
37  option (google.api.default_host) = "cloudiot.googleapis.com";
38  option (google.api.oauth_scopes) =
39      "https://www.googleapis.com/auth/cloud-platform,"
40      "https://www.googleapis.com/auth/cloudiot";
41
42  // Creates a device registry that contains devices.
43  rpc CreateDeviceRegistry(CreateDeviceRegistryRequest) returns (DeviceRegistry) {
44    option (google.api.http) = {
45      post: "/v1/{parent=projects/*/locations/*}/registries"
46      body: "device_registry"
47    };
48    option (google.api.method_signature) = "parent,device_registry";
49  }
50
51  // Gets a device registry configuration.
52  rpc GetDeviceRegistry(GetDeviceRegistryRequest) returns (DeviceRegistry) {
53    option (google.api.http) = {
54      get: "/v1/{name=projects/*/locations/*/registries/*}"
55    };
56    option (google.api.method_signature) = "name";
57  }
58
59  // Updates a device registry configuration.
60  rpc UpdateDeviceRegistry(UpdateDeviceRegistryRequest) returns (DeviceRegistry) {
61    option (google.api.http) = {
62      patch: "/v1/{device_registry.name=projects/*/locations/*/registries/*}"
63      body: "device_registry"
64    };
65    option (google.api.method_signature) = "device_registry,update_mask";
66  }
67
68  // Deletes a device registry configuration.
69  rpc DeleteDeviceRegistry(DeleteDeviceRegistryRequest) returns (google.protobuf.Empty) {
70    option (google.api.http) = {
71      delete: "/v1/{name=projects/*/locations/*/registries/*}"
72    };
73    option (google.api.method_signature) = "name";
74  }
75
76  // Lists device registries.
77  rpc ListDeviceRegistries(ListDeviceRegistriesRequest) returns (ListDeviceRegistriesResponse) {
78    option (google.api.http) = {
79      get: "/v1/{parent=projects/*/locations/*}/registries"
80    };
81    option (google.api.method_signature) = "parent";
82  }
83
84  // Creates a device in a device registry.
85  rpc CreateDevice(CreateDeviceRequest) returns (Device) {
86    option (google.api.http) = {
87      post: "/v1/{parent=projects/*/locations/*/registries/*}/devices"
88      body: "device"
89    };
90    option (google.api.method_signature) = "parent,device";
91  }
92
93  // Gets details about a device.
94  rpc GetDevice(GetDeviceRequest) returns (Device) {
95    option (google.api.http) = {
96      get: "/v1/{name=projects/*/locations/*/registries/*/devices/*}"
97      additional_bindings {
98        get: "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}"
99      }
100    };
101    option (google.api.method_signature) = "name";
102  }
103
104  // Updates a device.
105  rpc UpdateDevice(UpdateDeviceRequest) returns (Device) {
106    option (google.api.http) = {
107      patch: "/v1/{device.name=projects/*/locations/*/registries/*/devices/*}"
108      body: "device"
109      additional_bindings {
110        patch: "/v1/{device.name=projects/*/locations/*/registries/*/groups/*/devices/*}"
111        body: "device"
112      }
113    };
114    option (google.api.method_signature) = "device,update_mask";
115  }
116
117  // Deletes a device.
118  rpc DeleteDevice(DeleteDeviceRequest) returns (google.protobuf.Empty) {
119    option (google.api.http) = {
120      delete: "/v1/{name=projects/*/locations/*/registries/*/devices/*}"
121    };
122    option (google.api.method_signature) = "name";
123  }
124
125  // List devices in a device registry.
126  rpc ListDevices(ListDevicesRequest) returns (ListDevicesResponse) {
127    option (google.api.http) = {
128      get: "/v1/{parent=projects/*/locations/*/registries/*}/devices"
129      additional_bindings {
130        get: "/v1/{parent=projects/*/locations/*/registries/*/groups/*}/devices"
131      }
132    };
133    option (google.api.method_signature) = "parent";
134  }
135
136  // Modifies the configuration for the device, which is eventually sent from
137  // the Cloud IoT Core servers. Returns the modified configuration version and
138  // its metadata.
139  rpc ModifyCloudToDeviceConfig(ModifyCloudToDeviceConfigRequest) returns (DeviceConfig) {
140    option (google.api.http) = {
141      post: "/v1/{name=projects/*/locations/*/registries/*/devices/*}:modifyCloudToDeviceConfig"
142      body: "*"
143      additional_bindings {
144        post: "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}:modifyCloudToDeviceConfig"
145        body: "*"
146      }
147    };
148    option (google.api.method_signature) = "name,binary_data";
149  }
150
151  // Lists the last few versions of the device configuration in descending
152  // order (i.e.: newest first).
153  rpc ListDeviceConfigVersions(ListDeviceConfigVersionsRequest) returns (ListDeviceConfigVersionsResponse) {
154    option (google.api.http) = {
155      get: "/v1/{name=projects/*/locations/*/registries/*/devices/*}/configVersions"
156      additional_bindings {
157        get: "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}/configVersions"
158      }
159    };
160    option (google.api.method_signature) = "name";
161  }
162
163  // Lists the last few versions of the device state in descending order (i.e.:
164  // newest first).
165  rpc ListDeviceStates(ListDeviceStatesRequest) returns (ListDeviceStatesResponse) {
166    option (google.api.http) = {
167      get: "/v1/{name=projects/*/locations/*/registries/*/devices/*}/states"
168      additional_bindings {
169        get: "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}/states"
170      }
171    };
172    option (google.api.method_signature) = "name";
173  }
174
175  // Sets the access control policy on the specified resource. Replaces any
176  // existing policy.
177  rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) {
178    option (google.api.http) = {
179      post: "/v1/{resource=projects/*/locations/*/registries/*}:setIamPolicy"
180      body: "*"
181      additional_bindings {
182        post: "/v1/{resource=projects/*/locations/*/registries/*/groups/*}:setIamPolicy"
183        body: "*"
184      }
185    };
186    option (google.api.method_signature) = "resource,policy";
187  }
188
189  // Gets the access control policy for a resource.
190  // Returns an empty policy if the resource exists and does not have a policy
191  // set.
192  rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) {
193    option (google.api.http) = {
194      post: "/v1/{resource=projects/*/locations/*/registries/*}:getIamPolicy"
195      body: "*"
196      additional_bindings {
197        post: "/v1/{resource=projects/*/locations/*/registries/*/groups/*}:getIamPolicy"
198        body: "*"
199      }
200    };
201    option (google.api.method_signature) = "resource";
202  }
203
204  // Returns permissions that a caller has on the specified resource.
205  // If the resource does not exist, this will return an empty set of
206  // permissions, not a NOT_FOUND error.
207  rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) {
208    option (google.api.http) = {
209      post: "/v1/{resource=projects/*/locations/*/registries/*}:testIamPermissions"
210      body: "*"
211      additional_bindings {
212        post: "/v1/{resource=projects/*/locations/*/registries/*/groups/*}:testIamPermissions"
213        body: "*"
214      }
215    };
216    option (google.api.method_signature) = "resource,permissions";
217  }
218
219  // Sends a command to the specified device. In order for a device to be able
220  // to receive commands, it must:
221  // 1) be connected to Cloud IoT Core using the MQTT protocol, and
222  // 2) be subscribed to the group of MQTT topics specified by
223  //    /devices/{device-id}/commands/#. This subscription will receive commands
224  //    at the top-level topic /devices/{device-id}/commands as well as commands
225  //    for subfolders, like /devices/{device-id}/commands/subfolder.
226  //    Note that subscribing to specific subfolders is not supported.
227  // If the command could not be delivered to the device, this method will
228  // return an error; in particular, if the device is not subscribed, this
229  // method will return FAILED_PRECONDITION. Otherwise, this method will
230  // return OK. If the subscription is QoS 1, at least once delivery will be
231  // guaranteed; for QoS 0, no acknowledgment will be expected from the device.
232  rpc SendCommandToDevice(SendCommandToDeviceRequest) returns (SendCommandToDeviceResponse) {
233    option (google.api.http) = {
234      post: "/v1/{name=projects/*/locations/*/registries/*/devices/*}:sendCommandToDevice"
235      body: "*"
236      additional_bindings {
237        post: "/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}:sendCommandToDevice"
238        body: "*"
239      }
240    };
241    option (google.api.method_signature) = "name,binary_data";
242    option (google.api.method_signature) = "name,binary_data,subfolder";
243  }
244
245  // Associates the device with the gateway.
246  rpc BindDeviceToGateway(BindDeviceToGatewayRequest) returns (BindDeviceToGatewayResponse) {
247    option (google.api.http) = {
248      post: "/v1/{parent=projects/*/locations/*/registries/*}:bindDeviceToGateway"
249      body: "*"
250      additional_bindings {
251        post: "/v1/{parent=projects/*/locations/*/registries/*/groups/*}:bindDeviceToGateway"
252        body: "*"
253      }
254    };
255    option (google.api.method_signature) = "parent,gateway_id,device_id";
256  }
257
258  // Deletes the association between the device and the gateway.
259  rpc UnbindDeviceFromGateway(UnbindDeviceFromGatewayRequest) returns (UnbindDeviceFromGatewayResponse) {
260    option (google.api.http) = {
261      post: "/v1/{parent=projects/*/locations/*/registries/*}:unbindDeviceFromGateway"
262      body: "*"
263      additional_bindings {
264        post: "/v1/{parent=projects/*/locations/*/registries/*/groups/*}:unbindDeviceFromGateway"
265        body: "*"
266      }
267    };
268    option (google.api.method_signature) = "parent,gateway_id,device_id";
269  }
270}
271
272// Request for `CreateDeviceRegistry`.
273message CreateDeviceRegistryRequest {
274  // Required. The project and cloud region where this device registry must be created.
275  // For example, `projects/example-project/locations/us-central1`.
276  string parent = 1 [
277    (google.api.field_behavior) = REQUIRED,
278    (google.api.resource_reference) = {
279      type: "locations.googleapis.com/Location"
280    }
281  ];
282
283  // Required. The device registry. The field `name` must be empty. The server will
284  // generate that field from the device registry `id` provided and the
285  // `parent` field.
286  DeviceRegistry device_registry = 2 [(google.api.field_behavior) = REQUIRED];
287}
288
289// Request for `GetDeviceRegistry`.
290message GetDeviceRegistryRequest {
291  // Required. The name of the device registry. For example,
292  // `projects/example-project/locations/us-central1/registries/my-registry`.
293  string name = 1 [
294    (google.api.field_behavior) = REQUIRED,
295    (google.api.resource_reference) = {
296      type: "cloudiot.googleapis.com/Registry"
297    }
298  ];
299}
300
301// Request for `DeleteDeviceRegistry`.
302message DeleteDeviceRegistryRequest {
303  // Required. The name of the device registry. For example,
304  // `projects/example-project/locations/us-central1/registries/my-registry`.
305  string name = 1 [
306    (google.api.field_behavior) = REQUIRED,
307    (google.api.resource_reference) = {
308      type: "cloudiot.googleapis.com/Registry"
309    }
310  ];
311}
312
313// Request for `UpdateDeviceRegistry`.
314message UpdateDeviceRegistryRequest {
315  // Required. The new values for the device registry. The `id` field must be empty, and
316  // the `name` field must indicate the path of the resource. For example,
317  // `projects/example-project/locations/us-central1/registries/my-registry`.
318  DeviceRegistry device_registry = 1 [(google.api.field_behavior) = REQUIRED];
319
320  // Required. Only updates the `device_registry` fields indicated by this mask.
321  // The field mask must not be empty, and it must not contain fields that
322  // are immutable or only set by the server.
323  // Mutable top-level fields: `event_notification_config`, `http_config`,
324  // `mqtt_config`, and `state_notification_config`.
325  google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
326}
327
328// Request for `ListDeviceRegistries`.
329message ListDeviceRegistriesRequest {
330  // Required. The project and cloud region path. For example,
331  // `projects/example-project/locations/us-central1`.
332  string parent = 1 [
333    (google.api.field_behavior) = REQUIRED,
334    (google.api.resource_reference) = {
335      type: "locations.googleapis.com/Location"
336    }
337  ];
338
339  // The maximum number of registries to return in the response. If this value
340  // is zero, the service will select a default size. A call may return fewer
341  // objects than requested. A non-empty `next_page_token` in the response
342  // indicates that more data is available.
343  int32 page_size = 2;
344
345  // The value returned by the last `ListDeviceRegistriesResponse`; indicates
346  // that this is a continuation of a prior `ListDeviceRegistries` call and
347  // the system should return the next page of data.
348  string page_token = 3;
349}
350
351// Response for `ListDeviceRegistries`.
352message ListDeviceRegistriesResponse {
353  // The registries that matched the query.
354  repeated DeviceRegistry device_registries = 1;
355
356  // If not empty, indicates that there may be more registries that match the
357  // request; this value should be passed in a new
358  // `ListDeviceRegistriesRequest`.
359  string next_page_token = 2;
360}
361
362// Request for `CreateDevice`.
363message CreateDeviceRequest {
364  // Required. The name of the device registry where this device should be created.
365  // For example,
366  // `projects/example-project/locations/us-central1/registries/my-registry`.
367  string parent = 1 [
368    (google.api.field_behavior) = REQUIRED,
369    (google.api.resource_reference) = {
370      type: "cloudiot.googleapis.com/Registry"
371    }
372  ];
373
374  // Required. The device registration details. The field `name` must be empty. The server
375  // generates `name` from the device registry `id` and the
376  // `parent` field.
377  Device device = 2 [(google.api.field_behavior) = REQUIRED];
378}
379
380// Request for `GetDevice`.
381message GetDeviceRequest {
382  // Required. The name of the device. For example,
383  // `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
384  // `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
385  string name = 1 [
386    (google.api.field_behavior) = REQUIRED,
387    (google.api.resource_reference) = {
388      type: "cloudiot.googleapis.com/Device"
389    }
390  ];
391
392  // The fields of the `Device` resource to be returned in the response. If the
393  // field mask is unset or empty, all fields are returned. Fields have to be
394  // provided in snake_case format, for example: `last_heartbeat_time`.
395  google.protobuf.FieldMask field_mask = 2;
396}
397
398// Request for `UpdateDevice`.
399message UpdateDeviceRequest {
400  // Required. The new values for the device. The `id` and `num_id` fields must
401  // be empty, and the field `name` must specify the name path. For example,
402  // `projects/p0/locations/us-central1/registries/registry0/devices/device0`or
403  // `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
404  Device device = 2 [(google.api.field_behavior) = REQUIRED];
405
406  // Required. Only updates the `device` fields indicated by this mask.
407  // The field mask must not be empty, and it must not contain fields that
408  // are immutable or only set by the server.
409  // Mutable top-level fields: `credentials`, `blocked`, and `metadata`
410  google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = REQUIRED];
411}
412
413// Request for `DeleteDevice`.
414message DeleteDeviceRequest {
415  // Required. The name of the device. For example,
416  // `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
417  // `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
418  string name = 1 [
419    (google.api.field_behavior) = REQUIRED,
420    (google.api.resource_reference) = {
421      type: "cloudiot.googleapis.com/Device"
422    }
423  ];
424}
425
426// Request for `ListDevices`.
427message ListDevicesRequest {
428  // Required. The device registry path. Required. For example,
429  // `projects/my-project/locations/us-central1/registries/my-registry`.
430  string parent = 1 [
431    (google.api.field_behavior) = REQUIRED,
432    (google.api.resource_reference) = {
433      type: "cloudiot.googleapis.com/Registry"
434    }
435  ];
436
437  // A list of device numeric IDs. If empty, this field is ignored. Maximum
438  // IDs: 10,000.
439  repeated uint64 device_num_ids = 2;
440
441  // A list of device string IDs. For example, `['device0', 'device12']`.
442  // If empty, this field is ignored. Maximum IDs: 10,000
443  repeated string device_ids = 3;
444
445  // The fields of the `Device` resource to be returned in the response. The
446  // fields `id` and `num_id` are always returned, along with any
447  // other fields specified in snake_case format, for example:
448  // `last_heartbeat_time`.
449  google.protobuf.FieldMask field_mask = 4;
450
451  // Options related to gateways.
452  GatewayListOptions gateway_list_options = 6;
453
454  // The maximum number of devices to return in the response. If this value
455  // is zero, the service will select a default size. A call may return fewer
456  // objects than requested. A non-empty `next_page_token` in the response
457  // indicates that more data is available.
458  int32 page_size = 100;
459
460  // The value returned by the last `ListDevicesResponse`; indicates
461  // that this is a continuation of a prior `ListDevices` call and
462  // the system should return the next page of data.
463  string page_token = 101;
464}
465
466// Options for limiting the list based on gateway type and associations.
467message GatewayListOptions {
468  // If not set, all devices and gateways are returned. If set, the list is
469  // filtered based on gateway type and associations.
470  oneof filter {
471    // If `GATEWAY` is specified, only gateways are returned. If `NON_GATEWAY`
472    // is specified, only non-gateway devices are returned. If
473    // `GATEWAY_TYPE_UNSPECIFIED` is specified, all devices are returned.
474    GatewayType gateway_type = 1;
475
476    // If set, only devices associated with the specified gateway are returned.
477    // The gateway ID can be numeric (`num_id`) or the user-defined string
478    // (`id`). For example, if `123` is specified, only devices bound to the
479    // gateway with `num_id` 123 are returned.
480    string associations_gateway_id = 2;
481
482    // If set, returns only the gateways with which the specified device is
483    // associated. The device ID can be numeric (`num_id`) or the user-defined
484    // string (`id`). For example, if `456` is specified, returns only the
485    // gateways to which the device with `num_id` 456 is bound.
486    string associations_device_id = 3;
487  }
488}
489
490// Response for `ListDevices`.
491message ListDevicesResponse {
492  // The devices that match the request.
493  repeated Device devices = 1;
494
495  // If not empty, indicates that there may be more devices that match the
496  // request; this value should be passed in a new `ListDevicesRequest`.
497  string next_page_token = 2;
498}
499
500// Request for `ModifyCloudToDeviceConfig`.
501message ModifyCloudToDeviceConfigRequest {
502  // Required. The name of the device. For example,
503  // `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
504  // `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
505  string name = 1 [
506    (google.api.field_behavior) = REQUIRED,
507    (google.api.resource_reference) = {
508      type: "cloudiot.googleapis.com/Device"
509    }
510  ];
511
512  // The version number to update. If this value is zero, it will not check the
513  // version number of the server and will always update the current version;
514  // otherwise, this update will fail if the version number found on the server
515  // does not match this version number. This is used to support multiple
516  // simultaneous updates without losing data.
517  int64 version_to_update = 2;
518
519  // Required. The configuration data for the device.
520  bytes binary_data = 3 [(google.api.field_behavior) = REQUIRED];
521}
522
523// Request for `ListDeviceConfigVersions`.
524message ListDeviceConfigVersionsRequest {
525  // Required. The name of the device. For example,
526  // `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
527  // `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
528  string name = 1 [
529    (google.api.field_behavior) = REQUIRED,
530    (google.api.resource_reference) = {
531      type: "cloudiot.googleapis.com/Device"
532    }
533  ];
534
535  // The number of versions to list. Versions are listed in decreasing order of
536  // the version number. The maximum number of versions retained is 10. If this
537  // value is zero, it will return all the versions available.
538  int32 num_versions = 2;
539}
540
541// Response for `ListDeviceConfigVersions`.
542message ListDeviceConfigVersionsResponse {
543  // The device configuration for the last few versions. Versions are listed
544  // in decreasing order, starting from the most recent one.
545  repeated DeviceConfig device_configs = 1;
546}
547
548// Request for `ListDeviceStates`.
549message ListDeviceStatesRequest {
550  // Required. The name of the device. For example,
551  // `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
552  // `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
553  string name = 1 [
554    (google.api.field_behavior) = REQUIRED,
555    (google.api.resource_reference) = {
556      type: "cloudiot.googleapis.com/Device"
557    }
558  ];
559
560  // The number of states to list. States are listed in descending order of
561  // update time. The maximum number of states retained is 10. If this
562  // value is zero, it will return all the states available.
563  int32 num_states = 2;
564}
565
566// Response for `ListDeviceStates`.
567message ListDeviceStatesResponse {
568  // The last few device states. States are listed in descending order of server
569  // update time, starting from the most recent one.
570  repeated DeviceState device_states = 1;
571}
572
573// Request for `SendCommandToDevice`.
574message SendCommandToDeviceRequest {
575  // Required. The name of the device. For example,
576  // `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
577  // `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
578  string name = 1 [
579    (google.api.field_behavior) = REQUIRED,
580    (google.api.resource_reference) = {
581      type: "cloudiot.googleapis.com/Device"
582    }
583  ];
584
585  // Required. The command data to send to the device.
586  bytes binary_data = 2 [(google.api.field_behavior) = REQUIRED];
587
588  // Optional subfolder for the command. If empty, the command will be delivered
589  // to the /devices/{device-id}/commands topic, otherwise it will be delivered
590  // to the /devices/{device-id}/commands/{subfolder} topic. Multi-level
591  // subfolders are allowed. This field must not have more than 256 characters,
592  // and must not contain any MQTT wildcards ("+" or "#") or null characters.
593  string subfolder = 3;
594}
595
596// Response for `SendCommandToDevice`.
597message SendCommandToDeviceResponse {
598
599}
600
601// Request for `BindDeviceToGateway`.
602message BindDeviceToGatewayRequest {
603  // Required. The name of the registry. For example,
604  // `projects/example-project/locations/us-central1/registries/my-registry`.
605  string parent = 1 [
606    (google.api.field_behavior) = REQUIRED,
607    (google.api.resource_reference) = {
608      type: "cloudiot.googleapis.com/Registry"
609    }
610  ];
611
612  // Required. The value of `gateway_id` can be either the device numeric ID or the
613  // user-defined device identifier.
614  string gateway_id = 2 [(google.api.field_behavior) = REQUIRED];
615
616  // Required. The device to associate with the specified gateway. The value of
617  // `device_id` can be either the device numeric ID or the user-defined device
618  // identifier.
619  string device_id = 3 [(google.api.field_behavior) = REQUIRED];
620}
621
622// Response for `BindDeviceToGateway`.
623message BindDeviceToGatewayResponse {
624
625}
626
627// Request for `UnbindDeviceFromGateway`.
628message UnbindDeviceFromGatewayRequest {
629  // Required. The name of the registry. For example,
630  // `projects/example-project/locations/us-central1/registries/my-registry`.
631  string parent = 1 [
632    (google.api.field_behavior) = REQUIRED,
633    (google.api.resource_reference) = {
634      type: "cloudiot.googleapis.com/Registry"
635    }
636  ];
637
638  // Required. The value of `gateway_id` can be either the device numeric ID or the
639  // user-defined device identifier.
640  string gateway_id = 2 [(google.api.field_behavior) = REQUIRED];
641
642  // Required. The device to disassociate from the specified gateway. The value of
643  // `device_id` can be either the device numeric ID or the user-defined device
644  // identifier.
645  string device_id = 3 [(google.api.field_behavior) = REQUIRED];
646}
647
648// Response for `UnbindDeviceFromGateway`.
649message UnbindDeviceFromGatewayResponse {
650
651}
652