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\ChromeManagement\Resource;
19
20use Google\Service\ChromeManagement\GoogleChromeManagementV1CountChromeVersionsResponse;
21use Google\Service\ChromeManagement\GoogleChromeManagementV1CountInstalledAppsResponse;
22use Google\Service\ChromeManagement\GoogleChromeManagementV1FindInstalledAppDevicesResponse;
23
24/**
25 * The "reports" collection of methods.
26 * Typical usage is:
27 *  <code>
28 *   $chromemanagementService = new Google\Service\ChromeManagement(...);
29 *   $reports = $chromemanagementService->reports;
30 *  </code>
31 */
32class CustomersReports extends \Google\Service\Resource
33{
34  /**
35   * Generate report of installed Chrome versions. (reports.countChromeVersions)
36   *
37   * @param string $customer Required. Customer id or "my_customer" to use the
38   * customer associated to the account making the request.
39   * @param array $optParams Optional parameters.
40   *
41   * @opt_param string filter Query string to filter results, AND-separated fields
42   * in EBNF syntax. Note: OR operations are not supported in this filter.
43   * Supported filter fields: * last_active_date
44   * @opt_param string orgUnitId The ID of the organizational unit.
45   * @opt_param int pageSize Maximum number of results to return. Maximum and
46   * default are 100.
47   * @opt_param string pageToken Token to specify the page of the request to be
48   * returned.
49   * @return GoogleChromeManagementV1CountChromeVersionsResponse
50   */
51  public function countChromeVersions($customer, $optParams = [])
52  {
53    $params = ['customer' => $customer];
54    $params = array_merge($params, $optParams);
55    return $this->call('countChromeVersions', [$params], GoogleChromeManagementV1CountChromeVersionsResponse::class);
56  }
57  /**
58   * Generate report of app installations. (reports.countInstalledApps)
59   *
60   * @param string $customer Required. Customer id or "my_customer" to use the
61   * customer associated to the account making the request.
62   * @param array $optParams Optional parameters.
63   *
64   * @opt_param string filter Query string to filter results, AND-separated fields
65   * in EBNF syntax. Note: OR operations are not supported in this filter.
66   * Supported filter fields: * app_name * app_type * install_type *
67   * number_of_permissions * total_install_count * latest_profile_active_date *
68   * permission_name
69   * @opt_param string orderBy Field used to order results. Supported order by
70   * fields: * app_name * app_type * install_type * number_of_permissions *
71   * total_install_count
72   * @opt_param string orgUnitId The ID of the organizational unit.
73   * @opt_param int pageSize Maximum number of results to return. Maximum and
74   * default are 100.
75   * @opt_param string pageToken Token to specify the page of the request to be
76   * returned.
77   * @return GoogleChromeManagementV1CountInstalledAppsResponse
78   */
79  public function countInstalledApps($customer, $optParams = [])
80  {
81    $params = ['customer' => $customer];
82    $params = array_merge($params, $optParams);
83    return $this->call('countInstalledApps', [$params], GoogleChromeManagementV1CountInstalledAppsResponse::class);
84  }
85  /**
86   * Generate report of devices that have a specified app installed.
87   * (reports.findInstalledAppDevices)
88   *
89   * @param string $customer Required. Customer id or "my_customer" to use the
90   * customer associated to the account making the request.
91   * @param array $optParams Optional parameters.
92   *
93   * @opt_param string appId Unique identifier of the app. For Chrome apps and
94   * extensions, the 32-character id (e.g. ehoadneljpdggcbbknedodolkkjodefl). For
95   * Android apps, the package name (e.g. com.evernote).
96   * @opt_param string appType Type of the app.
97   * @opt_param string filter Query string to filter results, AND-separated fields
98   * in EBNF syntax. Note: OR operations are not supported in this filter.
99   * Supported filter fields: * last_active_date
100   * @opt_param string orderBy Field used to order results. Supported order by
101   * fields: * machine * device_id
102   * @opt_param string orgUnitId The ID of the organizational unit.
103   * @opt_param int pageSize Maximum number of results to return. Maximum and
104   * default are 100.
105   * @opt_param string pageToken Token to specify the page of the request to be
106   * returned.
107   * @return GoogleChromeManagementV1FindInstalledAppDevicesResponse
108   */
109  public function findInstalledAppDevices($customer, $optParams = [])
110  {
111    $params = ['customer' => $customer];
112    $params = array_merge($params, $optParams);
113    return $this->call('findInstalledAppDevices', [$params], GoogleChromeManagementV1FindInstalledAppDevicesResponse::class);
114  }
115}
116
117// Adding a class alias for backwards compatibility with the previous class name.
118class_alias(CustomersReports::class, 'Google_Service_ChromeManagement_Resource_CustomersReports');
119