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 * The "activities" collection of methods.
20 * Typical usage is:
21 *  <code>
22 *   $adminService = new Google_Service_Reports(...);
23 *   $activities = $adminService->activities;
24 *  </code>
25 */
26class Google_Service_Reports_Resource_Activities extends Google_Service_Resource
27{
28  /**
29   * Retrieves a list of activities for a specific customer and application.
30   * (activities.listActivities)
31   *
32   * @param string $userKey Represents the profile id or the user email for which
33   * the data should be filtered. When 'all' is specified as the userKey, it
34   * returns usageReports for all users.
35   * @param string $applicationName Application name for which the events are to
36   * be retrieved.
37   * @param array $optParams Optional parameters.
38   *
39   * @opt_param string actorIpAddress IP Address of host where the event was
40   * performed. Supports both IPv4 and IPv6 addresses.
41   * @opt_param string customerId Represents the customer for which the data is to
42   * be fetched.
43   * @opt_param string endTime Return events which occurred at or before this
44   * time.
45   * @opt_param string eventName Name of the event being queried.
46   * @opt_param string filters Event parameters in the form [parameter1
47   * name][operator][parameter1 value],[parameter2 name][operator][parameter2
48   * value],...
49   * @opt_param int maxResults Number of activity records to be shown in each
50   * page.
51   * @opt_param string orgUnitID the organizational unit's(OU) ID to filter
52   * activities from users belonging to a specific OU or one of its sub-OU(s)
53   * @opt_param string pageToken Token to specify next page.
54   * @opt_param string startTime Return events which occurred at or after this
55   * time.
56   * @return Google_Service_Reports_Activities
57   */
58  public function listActivities($userKey, $applicationName, $optParams = array())
59  {
60    $params = array('userKey' => $userKey, 'applicationName' => $applicationName);
61    $params = array_merge($params, $optParams);
62    return $this->call('list', array($params), "Google_Service_Reports_Activities");
63  }
64  /**
65   * Push changes to activities (activities.watch)
66   *
67   * @param string $userKey Represents the profile id or the user email for which
68   * the data should be filtered. When 'all' is specified as the userKey, it
69   * returns usageReports for all users.
70   * @param string $applicationName Application name for which the events are to
71   * be retrieved.
72   * @param Google_Service_Reports_Channel $postBody
73   * @param array $optParams Optional parameters.
74   *
75   * @opt_param string actorIpAddress IP Address of host where the event was
76   * performed. Supports both IPv4 and IPv6 addresses.
77   * @opt_param string customerId Represents the customer for which the data is to
78   * be fetched.
79   * @opt_param string endTime Return events which occurred at or before this
80   * time.
81   * @opt_param string eventName Name of the event being queried.
82   * @opt_param string filters Event parameters in the form [parameter1
83   * name][operator][parameter1 value],[parameter2 name][operator][parameter2
84   * value],...
85   * @opt_param int maxResults Number of activity records to be shown in each
86   * page.
87   * @opt_param string orgUnitID the organizational unit's(OU) ID to filter
88   * activities from users belonging to a specific OU or one of its sub-OU(s)
89   * @opt_param string pageToken Token to specify next page.
90   * @opt_param string startTime Return events which occurred at or after this
91   * time.
92   * @return Google_Service_Reports_Channel
93   */
94  public function watch($userKey, $applicationName, Google_Service_Reports_Channel $postBody, $optParams = array())
95  {
96    $params = array('userKey' => $userKey, 'applicationName' => $applicationName, 'postBody' => $postBody);
97    $params = array_merge($params, $optParams);
98    return $this->call('watch', array($params), "Google_Service_Reports_Channel");
99  }
100}
101