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 ChromeManagement (v1).
24 *
25 * <p>
26 * The Chrome Management API is a suite of services that allows Chrome
27 * administrators to view, manage and gain insights on their Chrome OS and
28 * Chrome Browser devices.</p>
29 *
30 * <p>
31 * For more information about this service, see the API
32 * <a href="http://developers.google.com/chrome/management/" target="_blank">Documentation</a>
33 * </p>
34 *
35 * @author Google, Inc.
36 */
37class ChromeManagement extends \Google\Service
38{
39  /** See detailed information about apps installed on Chrome browsers and devices managed by your organization. */
40  const CHROME_MANAGEMENT_APPDETAILS_READONLY =
41      "https://www.googleapis.com/auth/chrome.management.appdetails.readonly";
42  /** See reports about devices and Chrome browsers managed within your organization. */
43  const CHROME_MANAGEMENT_REPORTS_READONLY =
44      "https://www.googleapis.com/auth/chrome.management.reports.readonly";
45  /** See basic device and telemetry information collected from Chrome OS devices or users managed within your organization. */
46  const CHROME_MANAGEMENT_TELEMETRY_READONLY =
47      "https://www.googleapis.com/auth/chrome.management.telemetry.readonly";
48
49  public $customers_apps;
50  public $customers_apps_android;
51  public $customers_apps_chrome;
52  public $customers_apps_web;
53  public $customers_reports;
54  public $customers_telemetry_devices;
55
56  /**
57   * Constructs the internal representation of the ChromeManagement service.
58   *
59   * @param Client|array $clientOrConfig The client used to deliver requests, or a
60   *                                     config array to pass to a new Client instance.
61   * @param string $rootUrl The root URL used for requests to the service.
62   */
63  public function __construct($clientOrConfig = [], $rootUrl = null)
64  {
65    parent::__construct($clientOrConfig);
66    $this->rootUrl = $rootUrl ?: 'https://chromemanagement.googleapis.com/';
67    $this->servicePath = '';
68    $this->batchPath = 'batch';
69    $this->version = 'v1';
70    $this->serviceName = 'chromemanagement';
71
72    $this->customers_apps = new ChromeManagement\Resource\CustomersApps(
73        $this,
74        $this->serviceName,
75        'apps',
76        [
77          'methods' => [
78            'countChromeAppRequests' => [
79              'path' => 'v1/{+customer}/apps:countChromeAppRequests',
80              'httpMethod' => 'GET',
81              'parameters' => [
82                'customer' => [
83                  'location' => 'path',
84                  'type' => 'string',
85                  'required' => true,
86                ],
87                'orderBy' => [
88                  'location' => 'query',
89                  'type' => 'string',
90                ],
91                'orgUnitId' => [
92                  'location' => 'query',
93                  'type' => 'string',
94                ],
95                'pageSize' => [
96                  'location' => 'query',
97                  'type' => 'integer',
98                ],
99                'pageToken' => [
100                  'location' => 'query',
101                  'type' => 'string',
102                ],
103              ],
104            ],
105          ]
106        ]
107    );
108    $this->customers_apps_android = new ChromeManagement\Resource\CustomersAppsAndroid(
109        $this,
110        $this->serviceName,
111        'android',
112        [
113          'methods' => [
114            'get' => [
115              'path' => 'v1/{+name}',
116              'httpMethod' => 'GET',
117              'parameters' => [
118                'name' => [
119                  'location' => 'path',
120                  'type' => 'string',
121                  'required' => true,
122                ],
123              ],
124            ],
125          ]
126        ]
127    );
128    $this->customers_apps_chrome = new ChromeManagement\Resource\CustomersAppsChrome(
129        $this,
130        $this->serviceName,
131        'chrome',
132        [
133          'methods' => [
134            'get' => [
135              'path' => 'v1/{+name}',
136              'httpMethod' => 'GET',
137              'parameters' => [
138                'name' => [
139                  'location' => 'path',
140                  'type' => 'string',
141                  'required' => true,
142                ],
143              ],
144            ],
145          ]
146        ]
147    );
148    $this->customers_apps_web = new ChromeManagement\Resource\CustomersAppsWeb(
149        $this,
150        $this->serviceName,
151        'web',
152        [
153          'methods' => [
154            'get' => [
155              'path' => 'v1/{+name}',
156              'httpMethod' => 'GET',
157              'parameters' => [
158                'name' => [
159                  'location' => 'path',
160                  'type' => 'string',
161                  'required' => true,
162                ],
163              ],
164            ],
165          ]
166        ]
167    );
168    $this->customers_reports = new ChromeManagement\Resource\CustomersReports(
169        $this,
170        $this->serviceName,
171        'reports',
172        [
173          'methods' => [
174            'countChromeVersions' => [
175              'path' => 'v1/{+customer}/reports:countChromeVersions',
176              'httpMethod' => 'GET',
177              'parameters' => [
178                'customer' => [
179                  'location' => 'path',
180                  'type' => 'string',
181                  'required' => true,
182                ],
183                'filter' => [
184                  'location' => 'query',
185                  'type' => 'string',
186                ],
187                'orgUnitId' => [
188                  'location' => 'query',
189                  'type' => 'string',
190                ],
191                'pageSize' => [
192                  'location' => 'query',
193                  'type' => 'integer',
194                ],
195                'pageToken' => [
196                  'location' => 'query',
197                  'type' => 'string',
198                ],
199              ],
200            ],'countInstalledApps' => [
201              'path' => 'v1/{+customer}/reports:countInstalledApps',
202              'httpMethod' => 'GET',
203              'parameters' => [
204                'customer' => [
205                  'location' => 'path',
206                  'type' => 'string',
207                  'required' => true,
208                ],
209                'filter' => [
210                  'location' => 'query',
211                  'type' => 'string',
212                ],
213                'orderBy' => [
214                  'location' => 'query',
215                  'type' => 'string',
216                ],
217                'orgUnitId' => [
218                  'location' => 'query',
219                  'type' => 'string',
220                ],
221                'pageSize' => [
222                  'location' => 'query',
223                  'type' => 'integer',
224                ],
225                'pageToken' => [
226                  'location' => 'query',
227                  'type' => 'string',
228                ],
229              ],
230            ],'findInstalledAppDevices' => [
231              'path' => 'v1/{+customer}/reports:findInstalledAppDevices',
232              'httpMethod' => 'GET',
233              'parameters' => [
234                'customer' => [
235                  'location' => 'path',
236                  'type' => 'string',
237                  'required' => true,
238                ],
239                'appId' => [
240                  'location' => 'query',
241                  'type' => 'string',
242                ],
243                'appType' => [
244                  'location' => 'query',
245                  'type' => 'string',
246                ],
247                'filter' => [
248                  'location' => 'query',
249                  'type' => 'string',
250                ],
251                'orderBy' => [
252                  'location' => 'query',
253                  'type' => 'string',
254                ],
255                'orgUnitId' => [
256                  'location' => 'query',
257                  'type' => 'string',
258                ],
259                'pageSize' => [
260                  'location' => 'query',
261                  'type' => 'integer',
262                ],
263                'pageToken' => [
264                  'location' => 'query',
265                  'type' => 'string',
266                ],
267              ],
268            ],
269          ]
270        ]
271    );
272    $this->customers_telemetry_devices = new ChromeManagement\Resource\CustomersTelemetryDevices(
273        $this,
274        $this->serviceName,
275        'devices',
276        [
277          'methods' => [
278            'list' => [
279              'path' => 'v1/{+parent}/telemetry/devices',
280              'httpMethod' => 'GET',
281              'parameters' => [
282                'parent' => [
283                  'location' => 'path',
284                  'type' => 'string',
285                  'required' => true,
286                ],
287                'filter' => [
288                  'location' => 'query',
289                  'type' => 'string',
290                ],
291                'pageSize' => [
292                  'location' => 'query',
293                  'type' => 'integer',
294                ],
295                'pageToken' => [
296                  'location' => 'query',
297                  'type' => 'string',
298                ],
299                'readMask' => [
300                  'location' => 'query',
301                  'type' => 'string',
302                ],
303              ],
304            ],
305          ]
306        ]
307    );
308  }
309}
310
311// Adding a class alias for backwards compatibility with the previous class name.
312class_alias(ChromeManagement::class, 'Google_Service_ChromeManagement');
313