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 * Service definition for Reports (reports_v1). 20 * 21 * <p> 22 * Fetches reports for the administrators of G Suite customers about the usage, 23 * collaboration, security, and risk for their users.</p> 24 * 25 * <p> 26 * For more information about this service, see the API 27 * <a href="https://developers.google.com/admin-sdk/reports/" target="_blank">Documentation</a> 28 * </p> 29 * 30 * @author Google, Inc. 31 */ 32class Google_Service_Reports extends Google_Service 33{ 34 /** View audit reports for your G Suite domain. */ 35 const ADMIN_REPORTS_AUDIT_READONLY = 36 "https://www.googleapis.com/auth/admin.reports.audit.readonly"; 37 /** View usage reports for your G Suite domain. */ 38 const ADMIN_REPORTS_USAGE_READONLY = 39 "https://www.googleapis.com/auth/admin.reports.usage.readonly"; 40 41 public $activities; 42 public $channels; 43 public $customerUsageReports; 44 public $entityUsageReports; 45 public $userUsageReport; 46 47 /** 48 * Constructs the internal representation of the Reports service. 49 * 50 * @param Google_Client $client 51 */ 52 public function __construct(Google_Client $client) 53 { 54 parent::__construct($client); 55 $this->rootUrl = 'https://www.googleapis.com/'; 56 $this->servicePath = 'admin/reports/v1/'; 57 $this->batchPath = 'batch/admin/reports_v1'; 58 $this->version = 'reports_v1'; 59 $this->serviceName = 'admin'; 60 61 $this->activities = new Google_Service_Reports_Resource_Activities( 62 $this, 63 $this->serviceName, 64 'activities', 65 array( 66 'methods' => array( 67 'list' => array( 68 'path' => 'activity/users/{userKey}/applications/{applicationName}', 69 'httpMethod' => 'GET', 70 'parameters' => array( 71 'userKey' => array( 72 'location' => 'path', 73 'type' => 'string', 74 'required' => true, 75 ), 76 'applicationName' => array( 77 'location' => 'path', 78 'type' => 'string', 79 'required' => true, 80 ), 81 'actorIpAddress' => array( 82 'location' => 'query', 83 'type' => 'string', 84 ), 85 'customerId' => array( 86 'location' => 'query', 87 'type' => 'string', 88 ), 89 'endTime' => array( 90 'location' => 'query', 91 'type' => 'string', 92 ), 93 'eventName' => array( 94 'location' => 'query', 95 'type' => 'string', 96 ), 97 'filters' => array( 98 'location' => 'query', 99 'type' => 'string', 100 ), 101 'maxResults' => array( 102 'location' => 'query', 103 'type' => 'integer', 104 ), 105 'orgUnitID' => array( 106 'location' => 'query', 107 'type' => 'string', 108 ), 109 'pageToken' => array( 110 'location' => 'query', 111 'type' => 'string', 112 ), 113 'startTime' => array( 114 'location' => 'query', 115 'type' => 'string', 116 ), 117 ), 118 ),'watch' => array( 119 'path' => 'activity/users/{userKey}/applications/{applicationName}/watch', 120 'httpMethod' => 'POST', 121 'parameters' => array( 122 'userKey' => array( 123 'location' => 'path', 124 'type' => 'string', 125 'required' => true, 126 ), 127 'applicationName' => array( 128 'location' => 'path', 129 'type' => 'string', 130 'required' => true, 131 ), 132 'actorIpAddress' => array( 133 'location' => 'query', 134 'type' => 'string', 135 ), 136 'customerId' => array( 137 'location' => 'query', 138 'type' => 'string', 139 ), 140 'endTime' => array( 141 'location' => 'query', 142 'type' => 'string', 143 ), 144 'eventName' => array( 145 'location' => 'query', 146 'type' => 'string', 147 ), 148 'filters' => array( 149 'location' => 'query', 150 'type' => 'string', 151 ), 152 'maxResults' => array( 153 'location' => 'query', 154 'type' => 'integer', 155 ), 156 'orgUnitID' => array( 157 'location' => 'query', 158 'type' => 'string', 159 ), 160 'pageToken' => array( 161 'location' => 'query', 162 'type' => 'string', 163 ), 164 'startTime' => array( 165 'location' => 'query', 166 'type' => 'string', 167 ), 168 ), 169 ), 170 ) 171 ) 172 ); 173 $this->channels = new Google_Service_Reports_Resource_Channels( 174 $this, 175 $this->serviceName, 176 'channels', 177 array( 178 'methods' => array( 179 'stop' => array( 180 'path' => '/admin/reports_v1/channels/stop', 181 'httpMethod' => 'POST', 182 'parameters' => array(), 183 ), 184 ) 185 ) 186 ); 187 $this->customerUsageReports = new Google_Service_Reports_Resource_CustomerUsageReports( 188 $this, 189 $this->serviceName, 190 'customerUsageReports', 191 array( 192 'methods' => array( 193 'get' => array( 194 'path' => 'usage/dates/{date}', 195 'httpMethod' => 'GET', 196 'parameters' => array( 197 'date' => array( 198 'location' => 'path', 199 'type' => 'string', 200 'required' => true, 201 ), 202 'customerId' => array( 203 'location' => 'query', 204 'type' => 'string', 205 ), 206 'pageToken' => array( 207 'location' => 'query', 208 'type' => 'string', 209 ), 210 'parameters' => array( 211 'location' => 'query', 212 'type' => 'string', 213 ), 214 ), 215 ), 216 ) 217 ) 218 ); 219 $this->entityUsageReports = new Google_Service_Reports_Resource_EntityUsageReports( 220 $this, 221 $this->serviceName, 222 'entityUsageReports', 223 array( 224 'methods' => array( 225 'get' => array( 226 'path' => 'usage/{entityType}/{entityKey}/dates/{date}', 227 'httpMethod' => 'GET', 228 'parameters' => array( 229 'entityType' => array( 230 'location' => 'path', 231 'type' => 'string', 232 'required' => true, 233 ), 234 'entityKey' => array( 235 'location' => 'path', 236 'type' => 'string', 237 'required' => true, 238 ), 239 'date' => array( 240 'location' => 'path', 241 'type' => 'string', 242 'required' => true, 243 ), 244 'customerId' => array( 245 'location' => 'query', 246 'type' => 'string', 247 ), 248 'filters' => array( 249 'location' => 'query', 250 'type' => 'string', 251 ), 252 'maxResults' => array( 253 'location' => 'query', 254 'type' => 'integer', 255 ), 256 'pageToken' => array( 257 'location' => 'query', 258 'type' => 'string', 259 ), 260 'parameters' => array( 261 'location' => 'query', 262 'type' => 'string', 263 ), 264 ), 265 ), 266 ) 267 ) 268 ); 269 $this->userUsageReport = new Google_Service_Reports_Resource_UserUsageReport( 270 $this, 271 $this->serviceName, 272 'userUsageReport', 273 array( 274 'methods' => array( 275 'get' => array( 276 'path' => 'usage/users/{userKey}/dates/{date}', 277 'httpMethod' => 'GET', 278 'parameters' => array( 279 'userKey' => array( 280 'location' => 'path', 281 'type' => 'string', 282 'required' => true, 283 ), 284 'date' => array( 285 'location' => 'path', 286 'type' => 'string', 287 'required' => true, 288 ), 289 'customerId' => array( 290 'location' => 'query', 291 'type' => 'string', 292 ), 293 'filters' => array( 294 'location' => 'query', 295 'type' => 'string', 296 ), 297 'maxResults' => array( 298 'location' => 'query', 299 'type' => 'integer', 300 ), 301 'orgUnitID' => array( 302 'location' => 'query', 303 'type' => 'string', 304 ), 305 'pageToken' => array( 306 'location' => 'query', 307 'type' => 'string', 308 ), 309 'parameters' => array( 310 'location' => 'query', 311 'type' => 'string', 312 ), 313 ), 314 ), 315 ) 316 ) 317 ); 318 } 319} 320