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