google-api-client 0.14.4 → 0.14.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +41 -0
  3. data/generated/google/apis/analyticsreporting_v4.rb +1 -1
  4. data/generated/google/apis/androidmanagement_v1.rb +1 -1
  5. data/generated/google/apis/androidmanagement_v1/classes.rb +2 -2
  6. data/generated/google/apis/appengine_v1.rb +1 -1
  7. data/generated/google/apis/appengine_v1/classes.rb +111 -0
  8. data/generated/google/apis/appengine_v1/representations.rb +59 -0
  9. data/generated/google/apis/appengine_v1/service.rb +220 -0
  10. data/generated/google/apis/bigquerydatatransfer_v1.rb +1 -1
  11. data/generated/google/apis/classroom_v1.rb +7 -1
  12. data/generated/google/apis/classroom_v1/classes.rb +361 -0
  13. data/generated/google/apis/classroom_v1/representations.rb +161 -0
  14. data/generated/google/apis/classroom_v1/service.rb +426 -0
  15. data/generated/google/apis/cloudfunctions_v1beta2.rb +1 -1
  16. data/generated/google/apis/cloudfunctions_v1beta2/classes.rb +3 -3
  17. data/generated/google/apis/cloudiot_v1.rb +38 -0
  18. data/generated/google/apis/cloudiot_v1/classes.rb +1197 -0
  19. data/generated/google/apis/cloudiot_v1/representations.rb +473 -0
  20. data/generated/google/apis/cloudiot_v1/service.rb +657 -0
  21. data/generated/google/apis/cloudiot_v1beta1.rb +38 -0
  22. data/generated/google/apis/cloudiot_v1beta1/classes.rb +1064 -0
  23. data/generated/google/apis/cloudiot_v1beta1/representations.rb +442 -0
  24. data/generated/google/apis/cloudiot_v1beta1/service.rb +725 -0
  25. data/generated/google/apis/cloudtasks_v2beta2.rb +1 -1
  26. data/generated/google/apis/cloudtasks_v2beta2/classes.rb +4 -4
  27. data/generated/google/apis/cloudtrace_v1.rb +1 -1
  28. data/generated/google/apis/cloudtrace_v2.rb +1 -1
  29. data/generated/google/apis/cloudtrace_v2/classes.rb +1 -1
  30. data/generated/google/apis/cloudtrace_v2/service.rb +1 -1
  31. data/generated/google/apis/container_v1.rb +1 -1
  32. data/generated/google/apis/container_v1/classes.rb +34 -4
  33. data/generated/google/apis/container_v1/representations.rb +15 -0
  34. data/generated/google/apis/container_v1beta1.rb +1 -1
  35. data/generated/google/apis/container_v1beta1/classes.rb +34 -4
  36. data/generated/google/apis/container_v1beta1/representations.rb +15 -0
  37. data/generated/google/apis/content_v2.rb +1 -1
  38. data/generated/google/apis/content_v2/classes.rb +91 -9
  39. data/generated/google/apis/content_v2/representations.rb +20 -0
  40. data/generated/google/apis/content_v2/service.rb +1 -2
  41. data/generated/google/apis/content_v2sandbox.rb +1 -1
  42. data/generated/google/apis/content_v2sandbox/classes.rb +90 -8
  43. data/generated/google/apis/content_v2sandbox/representations.rb +20 -0
  44. data/generated/google/apis/dataflow_v1b3.rb +1 -1
  45. data/generated/google/apis/dataflow_v1b3/classes.rb +53 -3
  46. data/generated/google/apis/dataflow_v1b3/representations.rb +16 -0
  47. data/generated/google/apis/dataproc_v1beta2.rb +1 -1
  48. data/generated/google/apis/dataproc_v1beta2/classes.rb +461 -0
  49. data/generated/google/apis/dataproc_v1beta2/representations.rb +194 -0
  50. data/generated/google/apis/dataproc_v1beta2/service.rb +452 -0
  51. data/generated/google/apis/deploymentmanager_alpha.rb +1 -1
  52. data/generated/google/apis/deploymentmanager_alpha/classes.rb +30 -1
  53. data/generated/google/apis/deploymentmanager_alpha/representations.rb +8 -0
  54. data/generated/google/apis/deploymentmanager_v2.rb +1 -1
  55. data/generated/google/apis/deploymentmanager_v2/classes.rb +2 -1
  56. data/generated/google/apis/deploymentmanager_v2beta.rb +1 -1
  57. data/generated/google/apis/deploymentmanager_v2beta/classes.rb +2 -1
  58. data/generated/google/apis/dlp_v2beta1.rb +1 -1
  59. data/generated/google/apis/dlp_v2beta1/classes.rb +2 -2
  60. data/generated/google/apis/firebaserules_v1.rb +1 -1
  61. data/generated/google/apis/firebaserules_v1/classes.rb +44 -0
  62. data/generated/google/apis/firebaserules_v1/representations.rb +17 -0
  63. data/generated/google/apis/firebaserules_v1/service.rb +35 -0
  64. data/generated/google/apis/fitness_v1.rb +1 -1
  65. data/generated/google/apis/fitness_v1/classes.rb +3 -3
  66. data/generated/google/apis/fitness_v1/service.rb +4 -4
  67. data/generated/google/apis/iam_v1.rb +1 -1
  68. data/generated/google/apis/iam_v1/classes.rb +14 -14
  69. data/generated/google/apis/iam_v1/service.rb +29 -29
  70. data/generated/google/apis/kgsearch_v1.rb +1 -1
  71. data/generated/google/apis/logging_v2.rb +1 -1
  72. data/generated/google/apis/logging_v2/classes.rb +11 -9
  73. data/generated/google/apis/logging_v2beta1.rb +1 -1
  74. data/generated/google/apis/logging_v2beta1/classes.rb +11 -9
  75. data/generated/google/apis/ml_v1.rb +1 -1
  76. data/generated/google/apis/ml_v1/classes.rb +5 -4
  77. data/generated/google/apis/oslogin_v1alpha.rb +1 -1
  78. data/generated/google/apis/oslogin_v1beta.rb +1 -1
  79. data/generated/google/apis/pubsub_v1.rb +1 -1
  80. data/generated/google/apis/pubsub_v1/classes.rb +2 -1
  81. data/generated/google/apis/script_v1.rb +2 -2
  82. data/generated/google/apis/script_v1/service.rb +1 -1
  83. data/generated/google/apis/servicecontrol_v1.rb +1 -1
  84. data/generated/google/apis/servicecontrol_v1/classes.rb +19 -23
  85. data/generated/google/apis/servicecontrol_v1/representations.rb +1 -1
  86. data/generated/google/apis/servicemanagement_v1.rb +1 -1
  87. data/generated/google/apis/servicemanagement_v1/classes.rb +106 -0
  88. data/generated/google/apis/servicemanagement_v1/representations.rb +32 -0
  89. data/generated/google/apis/serviceuser_v1.rb +1 -1
  90. data/generated/google/apis/serviceuser_v1/classes.rb +92 -92
  91. data/generated/google/apis/serviceuser_v1/representations.rb +27 -15
  92. data/generated/google/apis/streetviewpublish_v1.rb +1 -1
  93. data/generated/google/apis/streetviewpublish_v1/service.rb +7 -0
  94. data/generated/google/apis/toolresults_v1beta3.rb +1 -1
  95. data/generated/google/apis/toolresults_v1beta3/classes.rb +2 -2
  96. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  97. data/generated/google/apis/youtube_partner_v1/classes.rb +53 -0
  98. data/generated/google/apis/youtube_partner_v1/representations.rb +29 -0
  99. data/generated/google/apis/youtube_partner_v1/service.rb +37 -0
  100. data/lib/google/apis/version.rb +1 -1
  101. metadata +10 -2
