source: vendor/google/apiclient-services/src/Reports/Resource/UserUsageReport.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 10 days ago

Upload project files

  • Property mode set to 100644
File size: 5.8 KB
Line 
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\Reports\Resource;
19
20use Google\Service\Reports\UsageReports;
21
22/**
23 * The "userUsageReport" collection of methods.
24 * Typical usage is:
25 * <code>
26 * $adminService = new Google\Service\Reports(...);
27 * $userUsageReport = $adminService->userUsageReport;
28 * </code>
29 */
30class UserUsageReport extends \Google\Service\Resource
31{
32 /**
33 * Retrieves a report which is a collection of properties and statistics for a
34 * set of users with the account. For more information, see the User Usage
35 * Report guide. For more information about the user report's parameters, see
36 * the Users Usage parameters reference guides. (userUsageReport.get)
37 *
38 * @param string $userKey Represents the profile ID or the user email for which
39 * the data should be filtered. Can be `all` for all information, or `userKey`
40 * for a user's unique Google Workspace profile ID or their primary email
41 * address. Must not be a deleted user. For a deleted user, call `users.list` in
42 * Directory API with `showDeleted=true`, then use the returned `ID` as the
43 * `userKey`.
44 * @param string $date Represents the date the usage occurred, based on UTC-8:00
45 * (Pacific Standard Time). The timestamp is in the [ISO 8601
46 * format](https://en.wikipedia.org/wiki/ISO_8601), `yyyy-mm-dd`.
47 * @param array $optParams Optional parameters.
48 *
49 * @opt_param string customerId The unique ID of the customer to retrieve data
50 * for.
51 * @opt_param string filters The `filters` query string is a comma-separated
52 * list of an application's event parameters where the parameter's value is
53 * manipulated by a relational operator. The `filters` query string includes the
54 * name of the application whose usage is returned in the report. The
55 * application values for the Users Usage Report include `accounts`, `docs`, and
56 * `gmail`. Filters are in the form `[application name]:parameter name[parameter
57 * value],...`. In this example, the `<>` 'not equal to' operator is URL-encoded
58 * in the request's query string (%3C%3E): GET
59 * https://www.googleapis.com/admin/reports/v1/usage/users/all/dates/2013-03-03
60 * ?parameters=accounts:last_login_time
61 * &filters=accounts:last_login_time%3C%3E2010-10-28T10:26:35.000Z The
62 * relational operators include: - `==` - 'equal to'. - `<>` - 'not equal to'.
63 * It is URL-encoded (%3C%3E). - `<` - 'less than'. It is URL-encoded (%3C). -
64 * `<=` - 'less than or equal to'. It is URL-encoded (%3C=). - `>` - 'greater
65 * than'. It is URL-encoded (%3E). - `>=` - 'greater than or equal to'. It is
66 * URL-encoded (%3E=).
67 * @opt_param string groupIdFilter Comma separated group ids (obfuscated) on
68 * which user activities are filtered, i.e. the response will contain activities
69 * for only those users that are a part of at least one of the group ids
70 * mentioned here. Format: "id:abc123,id:xyz456"
71 * @opt_param string maxResults Determines how many activity records are shown
72 * on each response page. For example, if the request sets `maxResults=1` and
73 * the report has two activities, the report has two pages. The response's
74 * `nextPageToken` property has the token to the second page. The `maxResults`
75 * query string is optional.
76 * @opt_param string orgUnitID ID of the organizational unit to report on. User
77 * activity will be shown only for users who belong to the specified
78 * organizational unit. Data before Dec 17, 2018 doesn't appear in the filtered
79 * results.
80 * @opt_param string pageToken Token to specify next page. A report with
81 * multiple pages has a `nextPageToken` property in the response. In your
82 * follow-on request getting the next page of the report, enter the
83 * `nextPageToken` value in the `pageToken` query string.
84 * @opt_param string parameters The `parameters` query string is a comma-
85 * separated list of event parameters that refine a report's results. The
86 * parameter is associated with a specific application. The application values
87 * for the Customers Usage report include `accounts`, `app_maker`,
88 * `apps_scripts`, `calendar`, `classroom`, `cros`, `docs`, `gmail`, `gplus`,
89 * `device_management`, `meet`, and `sites`. A `parameters` query string is in
90 * the CSV form of `app_name1:param_name1, app_name2:param_name2`. *Note:* The
91 * API doesn't accept multiple values of a parameter. If a particular parameter
92 * is supplied more than once in the API request, the API only accepts the last
93 * value of that request parameter. In addition, if an invalid request parameter
94 * is supplied in the API request, the API ignores that request parameter and
95 * returns the response corresponding to the remaining valid request parameters.
96 * An example of an invalid request parameter is one that does not belong to the
97 * application. If no parameters are requested, all parameters are returned.
98 * @return UsageReports
99 * @throws \Google\Service\Exception
100 */
101 public function get($userKey, $date, $optParams = [])
102 {
103 $params = ['userKey' => $userKey, 'date' => $date];
104 $params = array_merge($params, $optParams);
105 return $this->call('get', [$params], UsageReports::class);
106 }
107}
108
109// Adding a class alias for backwards compatibility with the previous class name.
110class_alias(UserUsageReport::class, 'Google_Service_Reports_Resource_UserUsageReport');
Note: See TracBrowser for help on using the repository browser.