1 | <?php
|
---|
2 | /*
|
---|
3 | * Copyright 2014 Google Inc.
|
---|
4 | *
|
---|
5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
---|
6 | * use this file except in compliance with the License. You may obtain a copy of
|
---|
7 | * the License at
|
---|
8 | *
|
---|
9 | * http://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, WITHOUT
|
---|
13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
---|
14 | * License for the specific language governing permissions and limitations under
|
---|
15 | * the License.
|
---|
16 | */
|
---|
17 |
|
---|
18 | namespace Google\Service;
|
---|
19 |
|
---|
20 | use Google\Client;
|
---|
21 |
|
---|
22 | /**
|
---|
23 | * Service definition for CloudIot (v1).
|
---|
24 | *
|
---|
25 | * <p>
|
---|
26 | * Registers and manages IoT (Internet of Things) devices that connect to the
|
---|
27 | * Google Cloud Platform.</p>
|
---|
28 | *
|
---|
29 | * <p>
|
---|
30 | * For more information about this service, see the API
|
---|
31 | * <a href="https://cloud.google.com/iot" target="_blank">Documentation</a>
|
---|
32 | * </p>
|
---|
33 | *
|
---|
34 | * @author Google, Inc.
|
---|
35 | */
|
---|
36 | class CloudIot extends \Google\Service
|
---|
37 | {
|
---|
38 | /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
|
---|
39 | const CLOUD_PLATFORM =
|
---|
40 | "https://www.googleapis.com/auth/cloud-platform";
|
---|
41 | /** Register and manage devices in the Google Cloud IoT service. */
|
---|
42 | const CLOUDIOT =
|
---|
43 | "https://www.googleapis.com/auth/cloudiot";
|
---|
44 |
|
---|
45 | public $projects_locations_registries;
|
---|
46 | public $projects_locations_registries_devices;
|
---|
47 | public $projects_locations_registries_devices_configVersions;
|
---|
48 | public $projects_locations_registries_devices_states;
|
---|
49 | public $projects_locations_registries_groups;
|
---|
50 | public $projects_locations_registries_groups_devices;
|
---|
51 |
|
---|
52 | /**
|
---|
53 | * Constructs the internal representation of the CloudIot service.
|
---|
54 | *
|
---|
55 | * @param Client|array $clientOrConfig The client used to deliver requests, or a
|
---|
56 | * config array to pass to a new Client instance.
|
---|
57 | * @param string $rootUrl The root URL used for requests to the service.
|
---|
58 | */
|
---|
59 | public function __construct($clientOrConfig = [], $rootUrl = null)
|
---|
60 | {
|
---|
61 | parent::__construct($clientOrConfig);
|
---|
62 | $this->rootUrl = $rootUrl ?: 'https://cloudiot.googleapis.com/';
|
---|
63 | $this->servicePath = '';
|
---|
64 | $this->batchPath = 'batch';
|
---|
65 | $this->version = 'v1';
|
---|
66 | $this->serviceName = 'cloudiot';
|
---|
67 |
|
---|
68 | $this->projects_locations_registries = new CloudIot\Resource\ProjectsLocationsRegistries(
|
---|
69 | $this,
|
---|
70 | $this->serviceName,
|
---|
71 | 'registries',
|
---|
72 | [
|
---|
73 | 'methods' => [
|
---|
74 | 'bindDeviceToGateway' => [
|
---|
75 | 'path' => 'v1/{+parent}:bindDeviceToGateway',
|
---|
76 | 'httpMethod' => 'POST',
|
---|
77 | 'parameters' => [
|
---|
78 | 'parent' => [
|
---|
79 | 'location' => 'path',
|
---|
80 | 'type' => 'string',
|
---|
81 | 'required' => true,
|
---|
82 | ],
|
---|
83 | ],
|
---|
84 | ],'create' => [
|
---|
85 | 'path' => 'v1/{+parent}/registries',
|
---|
86 | 'httpMethod' => 'POST',
|
---|
87 | 'parameters' => [
|
---|
88 | 'parent' => [
|
---|
89 | 'location' => 'path',
|
---|
90 | 'type' => 'string',
|
---|
91 | 'required' => true,
|
---|
92 | ],
|
---|
93 | ],
|
---|
94 | ],'delete' => [
|
---|
95 | 'path' => 'v1/{+name}',
|
---|
96 | 'httpMethod' => 'DELETE',
|
---|
97 | 'parameters' => [
|
---|
98 | 'name' => [
|
---|
99 | 'location' => 'path',
|
---|
100 | 'type' => 'string',
|
---|
101 | 'required' => true,
|
---|
102 | ],
|
---|
103 | ],
|
---|
104 | ],'get' => [
|
---|
105 | 'path' => 'v1/{+name}',
|
---|
106 | 'httpMethod' => 'GET',
|
---|
107 | 'parameters' => [
|
---|
108 | 'name' => [
|
---|
109 | 'location' => 'path',
|
---|
110 | 'type' => 'string',
|
---|
111 | 'required' => true,
|
---|
112 | ],
|
---|
113 | ],
|
---|
114 | ],'getIamPolicy' => [
|
---|
115 | 'path' => 'v1/{+resource}:getIamPolicy',
|
---|
116 | 'httpMethod' => 'POST',
|
---|
117 | 'parameters' => [
|
---|
118 | 'resource' => [
|
---|
119 | 'location' => 'path',
|
---|
120 | 'type' => 'string',
|
---|
121 | 'required' => true,
|
---|
122 | ],
|
---|
123 | ],
|
---|
124 | ],'list' => [
|
---|
125 | 'path' => 'v1/{+parent}/registries',
|
---|
126 | 'httpMethod' => 'GET',
|
---|
127 | 'parameters' => [
|
---|
128 | 'parent' => [
|
---|
129 | 'location' => 'path',
|
---|
130 | 'type' => 'string',
|
---|
131 | 'required' => true,
|
---|
132 | ],
|
---|
133 | 'pageSize' => [
|
---|
134 | 'location' => 'query',
|
---|
135 | 'type' => 'integer',
|
---|
136 | ],
|
---|
137 | 'pageToken' => [
|
---|
138 | 'location' => 'query',
|
---|
139 | 'type' => 'string',
|
---|
140 | ],
|
---|
141 | ],
|
---|
142 | ],'patch' => [
|
---|
143 | 'path' => 'v1/{+name}',
|
---|
144 | 'httpMethod' => 'PATCH',
|
---|
145 | 'parameters' => [
|
---|
146 | 'name' => [
|
---|
147 | 'location' => 'path',
|
---|
148 | 'type' => 'string',
|
---|
149 | 'required' => true,
|
---|
150 | ],
|
---|
151 | 'updateMask' => [
|
---|
152 | 'location' => 'query',
|
---|
153 | 'type' => 'string',
|
---|
154 | ],
|
---|
155 | ],
|
---|
156 | ],'setIamPolicy' => [
|
---|
157 | 'path' => 'v1/{+resource}:setIamPolicy',
|
---|
158 | 'httpMethod' => 'POST',
|
---|
159 | 'parameters' => [
|
---|
160 | 'resource' => [
|
---|
161 | 'location' => 'path',
|
---|
162 | 'type' => 'string',
|
---|
163 | 'required' => true,
|
---|
164 | ],
|
---|
165 | ],
|
---|
166 | ],'testIamPermissions' => [
|
---|
167 | 'path' => 'v1/{+resource}:testIamPermissions',
|
---|
168 | 'httpMethod' => 'POST',
|
---|
169 | 'parameters' => [
|
---|
170 | 'resource' => [
|
---|
171 | 'location' => 'path',
|
---|
172 | 'type' => 'string',
|
---|
173 | 'required' => true,
|
---|
174 | ],
|
---|
175 | ],
|
---|
176 | ],'unbindDeviceFromGateway' => [
|
---|
177 | 'path' => 'v1/{+parent}:unbindDeviceFromGateway',
|
---|
178 | 'httpMethod' => 'POST',
|
---|
179 | 'parameters' => [
|
---|
180 | 'parent' => [
|
---|
181 | 'location' => 'path',
|
---|
182 | 'type' => 'string',
|
---|
183 | 'required' => true,
|
---|
184 | ],
|
---|
185 | ],
|
---|
186 | ],
|
---|
187 | ]
|
---|
188 | ]
|
---|
189 | );
|
---|
190 | $this->projects_locations_registries_devices = new CloudIot\Resource\ProjectsLocationsRegistriesDevices(
|
---|
191 | $this,
|
---|
192 | $this->serviceName,
|
---|
193 | 'devices',
|
---|
194 | [
|
---|
195 | 'methods' => [
|
---|
196 | 'create' => [
|
---|
197 | 'path' => 'v1/{+parent}/devices',
|
---|
198 | 'httpMethod' => 'POST',
|
---|
199 | 'parameters' => [
|
---|
200 | 'parent' => [
|
---|
201 | 'location' => 'path',
|
---|
202 | 'type' => 'string',
|
---|
203 | 'required' => true,
|
---|
204 | ],
|
---|
205 | ],
|
---|
206 | ],'delete' => [
|
---|
207 | 'path' => 'v1/{+name}',
|
---|
208 | 'httpMethod' => 'DELETE',
|
---|
209 | 'parameters' => [
|
---|
210 | 'name' => [
|
---|
211 | 'location' => 'path',
|
---|
212 | 'type' => 'string',
|
---|
213 | 'required' => true,
|
---|
214 | ],
|
---|
215 | ],
|
---|
216 | ],'get' => [
|
---|
217 | 'path' => 'v1/{+name}',
|
---|
218 | 'httpMethod' => 'GET',
|
---|
219 | 'parameters' => [
|
---|
220 | 'name' => [
|
---|
221 | 'location' => 'path',
|
---|
222 | 'type' => 'string',
|
---|
223 | 'required' => true,
|
---|
224 | ],
|
---|
225 | 'fieldMask' => [
|
---|
226 | 'location' => 'query',
|
---|
227 | 'type' => 'string',
|
---|
228 | ],
|
---|
229 | ],
|
---|
230 | ],'list' => [
|
---|
231 | 'path' => 'v1/{+parent}/devices',
|
---|
232 | 'httpMethod' => 'GET',
|
---|
233 | 'parameters' => [
|
---|
234 | 'parent' => [
|
---|
235 | 'location' => 'path',
|
---|
236 | 'type' => 'string',
|
---|
237 | 'required' => true,
|
---|
238 | ],
|
---|
239 | 'deviceIds' => [
|
---|
240 | 'location' => 'query',
|
---|
241 | 'type' => 'string',
|
---|
242 | 'repeated' => true,
|
---|
243 | ],
|
---|
244 | 'deviceNumIds' => [
|
---|
245 | 'location' => 'query',
|
---|
246 | 'type' => 'string',
|
---|
247 | 'repeated' => true,
|
---|
248 | ],
|
---|
249 | 'fieldMask' => [
|
---|
250 | 'location' => 'query',
|
---|
251 | 'type' => 'string',
|
---|
252 | ],
|
---|
253 | 'gatewayListOptions.associationsDeviceId' => [
|
---|
254 | 'location' => 'query',
|
---|
255 | 'type' => 'string',
|
---|
256 | ],
|
---|
257 | 'gatewayListOptions.associationsGatewayId' => [
|
---|
258 | 'location' => 'query',
|
---|
259 | 'type' => 'string',
|
---|
260 | ],
|
---|
261 | 'gatewayListOptions.gatewayType' => [
|
---|
262 | 'location' => 'query',
|
---|
263 | 'type' => 'string',
|
---|
264 | ],
|
---|
265 | 'pageSize' => [
|
---|
266 | 'location' => 'query',
|
---|
267 | 'type' => 'integer',
|
---|
268 | ],
|
---|
269 | 'pageToken' => [
|
---|
270 | 'location' => 'query',
|
---|
271 | 'type' => 'string',
|
---|
272 | ],
|
---|
273 | ],
|
---|
274 | ],'modifyCloudToDeviceConfig' => [
|
---|
275 | 'path' => 'v1/{+name}:modifyCloudToDeviceConfig',
|
---|
276 | 'httpMethod' => 'POST',
|
---|
277 | 'parameters' => [
|
---|
278 | 'name' => [
|
---|
279 | 'location' => 'path',
|
---|
280 | 'type' => 'string',
|
---|
281 | 'required' => true,
|
---|
282 | ],
|
---|
283 | ],
|
---|
284 | ],'patch' => [
|
---|
285 | 'path' => 'v1/{+name}',
|
---|
286 | 'httpMethod' => 'PATCH',
|
---|
287 | 'parameters' => [
|
---|
288 | 'name' => [
|
---|
289 | 'location' => 'path',
|
---|
290 | 'type' => 'string',
|
---|
291 | 'required' => true,
|
---|
292 | ],
|
---|
293 | 'updateMask' => [
|
---|
294 | 'location' => 'query',
|
---|
295 | 'type' => 'string',
|
---|
296 | ],
|
---|
297 | ],
|
---|
298 | ],'sendCommandToDevice' => [
|
---|
299 | 'path' => 'v1/{+name}:sendCommandToDevice',
|
---|
300 | 'httpMethod' => 'POST',
|
---|
301 | 'parameters' => [
|
---|
302 | 'name' => [
|
---|
303 | 'location' => 'path',
|
---|
304 | 'type' => 'string',
|
---|
305 | 'required' => true,
|
---|
306 | ],
|
---|
307 | ],
|
---|
308 | ],
|
---|
309 | ]
|
---|
310 | ]
|
---|
311 | );
|
---|
312 | $this->projects_locations_registries_devices_configVersions = new CloudIot\Resource\ProjectsLocationsRegistriesDevicesConfigVersions(
|
---|
313 | $this,
|
---|
314 | $this->serviceName,
|
---|
315 | 'configVersions',
|
---|
316 | [
|
---|
317 | 'methods' => [
|
---|
318 | 'list' => [
|
---|
319 | 'path' => 'v1/{+name}/configVersions',
|
---|
320 | 'httpMethod' => 'GET',
|
---|
321 | 'parameters' => [
|
---|
322 | 'name' => [
|
---|
323 | 'location' => 'path',
|
---|
324 | 'type' => 'string',
|
---|
325 | 'required' => true,
|
---|
326 | ],
|
---|
327 | 'numVersions' => [
|
---|
328 | 'location' => 'query',
|
---|
329 | 'type' => 'integer',
|
---|
330 | ],
|
---|
331 | ],
|
---|
332 | ],
|
---|
333 | ]
|
---|
334 | ]
|
---|
335 | );
|
---|
336 | $this->projects_locations_registries_devices_states = new CloudIot\Resource\ProjectsLocationsRegistriesDevicesStates(
|
---|
337 | $this,
|
---|
338 | $this->serviceName,
|
---|
339 | 'states',
|
---|
340 | [
|
---|
341 | 'methods' => [
|
---|
342 | 'list' => [
|
---|
343 | 'path' => 'v1/{+name}/states',
|
---|
344 | 'httpMethod' => 'GET',
|
---|
345 | 'parameters' => [
|
---|
346 | 'name' => [
|
---|
347 | 'location' => 'path',
|
---|
348 | 'type' => 'string',
|
---|
349 | 'required' => true,
|
---|
350 | ],
|
---|
351 | 'numStates' => [
|
---|
352 | 'location' => 'query',
|
---|
353 | 'type' => 'integer',
|
---|
354 | ],
|
---|
355 | ],
|
---|
356 | ],
|
---|
357 | ]
|
---|
358 | ]
|
---|
359 | );
|
---|
360 | $this->projects_locations_registries_groups = new CloudIot\Resource\ProjectsLocationsRegistriesGroups(
|
---|
361 | $this,
|
---|
362 | $this->serviceName,
|
---|
363 | 'groups',
|
---|
364 | [
|
---|
365 | 'methods' => [
|
---|
366 | 'getIamPolicy' => [
|
---|
367 | 'path' => 'v1/{+resource}:getIamPolicy',
|
---|
368 | 'httpMethod' => 'POST',
|
---|
369 | 'parameters' => [
|
---|
370 | 'resource' => [
|
---|
371 | 'location' => 'path',
|
---|
372 | 'type' => 'string',
|
---|
373 | 'required' => true,
|
---|
374 | ],
|
---|
375 | ],
|
---|
376 | ],'setIamPolicy' => [
|
---|
377 | 'path' => 'v1/{+resource}:setIamPolicy',
|
---|
378 | 'httpMethod' => 'POST',
|
---|
379 | 'parameters' => [
|
---|
380 | 'resource' => [
|
---|
381 | 'location' => 'path',
|
---|
382 | 'type' => 'string',
|
---|
383 | 'required' => true,
|
---|
384 | ],
|
---|
385 | ],
|
---|
386 | ],'testIamPermissions' => [
|
---|
387 | 'path' => 'v1/{+resource}:testIamPermissions',
|
---|
388 | 'httpMethod' => 'POST',
|
---|
389 | 'parameters' => [
|
---|
390 | 'resource' => [
|
---|
391 | 'location' => 'path',
|
---|
392 | 'type' => 'string',
|
---|
393 | 'required' => true,
|
---|
394 | ],
|
---|
395 | ],
|
---|
396 | ],
|
---|
397 | ]
|
---|
398 | ]
|
---|
399 | );
|
---|
400 | $this->projects_locations_registries_groups_devices = new CloudIot\Resource\ProjectsLocationsRegistriesGroupsDevices(
|
---|
401 | $this,
|
---|
402 | $this->serviceName,
|
---|
403 | 'devices',
|
---|
404 | [
|
---|
405 | 'methods' => [
|
---|
406 | 'list' => [
|
---|
407 | 'path' => 'v1/{+parent}/devices',
|
---|
408 | 'httpMethod' => 'GET',
|
---|
409 | 'parameters' => [
|
---|
410 | 'parent' => [
|
---|
411 | 'location' => 'path',
|
---|
412 | 'type' => 'string',
|
---|
413 | 'required' => true,
|
---|
414 | ],
|
---|
415 | 'deviceIds' => [
|
---|
416 | 'location' => 'query',
|
---|
417 | 'type' => 'string',
|
---|
418 | 'repeated' => true,
|
---|
419 | ],
|
---|
420 | 'deviceNumIds' => [
|
---|
421 | 'location' => 'query',
|
---|
422 | 'type' => 'string',
|
---|
423 | 'repeated' => true,
|
---|
424 | ],
|
---|
425 | 'fieldMask' => [
|
---|
426 | 'location' => 'query',
|
---|
427 | 'type' => 'string',
|
---|
428 | ],
|
---|
429 | 'gatewayListOptions.associationsDeviceId' => [
|
---|
430 | 'location' => 'query',
|
---|
431 | 'type' => 'string',
|
---|
432 | ],
|
---|
433 | 'gatewayListOptions.associationsGatewayId' => [
|
---|
434 | 'location' => 'query',
|
---|
435 | 'type' => 'string',
|
---|
436 | ],
|
---|
437 | 'gatewayListOptions.gatewayType' => [
|
---|
438 | 'location' => 'query',
|
---|
439 | 'type' => 'string',
|
---|
440 | ],
|
---|
441 | 'pageSize' => [
|
---|
442 | 'location' => 'query',
|
---|
443 | 'type' => 'integer',
|
---|
444 | ],
|
---|
445 | 'pageToken' => [
|
---|
446 | 'location' => 'query',
|
---|
447 | 'type' => 'string',
|
---|
448 | ],
|
---|
449 | ],
|
---|
450 | ],
|
---|
451 | ]
|
---|
452 | ]
|
---|
453 | );
|
---|
454 | }
|
---|
455 | }
|
---|
456 |
|
---|
457 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
458 | class_alias(CloudIot::class, 'Google_Service_CloudIot');
|
---|