google-cloud-iot-v1 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module Iot
23
+ module V1
24
+ VERSION = "0.1.0"
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,4 @@
1
+ # Cloud IoT API V1 Protocol Buffer Documentation
2
+
3
+ These files are for the YARD documentation of the generated protobuf files.
4
+ They are not intended to be required or loaded at runtime.
@@ -0,0 +1,59 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Api
22
+ # An indicator of the behavior of a given field (for example, that a field
23
+ # is required in requests, or given as output but ignored as input).
24
+ # This **does not** change the behavior in protocol buffers itself; it only
25
+ # denotes the behavior and may affect how API tooling handles the field.
26
+ #
27
+ # Note: This enum **may** receive new values in the future.
28
+ module FieldBehavior
29
+ # Conventional default for enums. Do not use this.
30
+ FIELD_BEHAVIOR_UNSPECIFIED = 0
31
+
32
+ # Specifically denotes a field as optional.
33
+ # While all fields in protocol buffers are optional, this may be specified
34
+ # for emphasis if appropriate.
35
+ OPTIONAL = 1
36
+
37
+ # Denotes a field as required.
38
+ # This indicates that the field **must** be provided as part of the request,
39
+ # and failure to do so will cause an error (usually `INVALID_ARGUMENT`).
40
+ REQUIRED = 2
41
+
42
+ # Denotes a field as output only.
43
+ # This indicates that the field is provided in responses, but including the
44
+ # field in a request does nothing (the server *must* ignore it and
45
+ # *must not* throw an error as a result of the field's presence).
46
+ OUTPUT_ONLY = 3
47
+
48
+ # Denotes a field as input only.
49
+ # This indicates that the field is provided in requests, and the
50
+ # corresponding field is not included in output.
51
+ INPUT_ONLY = 4
52
+
53
+ # Denotes a field as immutable.
54
+ # This indicates that the field may be set once in a request to create a
55
+ # resource, but may not be changed thereafter.
56
+ IMMUTABLE = 5
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,247 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Api
22
+ # A simple descriptor of a resource type.
23
+ #
24
+ # ResourceDescriptor annotates a resource message (either by means of a
25
+ # protobuf annotation or use in the service config), and associates the
26
+ # resource's schema, the resource type, and the pattern of the resource name.
27
+ #
28
+ # Example:
29
+ #
30
+ # message Topic {
31
+ # // Indicates this message defines a resource schema.
32
+ # // Declares the resource type in the format of {service}/{kind}.
33
+ # // For Kubernetes resources, the format is {api group}/{kind}.
34
+ # option (google.api.resource) = {
35
+ # type: "pubsub.googleapis.com/Topic"
36
+ # name_descriptor: {
37
+ # pattern: "projects/{project}/topics/{topic}"
38
+ # parent_type: "cloudresourcemanager.googleapis.com/Project"
39
+ # parent_name_extractor: "projects/{project}"
40
+ # }
41
+ # };
42
+ # }
43
+ #
44
+ # The ResourceDescriptor Yaml config will look like:
45
+ #
46
+ # resources:
47
+ # - type: "pubsub.googleapis.com/Topic"
48
+ # name_descriptor:
49
+ # - pattern: "projects/\\{project}/topics/\\{topic}"
50
+ # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
+ # parent_name_extractor: "projects/\\{project}"
52
+ #
53
+ # Sometimes, resources have multiple patterns, typically because they can
54
+ # live under multiple parents.
55
+ #
56
+ # Example:
57
+ #
58
+ # message LogEntry {
59
+ # option (google.api.resource) = {
60
+ # type: "logging.googleapis.com/LogEntry"
61
+ # name_descriptor: {
62
+ # pattern: "projects/{project}/logs/{log}"
63
+ # parent_type: "cloudresourcemanager.googleapis.com/Project"
64
+ # parent_name_extractor: "projects/{project}"
65
+ # }
66
+ # name_descriptor: {
67
+ # pattern: "folders/{folder}/logs/{log}"
68
+ # parent_type: "cloudresourcemanager.googleapis.com/Folder"
69
+ # parent_name_extractor: "folders/{folder}"
70
+ # }
71
+ # name_descriptor: {
72
+ # pattern: "organizations/{organization}/logs/{log}"
73
+ # parent_type: "cloudresourcemanager.googleapis.com/Organization"
74
+ # parent_name_extractor: "organizations/{organization}"
75
+ # }
76
+ # name_descriptor: {
77
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
78
+ # parent_type: "billing.googleapis.com/BillingAccount"
79
+ # parent_name_extractor: "billingAccounts/{billing_account}"
80
+ # }
81
+ # };
82
+ # }
83
+ #
84
+ # The ResourceDescriptor Yaml config will look like:
85
+ #
86
+ # resources:
87
+ # - type: 'logging.googleapis.com/LogEntry'
88
+ # name_descriptor:
89
+ # - pattern: "projects/{project}/logs/{log}"
90
+ # parent_type: "cloudresourcemanager.googleapis.com/Project"
91
+ # parent_name_extractor: "projects/{project}"
92
+ # - pattern: "folders/{folder}/logs/{log}"
93
+ # parent_type: "cloudresourcemanager.googleapis.com/Folder"
94
+ # parent_name_extractor: "folders/{folder}"
95
+ # - pattern: "organizations/{organization}/logs/{log}"
96
+ # parent_type: "cloudresourcemanager.googleapis.com/Organization"
97
+ # parent_name_extractor: "organizations/{organization}"
98
+ # - pattern: "billingAccounts/{billing_account}/logs/{log}"
99
+ # parent_type: "billing.googleapis.com/BillingAccount"
100
+ # parent_name_extractor: "billingAccounts/{billing_account}"
101
+ #
102
+ # For flexible resources, the resource name doesn't contain parent names, but
103
+ # the resource itself has parents for policy evaluation.
104
+ #
105
+ # Example:
106
+ #
107
+ # message Shelf {
108
+ # option (google.api.resource) = {
109
+ # type: "library.googleapis.com/Shelf"
110
+ # name_descriptor: {
111
+ # pattern: "shelves/{shelf}"
112
+ # parent_type: "cloudresourcemanager.googleapis.com/Project"
113
+ # }
114
+ # name_descriptor: {
115
+ # pattern: "shelves/{shelf}"
116
+ # parent_type: "cloudresourcemanager.googleapis.com/Folder"
117
+ # }
118
+ # };
119
+ # }
120
+ #
121
+ # The ResourceDescriptor Yaml config will look like:
122
+ #
123
+ # resources:
124
+ # - type: 'library.googleapis.com/Shelf'
125
+ # name_descriptor:
126
+ # - pattern: "shelves/{shelf}"
127
+ # parent_type: "cloudresourcemanager.googleapis.com/Project"
128
+ # - pattern: "shelves/{shelf}"
129
+ # parent_type: "cloudresourcemanager.googleapis.com/Folder"
130
+ # @!attribute [rw] type
131
+ # @return [::String]
132
+ # The resource type. It must be in the format of
133
+ # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be
134
+ # singular and must not include version numbers.
135
+ #
136
+ # Example: `storage.googleapis.com/Bucket`
137
+ #
138
+ # The value of the resource_type_kind must follow the regular expression
139
+ # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and
140
+ # should use PascalCase (UpperCamelCase). The maximum number of
141
+ # characters allowed for the `resource_type_kind` is 100.
142
+ # @!attribute [rw] pattern
143
+ # @return [::Array<::String>]
144
+ # Optional. The relative resource name pattern associated with this resource
145
+ # type. The DNS prefix of the full resource name shouldn't be specified here.
146
+ #
147
+ # The path pattern must follow the syntax, which aligns with HTTP binding
148
+ # syntax:
149
+ #
150
+ # Template = Segment { "/" Segment } ;
151
+ # Segment = LITERAL | Variable ;
152
+ # Variable = "{" LITERAL "}" ;
153
+ #
154
+ # Examples:
155
+ #
156
+ # - "projects/\\{project}/topics/\\{topic}"
157
+ # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}"
158
+ #
159
+ # The components in braces correspond to the IDs for each resource in the
160
+ # hierarchy. It is expected that, if multiple patterns are provided,
161
+ # the same component name (e.g. "project") refers to IDs of the same
162
+ # type of resource.
163
+ # @!attribute [rw] name_field
164
+ # @return [::String]
165
+ # Optional. The field on the resource that designates the resource name
166
+ # field. If omitted, this is assumed to be "name".
167
+ # @!attribute [rw] history
168
+ # @return [::Google::Api::ResourceDescriptor::History]
169
+ # Optional. The historical or future-looking state of the resource pattern.
170
+ #
171
+ # Example:
172
+ #
173
+ # // The InspectTemplate message originally only supported resource
174
+ # // names with organization, and project was added later.
175
+ # message InspectTemplate {
176
+ # option (google.api.resource) = {
177
+ # type: "dlp.googleapis.com/InspectTemplate"
178
+ # pattern:
179
+ # "organizations/{organization}/inspectTemplates/{inspect_template}"
180
+ # pattern: "projects/{project}/inspectTemplates/{inspect_template}"
181
+ # history: ORIGINALLY_SINGLE_PATTERN
182
+ # };
183
+ # }
184
+ # @!attribute [rw] plural
185
+ # @return [::String]
186
+ # The plural name used in the resource name, such as 'projects' for
187
+ # the name of 'projects/\\{project}'. It is the same concept of the `plural`
188
+ # field in k8s CRD spec
189
+ # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
190
+ # @!attribute [rw] singular
191
+ # @return [::String]
192
+ # The same concept of the `singular` field in k8s CRD spec
193
+ # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
194
+ # Such as "project" for the `resourcemanager.googleapis.com/Project` type.
195
+ class ResourceDescriptor
196
+ include ::Google::Protobuf::MessageExts
197
+ extend ::Google::Protobuf::MessageExts::ClassMethods
198
+
199
+ # A description of the historical or future-looking state of the
200
+ # resource pattern.
201
+ module History
202
+ # The "unset" value.
203
+ HISTORY_UNSPECIFIED = 0
204
+
205
+ # The resource originally had one pattern and launched as such, and
206
+ # additional patterns were added later.
207
+ ORIGINALLY_SINGLE_PATTERN = 1
208
+
209
+ # The resource has one pattern, but the API owner expects to add more
210
+ # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents
211
+ # that from being necessary once there are multiple patterns.)
212
+ FUTURE_MULTI_PATTERN = 2
213
+ end
214
+ end
215
+
216
+ # Defines a proto annotation that describes a string field that refers to
217
+ # an API resource.
218
+ # @!attribute [rw] type
219
+ # @return [::String]
220
+ # The resource type that the annotated field references.
221
+ #
222
+ # Example:
223
+ #
224
+ # message Subscription {
225
+ # string topic = 2 [(google.api.resource_reference) = {
226
+ # type: "pubsub.googleapis.com/Topic"
227
+ # }];
228
+ # }
229
+ # @!attribute [rw] child_type
230
+ # @return [::String]
231
+ # The resource type of a child collection that the annotated field
232
+ # references. This is useful for annotating the `parent` field that
233
+ # doesn't have a fixed resource type.
234
+ #
235
+ # Example:
236
+ #
237
+ # message ListLogEntriesRequest {
238
+ # string parent = 1 [(google.api.resource_reference) = {
239
+ # child_type: "logging.googleapis.com/LogEntry"
240
+ # };
241
+ # }
242
+ class ResourceReference
243
+ include ::Google::Protobuf::MessageExts
244
+ extend ::Google::Protobuf::MessageExts::ClassMethods
245
+ end
246
+ end
247
+ end
@@ -0,0 +1,397 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module Iot
23
+ module V1
24
+ # Request for `CreateDeviceRegistry`.
25
+ # @!attribute [rw] parent
26
+ # @return [::String]
27
+ # Required. The project and cloud region where this device registry must be created.
28
+ # For example, `projects/example-project/locations/us-central1`.
29
+ # @!attribute [rw] device_registry
30
+ # @return [::Google::Cloud::Iot::V1::DeviceRegistry]
31
+ # Required. The device registry. The field `name` must be empty. The server will
32
+ # generate that field from the device registry `id` provided and the
33
+ # `parent` field.
34
+ class CreateDeviceRegistryRequest
35
+ include ::Google::Protobuf::MessageExts
36
+ extend ::Google::Protobuf::MessageExts::ClassMethods
37
+ end
38
+
39
+ # Request for `GetDeviceRegistry`.
40
+ # @!attribute [rw] name
41
+ # @return [::String]
42
+ # Required. The name of the device registry. For example,
43
+ # `projects/example-project/locations/us-central1/registries/my-registry`.
44
+ class GetDeviceRegistryRequest
45
+ include ::Google::Protobuf::MessageExts
46
+ extend ::Google::Protobuf::MessageExts::ClassMethods
47
+ end
48
+
49
+ # Request for `DeleteDeviceRegistry`.
50
+ # @!attribute [rw] name
51
+ # @return [::String]
52
+ # Required. The name of the device registry. For example,
53
+ # `projects/example-project/locations/us-central1/registries/my-registry`.
54
+ class DeleteDeviceRegistryRequest
55
+ include ::Google::Protobuf::MessageExts
56
+ extend ::Google::Protobuf::MessageExts::ClassMethods
57
+ end
58
+
59
+ # Request for `UpdateDeviceRegistry`.
60
+ # @!attribute [rw] device_registry
61
+ # @return [::Google::Cloud::Iot::V1::DeviceRegistry]
62
+ # Required. The new values for the device registry. The `id` field must be empty, and
63
+ # the `name` field must indicate the path of the resource. For example,
64
+ # `projects/example-project/locations/us-central1/registries/my-registry`.
65
+ # @!attribute [rw] update_mask
66
+ # @return [::Google::Protobuf::FieldMask]
67
+ # Required. Only updates the `device_registry` fields indicated by this mask.
68
+ # The field mask must not be empty, and it must not contain fields that
69
+ # are immutable or only set by the server.
70
+ # Mutable top-level fields: `event_notification_config`, `http_config`,
71
+ # `mqtt_config`, and `state_notification_config`.
72
+ class UpdateDeviceRegistryRequest
73
+ include ::Google::Protobuf::MessageExts
74
+ extend ::Google::Protobuf::MessageExts::ClassMethods
75
+ end
76
+
77
+ # Request for `ListDeviceRegistries`.
78
+ # @!attribute [rw] parent
79
+ # @return [::String]
80
+ # Required. The project and cloud region path. For example,
81
+ # `projects/example-project/locations/us-central1`.
82
+ # @!attribute [rw] page_size
83
+ # @return [::Integer]
84
+ # The maximum number of registries to return in the response. If this value
85
+ # is zero, the service will select a default size. A call may return fewer
86
+ # objects than requested. A non-empty `next_page_token` in the response
87
+ # indicates that more data is available.
88
+ # @!attribute [rw] page_token
89
+ # @return [::String]
90
+ # The value returned by the last `ListDeviceRegistriesResponse`; indicates
91
+ # that this is a continuation of a prior `ListDeviceRegistries` call and
92
+ # the system should return the next page of data.
93
+ class ListDeviceRegistriesRequest
94
+ include ::Google::Protobuf::MessageExts
95
+ extend ::Google::Protobuf::MessageExts::ClassMethods
96
+ end
97
+
98
+ # Response for `ListDeviceRegistries`.
99
+ # @!attribute [rw] device_registries
100
+ # @return [::Array<::Google::Cloud::Iot::V1::DeviceRegistry>]
101
+ # The registries that matched the query.
102
+ # @!attribute [rw] next_page_token
103
+ # @return [::String]
104
+ # If not empty, indicates that there may be more registries that match the
105
+ # request; this value should be passed in a new
106
+ # `ListDeviceRegistriesRequest`.
107
+ class ListDeviceRegistriesResponse
108
+ include ::Google::Protobuf::MessageExts
109
+ extend ::Google::Protobuf::MessageExts::ClassMethods
110
+ end
111
+
112
+ # Request for `CreateDevice`.
113
+ # @!attribute [rw] parent
114
+ # @return [::String]
115
+ # Required. The name of the device registry where this device should be created.
116
+ # For example,
117
+ # `projects/example-project/locations/us-central1/registries/my-registry`.
118
+ # @!attribute [rw] device
119
+ # @return [::Google::Cloud::Iot::V1::Device]
120
+ # Required. The device registration details. The field `name` must be empty. The server
121
+ # generates `name` from the device registry `id` and the
122
+ # `parent` field.
123
+ class CreateDeviceRequest
124
+ include ::Google::Protobuf::MessageExts
125
+ extend ::Google::Protobuf::MessageExts::ClassMethods
126
+ end
127
+
128
+ # Request for `GetDevice`.
129
+ # @!attribute [rw] name
130
+ # @return [::String]
131
+ # Required. The name of the device. For example,
132
+ # `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
133
+ # `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
134
+ # @!attribute [rw] field_mask
135
+ # @return [::Google::Protobuf::FieldMask]
136
+ # The fields of the `Device` resource to be returned in the response. If the
137
+ # field mask is unset or empty, all fields are returned.
138
+ class GetDeviceRequest
139
+ include ::Google::Protobuf::MessageExts
140
+ extend ::Google::Protobuf::MessageExts::ClassMethods
141
+ end
142
+
143
+ # Request for `UpdateDevice`.
144
+ # @!attribute [rw] device
145
+ # @return [::Google::Cloud::Iot::V1::Device]
146
+ # Required. The new values for the device. The `id` and `num_id` fields must
147
+ # be empty, and the field `name` must specify the name path. For example,
148
+ # `projects/p0/locations/us-central1/registries/registry0/devices/device0`or
149
+ # `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
150
+ # @!attribute [rw] update_mask
151
+ # @return [::Google::Protobuf::FieldMask]
152
+ # Required. Only updates the `device` fields indicated by this mask.
153
+ # The field mask must not be empty, and it must not contain fields that
154
+ # are immutable or only set by the server.
155
+ # Mutable top-level fields: `credentials`, `blocked`, and `metadata`
156
+ class UpdateDeviceRequest
157
+ include ::Google::Protobuf::MessageExts
158
+ extend ::Google::Protobuf::MessageExts::ClassMethods
159
+ end
160
+
161
+ # Request for `DeleteDevice`.
162
+ # @!attribute [rw] name
163
+ # @return [::String]
164
+ # Required. The name of the device. For example,
165
+ # `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
166
+ # `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
167
+ class DeleteDeviceRequest
168
+ include ::Google::Protobuf::MessageExts
169
+ extend ::Google::Protobuf::MessageExts::ClassMethods
170
+ end
171
+
172
+ # Request for `ListDevices`.
173
+ # @!attribute [rw] parent
174
+ # @return [::String]
175
+ # Required. The device registry path. Required. For example,
176
+ # `projects/my-project/locations/us-central1/registries/my-registry`.
177
+ # @!attribute [rw] device_num_ids
178
+ # @return [::Array<::Integer>]
179
+ # A list of device numeric IDs. If empty, this field is ignored. Maximum
180
+ # IDs: 10,000.
181
+ # @!attribute [rw] device_ids
182
+ # @return [::Array<::String>]
183
+ # A list of device string IDs. For example, `['device0', 'device12']`.
184
+ # If empty, this field is ignored. Maximum IDs: 10,000
185
+ # @!attribute [rw] field_mask
186
+ # @return [::Google::Protobuf::FieldMask]
187
+ # The fields of the `Device` resource to be returned in the response. The
188
+ # fields `id` and `num_id` are always returned, along with any
189
+ # other fields specified.
190
+ # @!attribute [rw] gateway_list_options
191
+ # @return [::Google::Cloud::Iot::V1::GatewayListOptions]
192
+ # Options related to gateways.
193
+ # @!attribute [rw] page_size
194
+ # @return [::Integer]
195
+ # The maximum number of devices to return in the response. If this value
196
+ # is zero, the service will select a default size. A call may return fewer
197
+ # objects than requested. A non-empty `next_page_token` in the response
198
+ # indicates that more data is available.
199
+ # @!attribute [rw] page_token
200
+ # @return [::String]
201
+ # The value returned by the last `ListDevicesResponse`; indicates
202
+ # that this is a continuation of a prior `ListDevices` call and
203
+ # the system should return the next page of data.
204
+ class ListDevicesRequest
205
+ include ::Google::Protobuf::MessageExts
206
+ extend ::Google::Protobuf::MessageExts::ClassMethods
207
+ end
208
+
209
+ # Options for limiting the list based on gateway type and associations.
210
+ # @!attribute [rw] gateway_type
211
+ # @return [::Google::Cloud::Iot::V1::GatewayType]
212
+ # If `GATEWAY` is specified, only gateways are returned. If `NON_GATEWAY`
213
+ # is specified, only non-gateway devices are returned. If
214
+ # `GATEWAY_TYPE_UNSPECIFIED` is specified, all devices are returned.
215
+ # @!attribute [rw] associations_gateway_id
216
+ # @return [::String]
217
+ # If set, only devices associated with the specified gateway are returned.
218
+ # The gateway ID can be numeric (`num_id`) or the user-defined string
219
+ # (`id`). For example, if `123` is specified, only devices bound to the
220
+ # gateway with `num_id` 123 are returned.
221
+ # @!attribute [rw] associations_device_id
222
+ # @return [::String]
223
+ # If set, returns only the gateways with which the specified device is
224
+ # associated. The device ID can be numeric (`num_id`) or the user-defined
225
+ # string (`id`). For example, if `456` is specified, returns only the
226
+ # gateways to which the device with `num_id` 456 is bound.
227
+ class GatewayListOptions
228
+ include ::Google::Protobuf::MessageExts
229
+ extend ::Google::Protobuf::MessageExts::ClassMethods
230
+ end
231
+
232
+ # Response for `ListDevices`.
233
+ # @!attribute [rw] devices
234
+ # @return [::Array<::Google::Cloud::Iot::V1::Device>]
235
+ # The devices that match the request.
236
+ # @!attribute [rw] next_page_token
237
+ # @return [::String]
238
+ # If not empty, indicates that there may be more devices that match the
239
+ # request; this value should be passed in a new `ListDevicesRequest`.
240
+ class ListDevicesResponse
241
+ include ::Google::Protobuf::MessageExts
242
+ extend ::Google::Protobuf::MessageExts::ClassMethods
243
+ end
244
+
245
+ # Request for `ModifyCloudToDeviceConfig`.
246
+ # @!attribute [rw] name
247
+ # @return [::String]
248
+ # Required. The name of the device. For example,
249
+ # `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
250
+ # `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
251
+ # @!attribute [rw] version_to_update
252
+ # @return [::Integer]
253
+ # The version number to update. If this value is zero, it will not check the
254
+ # version number of the server and will always update the current version;
255
+ # otherwise, this update will fail if the version number found on the server
256
+ # does not match this version number. This is used to support multiple
257
+ # simultaneous updates without losing data.
258
+ # @!attribute [rw] binary_data
259
+ # @return [::String]
260
+ # Required. The configuration data for the device.
261
+ class ModifyCloudToDeviceConfigRequest
262
+ include ::Google::Protobuf::MessageExts
263
+ extend ::Google::Protobuf::MessageExts::ClassMethods
264
+ end
265
+
266
+ # Request for `ListDeviceConfigVersions`.
267
+ # @!attribute [rw] name
268
+ # @return [::String]
269
+ # Required. The name of the device. For example,
270
+ # `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
271
+ # `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
272
+ # @!attribute [rw] num_versions
273
+ # @return [::Integer]
274
+ # The number of versions to list. Versions are listed in decreasing order of
275
+ # the version number. The maximum number of versions retained is 10. If this
276
+ # value is zero, it will return all the versions available.
277
+ class ListDeviceConfigVersionsRequest
278
+ include ::Google::Protobuf::MessageExts
279
+ extend ::Google::Protobuf::MessageExts::ClassMethods
280
+ end
281
+
282
+ # Response for `ListDeviceConfigVersions`.
283
+ # @!attribute [rw] device_configs
284
+ # @return [::Array<::Google::Cloud::Iot::V1::DeviceConfig>]
285
+ # The device configuration for the last few versions. Versions are listed
286
+ # in decreasing order, starting from the most recent one.
287
+ class ListDeviceConfigVersionsResponse
288
+ include ::Google::Protobuf::MessageExts
289
+ extend ::Google::Protobuf::MessageExts::ClassMethods
290
+ end
291
+
292
+ # Request for `ListDeviceStates`.
293
+ # @!attribute [rw] name
294
+ # @return [::String]
295
+ # Required. The name of the device. For example,
296
+ # `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
297
+ # `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
298
+ # @!attribute [rw] num_states
299
+ # @return [::Integer]
300
+ # The number of states to list. States are listed in descending order of
301
+ # update time. The maximum number of states retained is 10. If this
302
+ # value is zero, it will return all the states available.
303
+ class ListDeviceStatesRequest
304
+ include ::Google::Protobuf::MessageExts
305
+ extend ::Google::Protobuf::MessageExts::ClassMethods
306
+ end
307
+
308
+ # Response for `ListDeviceStates`.
309
+ # @!attribute [rw] device_states
310
+ # @return [::Array<::Google::Cloud::Iot::V1::DeviceState>]
311
+ # The last few device states. States are listed in descending order of server
312
+ # update time, starting from the most recent one.
313
+ class ListDeviceStatesResponse
314
+ include ::Google::Protobuf::MessageExts
315
+ extend ::Google::Protobuf::MessageExts::ClassMethods
316
+ end
317
+
318
+ # Request for `SendCommandToDevice`.
319
+ # @!attribute [rw] name
320
+ # @return [::String]
321
+ # Required. The name of the device. For example,
322
+ # `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
323
+ # `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
324
+ # @!attribute [rw] binary_data
325
+ # @return [::String]
326
+ # Required. The command data to send to the device.
327
+ # @!attribute [rw] subfolder
328
+ # @return [::String]
329
+ # Optional subfolder for the command. If empty, the command will be delivered
330
+ # to the /devices/\\{device-id}/commands topic, otherwise it will be delivered
331
+ # to the /devices/\\{device-id}/commands/\\{subfolder} topic. Multi-level
332
+ # subfolders are allowed. This field must not have more than 256 characters,
333
+ # and must not contain any MQTT wildcards ("+" or "#") or null characters.
334
+ class SendCommandToDeviceRequest
335
+ include ::Google::Protobuf::MessageExts
336
+ extend ::Google::Protobuf::MessageExts::ClassMethods
337
+ end
338
+
339
+ # Response for `SendCommandToDevice`.
340
+ class SendCommandToDeviceResponse
341
+ include ::Google::Protobuf::MessageExts
342
+ extend ::Google::Protobuf::MessageExts::ClassMethods
343
+ end
344
+
345
+ # Request for `BindDeviceToGateway`.
346
+ # @!attribute [rw] parent
347
+ # @return [::String]
348
+ # Required. The name of the registry. For example,
349
+ # `projects/example-project/locations/us-central1/registries/my-registry`.
350
+ # @!attribute [rw] gateway_id
351
+ # @return [::String]
352
+ # Required. The value of `gateway_id` can be either the device numeric ID or the
353
+ # user-defined device identifier.
354
+ # @!attribute [rw] device_id
355
+ # @return [::String]
356
+ # Required. The device to associate with the specified gateway. The value of
357
+ # `device_id` can be either the device numeric ID or the user-defined device
358
+ # identifier.
359
+ class BindDeviceToGatewayRequest
360
+ include ::Google::Protobuf::MessageExts
361
+ extend ::Google::Protobuf::MessageExts::ClassMethods
362
+ end
363
+
364
+ # Response for `BindDeviceToGateway`.
365
+ class BindDeviceToGatewayResponse
366
+ include ::Google::Protobuf::MessageExts
367
+ extend ::Google::Protobuf::MessageExts::ClassMethods
368
+ end
369
+
370
+ # Request for `UnbindDeviceFromGateway`.
371
+ # @!attribute [rw] parent
372
+ # @return [::String]
373
+ # Required. The name of the registry. For example,
374
+ # `projects/example-project/locations/us-central1/registries/my-registry`.
375
+ # @!attribute [rw] gateway_id
376
+ # @return [::String]
377
+ # Required. The value of `gateway_id` can be either the device numeric ID or the
378
+ # user-defined device identifier.
379
+ # @!attribute [rw] device_id
380
+ # @return [::String]
381
+ # Required. The device to disassociate from the specified gateway. The value of
382
+ # `device_id` can be either the device numeric ID or the user-defined device
383
+ # identifier.
384
+ class UnbindDeviceFromGatewayRequest
385
+ include ::Google::Protobuf::MessageExts
386
+ extend ::Google::Protobuf::MessageExts::ClassMethods
387
+ end
388
+
389
+ # Response for `UnbindDeviceFromGateway`.
390
+ class UnbindDeviceFromGatewayResponse
391
+ include ::Google::Protobuf::MessageExts
392
+ extend ::Google::Protobuf::MessageExts::ClassMethods
393
+ end
394
+ end
395
+ end
396
+ end
397
+ end