@@ -0,0 +1,442 @@
1
+ # Copyright 2015 Google Inc.
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
+
15
+ require 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module CloudiotV1beta1
24
+
25
+ class AuditConfig
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+
28
+ include Google::Apis::Core::JsonObjectSupport
29
+ end
30
+
31
+ class AuditLogConfig
32
+ class Representation < Google::Apis::Core::JsonRepresentation; end
33
+
34
+ include Google::Apis::Core::JsonObjectSupport
35
+ end
36
+
37
+ class Binding
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+
40
+ include Google::Apis::Core::JsonObjectSupport
41
+ end
42
+
43
+ class Device
44
+ class Representation < Google::Apis::Core::JsonRepresentation; end
45
+
46
+ include Google::Apis::Core::JsonObjectSupport
47
+ end
48
+
49
+ class DeviceConfig
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
53
+ end
54
+
55
+ class DeviceConfigData
56
+ class Representation < Google::Apis::Core::JsonRepresentation; end
57
+
58
+ include Google::Apis::Core::JsonObjectSupport
59
+ end
60
+
61
+ class DeviceCredential
62
+ class Representation < Google::Apis::Core::JsonRepresentation; end
63
+
64
+ include Google::Apis::Core::JsonObjectSupport
65
+ end
66
+
67
+ class DeviceRegistry
68
+ class Representation < Google::Apis::Core::JsonRepresentation; end
69
+
70
+ include Google::Apis::Core::JsonObjectSupport
71
+ end
72
+
73
+ class Empty
74
+ class Representation < Google::Apis::Core::JsonRepresentation; end
75
+
76
+ include Google::Apis::Core::JsonObjectSupport
77
+ end
78
+
79
+ class Expr
80
+ class Representation < Google::Apis::Core::JsonRepresentation; end
81
+
82
+ include Google::Apis::Core::JsonObjectSupport
83
+ end
84
+
85
+ class GetIamPolicyRequest
86
+ class Representation < Google::Apis::Core::JsonRepresentation; end
87
+
88
+ include Google::Apis::Core::JsonObjectSupport
89
+ end
90
+
91
+ class HttpDeviceConfig
92
+ class Representation < Google::Apis::Core::JsonRepresentation; end
93
+
94
+ include Google::Apis::Core::JsonObjectSupport
95
+ end
96
+
97
+ class HttpDeviceState
98
+ class Representation < Google::Apis::Core::JsonRepresentation; end
99
+
100
+ include Google::Apis::Core::JsonObjectSupport
101
+ end
102
+
103
+ class HttpPublishEventRequest
104
+ class Representation < Google::Apis::Core::JsonRepresentation; end
105
+
106
+ include Google::Apis::Core::JsonObjectSupport
107
+ end
108
+
109
+ class HttpPublishEventResponse
110
+ class Representation < Google::Apis::Core::JsonRepresentation; end
111
+
112
+ include Google::Apis::Core::JsonObjectSupport
113
+ end
114
+
115
+ class HttpSetDeviceStateRequest
116
+ class Representation < Google::Apis::Core::JsonRepresentation; end
117
+
118
+ include Google::Apis::Core::JsonObjectSupport
119
+ end
120
+
121
+ class ListDeviceConfigVersionsResponse
122
+ class Representation < Google::Apis::Core::JsonRepresentation; end
123
+
124
+ include Google::Apis::Core::JsonObjectSupport
125
+ end
126
+
127
+ class ListDeviceRegistriesResponse
128
+ class Representation < Google::Apis::Core::JsonRepresentation; end
129
+
130
+ include Google::Apis::Core::JsonObjectSupport
131
+ end
132
+
133
+ class ListDevicesResponse
134
+ class Representation < Google::Apis::Core::JsonRepresentation; end
135
+
136
+ include Google::Apis::Core::JsonObjectSupport
137
+ end
138
+
139
+ class ModifyCloudToDeviceConfigRequest
140
+ class Representation < Google::Apis::Core::JsonRepresentation; end
141
+
142
+ include Google::Apis::Core::JsonObjectSupport
143
+ end
144
+
145
+ class MqttConfig
146
+ class Representation < Google::Apis::Core::JsonRepresentation; end
147
+
148
+ include Google::Apis::Core::JsonObjectSupport
149
+ end
150
+
151
+ class NotificationConfig
152
+ class Representation < Google::Apis::Core::JsonRepresentation; end
153
+
154
+ include Google::Apis::Core::JsonObjectSupport
155
+ end
156
+
157
+ class Policy
158
+ class Representation < Google::Apis::Core::JsonRepresentation; end
159
+
160
+ include Google::Apis::Core::JsonObjectSupport
161
+ end
162
+
163
+ class PublicKeyCredential
164
+ class Representation < Google::Apis::Core::JsonRepresentation; end
165
+
166
+ include Google::Apis::Core::JsonObjectSupport
167
+ end
168
+
169
+ class SetIamPolicyRequest
170
+ class Representation < Google::Apis::Core::JsonRepresentation; end
171
+
172
+ include Google::Apis::Core::JsonObjectSupport
173
+ end
174
+
175
+ class Status
176
+ class Representation < Google::Apis::Core::JsonRepresentation; end
177
+
178
+ include Google::Apis::Core::JsonObjectSupport
179
+ end
180
+
181
+ class TestIamPermissionsRequest
182
+ class Representation < Google::Apis::Core::JsonRepresentation; end
183
+
184
+ include Google::Apis::Core::JsonObjectSupport
185
+ end
186
+
187
+ class TestIamPermissionsResponse
188
+ class Representation < Google::Apis::Core::JsonRepresentation; end
189
+
190
+ include Google::Apis::Core::JsonObjectSupport
191
+ end
192
+
193
+ class AuditConfig
194
+ # @private
195
+ class Representation < Google::Apis::Core::JsonRepresentation
196
+ collection :audit_log_configs, as: 'auditLogConfigs', class: Google::Apis::CloudiotV1beta1::AuditLogConfig, decorator: Google::Apis::CloudiotV1beta1::AuditLogConfig::Representation
197
+
198
+ collection :exempted_members, as: 'exemptedMembers'
199
+ property :service, as: 'service'
200
+ end
201
+ end
202
+
203
+ class AuditLogConfig
204
+ # @private
205
+ class Representation < Google::Apis::Core::JsonRepresentation
206
+ collection :exempted_members, as: 'exemptedMembers'
207
+ property :log_type, as: 'logType'
208
+ end
209
+ end
210
+
211
+ class Binding
212
+ # @private
213
+ class Representation < Google::Apis::Core::JsonRepresentation
214
+ property :condition, as: 'condition', class: Google::Apis::CloudiotV1beta1::Expr, decorator: Google::Apis::CloudiotV1beta1::Expr::Representation
215
+
216
+ collection :members, as: 'members'
217
+ property :role, as: 'role'
218
+ end
219
+ end
220
+
221
+ class Device
222
+ # @private
223
+ class Representation < Google::Apis::Core::JsonRepresentation
224
+ property :config, as: 'config', class: Google::Apis::CloudiotV1beta1::DeviceConfig, decorator: Google::Apis::CloudiotV1beta1::DeviceConfig::Representation
225
+
226
+ collection :credentials, as: 'credentials', class: Google::Apis::CloudiotV1beta1::DeviceCredential, decorator: Google::Apis::CloudiotV1beta1::DeviceCredential::Representation
227
+
228
+ property :enabled_state, as: 'enabledState'
229
+ property :id, as: 'id'
230
+ property :last_config_ack_time, as: 'lastConfigAckTime'
231
+ property :last_error_status, as: 'lastErrorStatus', class: Google::Apis::CloudiotV1beta1::Status, decorator: Google::Apis::CloudiotV1beta1::Status::Representation
232
+
233
+ property :last_error_time, as: 'lastErrorTime'
234
+ property :last_event_time, as: 'lastEventTime'
235
+ property :last_heartbeat_time, as: 'lastHeartbeatTime'
236
+ property :name, as: 'name'
237
+ property :num_id, :numeric_string => true, as: 'numId'
238
+ end
239
+ end
240
+
241
+ class DeviceConfig
242
+ # @private
243
+ class Representation < Google::Apis::Core::JsonRepresentation
244
+ property :cloud_update_time, as: 'cloudUpdateTime'
245
+ property :data, as: 'data', class: Google::Apis::CloudiotV1beta1::DeviceConfigData, decorator: Google::Apis::CloudiotV1beta1::DeviceConfigData::Representation
246
+
247
+ property :device_ack_time, as: 'deviceAckTime'
248
+ property :version, :numeric_string => true, as: 'version'
249
+ end
250
+ end
251
+
252
+ class DeviceConfigData
253
+ # @private
254
+ class Representation < Google::Apis::Core::JsonRepresentation
255
+ property :binary_data, :base64 => true, as: 'binaryData'
256
+ end
257
+ end
258
+
259
+ class DeviceCredential
260
+ # @private
261
+ class Representation < Google::Apis::Core::JsonRepresentation
262
+ property :expiration_time, as: 'expirationTime'
263
+ property :public_key, as: 'publicKey', class: Google::Apis::CloudiotV1beta1::PublicKeyCredential, decorator: Google::Apis::CloudiotV1beta1::PublicKeyCredential::Representation
264
+
265
+ end
266
+ end
267
+
268
+ class DeviceRegistry
269
+ # @private
270
+ class Representation < Google::Apis::Core::JsonRepresentation
271
+ property :event_notification_config, as: 'eventNotificationConfig', class: Google::Apis::CloudiotV1beta1::NotificationConfig, decorator: Google::Apis::CloudiotV1beta1::NotificationConfig::Representation
272
+
273
+ property :id, as: 'id'
274
+ property :mqtt_config, as: 'mqttConfig', class: Google::Apis::CloudiotV1beta1::MqttConfig, decorator: Google::Apis::CloudiotV1beta1::MqttConfig::Representation
275
+
276
+ property :name, as: 'name'
277
+ end
278
+ end
279
+
280
+ class Empty
281
+ # @private
282
+ class Representation < Google::Apis::Core::JsonRepresentation
283
+ end
284
+ end
285
+
286
+ class Expr
287
+ # @private
288
+ class Representation < Google::Apis::Core::JsonRepresentation
289
+ property :description, as: 'description'
290
+ property :expression, as: 'expression'
291
+ property :location, as: 'location'
292
+ property :title, as: 'title'
293
+ end
294
+ end
295
+
296
+ class GetIamPolicyRequest
297
+ # @private
298
+ class Representation < Google::Apis::Core::JsonRepresentation
299
+ end
300
+ end
301
+
302
+ class HttpDeviceConfig
303
+ # @private
304
+ class Representation < Google::Apis::Core::JsonRepresentation
305
+ property :binary_data, :base64 => true, as: 'binaryData'
306
+ property :version, :numeric_string => true, as: 'version'
307
+ end
308
+ end
309
+
310
+ class HttpDeviceState
311
+ # @private
312
+ class Representation < Google::Apis::Core::JsonRepresentation
313
+ property :binary_data, :base64 => true, as: 'binaryData'
314
+ end
315
+ end
316
+
317
+ class HttpPublishEventRequest
318
+ # @private
319
+ class Representation < Google::Apis::Core::JsonRepresentation
320
+ property :binary_data, :base64 => true, as: 'binaryData'
321
+ property :sub_folder, as: 'subFolder'
322
+ end
323
+ end
324
+
325
+ class HttpPublishEventResponse
326
+ # @private
327
+ class Representation < Google::Apis::Core::JsonRepresentation
328
+ end
329
+ end
330
+
331
+ class HttpSetDeviceStateRequest
332
+ # @private
333
+ class Representation < Google::Apis::Core::JsonRepresentation
334
+ property :state, as: 'state', class: Google::Apis::CloudiotV1beta1::HttpDeviceState, decorator: Google::Apis::CloudiotV1beta1::HttpDeviceState::Representation
335
+
336
+ end
337
+ end
338
+
339
+ class ListDeviceConfigVersionsResponse
340
+ # @private
341
+ class Representation < Google::Apis::Core::JsonRepresentation
342
+ collection :device_configs, as: 'deviceConfigs', class: Google::Apis::CloudiotV1beta1::DeviceConfig, decorator: Google::Apis::CloudiotV1beta1::DeviceConfig::Representation
343
+
344
+ end
345
+ end
346
+
347
+ class ListDeviceRegistriesResponse
348
+ # @private
349
+ class Representation < Google::Apis::Core::JsonRepresentation
350
+ collection :device_registries, as: 'deviceRegistries', class: Google::Apis::CloudiotV1beta1::DeviceRegistry, decorator: Google::Apis::CloudiotV1beta1::DeviceRegistry::Representation
351
+
352
+ property :next_page_token, as: 'nextPageToken'
353
+ end
354
+ end
355
+
356
+ class ListDevicesResponse
357
+ # @private
358
+ class Representation < Google::Apis::Core::JsonRepresentation
359
+ collection :devices, as: 'devices', class: Google::Apis::CloudiotV1beta1::Device, decorator: Google::Apis::CloudiotV1beta1::Device::Representation
360
+
361
+ property :next_page_token, as: 'nextPageToken'
362
+ end
363
+ end
364
+
365
+ class ModifyCloudToDeviceConfigRequest
366
+ # @private
367
+ class Representation < Google::Apis::Core::JsonRepresentation
368
+ property :data, as: 'data', class: Google::Apis::CloudiotV1beta1::DeviceConfigData, decorator: Google::Apis::CloudiotV1beta1::DeviceConfigData::Representation
369
+
370
+ property :version_to_update, :numeric_string => true, as: 'versionToUpdate'
371
+ end
372
+ end
373
+
374
+ class MqttConfig
375
+ # @private
376
+ class Representation < Google::Apis::Core::JsonRepresentation
377
+ property :mqtt_config_state, as: 'mqttConfigState'
378
+ end
379
+ end
380
+
381
+ class NotificationConfig
382
+ # @private
383
+ class Representation < Google::Apis::Core::JsonRepresentation
384
+ property :pubsub_topic_name, as: 'pubsubTopicName'
385
+ end
386
+ end
387
+
388
+ class Policy
389
+ # @private
390
+ class Representation < Google::Apis::Core::JsonRepresentation
391
+ collection :audit_configs, as: 'auditConfigs', class: Google::Apis::CloudiotV1beta1::AuditConfig, decorator: Google::Apis::CloudiotV1beta1::AuditConfig::Representation
392
+
393
+ collection :bindings, as: 'bindings', class: Google::Apis::CloudiotV1beta1::Binding, decorator: Google::Apis::CloudiotV1beta1::Binding::Representation
394
+
395
+ property :etag, :base64 => true, as: 'etag'
396
+ property :iam_owned, as: 'iamOwned'
397
+ property :version, as: 'version'
398
+ end
399
+ end
400
+
401
+ class PublicKeyCredential
402
+ # @private
403
+ class Representation < Google::Apis::Core::JsonRepresentation
404
+ property :format, as: 'format'
405
+ property :key, as: 'key'
406
+ end
407
+ end
408
+
409
+ class SetIamPolicyRequest
410
+ # @private
411
+ class Representation < Google::Apis::Core::JsonRepresentation
412
+ property :policy, as: 'policy', class: Google::Apis::CloudiotV1beta1::Policy, decorator: Google::Apis::CloudiotV1beta1::Policy::Representation
413
+
414
+ property :update_mask, as: 'updateMask'
415
+ end
416
+ end
417
+
418
+ class Status
419
+ # @private
420
+ class Representation < Google::Apis::Core::JsonRepresentation
421
+ property :code, as: 'code'
422
+ collection :details, as: 'details'
423
+ property :message, as: 'message'
424
+ end
425
+ end
426
+
427
+ class TestIamPermissionsRequest
428
+ # @private
429
+ class Representation < Google::Apis::Core::JsonRepresentation
430
+ collection :permissions, as: 'permissions'
431
+ end
432
+ end
433
+
434
+ class TestIamPermissionsResponse
435
+ # @private
436
+ class Representation < Google::Apis::Core::JsonRepresentation
437
+ collection :permissions, as: 'permissions'
438
+ end
439
+ end
440
+ end
441
+ end
442
+ end
@@ -0,0 +1,725 @@
1
+ # Copyright 2015 Google Inc.
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
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module CloudiotV1beta1
23
+ # Google Cloud IoT API
24
+ #
25
+ # Registers and manages IoT (Internet of Things) devices that connect to the
26
+ # Google Cloud Platform.
27
+ #
28
+ # @example
29
+ # require 'google/apis/cloudiot_v1beta1'
30
+ #
31
+ # Cloudiot = Google::Apis::CloudiotV1beta1 # Alias the module
32
+ # service = Cloudiot::CloudIotService.new
33
+ #
34
+ # @see https://cloud.google.com/iot
35
+ class CloudIotService < Google::Apis::Core::BaseService
36
+ # @return [String]
37
+ # API key. Your API key identifies your project and provides you with API access,
38
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
39
+ attr_accessor :key
40
+
41
+ # @return [String]
42
+ # Available to use for quota purposes for server-side applications. Can be any
43
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
44
+ attr_accessor :quota_user
45
+
46
+ def initialize
47
+ super('https://cloudiot.googleapis.com/', '')
48
+ @batch_path = 'batch'
49
+ end
50
+
51
+ # Creates a device registry that contains devices.
52
+ # @param [String] parent
53
+ # The project and cloud region where this device registry must be created.
54
+ # For example, `projects/example-project/locations/us-central1`.
55
+ # @param [Google::Apis::CloudiotV1beta1::DeviceRegistry] device_registry_object
56
+ # @param [String] fields
57
+ # Selector specifying which fields to include in a partial response.
58
+ # @param [String] quota_user
59
+ # Available to use for quota purposes for server-side applications. Can be any
60
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
61
+ # @param [Google::Apis::RequestOptions] options
62
+ # Request-specific options
63
+ #
64
+ # @yield [result, err] Result & error if block supplied
65
+ # @yieldparam result [Google::Apis::CloudiotV1beta1::DeviceRegistry] parsed result object
66
+ # @yieldparam err [StandardError] error object if request failed
67
+ #
68
+ # @return [Google::Apis::CloudiotV1beta1::DeviceRegistry]
69
+ #
70
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
71
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
72
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
73
+ def create_project_location_registry(parent, device_registry_object = nil, fields: nil, quota_user: nil, options: nil, &block)
74
+ command = make_simple_command(:post, 'v1beta1/{+parent}/registries', options)
75
+ command.request_representation = Google::Apis::CloudiotV1beta1::DeviceRegistry::Representation
76
+ command.request_object = device_registry_object
77
+ command.response_representation = Google::Apis::CloudiotV1beta1::DeviceRegistry::Representation
78
+ command.response_class = Google::Apis::CloudiotV1beta1::DeviceRegistry
79
+ command.params['parent'] = parent unless parent.nil?
80
+ command.query['fields'] = fields unless fields.nil?
81
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
82
+ execute_or_queue_command(command, &block)
83
+ end
84
+
85
+ # Deletes a device registry configuration.
86
+ # @param [String] name
87
+ # The name of the device registry. For example,
88
+ # `projects/example-project/locations/us-central1/registries/my-registry`.
89
+ # @param [String] fields
90
+ # Selector specifying which fields to include in a partial response.
91
+ # @param [String] quota_user
92
+ # Available to use for quota purposes for server-side applications. Can be any
93
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
94
+ # @param [Google::Apis::RequestOptions] options
95
+ # Request-specific options
96
+ #
97
+ # @yield [result, err] Result & error if block supplied
98
+ # @yieldparam result [Google::Apis::CloudiotV1beta1::Empty] parsed result object
99
+ # @yieldparam err [StandardError] error object if request failed
100
+ #
101
+ # @return [Google::Apis::CloudiotV1beta1::Empty]
102
+ #
103
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
104
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
105
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
106
+ def delete_project_location_registry(name, fields: nil, quota_user: nil, options: nil, &block)
107
+ command = make_simple_command(:delete, 'v1beta1/{+name}', options)
108
+ command.response_representation = Google::Apis::CloudiotV1beta1::Empty::Representation
109
+ command.response_class = Google::Apis::CloudiotV1beta1::Empty
110
+ command.params['name'] = name unless name.nil?
111
+ command.query['fields'] = fields unless fields.nil?
112
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
113
+ execute_or_queue_command(command, &block)
114
+ end
115
+
116
+ # Gets a device registry configuration.
117
+ # @param [String] name
118
+ # The name of the device registry. For example,
119
+ # `projects/example-project/locations/us-central1/registries/my-registry`.
120
+ # @param [String] fields
121
+ # Selector specifying which fields to include in a partial response.
122
+ # @param [String] quota_user
123
+ # Available to use for quota purposes for server-side applications. Can be any
124
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
125
+ # @param [Google::Apis::RequestOptions] options
126
+ # Request-specific options
127
+ #
128
+ # @yield [result, err] Result & error if block supplied
129
+ # @yieldparam result [Google::Apis::CloudiotV1beta1::DeviceRegistry] parsed result object
130
+ # @yieldparam err [StandardError] error object if request failed
131
+ #
132
+ # @return [Google::Apis::CloudiotV1beta1::DeviceRegistry]
133
+ #
134
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
135
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
136
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
137
+ def get_project_location_registry(name, fields: nil, quota_user: nil, options: nil, &block)
138
+ command = make_simple_command(:get, 'v1beta1/{+name}', options)
139
+ command.response_representation = Google::Apis::CloudiotV1beta1::DeviceRegistry::Representation
140
+ command.response_class = Google::Apis::CloudiotV1beta1::DeviceRegistry
141
+ command.params['name'] = name unless name.nil?
142
+ command.query['fields'] = fields unless fields.nil?
143
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
144
+ execute_or_queue_command(command, &block)
145
+ end
146
+
147
+ # Gets the access control policy for a resource.
148
+ # Returns an empty policy if the resource exists and does not have a policy
149
+ # set.
150
+ # @param [String] resource
151
+ # REQUIRED: The resource for which the policy is being requested.
152
+ # See the operation documentation for the appropriate value for this field.
153
+ # @param [Google::Apis::CloudiotV1beta1::GetIamPolicyRequest] get_iam_policy_request_object
154
+ # @param [String] fields
155
+ # Selector specifying which fields to include in a partial response.
156
+ # @param [String] quota_user
157
+ # Available to use for quota purposes for server-side applications. Can be any
158
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
159
+ # @param [Google::Apis::RequestOptions] options
160
+ # Request-specific options
161
+ #
162
+ # @yield [result, err] Result & error if block supplied
163
+ # @yieldparam result [Google::Apis::CloudiotV1beta1::Policy] parsed result object
164
+ # @yieldparam err [StandardError] error object if request failed
165
+ #
166
+ # @return [Google::Apis::CloudiotV1beta1::Policy]
167
+ #
168
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
169
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
170
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
171
+ def get_registry_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
172
+ command = make_simple_command(:post, 'v1beta1/{+resource}:getIamPolicy', options)
173
+ command.request_representation = Google::Apis::CloudiotV1beta1::GetIamPolicyRequest::Representation
174
+ command.request_object = get_iam_policy_request_object
175
+ command.response_representation = Google::Apis::CloudiotV1beta1::Policy::Representation
176
+ command.response_class = Google::Apis::CloudiotV1beta1::Policy
177
+ command.params['resource'] = resource unless resource.nil?
178
+ command.query['fields'] = fields unless fields.nil?
179
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
180
+ execute_or_queue_command(command, &block)
181
+ end
182
+
183
+ # Lists device registries.
184
+ # @param [String] parent
185
+ # The project and cloud region path. For example,
186
+ # `projects/example-project/locations/us-central1`.
187
+ # @param [Fixnum] page_size
188
+ # The maximum number of registries to return in the response. If this value
189
+ # is zero, the service will select a default size. A call may return fewer
190
+ # objects than requested, but if there is a non-empty `page_token`, it
191
+ # indicates that more entries are available.
192
+ # @param [String] page_token
193
+ # The value returned by the last `ListDeviceRegistriesResponse`; indicates
194
+ # that this is a continuation of a prior `ListDeviceRegistries` call, and
195
+ # that the system should return the next page of data.
196
+ # @param [String] fields
197
+ # Selector specifying which fields to include in a partial response.
198
+ # @param [String] quota_user
199
+ # Available to use for quota purposes for server-side applications. Can be any
200
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
201
+ # @param [Google::Apis::RequestOptions] options
202
+ # Request-specific options
203
+ #
204
+ # @yield [result, err] Result & error if block supplied
205
+ # @yieldparam result [Google::Apis::CloudiotV1beta1::ListDeviceRegistriesResponse] parsed result object
206
+ # @yieldparam err [StandardError] error object if request failed
207
+ #
208
+ # @return [Google::Apis::CloudiotV1beta1::ListDeviceRegistriesResponse]
209
+ #
210
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
211
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
212
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
213
+ def list_project_location_registries(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
214
+ command = make_simple_command(:get, 'v1beta1/{+parent}/registries', options)
215
+ command.response_representation = Google::Apis::CloudiotV1beta1::ListDeviceRegistriesResponse::Representation
216
+ command.response_class = Google::Apis::CloudiotV1beta1::ListDeviceRegistriesResponse
217
+ command.params['parent'] = parent unless parent.nil?
218
+ command.query['pageSize'] = page_size unless page_size.nil?
219
+ command.query['pageToken'] = page_token unless page_token.nil?
220
+ command.query['fields'] = fields unless fields.nil?
221
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
222
+ execute_or_queue_command(command, &block)
223
+ end
224
+
225
+ # Updates a device registry configuration.
226
+ # @param [String] name
227
+ # The resource path name. For example,
228
+ # `projects/example-project/locations/us-central1/registries/my-registry`.
229
+ # @param [Google::Apis::CloudiotV1beta1::DeviceRegistry] device_registry_object
230
+ # @param [String] update_mask
231
+ # Only updates the `device_registry` fields indicated by this mask.
232
+ # The field mask must not be empty, and it must not contain fields that
233
+ # are immutable or only set by the server.
234
+ # Mutable top-level fields: `event_notification_config` and `mqtt_config`
235
+ # @param [String] fields
236
+ # Selector specifying which fields to include in a partial response.
237
+ # @param [String] quota_user
238
+ # Available to use for quota purposes for server-side applications. Can be any
239
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
240
+ # @param [Google::Apis::RequestOptions] options
241
+ # Request-specific options
242
+ #
243
+ # @yield [result, err] Result & error if block supplied
244
+ # @yieldparam result [Google::Apis::CloudiotV1beta1::DeviceRegistry] parsed result object
245
+ # @yieldparam err [StandardError] error object if request failed
246
+ #
247
+ # @return [Google::Apis::CloudiotV1beta1::DeviceRegistry]
248
+ #
249
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
250
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
251
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
252
+ def patch_project_location_registry(name, device_registry_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
253
+ command = make_simple_command(:patch, 'v1beta1/{+name}', options)
254
+ command.request_representation = Google::Apis::CloudiotV1beta1::DeviceRegistry::Representation
255
+ command.request_object = device_registry_object
256
+ command.response_representation = Google::Apis::CloudiotV1beta1::DeviceRegistry::Representation
257
+ command.response_class = Google::Apis::CloudiotV1beta1::DeviceRegistry
258
+ command.params['name'] = name unless name.nil?
259
+ command.query['updateMask'] = update_mask unless update_mask.nil?
260
+ command.query['fields'] = fields unless fields.nil?
261
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
262
+ execute_or_queue_command(command, &block)
263
+ end
264
+
265
+ # Sets the access control policy on the specified resource. Replaces any
266
+ # existing policy.
267
+ # @param [String] resource
268
+ # REQUIRED: The resource for which the policy is being specified.
269
+ # See the operation documentation for the appropriate value for this field.
270
+ # @param [Google::Apis::CloudiotV1beta1::SetIamPolicyRequest] set_iam_policy_request_object
271
+ # @param [String] fields
272
+ # Selector specifying which fields to include in a partial response.
273
+ # @param [String] quota_user
274
+ # Available to use for quota purposes for server-side applications. Can be any
275
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
276
+ # @param [Google::Apis::RequestOptions] options
277
+ # Request-specific options
278
+ #
279
+ # @yield [result, err] Result & error if block supplied
280
+ # @yieldparam result [Google::Apis::CloudiotV1beta1::Policy] parsed result object
281
+ # @yieldparam err [StandardError] error object if request failed
282
+ #
283
+ # @return [Google::Apis::CloudiotV1beta1::Policy]
284
+ #
285
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
286
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
287
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
288
+ def set_registry_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
289
+ command = make_simple_command(:post, 'v1beta1/{+resource}:setIamPolicy', options)
290
+ command.request_representation = Google::Apis::CloudiotV1beta1::SetIamPolicyRequest::Representation
291
+ command.request_object = set_iam_policy_request_object
292
+ command.response_representation = Google::Apis::CloudiotV1beta1::Policy::Representation
293
+ command.response_class = Google::Apis::CloudiotV1beta1::Policy
294
+ command.params['resource'] = resource unless resource.nil?
295
+ command.query['fields'] = fields unless fields.nil?
296
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
297
+ execute_or_queue_command(command, &block)
298
+ end
299
+
300
+ # Returns permissions that a caller has on the specified resource.
301
+ # If the resource does not exist, this will return an empty set of
302
+ # permissions, not a NOT_FOUND error.
303
+ # @param [String] resource
304
+ # REQUIRED: The resource for which the policy detail is being requested.
305
+ # See the operation documentation for the appropriate value for this field.
306
+ # @param [Google::Apis::CloudiotV1beta1::TestIamPermissionsRequest] test_iam_permissions_request_object
307
+ # @param [String] fields
308
+ # Selector specifying which fields to include in a partial response.
309
+ # @param [String] quota_user
310
+ # Available to use for quota purposes for server-side applications. Can be any
311
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
312
+ # @param [Google::Apis::RequestOptions] options
313
+ # Request-specific options
314
+ #
315
+ # @yield [result, err] Result & error if block supplied
316
+ # @yieldparam result [Google::Apis::CloudiotV1beta1::TestIamPermissionsResponse] parsed result object
317
+ # @yieldparam err [StandardError] error object if request failed
318
+ #
319
+ # @return [Google::Apis::CloudiotV1beta1::TestIamPermissionsResponse]
320
+ #
321
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
322
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
323
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
324
+ def test_registry_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
325
+ command = make_simple_command(:post, 'v1beta1/{+resource}:testIamPermissions', options)
326
+ command.request_representation = Google::Apis::CloudiotV1beta1::TestIamPermissionsRequest::Representation
327
+ command.request_object = test_iam_permissions_request_object
328
+ command.response_representation = Google::Apis::CloudiotV1beta1::TestIamPermissionsResponse::Representation
329
+ command.response_class = Google::Apis::CloudiotV1beta1::TestIamPermissionsResponse
330
+ command.params['resource'] = resource unless resource.nil?
331
+ command.query['fields'] = fields unless fields.nil?
332
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
333
+ execute_or_queue_command(command, &block)
334
+ end
335
+
336
+ # Creates a device in a device registry.
337
+ # @param [String] parent
338
+ # The name of the device registry where this device should be created.
339
+ # For example,
340
+ # `projects/example-project/locations/us-central1/registries/my-registry`.
341
+ # @param [Google::Apis::CloudiotV1beta1::Device] device_object
342
+ # @param [String] fields
343
+ # Selector specifying which fields to include in a partial response.
344
+ # @param [String] quota_user
345
+ # Available to use for quota purposes for server-side applications. Can be any
346
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
347
+ # @param [Google::Apis::RequestOptions] options
348
+ # Request-specific options
349
+ #
350
+ # @yield [result, err] Result & error if block supplied
351
+ # @yieldparam result [Google::Apis::CloudiotV1beta1::Device] parsed result object
352
+ # @yieldparam err [StandardError] error object if request failed
353
+ #
354
+ # @return [Google::Apis::CloudiotV1beta1::Device]
355
+ #
356
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
357
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
358
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
359
+ def create_project_location_registry_device(parent, device_object = nil, fields: nil, quota_user: nil, options: nil, &block)
360
+ command = make_simple_command(:post, 'v1beta1/{+parent}/devices', options)
361
+ command.request_representation = Google::Apis::CloudiotV1beta1::Device::Representation
362
+ command.request_object = device_object
363
+ command.response_representation = Google::Apis::CloudiotV1beta1::Device::Representation
364
+ command.response_class = Google::Apis::CloudiotV1beta1::Device
365
+ command.params['parent'] = parent unless parent.nil?
366
+ command.query['fields'] = fields unless fields.nil?
367
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
368
+ execute_or_queue_command(command, &block)
369
+ end
370
+
371
+ # Deletes a device.
372
+ # @param [String] name
373
+ # The name of the device. For example,
374
+ # `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
375
+ # `projects/p0/locations/us-central1/registries/registry0/devices/`num_id``.
376
+ # @param [String] fields
377
+ # Selector specifying which fields to include in a partial response.
378
+ # @param [String] quota_user
379
+ # Available to use for quota purposes for server-side applications. Can be any
380
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
381
+ # @param [Google::Apis::RequestOptions] options
382
+ # Request-specific options
383
+ #
384
+ # @yield [result, err] Result & error if block supplied
385
+ # @yieldparam result [Google::Apis::CloudiotV1beta1::Empty] parsed result object
386
+ # @yieldparam err [StandardError] error object if request failed
387
+ #
388
+ # @return [Google::Apis::CloudiotV1beta1::Empty]
389
+ #
390
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
391
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
392
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
393
+ def delete_project_location_registry_device(name, fields: nil, quota_user: nil, options: nil, &block)
394
+ command = make_simple_command(:delete, 'v1beta1/{+name}', options)
395
+ command.response_representation = Google::Apis::CloudiotV1beta1::Empty::Representation
396
+ command.response_class = Google::Apis::CloudiotV1beta1::Empty
397
+ command.params['name'] = name unless name.nil?
398
+ command.query['fields'] = fields unless fields.nil?
399
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
400
+ execute_or_queue_command(command, &block)
401
+ end
402
+
403
+ # Gets details about a device.
404
+ # @param [String] name
405
+ # The name of the device. For example,
406
+ # `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
407
+ # `projects/p0/locations/us-central1/registries/registry0/devices/`num_id``.
408
+ # @param [String] fields
409
+ # Selector specifying which fields to include in a partial response.
410
+ # @param [String] quota_user
411
+ # Available to use for quota purposes for server-side applications. Can be any
412
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
413
+ # @param [Google::Apis::RequestOptions] options
414
+ # Request-specific options
415
+ #
416
+ # @yield [result, err] Result & error if block supplied
417
+ # @yieldparam result [Google::Apis::CloudiotV1beta1::Device] parsed result object
418
+ # @yieldparam err [StandardError] error object if request failed
419
+ #
420
+ # @return [Google::Apis::CloudiotV1beta1::Device]
421
+ #
422
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
423
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
424
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
425
+ def get_project_location_registry_device(name, fields: nil, quota_user: nil, options: nil, &block)
426
+ command = make_simple_command(:get, 'v1beta1/{+name}', options)
427
+ command.response_representation = Google::Apis::CloudiotV1beta1::Device::Representation
428
+ command.response_class = Google::Apis::CloudiotV1beta1::Device
429
+ command.params['name'] = name unless name.nil?
430
+ command.query['fields'] = fields unless fields.nil?
431
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
432
+ execute_or_queue_command(command, &block)
433
+ end
434
+
435
+ # Gets the configuration of a device.
436
+ # @param [String] name
437
+ # The name of the device. For example,
438
+ # `projects/p0/locations/us-central1/registries/registry0/devices/device0`.
439
+ # @param [Fixnum] local_version
440
+ # If zero, returns the current device configuration from Cloud IoT Core.
441
+ # If nonzero, specifies the local version of the configuration on the device.
442
+ # The server returns config data only if a higher (newer) version is
443
+ # available from Cloud IoT Core.
444
+ # If this value is higher than the latest version available in Cloud IoT
445
+ # Core, returns an `OUT_OF_RANGE` error.
446
+ # @param [String] fields
447
+ # Selector specifying which fields to include in a partial response.
448
+ # @param [String] quota_user
449
+ # Available to use for quota purposes for server-side applications. Can be any
450
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
451
+ # @param [Google::Apis::RequestOptions] options
452
+ # Request-specific options
453
+ #
454
+ # @yield [result, err] Result & error if block supplied
455
+ # @yieldparam result [Google::Apis::CloudiotV1beta1::HttpDeviceConfig] parsed result object
456
+ # @yieldparam err [StandardError] error object if request failed
457
+ #
458
+ # @return [Google::Apis::CloudiotV1beta1::HttpDeviceConfig]
459
+ #
460
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
461
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
462
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
463
+ def get_project_location_registry_device_config(name, local_version: nil, fields: nil, quota_user: nil, options: nil, &block)
464
+ command = make_simple_command(:get, 'v1beta1/{+name}/config', options)
465
+ command.response_representation = Google::Apis::CloudiotV1beta1::HttpDeviceConfig::Representation
466
+ command.response_class = Google::Apis::CloudiotV1beta1::HttpDeviceConfig
467
+ command.params['name'] = name unless name.nil?
468
+ command.query['localVersion'] = local_version unless local_version.nil?
469
+ command.query['fields'] = fields unless fields.nil?
470
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
471
+ execute_or_queue_command(command, &block)
472
+ end
473
+
474
+ # List devices in a device registry.
475
+ # @param [String] parent
476
+ # The device registry path. Required. For example,
477
+ # `projects/my-project/locations/us-central1/registries/my-registry`.
478
+ # @param [Array<String>, String] device_ids
479
+ # A list of device string identifiers. If empty, it will ignore this field.
480
+ # For example, `['device0', 'device12']`. This field cannot hold more than
481
+ # 10,000 entries.
482
+ # @param [Array<Fixnum>, Fixnum] device_num_ids
483
+ # A list of device numerical ids. If empty, it will ignore this field. This
484
+ # field cannot hold more than 10,000 entries.
485
+ # @param [String] field_mask
486
+ # The fields of the `Device` resource to be returned in the response. The
487
+ # fields `id`, and `num_id` are always returned by default, along with any
488
+ # other fields specified.
489
+ # @param [Fixnum] page_size
490
+ # The maximum number of devices to return in the response. If this value
491
+ # is zero, the service will select a default size. A call may return fewer
492
+ # objects than requested, but if there is a non-empty `page_token`, it
493
+ # indicates that more entries are available.
494
+ # @param [String] page_token
495
+ # The value returned by the last `ListDevicesResponse`; indicates
496
+ # that this is a continuation of a prior `ListDevices` call, and
497
+ # that the system should return the next page of data.
498
+ # @param [String] fields
499
+ # Selector specifying which fields to include in a partial response.
500
+ # @param [String] quota_user
501
+ # Available to use for quota purposes for server-side applications. Can be any
502
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
503
+ # @param [Google::Apis::RequestOptions] options
504
+ # Request-specific options
505
+ #
506
+ # @yield [result, err] Result & error if block supplied
507
+ # @yieldparam result [Google::Apis::CloudiotV1beta1::ListDevicesResponse] parsed result object
508
+ # @yieldparam err [StandardError] error object if request failed
509
+ #
510
+ # @return [Google::Apis::CloudiotV1beta1::ListDevicesResponse]
511
+ #
512
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
513
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
514
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
515
+ def list_project_location_registry_devices(parent, device_ids: nil, device_num_ids: nil, field_mask: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
516
+ command = make_simple_command(:get, 'v1beta1/{+parent}/devices', options)
517
+ command.response_representation = Google::Apis::CloudiotV1beta1::ListDevicesResponse::Representation
518
+ command.response_class = Google::Apis::CloudiotV1beta1::ListDevicesResponse
519
+ command.params['parent'] = parent unless parent.nil?
520
+ command.query['deviceIds'] = device_ids unless device_ids.nil?
521
+ command.query['deviceNumIds'] = device_num_ids unless device_num_ids.nil?
522
+ command.query['fieldMask'] = field_mask unless field_mask.nil?
523
+ command.query['pageSize'] = page_size unless page_size.nil?
524
+ command.query['pageToken'] = page_token unless page_token.nil?
525
+ command.query['fields'] = fields unless fields.nil?
526
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
527
+ execute_or_queue_command(command, &block)
528
+ end
529
+
530
+ # Modifies the configuration for the device, which is eventually sent from
531
+ # the Cloud IoT servers. Returns the modified configuration version and its
532
+ # meta-data.
533
+ # @param [String] name
534
+ # The name of the device. For example,
535
+ # `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
536
+ # `projects/p0/locations/us-central1/registries/registry0/devices/`num_id``.
537
+ # @param [Google::Apis::CloudiotV1beta1::ModifyCloudToDeviceConfigRequest] modify_cloud_to_device_config_request_object
538
+ # @param [String] fields
539
+ # Selector specifying which fields to include in a partial response.
540
+ # @param [String] quota_user
541
+ # Available to use for quota purposes for server-side applications. Can be any
542
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
543
+ # @param [Google::Apis::RequestOptions] options
544
+ # Request-specific options
545
+ #
546
+ # @yield [result, err] Result & error if block supplied
547
+ # @yieldparam result [Google::Apis::CloudiotV1beta1::DeviceConfig] parsed result object
548
+ # @yieldparam err [StandardError] error object if request failed
549
+ #
550
+ # @return [Google::Apis::CloudiotV1beta1::DeviceConfig]
551
+ #
552
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
553
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
554
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
555
+ def modify_cloud_to_device_config(name, modify_cloud_to_device_config_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
556
+ command = make_simple_command(:post, 'v1beta1/{+name}:modifyCloudToDeviceConfig', options)
557
+ command.request_representation = Google::Apis::CloudiotV1beta1::ModifyCloudToDeviceConfigRequest::Representation
558
+ command.request_object = modify_cloud_to_device_config_request_object
559
+ command.response_representation = Google::Apis::CloudiotV1beta1::DeviceConfig::Representation
560
+ command.response_class = Google::Apis::CloudiotV1beta1::DeviceConfig
561
+ command.params['name'] = name unless name.nil?
562
+ command.query['fields'] = fields unless fields.nil?
563
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
564
+ execute_or_queue_command(command, &block)
565
+ end
566
+
567
+ # Updates a device.
568
+ # @param [String] name
569
+ # The resource path name. For example,
570
+ # `projects/p1/locations/us-central1/registries/registry0/devices/dev0` or
571
+ # `projects/p1/locations/us-central1/registries/registry0/devices/`num_id``.
572
+ # When `name` is populated as a response from the service, it always ends
573
+ # in the device numeric ID.
574
+ # @param [Google::Apis::CloudiotV1beta1::Device] device_object
575
+ # @param [String] update_mask
576
+ # Only updates the `device` fields indicated by this mask.
577
+ # The field mask must not be empty, and it must not contain fields that
578
+ # are immutable or only set by the server.
579
+ # Mutable top-level fields: `credentials` and `enabled_state`
580
+ # @param [String] fields
581
+ # Selector specifying which fields to include in a partial response.
582
+ # @param [String] quota_user
583
+ # Available to use for quota purposes for server-side applications. Can be any
584
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
585
+ # @param [Google::Apis::RequestOptions] options
586
+ # Request-specific options
587
+ #
588
+ # @yield [result, err] Result & error if block supplied
589
+ # @yieldparam result [Google::Apis::CloudiotV1beta1::Device] parsed result object
590
+ # @yieldparam err [StandardError] error object if request failed
591
+ #
592
+ # @return [Google::Apis::CloudiotV1beta1::Device]
593
+ #
594
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
595
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
596
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
597
+ def patch_project_location_registry_device(name, device_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
598
+ command = make_simple_command(:patch, 'v1beta1/{+name}', options)
599
+ command.request_representation = Google::Apis::CloudiotV1beta1::Device::Representation
600
+ command.request_object = device_object
601
+ command.response_representation = Google::Apis::CloudiotV1beta1::Device::Representation
602
+ command.response_class = Google::Apis::CloudiotV1beta1::Device
603
+ command.params['name'] = name unless name.nil?
604
+ command.query['updateMask'] = update_mask unless update_mask.nil?
605
+ command.query['fields'] = fields unless fields.nil?
606
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
607
+ execute_or_queue_command(command, &block)
608
+ end
609
+
610
+ # Publishes a telemetry event for a device.
611
+ # @param [String] name
612
+ # The name of the device. For example,
613
+ # `projects/p0/locations/us-central1/registries/registry0/devices/device0`.
614
+ # @param [Google::Apis::CloudiotV1beta1::HttpPublishEventRequest] http_publish_event_request_object
615
+ # @param [String] fields
616
+ # Selector specifying which fields to include in a partial response.
617
+ # @param [String] quota_user
618
+ # Available to use for quota purposes for server-side applications. Can be any
619
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
620
+ # @param [Google::Apis::RequestOptions] options
621
+ # Request-specific options
622
+ #
623
+ # @yield [result, err] Result & error if block supplied
624
+ # @yieldparam result [Google::Apis::CloudiotV1beta1::HttpPublishEventResponse] parsed result object
625
+ # @yieldparam err [StandardError] error object if request failed
626
+ #
627
+ # @return [Google::Apis::CloudiotV1beta1::HttpPublishEventResponse]
628
+ #
629
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
630
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
631
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
632
+ def publish_project_location_registry_device_event(name, http_publish_event_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
633
+ command = make_simple_command(:post, 'v1beta1/{+name}:publishEvent', options)
634
+ command.request_representation = Google::Apis::CloudiotV1beta1::HttpPublishEventRequest::Representation
635
+ command.request_object = http_publish_event_request_object
636
+ command.response_representation = Google::Apis::CloudiotV1beta1::HttpPublishEventResponse::Representation
637
+ command.response_class = Google::Apis::CloudiotV1beta1::HttpPublishEventResponse
638
+ command.params['name'] = name unless name.nil?
639
+ command.query['fields'] = fields unless fields.nil?
640
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
641
+ execute_or_queue_command(command, &block)
642
+ end
643
+
644
+ # Sets the state of a device.
645
+ # @param [String] name
646
+ # The name of the device. For example,
647
+ # `projects/p0/locations/us-central1/registries/registry0/devices/device0`.
648
+ # @param [Google::Apis::CloudiotV1beta1::HttpSetDeviceStateRequest] http_set_device_state_request_object
649
+ # @param [String] fields
650
+ # Selector specifying which fields to include in a partial response.
651
+ # @param [String] quota_user
652
+ # Available to use for quota purposes for server-side applications. Can be any
653
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
654
+ # @param [Google::Apis::RequestOptions] options
655
+ # Request-specific options
656
+ #
657
+ # @yield [result, err] Result & error if block supplied
658
+ # @yieldparam result [Google::Apis::CloudiotV1beta1::Empty] parsed result object
659
+ # @yieldparam err [StandardError] error object if request failed
660
+ #
661
+ # @return [Google::Apis::CloudiotV1beta1::Empty]
662
+ #
663
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
664
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
665
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
666
+ def set_project_location_registry_device_state(name, http_set_device_state_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
667
+ command = make_simple_command(:post, 'v1beta1/{+name}:setState', options)
668
+ command.request_representation = Google::Apis::CloudiotV1beta1::HttpSetDeviceStateRequest::Representation
669
+ command.request_object = http_set_device_state_request_object
670
+ command.response_representation = Google::Apis::CloudiotV1beta1::Empty::Representation
671
+ command.response_class = Google::Apis::CloudiotV1beta1::Empty
672
+ command.params['name'] = name unless name.nil?
673
+ command.query['fields'] = fields unless fields.nil?
674
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
675
+ execute_or_queue_command(command, &block)
676
+ end
677
+
678
+ # Lists the last few versions of the device configuration in descending
679
+ # order (i.e.: newest first).
680
+ # @param [String] name
681
+ # The name of the device. For example,
682
+ # `projects/p0/locations/us-central1/registries/registry0/devices/device0` or
683
+ # `projects/p0/locations/us-central1/registries/registry0/devices/`num_id``.
684
+ # @param [Fixnum] num_versions
685
+ # The number of versions to list. Versions are listed in decreasing order of
686
+ # the version number. The maximum number of versions retained is 10. If this
687
+ # value is zero, it will return all the versions available.
688
+ # @param [String] fields
689
+ # Selector specifying which fields to include in a partial response.
690
+ # @param [String] quota_user
691
+ # Available to use for quota purposes for server-side applications. Can be any
692
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
693
+ # @param [Google::Apis::RequestOptions] options
694
+ # Request-specific options
695
+ #
696
+ # @yield [result, err] Result & error if block supplied
697
+ # @yieldparam result [Google::Apis::CloudiotV1beta1::ListDeviceConfigVersionsResponse] parsed result object
698
+ # @yieldparam err [StandardError] error object if request failed
699
+ #
700
+ # @return [Google::Apis::CloudiotV1beta1::ListDeviceConfigVersionsResponse]
701
+ #
702
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
703
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
704
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
705
+ def list_project_location_registry_device_config_versions(name, num_versions: nil, fields: nil, quota_user: nil, options: nil, &block)
706
+ command = make_simple_command(:get, 'v1beta1/{+name}/configVersions', options)
707
+ command.response_representation = Google::Apis::CloudiotV1beta1::ListDeviceConfigVersionsResponse::Representation
708
+ command.response_class = Google::Apis::CloudiotV1beta1::ListDeviceConfigVersionsResponse
709
+ command.params['name'] = name unless name.nil?
710
+ command.query['numVersions'] = num_versions unless num_versions.nil?
711
+ command.query['fields'] = fields unless fields.nil?
712
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
713
+ execute_or_queue_command(command, &block)
714
+ end
715
+
716
+ protected
717
+
718
+ def apply_command_defaults(command)
719
+ command.query['key'] = key unless key.nil?
720
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
721
+ end
722
+ end
723
+ end
724
+ end
725
+ end