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/**
19 * Service definition for CloudIot (v1).
20 *
21 * <p>
22 * Registers and manages IoT (Internet of Things) devices that connect to the
23 * Google Cloud Platform.</p>
24 *
25 * <p>
26 * For more information about this service, see the API
27 * <a href="https://cloud.google.com/iot" target="_blank">Documentation</a>
28 * </p>
29 *
30 * @author Google, Inc.
31 */
32class Google_Service_CloudIot extends Google_Service
33{
34  /** View and manage your data across Google Cloud Platform services. */
35  const CLOUD_PLATFORM =
36      "https://www.googleapis.com/auth/cloud-platform";
37  /** Register and manage devices in the Google Cloud IoT service. */
38  const CLOUDIOT =
39      "https://www.googleapis.com/auth/cloudiot";
40
41  public $projects_locations_registries;
42  public $projects_locations_registries_devices;
43  public $projects_locations_registries_devices_configVersions;
44  public $projects_locations_registries_devices_states;
45  public $projects_locations_registries_groups;
46  public $projects_locations_registries_groups_devices;
47  public $projects_locations_registries_groups_devices_configVersions;
48  public $projects_locations_registries_groups_devices_states;
49
50  /**
51   * Constructs the internal representation of the CloudIot service.
52   *
53   * @param Google_Client $client
54   */
55  public function __construct(Google_Client $client)
56  {
57    parent::__construct($client);
58    $this->rootUrl = 'https://cloudiot.googleapis.com/';
59    $this->servicePath = '';
60    $this->batchPath = 'batch';
61    $this->version = 'v1';
62    $this->serviceName = 'cloudiot';
63
64    $this->projects_locations_registries = new Google_Service_CloudIot_Resource_ProjectsLocationsRegistries(
65        $this,
66        $this->serviceName,
67        'registries',
68        array(
69          'methods' => array(
70            'bindDeviceToGateway' => array(
71              'path' => 'v1/{+parent}:bindDeviceToGateway',
72              'httpMethod' => 'POST',
73              'parameters' => array(
74                'parent' => array(
75                  'location' => 'path',
76                  'type' => 'string',
77                  'required' => true,
78                ),
79              ),
80            ),'create' => array(
81              'path' => 'v1/{+parent}/registries',
82              'httpMethod' => 'POST',
83              'parameters' => array(
84                'parent' => array(
85                  'location' => 'path',
86                  'type' => 'string',
87                  'required' => true,
88                ),
89              ),
90            ),'delete' => array(
91              'path' => 'v1/{+name}',
92              'httpMethod' => 'DELETE',
93              'parameters' => array(
94                'name' => array(
95                  'location' => 'path',
96                  'type' => 'string',
97                  'required' => true,
98                ),
99              ),
100            ),'get' => array(
101              'path' => 'v1/{+name}',
102              'httpMethod' => 'GET',
103              'parameters' => array(
104                'name' => array(
105                  'location' => 'path',
106                  'type' => 'string',
107                  'required' => true,
108                ),
109              ),
110            ),'getIamPolicy' => array(
111              'path' => 'v1/{+resource}:getIamPolicy',
112              'httpMethod' => 'POST',
113              'parameters' => array(
114                'resource' => array(
115                  'location' => 'path',
116                  'type' => 'string',
117                  'required' => true,
118                ),
119              ),
120            ),'list' => array(
121              'path' => 'v1/{+parent}/registries',
122              'httpMethod' => 'GET',
123              'parameters' => array(
124                'parent' => array(
125                  'location' => 'path',
126                  'type' => 'string',
127                  'required' => true,
128                ),
129                'pageToken' => array(
130                  'location' => 'query',
131                  'type' => 'string',
132                ),
133                'pageSize' => array(
134                  'location' => 'query',
135                  'type' => 'integer',
136                ),
137              ),
138            ),'patch' => array(
139              'path' => 'v1/{+name}',
140              'httpMethod' => 'PATCH',
141              'parameters' => array(
142                'name' => array(
143                  'location' => 'path',
144                  'type' => 'string',
145                  'required' => true,
146                ),
147                'updateMask' => array(
148                  'location' => 'query',
149                  'type' => 'string',
150                ),
151              ),
152            ),'setIamPolicy' => array(
153              'path' => 'v1/{+resource}:setIamPolicy',
154              'httpMethod' => 'POST',
155              'parameters' => array(
156                'resource' => array(
157                  'location' => 'path',
158                  'type' => 'string',
159                  'required' => true,
160                ),
161              ),
162            ),'testIamPermissions' => array(
163              'path' => 'v1/{+resource}:testIamPermissions',
164              'httpMethod' => 'POST',
165              'parameters' => array(
166                'resource' => array(
167                  'location' => 'path',
168                  'type' => 'string',
169                  'required' => true,
170                ),
171              ),
172            ),'unbindDeviceFromGateway' => array(
173              'path' => 'v1/{+parent}:unbindDeviceFromGateway',
174              'httpMethod' => 'POST',
175              'parameters' => array(
176                'parent' => array(
177                  'location' => 'path',
178                  'type' => 'string',
179                  'required' => true,
180                ),
181              ),
182            ),
183          )
184        )
185    );
186    $this->projects_locations_registries_devices = new Google_Service_CloudIot_Resource_ProjectsLocationsRegistriesDevices(
187        $this,
188        $this->serviceName,
189        'devices',
190        array(
191          'methods' => array(
192            'create' => array(
193              'path' => 'v1/{+parent}/devices',
194              'httpMethod' => 'POST',
195              'parameters' => array(
196                'parent' => array(
197                  'location' => 'path',
198                  'type' => 'string',
199                  'required' => true,
200                ),
201              ),
202            ),'delete' => array(
203              'path' => 'v1/{+name}',
204              'httpMethod' => 'DELETE',
205              'parameters' => array(
206                'name' => array(
207                  'location' => 'path',
208                  'type' => 'string',
209                  'required' => true,
210                ),
211              ),
212            ),'get' => array(
213              'path' => 'v1/{+name}',
214              'httpMethod' => 'GET',
215              'parameters' => array(
216                'name' => array(
217                  'location' => 'path',
218                  'type' => 'string',
219                  'required' => true,
220                ),
221                'fieldMask' => array(
222                  'location' => 'query',
223                  'type' => 'string',
224                ),
225              ),
226            ),'list' => array(
227              'path' => 'v1/{+parent}/devices',
228              'httpMethod' => 'GET',
229              'parameters' => array(
230                'parent' => array(
231                  'location' => 'path',
232                  'type' => 'string',
233                  'required' => true,
234                ),
235                'gatewayListOptions.gatewayType' => array(
236                  'location' => 'query',
237                  'type' => 'string',
238                ),
239                'gatewayListOptions.associationsGatewayId' => array(
240                  'location' => 'query',
241                  'type' => 'string',
242                ),
243                'fieldMask' => array(
244                  'location' => 'query',
245                  'type' => 'string',
246                ),
247                'pageToken' => array(
248                  'location' => 'query',
249                  'type' => 'string',
250                ),
251                'pageSize' => array(
252                  'location' => 'query',
253                  'type' => 'integer',
254                ),
255                'deviceIds' => array(
256                  'location' => 'query',
257                  'type' => 'string',
258                  'repeated' => true,
259                ),
260                'gatewayListOptions.associationsDeviceId' => array(
261                  'location' => 'query',
262                  'type' => 'string',
263                ),
264                'deviceNumIds' => array(
265                  'location' => 'query',
266                  'type' => 'string',
267                  'repeated' => true,
268                ),
269              ),
270            ),'modifyCloudToDeviceConfig' => array(
271              'path' => 'v1/{+name}:modifyCloudToDeviceConfig',
272              'httpMethod' => 'POST',
273              'parameters' => array(
274                'name' => array(
275                  'location' => 'path',
276                  'type' => 'string',
277                  'required' => true,
278                ),
279              ),
280            ),'patch' => array(
281              'path' => 'v1/{+name}',
282              'httpMethod' => 'PATCH',
283              'parameters' => array(
284                'name' => array(
285                  'location' => 'path',
286                  'type' => 'string',
287                  'required' => true,
288                ),
289                'updateMask' => array(
290                  'location' => 'query',
291                  'type' => 'string',
292                ),
293              ),
294            ),'sendCommandToDevice' => array(
295              'path' => 'v1/{+name}:sendCommandToDevice',
296              'httpMethod' => 'POST',
297              'parameters' => array(
298                'name' => array(
299                  'location' => 'path',
300                  'type' => 'string',
301                  'required' => true,
302                ),
303              ),
304            ),
305          )
306        )
307    );
308    $this->projects_locations_registries_devices_configVersions = new Google_Service_CloudIot_Resource_ProjectsLocationsRegistriesDevicesConfigVersions(
309        $this,
310        $this->serviceName,
311        'configVersions',
312        array(
313          'methods' => array(
314            'list' => array(
315              'path' => 'v1/{+name}/configVersions',
316              'httpMethod' => 'GET',
317              'parameters' => array(
318                'name' => array(
319                  'location' => 'path',
320                  'type' => 'string',
321                  'required' => true,
322                ),
323                'numVersions' => array(
324                  'location' => 'query',
325                  'type' => 'integer',
326                ),
327              ),
328            ),
329          )
330        )
331    );
332    $this->projects_locations_registries_devices_states = new Google_Service_CloudIot_Resource_ProjectsLocationsRegistriesDevicesStates(
333        $this,
334        $this->serviceName,
335        'states',
336        array(
337          'methods' => array(
338            'list' => array(
339              'path' => 'v1/{+name}/states',
340              'httpMethod' => 'GET',
341              'parameters' => array(
342                'name' => array(
343                  'location' => 'path',
344                  'type' => 'string',
345                  'required' => true,
346                ),
347                'numStates' => array(
348                  'location' => 'query',
349                  'type' => 'integer',
350                ),
351              ),
352            ),
353          )
354        )
355    );
356    $this->projects_locations_registries_groups = new Google_Service_CloudIot_Resource_ProjectsLocationsRegistriesGroups(
357        $this,
358        $this->serviceName,
359        'groups',
360        array(
361          'methods' => array(
362            'bindDeviceToGateway' => array(
363              'path' => 'v1/{+parent}:bindDeviceToGateway',
364              'httpMethod' => 'POST',
365              'parameters' => array(
366                'parent' => array(
367                  'location' => 'path',
368                  'type' => 'string',
369                  'required' => true,
370                ),
371              ),
372            ),'getIamPolicy' => array(
373              'path' => 'v1/{+resource}:getIamPolicy',
374              'httpMethod' => 'POST',
375              'parameters' => array(
376                'resource' => array(
377                  'location' => 'path',
378                  'type' => 'string',
379                  'required' => true,
380                ),
381              ),
382            ),'setIamPolicy' => array(
383              'path' => 'v1/{+resource}:setIamPolicy',
384              'httpMethod' => 'POST',
385              'parameters' => array(
386                'resource' => array(
387                  'location' => 'path',
388                  'type' => 'string',
389                  'required' => true,
390                ),
391              ),
392            ),'testIamPermissions' => array(
393              'path' => 'v1/{+resource}:testIamPermissions',
394              'httpMethod' => 'POST',
395              'parameters' => array(
396                'resource' => array(
397                  'location' => 'path',
398                  'type' => 'string',
399                  'required' => true,
400                ),
401              ),
402            ),'unbindDeviceFromGateway' => array(
403              'path' => 'v1/{+parent}:unbindDeviceFromGateway',
404              'httpMethod' => 'POST',
405              'parameters' => array(
406                'parent' => array(
407                  'location' => 'path',
408                  'type' => 'string',
409                  'required' => true,
410                ),
411              ),
412            ),
413          )
414        )
415    );
416    $this->projects_locations_registries_groups_devices = new Google_Service_CloudIot_Resource_ProjectsLocationsRegistriesGroupsDevices(
417        $this,
418        $this->serviceName,
419        'devices',
420        array(
421          'methods' => array(
422            'get' => array(
423              'path' => 'v1/{+name}',
424              'httpMethod' => 'GET',
425              'parameters' => array(
426                'name' => array(
427                  'location' => 'path',
428                  'type' => 'string',
429                  'required' => true,
430                ),
431                'fieldMask' => array(
432                  'location' => 'query',
433                  'type' => 'string',
434                ),
435              ),
436            ),'list' => array(
437              'path' => 'v1/{+parent}/devices',
438              'httpMethod' => 'GET',
439              'parameters' => array(
440                'parent' => array(
441                  'location' => 'path',
442                  'type' => 'string',
443                  'required' => true,
444                ),
445                'deviceIds' => array(
446                  'location' => 'query',
447                  'type' => 'string',
448                  'repeated' => true,
449                ),
450                'deviceNumIds' => array(
451                  'location' => 'query',
452                  'type' => 'string',
453                  'repeated' => true,
454                ),
455                'gatewayListOptions.associationsDeviceId' => array(
456                  'location' => 'query',
457                  'type' => 'string',
458                ),
459                'gatewayListOptions.gatewayType' => array(
460                  'location' => 'query',
461                  'type' => 'string',
462                ),
463                'gatewayListOptions.associationsGatewayId' => array(
464                  'location' => 'query',
465                  'type' => 'string',
466                ),
467                'pageToken' => array(
468                  'location' => 'query',
469                  'type' => 'string',
470                ),
471                'fieldMask' => array(
472                  'location' => 'query',
473                  'type' => 'string',
474                ),
475                'pageSize' => array(
476                  'location' => 'query',
477                  'type' => 'integer',
478                ),
479              ),
480            ),'modifyCloudToDeviceConfig' => array(
481              'path' => 'v1/{+name}:modifyCloudToDeviceConfig',
482              'httpMethod' => 'POST',
483              'parameters' => array(
484                'name' => array(
485                  'location' => 'path',
486                  'type' => 'string',
487                  'required' => true,
488                ),
489              ),
490            ),'patch' => array(
491              'path' => 'v1/{+name}',
492              'httpMethod' => 'PATCH',
493              'parameters' => array(
494                'name' => array(
495                  'location' => 'path',
496                  'type' => 'string',
497                  'required' => true,
498                ),
499                'updateMask' => array(
500                  'location' => 'query',
501                  'type' => 'string',
502                ),
503              ),
504            ),'sendCommandToDevice' => array(
505              'path' => 'v1/{+name}:sendCommandToDevice',
506              'httpMethod' => 'POST',
507              'parameters' => array(
508                'name' => array(
509                  'location' => 'path',
510                  'type' => 'string',
511                  'required' => true,
512                ),
513              ),
514            ),
515          )
516        )
517    );
518    $this->projects_locations_registries_groups_devices_configVersions = new Google_Service_CloudIot_Resource_ProjectsLocationsRegistriesGroupsDevicesConfigVersions(
519        $this,
520        $this->serviceName,
521        'configVersions',
522        array(
523          'methods' => array(
524            'list' => array(
525              'path' => 'v1/{+name}/configVersions',
526              'httpMethod' => 'GET',
527              'parameters' => array(
528                'name' => array(
529                  'location' => 'path',
530                  'type' => 'string',
531                  'required' => true,
532                ),
533                'numVersions' => array(
534                  'location' => 'query',
535                  'type' => 'integer',
536                ),
537              ),
538            ),
539          )
540        )
541    );
542    $this->projects_locations_registries_groups_devices_states = new Google_Service_CloudIot_Resource_ProjectsLocationsRegistriesGroupsDevicesStates(
543        $this,
544        $this->serviceName,
545        'states',
546        array(
547          'methods' => array(
548            'list' => array(
549              'path' => 'v1/{+name}/states',
550              'httpMethod' => 'GET',
551              'parameters' => array(
552                'name' => array(
553                  'location' => 'path',
554                  'type' => 'string',
555                  'required' => true,
556                ),
557                'numStates' => array(
558                  'location' => 'query',
559                  'type' => 'integer',
560                ),
561              ),
562            ),
563          )
564        )
565    );
566  }
567}
568