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
18namespace Google\Service;
19
20use Google\Client;
21
22/**
23 * Service definition for AndroidManagement (v1).
24 *
25 * <p>
26 * The Android Management API provides remote enterprise management of Android
27 * devices and apps.</p>
28 *
29 * <p>
30 * For more information about this service, see the API
31 * <a href="https://developers.google.com/android/management" target="_blank">Documentation</a>
32 * </p>
33 *
34 * @author Google, Inc.
35 */
36class AndroidManagement extends \Google\Service
37{
38  /** Manage Android devices and apps for your customers. */
39  const ANDROIDMANAGEMENT =
40      "https://www.googleapis.com/auth/androidmanagement";
41
42  public $enterprises;
43  public $enterprises_applications;
44  public $enterprises_devices;
45  public $enterprises_devices_operations;
46  public $enterprises_enrollmentTokens;
47  public $enterprises_policies;
48  public $enterprises_webApps;
49  public $enterprises_webTokens;
50  public $signupUrls;
51
52  /**
53   * Constructs the internal representation of the AndroidManagement 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://androidmanagement.googleapis.com/';
63    $this->servicePath = '';
64    $this->batchPath = 'batch';
65    $this->version = 'v1';
66    $this->serviceName = 'androidmanagement';
67
68    $this->enterprises = new AndroidManagement\Resource\Enterprises(
69        $this,
70        $this->serviceName,
71        'enterprises',
72        [
73          'methods' => [
74            'create' => [
75              'path' => 'v1/enterprises',
76              'httpMethod' => 'POST',
77              'parameters' => [
78                'agreementAccepted' => [
79                  'location' => 'query',
80                  'type' => 'boolean',
81                ],
82                'enterpriseToken' => [
83                  'location' => 'query',
84                  'type' => 'string',
85                ],
86                'projectId' => [
87                  'location' => 'query',
88                  'type' => 'string',
89                ],
90                'signupUrlName' => [
91                  'location' => 'query',
92                  'type' => 'string',
93                ],
94              ],
95            ],'delete' => [
96              'path' => 'v1/{+name}',
97              'httpMethod' => 'DELETE',
98              'parameters' => [
99                'name' => [
100                  'location' => 'path',
101                  'type' => 'string',
102                  'required' => true,
103                ],
104              ],
105            ],'get' => [
106              'path' => 'v1/{+name}',
107              'httpMethod' => 'GET',
108              'parameters' => [
109                'name' => [
110                  'location' => 'path',
111                  'type' => 'string',
112                  'required' => true,
113                ],
114              ],
115            ],'list' => [
116              'path' => 'v1/enterprises',
117              'httpMethod' => 'GET',
118              'parameters' => [
119                'pageSize' => [
120                  'location' => 'query',
121                  'type' => 'integer',
122                ],
123                'pageToken' => [
124                  'location' => 'query',
125                  'type' => 'string',
126                ],
127                'projectId' => [
128                  'location' => 'query',
129                  'type' => 'string',
130                ],
131                'view' => [
132                  'location' => 'query',
133                  'type' => 'string',
134                ],
135              ],
136            ],'patch' => [
137              'path' => 'v1/{+name}',
138              'httpMethod' => 'PATCH',
139              'parameters' => [
140                'name' => [
141                  'location' => 'path',
142                  'type' => 'string',
143                  'required' => true,
144                ],
145                'updateMask' => [
146                  'location' => 'query',
147                  'type' => 'string',
148                ],
149              ],
150            ],
151          ]
152        ]
153    );
154    $this->enterprises_applications = new AndroidManagement\Resource\EnterprisesApplications(
155        $this,
156        $this->serviceName,
157        'applications',
158        [
159          'methods' => [
160            'get' => [
161              'path' => 'v1/{+name}',
162              'httpMethod' => 'GET',
163              'parameters' => [
164                'name' => [
165                  'location' => 'path',
166                  'type' => 'string',
167                  'required' => true,
168                ],
169                'languageCode' => [
170                  'location' => 'query',
171                  'type' => 'string',
172                ],
173              ],
174            ],
175          ]
176        ]
177    );
178    $this->enterprises_devices = new AndroidManagement\Resource\EnterprisesDevices(
179        $this,
180        $this->serviceName,
181        'devices',
182        [
183          'methods' => [
184            'delete' => [
185              'path' => 'v1/{+name}',
186              'httpMethod' => 'DELETE',
187              'parameters' => [
188                'name' => [
189                  'location' => 'path',
190                  'type' => 'string',
191                  'required' => true,
192                ],
193                'wipeDataFlags' => [
194                  'location' => 'query',
195                  'type' => 'string',
196                  'repeated' => true,
197                ],
198                'wipeReasonMessage' => [
199                  'location' => 'query',
200                  'type' => 'string',
201                ],
202              ],
203            ],'get' => [
204              'path' => 'v1/{+name}',
205              'httpMethod' => 'GET',
206              'parameters' => [
207                'name' => [
208                  'location' => 'path',
209                  'type' => 'string',
210                  'required' => true,
211                ],
212              ],
213            ],'issueCommand' => [
214              'path' => 'v1/{+name}:issueCommand',
215              'httpMethod' => 'POST',
216              'parameters' => [
217                'name' => [
218                  'location' => 'path',
219                  'type' => 'string',
220                  'required' => true,
221                ],
222              ],
223            ],'list' => [
224              'path' => 'v1/{+parent}/devices',
225              'httpMethod' => 'GET',
226              'parameters' => [
227                'parent' => [
228                  'location' => 'path',
229                  'type' => 'string',
230                  'required' => true,
231                ],
232                'pageSize' => [
233                  'location' => 'query',
234                  'type' => 'integer',
235                ],
236                'pageToken' => [
237                  'location' => 'query',
238                  'type' => 'string',
239                ],
240              ],
241            ],'patch' => [
242              'path' => 'v1/{+name}',
243              'httpMethod' => 'PATCH',
244              'parameters' => [
245                'name' => [
246                  'location' => 'path',
247                  'type' => 'string',
248                  'required' => true,
249                ],
250                'updateMask' => [
251                  'location' => 'query',
252                  'type' => 'string',
253                ],
254              ],
255            ],
256          ]
257        ]
258    );
259    $this->enterprises_devices_operations = new AndroidManagement\Resource\EnterprisesDevicesOperations(
260        $this,
261        $this->serviceName,
262        'operations',
263        [
264          'methods' => [
265            'cancel' => [
266              'path' => 'v1/{+name}:cancel',
267              'httpMethod' => 'POST',
268              'parameters' => [
269                'name' => [
270                  'location' => 'path',
271                  'type' => 'string',
272                  'required' => true,
273                ],
274              ],
275            ],'delete' => [
276              'path' => 'v1/{+name}',
277              'httpMethod' => 'DELETE',
278              'parameters' => [
279                'name' => [
280                  'location' => 'path',
281                  'type' => 'string',
282                  'required' => true,
283                ],
284              ],
285            ],'get' => [
286              'path' => 'v1/{+name}',
287              'httpMethod' => 'GET',
288              'parameters' => [
289                'name' => [
290                  'location' => 'path',
291                  'type' => 'string',
292                  'required' => true,
293                ],
294              ],
295            ],'list' => [
296              'path' => 'v1/{+name}',
297              'httpMethod' => 'GET',
298              'parameters' => [
299                'name' => [
300                  'location' => 'path',
301                  'type' => 'string',
302                  'required' => true,
303                ],
304                'filter' => [
305                  'location' => 'query',
306                  'type' => 'string',
307                ],
308                'pageSize' => [
309                  'location' => 'query',
310                  'type' => 'integer',
311                ],
312                'pageToken' => [
313                  'location' => 'query',
314                  'type' => 'string',
315                ],
316              ],
317            ],
318          ]
319        ]
320    );
321    $this->enterprises_enrollmentTokens = new AndroidManagement\Resource\EnterprisesEnrollmentTokens(
322        $this,
323        $this->serviceName,
324        'enrollmentTokens',
325        [
326          'methods' => [
327            'create' => [
328              'path' => 'v1/{+parent}/enrollmentTokens',
329              'httpMethod' => 'POST',
330              'parameters' => [
331                'parent' => [
332                  'location' => 'path',
333                  'type' => 'string',
334                  'required' => true,
335                ],
336              ],
337            ],'delete' => [
338              'path' => 'v1/{+name}',
339              'httpMethod' => 'DELETE',
340              'parameters' => [
341                'name' => [
342                  'location' => 'path',
343                  'type' => 'string',
344                  'required' => true,
345                ],
346              ],
347            ],
348          ]
349        ]
350    );
351    $this->enterprises_policies = new AndroidManagement\Resource\EnterprisesPolicies(
352        $this,
353        $this->serviceName,
354        'policies',
355        [
356          'methods' => [
357            'delete' => [
358              'path' => 'v1/{+name}',
359              'httpMethod' => 'DELETE',
360              'parameters' => [
361                'name' => [
362                  'location' => 'path',
363                  'type' => 'string',
364                  'required' => true,
365                ],
366              ],
367            ],'get' => [
368              'path' => 'v1/{+name}',
369              'httpMethod' => 'GET',
370              'parameters' => [
371                'name' => [
372                  'location' => 'path',
373                  'type' => 'string',
374                  'required' => true,
375                ],
376              ],
377            ],'list' => [
378              'path' => 'v1/{+parent}/policies',
379              'httpMethod' => 'GET',
380              'parameters' => [
381                'parent' => [
382                  'location' => 'path',
383                  'type' => 'string',
384                  'required' => true,
385                ],
386                'pageSize' => [
387                  'location' => 'query',
388                  'type' => 'integer',
389                ],
390                'pageToken' => [
391                  'location' => 'query',
392                  'type' => 'string',
393                ],
394              ],
395            ],'patch' => [
396              'path' => 'v1/{+name}',
397              'httpMethod' => 'PATCH',
398              'parameters' => [
399                'name' => [
400                  'location' => 'path',
401                  'type' => 'string',
402                  'required' => true,
403                ],
404                'updateMask' => [
405                  'location' => 'query',
406                  'type' => 'string',
407                ],
408              ],
409            ],
410          ]
411        ]
412    );
413    $this->enterprises_webApps = new AndroidManagement\Resource\EnterprisesWebApps(
414        $this,
415        $this->serviceName,
416        'webApps',
417        [
418          'methods' => [
419            'create' => [
420              'path' => 'v1/{+parent}/webApps',
421              'httpMethod' => 'POST',
422              'parameters' => [
423                'parent' => [
424                  'location' => 'path',
425                  'type' => 'string',
426                  'required' => true,
427                ],
428              ],
429            ],'delete' => [
430              'path' => 'v1/{+name}',
431              'httpMethod' => 'DELETE',
432              'parameters' => [
433                'name' => [
434                  'location' => 'path',
435                  'type' => 'string',
436                  'required' => true,
437                ],
438              ],
439            ],'get' => [
440              'path' => 'v1/{+name}',
441              'httpMethod' => 'GET',
442              'parameters' => [
443                'name' => [
444                  'location' => 'path',
445                  'type' => 'string',
446                  'required' => true,
447                ],
448              ],
449            ],'list' => [
450              'path' => 'v1/{+parent}/webApps',
451              'httpMethod' => 'GET',
452              'parameters' => [
453                'parent' => [
454                  'location' => 'path',
455                  'type' => 'string',
456                  'required' => true,
457                ],
458                'pageSize' => [
459                  'location' => 'query',
460                  'type' => 'integer',
461                ],
462                'pageToken' => [
463                  'location' => 'query',
464                  'type' => 'string',
465                ],
466              ],
467            ],'patch' => [
468              'path' => 'v1/{+name}',
469              'httpMethod' => 'PATCH',
470              'parameters' => [
471                'name' => [
472                  'location' => 'path',
473                  'type' => 'string',
474                  'required' => true,
475                ],
476                'updateMask' => [
477                  'location' => 'query',
478                  'type' => 'string',
479                ],
480              ],
481            ],
482          ]
483        ]
484    );
485    $this->enterprises_webTokens = new AndroidManagement\Resource\EnterprisesWebTokens(
486        $this,
487        $this->serviceName,
488        'webTokens',
489        [
490          'methods' => [
491            'create' => [
492              'path' => 'v1/{+parent}/webTokens',
493              'httpMethod' => 'POST',
494              'parameters' => [
495                'parent' => [
496                  'location' => 'path',
497                  'type' => 'string',
498                  'required' => true,
499                ],
500              ],
501            ],
502          ]
503        ]
504    );
505    $this->signupUrls = new AndroidManagement\Resource\SignupUrls(
506        $this,
507        $this->serviceName,
508        'signupUrls',
509        [
510          'methods' => [
511            'create' => [
512              'path' => 'v1/signupUrls',
513              'httpMethod' => 'POST',
514              'parameters' => [
515                'callbackUrl' => [
516                  'location' => 'query',
517                  'type' => 'string',
518                ],
519                'projectId' => [
520                  'location' => 'query',
521                  'type' => 'string',
522                ],
523              ],
524            ],
525          ]
526        ]
527    );
528  }
529}
530
531// Adding a class alias for backwards compatibility with the previous class name.
532class_alias(AndroidManagement::class, 'Google_Service_AndroidManagement');
533