1<?php 2/* 3 * Copyright 2010 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 Appsactivity (v1). 20 * 21 * <p> 22 * Provides a historical view of activity.</p> 23 * 24 * <p> 25 * For more information about this service, see the API 26 * <a href="https://developers.google.com/google-apps/activity/" target="_blank">Documentation</a> 27 * </p> 28 * 29 * @author Google, Inc. 30 */ 31class Google_Service_Appsactivity extends Google_Service 32{ 33 /** View the activity history of your Google Apps. */ 34 const ACTIVITY = 35 "https://www.googleapis.com/auth/activity"; 36 /** View and manage the files and documents in your Google Drive. */ 37 const DRIVE = 38 "https://www.googleapis.com/auth/drive"; 39 /** View metadata for files and documents in your Google Drive. */ 40 const DRIVE_METADATA_READONLY = 41 "https://www.googleapis.com/auth/drive.metadata.readonly"; 42 /** View the files and documents in your Google Drive. */ 43 const DRIVE_READONLY = 44 "https://www.googleapis.com/auth/drive.readonly"; 45 46 public $activities; 47 48 49 /** 50 * Constructs the internal representation of the Appsactivity service. 51 * 52 * @param Google_Client $client 53 */ 54 public function __construct(Google_Client $client) 55 { 56 parent::__construct($client); 57 $this->servicePath = 'appsactivity/v1/'; 58 $this->version = 'v1'; 59 $this->serviceName = 'appsactivity'; 60 61 $this->activities = new Google_Service_Appsactivity_Activities_Resource( 62 $this, 63 $this->serviceName, 64 'activities', 65 array( 66 'methods' => array( 67 'list' => array( 68 'path' => 'activities', 69 'httpMethod' => 'GET', 70 'parameters' => array( 71 'drive.ancestorId' => array( 72 'location' => 'query', 73 'type' => 'string', 74 ), 75 'pageSize' => array( 76 'location' => 'query', 77 'type' => 'integer', 78 ), 79 'pageToken' => array( 80 'location' => 'query', 81 'type' => 'string', 82 ), 83 'userId' => array( 84 'location' => 'query', 85 'type' => 'string', 86 ), 87 'groupingStrategy' => array( 88 'location' => 'query', 89 'type' => 'string', 90 ), 91 'drive.fileId' => array( 92 'location' => 'query', 93 'type' => 'string', 94 ), 95 'source' => array( 96 'location' => 'query', 97 'type' => 'string', 98 ), 99 ), 100 ), 101 ) 102 ) 103 ); 104 } 105} 106 107 108/** 109 * The "activities" collection of methods. 110 * Typical usage is: 111 * <code> 112 * $appsactivityService = new Google_Service_Appsactivity(...); 113 * $activities = $appsactivityService->activities; 114 * </code> 115 */ 116class Google_Service_Appsactivity_Activities_Resource extends Google_Service_Resource 117{ 118 119 /** 120 * Returns a list of activities visible to the current logged in user. Visible 121 * activities are determined by the visiblity settings of the object that was 122 * acted on, e.g. Drive files a user can see. An activity is a record of past 123 * events. Multiple events may be merged if they are similar. A request is 124 * scoped to activities from a given Google service using the source parameter. 125 * (activities.listActivities) 126 * 127 * @param array $optParams Optional parameters. 128 * 129 * @opt_param string drive.ancestorId Identifies the Drive folder containing the 130 * items for which to return activities. 131 * @opt_param int pageSize The maximum number of events to return on a page. The 132 * response includes a continuation token if there are more events. 133 * @opt_param string pageToken A token to retrieve a specific page of results. 134 * @opt_param string userId Indicates the user to return activity for. Use the 135 * special value me to indicate the currently authenticated user. 136 * @opt_param string groupingStrategy Indicates the strategy to use when 137 * grouping singleEvents items in the associated combinedEvent object. 138 * @opt_param string drive.fileId Identifies the Drive item to return activities 139 * for. 140 * @opt_param string source The Google service from which to return activities. 141 * Possible values of source are: - drive.google.com 142 * @return Google_Service_Appsactivity_ListActivitiesResponse 143 */ 144 public function listActivities($optParams = array()) 145 { 146 $params = array(); 147 $params = array_merge($params, $optParams); 148 return $this->call('list', array($params), "Google_Service_Appsactivity_ListActivitiesResponse"); 149 } 150} 151 152 153 154 155class Google_Service_Appsactivity_Activity extends Google_Collection 156{ 157 protected $collection_key = 'singleEvents'; 158 protected $internal_gapi_mappings = array( 159 ); 160 protected $combinedEventType = 'Google_Service_Appsactivity_Event'; 161 protected $combinedEventDataType = ''; 162 protected $singleEventsType = 'Google_Service_Appsactivity_Event'; 163 protected $singleEventsDataType = 'array'; 164 165 166 public function setCombinedEvent(Google_Service_Appsactivity_Event $combinedEvent) 167 { 168 $this->combinedEvent = $combinedEvent; 169 } 170 public function getCombinedEvent() 171 { 172 return $this->combinedEvent; 173 } 174 public function setSingleEvents($singleEvents) 175 { 176 $this->singleEvents = $singleEvents; 177 } 178 public function getSingleEvents() 179 { 180 return $this->singleEvents; 181 } 182} 183 184class Google_Service_Appsactivity_Event extends Google_Collection 185{ 186 protected $collection_key = 'permissionChanges'; 187 protected $internal_gapi_mappings = array( 188 ); 189 public $additionalEventTypes; 190 public $eventTimeMillis; 191 public $fromUserDeletion; 192 protected $moveType = 'Google_Service_Appsactivity_Move'; 193 protected $moveDataType = ''; 194 protected $permissionChangesType = 'Google_Service_Appsactivity_PermissionChange'; 195 protected $permissionChangesDataType = 'array'; 196 public $primaryEventType; 197 protected $renameType = 'Google_Service_Appsactivity_Rename'; 198 protected $renameDataType = ''; 199 protected $targetType = 'Google_Service_Appsactivity_Target'; 200 protected $targetDataType = ''; 201 protected $userType = 'Google_Service_Appsactivity_User'; 202 protected $userDataType = ''; 203 204 205 public function setAdditionalEventTypes($additionalEventTypes) 206 { 207 $this->additionalEventTypes = $additionalEventTypes; 208 } 209 public function getAdditionalEventTypes() 210 { 211 return $this->additionalEventTypes; 212 } 213 public function setEventTimeMillis($eventTimeMillis) 214 { 215 $this->eventTimeMillis = $eventTimeMillis; 216 } 217 public function getEventTimeMillis() 218 { 219 return $this->eventTimeMillis; 220 } 221 public function setFromUserDeletion($fromUserDeletion) 222 { 223 $this->fromUserDeletion = $fromUserDeletion; 224 } 225 public function getFromUserDeletion() 226 { 227 return $this->fromUserDeletion; 228 } 229 public function setMove(Google_Service_Appsactivity_Move $move) 230 { 231 $this->move = $move; 232 } 233 public function getMove() 234 { 235 return $this->move; 236 } 237 public function setPermissionChanges($permissionChanges) 238 { 239 $this->permissionChanges = $permissionChanges; 240 } 241 public function getPermissionChanges() 242 { 243 return $this->permissionChanges; 244 } 245 public function setPrimaryEventType($primaryEventType) 246 { 247 $this->primaryEventType = $primaryEventType; 248 } 249 public function getPrimaryEventType() 250 { 251 return $this->primaryEventType; 252 } 253 public function setRename(Google_Service_Appsactivity_Rename $rename) 254 { 255 $this->rename = $rename; 256 } 257 public function getRename() 258 { 259 return $this->rename; 260 } 261 public function setTarget(Google_Service_Appsactivity_Target $target) 262 { 263 $this->target = $target; 264 } 265 public function getTarget() 266 { 267 return $this->target; 268 } 269 public function setUser(Google_Service_Appsactivity_User $user) 270 { 271 $this->user = $user; 272 } 273 public function getUser() 274 { 275 return $this->user; 276 } 277} 278 279class Google_Service_Appsactivity_ListActivitiesResponse extends Google_Collection 280{ 281 protected $collection_key = 'activities'; 282 protected $internal_gapi_mappings = array( 283 ); 284 protected $activitiesType = 'Google_Service_Appsactivity_Activity'; 285 protected $activitiesDataType = 'array'; 286 public $nextPageToken; 287 288 289 public function setActivities($activities) 290 { 291 $this->activities = $activities; 292 } 293 public function getActivities() 294 { 295 return $this->activities; 296 } 297 public function setNextPageToken($nextPageToken) 298 { 299 $this->nextPageToken = $nextPageToken; 300 } 301 public function getNextPageToken() 302 { 303 return $this->nextPageToken; 304 } 305} 306 307class Google_Service_Appsactivity_Move extends Google_Collection 308{ 309 protected $collection_key = 'removedParents'; 310 protected $internal_gapi_mappings = array( 311 ); 312 protected $addedParentsType = 'Google_Service_Appsactivity_Parent'; 313 protected $addedParentsDataType = 'array'; 314 protected $removedParentsType = 'Google_Service_Appsactivity_Parent'; 315 protected $removedParentsDataType = 'array'; 316 317 318 public function setAddedParents($addedParents) 319 { 320 $this->addedParents = $addedParents; 321 } 322 public function getAddedParents() 323 { 324 return $this->addedParents; 325 } 326 public function setRemovedParents($removedParents) 327 { 328 $this->removedParents = $removedParents; 329 } 330 public function getRemovedParents() 331 { 332 return $this->removedParents; 333 } 334} 335 336class Google_Service_Appsactivity_Parent extends Google_Model 337{ 338 protected $internal_gapi_mappings = array( 339 ); 340 public $id; 341 public $isRoot; 342 public $title; 343 344 345 public function setId($id) 346 { 347 $this->id = $id; 348 } 349 public function getId() 350 { 351 return $this->id; 352 } 353 public function setIsRoot($isRoot) 354 { 355 $this->isRoot = $isRoot; 356 } 357 public function getIsRoot() 358 { 359 return $this->isRoot; 360 } 361 public function setTitle($title) 362 { 363 $this->title = $title; 364 } 365 public function getTitle() 366 { 367 return $this->title; 368 } 369} 370 371class Google_Service_Appsactivity_Permission extends Google_Model 372{ 373 protected $internal_gapi_mappings = array( 374 ); 375 public $name; 376 public $permissionId; 377 public $role; 378 public $type; 379 protected $userType = 'Google_Service_Appsactivity_User'; 380 protected $userDataType = ''; 381 public $withLink; 382 383 384 public function setName($name) 385 { 386 $this->name = $name; 387 } 388 public function getName() 389 { 390 return $this->name; 391 } 392 public function setPermissionId($permissionId) 393 { 394 $this->permissionId = $permissionId; 395 } 396 public function getPermissionId() 397 { 398 return $this->permissionId; 399 } 400 public function setRole($role) 401 { 402 $this->role = $role; 403 } 404 public function getRole() 405 { 406 return $this->role; 407 } 408 public function setType($type) 409 { 410 $this->type = $type; 411 } 412 public function getType() 413 { 414 return $this->type; 415 } 416 public function setUser(Google_Service_Appsactivity_User $user) 417 { 418 $this->user = $user; 419 } 420 public function getUser() 421 { 422 return $this->user; 423 } 424 public function setWithLink($withLink) 425 { 426 $this->withLink = $withLink; 427 } 428 public function getWithLink() 429 { 430 return $this->withLink; 431 } 432} 433 434class Google_Service_Appsactivity_PermissionChange extends Google_Collection 435{ 436 protected $collection_key = 'removedPermissions'; 437 protected $internal_gapi_mappings = array( 438 ); 439 protected $addedPermissionsType = 'Google_Service_Appsactivity_Permission'; 440 protected $addedPermissionsDataType = 'array'; 441 protected $removedPermissionsType = 'Google_Service_Appsactivity_Permission'; 442 protected $removedPermissionsDataType = 'array'; 443 444 445 public function setAddedPermissions($addedPermissions) 446 { 447 $this->addedPermissions = $addedPermissions; 448 } 449 public function getAddedPermissions() 450 { 451 return $this->addedPermissions; 452 } 453 public function setRemovedPermissions($removedPermissions) 454 { 455 $this->removedPermissions = $removedPermissions; 456 } 457 public function getRemovedPermissions() 458 { 459 return $this->removedPermissions; 460 } 461} 462 463class Google_Service_Appsactivity_Photo extends Google_Model 464{ 465 protected $internal_gapi_mappings = array( 466 ); 467 public $url; 468 469 470 public function setUrl($url) 471 { 472 $this->url = $url; 473 } 474 public function getUrl() 475 { 476 return $this->url; 477 } 478} 479 480class Google_Service_Appsactivity_Rename extends Google_Model 481{ 482 protected $internal_gapi_mappings = array( 483 ); 484 public $newTitle; 485 public $oldTitle; 486 487 488 public function setNewTitle($newTitle) 489 { 490 $this->newTitle = $newTitle; 491 } 492 public function getNewTitle() 493 { 494 return $this->newTitle; 495 } 496 public function setOldTitle($oldTitle) 497 { 498 $this->oldTitle = $oldTitle; 499 } 500 public function getOldTitle() 501 { 502 return $this->oldTitle; 503 } 504} 505 506class Google_Service_Appsactivity_Target extends Google_Model 507{ 508 protected $internal_gapi_mappings = array( 509 ); 510 public $id; 511 public $mimeType; 512 public $name; 513 514 515 public function setId($id) 516 { 517 $this->id = $id; 518 } 519 public function getId() 520 { 521 return $this->id; 522 } 523 public function setMimeType($mimeType) 524 { 525 $this->mimeType = $mimeType; 526 } 527 public function getMimeType() 528 { 529 return $this->mimeType; 530 } 531 public function setName($name) 532 { 533 $this->name = $name; 534 } 535 public function getName() 536 { 537 return $this->name; 538 } 539} 540 541class Google_Service_Appsactivity_User extends Google_Model 542{ 543 protected $internal_gapi_mappings = array( 544 ); 545 public $name; 546 protected $photoType = 'Google_Service_Appsactivity_Photo'; 547 protected $photoDataType = ''; 548 549 550 public function setName($name) 551 { 552 $this->name = $name; 553 } 554 public function getName() 555 { 556 return $this->name; 557 } 558 public function setPhoto(Google_Service_Appsactivity_Photo $photo) 559 { 560 $this->photo = $photo; 561 } 562 public function getPhoto() 563 { 564 return $this->photo; 565 } 566} 567