PageRenderTime 42ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/plugins/backupbuddy/destinations/gdrive/Google/Service/Appsactivity.php

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