PluginProbe
WP Database Backup – Unlimited Database & Files Backup by Backup for WP / 6.11
WP Database Backup – Unlimited Database & Files Backup by Backup for WP v6.11
7.13 7.12 trunk 1.1 2.1.1 5.9 6.0 6.1 6.10 6.11 6.12 6.12.1 6.2 6.3 6.4 6.5 6.5.1 6.6 6.7 6.8 6.9 7.0 7.0.1 7.1 7.10 All 34 releases
wp-database-backup / includes / admin / Destination / Google / google-api-php-client / src / contrib / Google_TasksService.php

Google_TasksService.php in WP Database Backup – Unlimited Database & Files Backup by Backup for WP 6.11, at includes/admin/Destination/Google/google-api-php-client/src/contrib/Google_TasksService.php

581 lines 23.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*
3 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
4 * use this file except in compliance with the License. You may obtain a copy of
5 * the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 * License for the specific language governing permissions and limitations under
13 * the License.
14 */
15
16
17 /**
18 * The "tasklists" collection of methods.
19 * Typical usage is:
20 * <code>
21 * $tasksService = new Google_TasksService(...);
22 * $tasklists = $tasksService->tasklists;
23 * </code>
24 */
25 class Google_TasklistsServiceResource extends Google_ServiceResource {
26
27 /**
28 * Deletes the authenticated user's specified task list. (tasklists.delete)
29 *
30 * @param string $tasklist Task list identifier.
31 * @param array $optParams Optional parameters.
32 */
33 public function delete($tasklist, $optParams = array()) {
34 $params = array('tasklist' => $tasklist);
35 $params = array_merge($params, $optParams);
36 $data = $this->__call('delete', array($params));
37 return $data;
38 }
39 /**
40 * Returns the authenticated user's specified task list. (tasklists.get)
41 *
42 * @param string $tasklist Task list identifier.
43 * @param array $optParams Optional parameters.
44 * @return Google_TaskList
45 */
46 public function get($tasklist, $optParams = array()) {
47 $params = array('tasklist' => $tasklist);
48 $params = array_merge($params, $optParams);
49 $data = $this->__call('get', array($params));
50 if ($this->useObjects()) {
51 return new Google_TaskList($data);
52 } else {
53 return $data;
54 }
55 }
56 /**
57 * Creates a new task list and adds it to the authenticated user's task lists. (tasklists.insert)
58 *
59 * @param Google_TaskList $postBody
60 * @param array $optParams Optional parameters.
61 * @return Google_TaskList
62 */
63 public function insert(Google_TaskList $postBody, $optParams = array()) {
64 $params = array('postBody' => $postBody);
65 $params = array_merge($params, $optParams);
66 $data = $this->__call('insert', array($params));
67 if ($this->useObjects()) {
68 return new Google_TaskList($data);
69 } else {
70 return $data;
71 }
72 }
73 /**
74 * Returns all the authenticated user's task lists. (tasklists.list)
75 *
76 * @param array $optParams Optional parameters.
77 *
78 * @opt_param string maxResults Maximum number of task lists returned on one page. Optional. The default is 100.
79 * @opt_param string pageToken Token specifying the result page to return. Optional.
80 * @return Google_TaskLists
81 */
82 public function listTasklists($optParams = array()) {
83 $params = array();
84 $params = array_merge($params, $optParams);
85 $data = $this->__call('list', array($params));
86 if ($this->useObjects()) {
87 return new Google_TaskLists($data);
88 } else {
89 return $data;
90 }
91 }
92 /**
93 * Updates the authenticated user's specified task list. This method supports patch semantics.
94 * (tasklists.patch)
95 *
96 * @param string $tasklist Task list identifier.
97 * @param Google_TaskList $postBody
98 * @param array $optParams Optional parameters.
99 * @return Google_TaskList
100 */
101 public function patch($tasklist, Google_TaskList $postBody, $optParams = array()) {
102 $params = array('tasklist' => $tasklist, 'postBody' => $postBody);
103 $params = array_merge($params, $optParams);
104 $data = $this->__call('patch', array($params));
105 if ($this->useObjects()) {
106 return new Google_TaskList($data);
107 } else {
108 return $data;
109 }
110 }
111 /**
112 * Updates the authenticated user's specified task list. (tasklists.update)
113 *
114 * @param string $tasklist Task list identifier.
115 * @param Google_TaskList $postBody
116 * @param array $optParams Optional parameters.
117 * @return Google_TaskList
118 */
119 public function update($tasklist, Google_TaskList $postBody, $optParams = array()) {
120 $params = array('tasklist' => $tasklist, 'postBody' => $postBody);
121 $params = array_merge($params, $optParams);
122 $data = $this->__call('update', array($params));
123 if ($this->useObjects()) {
124 return new Google_TaskList($data);
125 } else {
126 return $data;
127 }
128 }
129 }
130
131 /**
132 * The "tasks" collection of methods.
133 * Typical usage is:
134 * <code>
135 * $tasksService = new Google_TasksService(...);
136 * $tasks = $tasksService->tasks;
137 * </code>
138 */
139 class Google_TasksServiceResource extends Google_ServiceResource {
140
141 /**
142 * Clears all completed tasks from the specified task list. The affected tasks will be marked as
143 * 'hidden' and no longer be returned by default when retrieving all tasks for a task list.
144 * (tasks.clear)
145 *
146 * @param string $tasklist Task list identifier.
147 * @param array $optParams Optional parameters.
148 */
149 public function clear($tasklist, $optParams = array()) {
150 $params = array('tasklist' => $tasklist);
151 $params = array_merge($params, $optParams);
152 $data = $this->__call('clear', array($params));
153 return $data;
154 }
155 /**
156 * Deletes the specified task from the task list. (tasks.delete)
157 *
158 * @param string $tasklist Task list identifier.
159 * @param string $task Task identifier.
160 * @param array $optParams Optional parameters.
161 */
162 public function delete($tasklist, $task, $optParams = array()) {
163 $params = array('tasklist' => $tasklist, 'task' => $task);
164 $params = array_merge($params, $optParams);
165 $data = $this->__call('delete', array($params));
166 return $data;
167 }
168 /**
169 * Returns the specified task. (tasks.get)
170 *
171 * @param string $tasklist Task list identifier.
172 * @param string $task Task identifier.
173 * @param array $optParams Optional parameters.
174 * @return Google_Task
175 */
176 public function get($tasklist, $task, $optParams = array()) {
177 $params = array('tasklist' => $tasklist, 'task' => $task);
178 $params = array_merge($params, $optParams);
179 $data = $this->__call('get', array($params));
180 if ($this->useObjects()) {
181 return new Google_Task($data);
182 } else {
183 return $data;
184 }
185 }
186 /**
187 * Creates a new task on the specified task list. (tasks.insert)
188 *
189 * @param string $tasklist Task list identifier.
190 * @param Google_Task $postBody
191 * @param array $optParams Optional parameters.
192 *
193 * @opt_param string parent Parent task identifier. If the task is created at the top level, this parameter is omitted. Optional.
194 * @opt_param string previous Previous sibling task identifier. If the task is created at the first position among its siblings, this parameter is omitted. Optional.
195 * @return Google_Task
196 */
197 public function insert($tasklist, Google_Task $postBody, $optParams = array()) {
198 $params = array('tasklist' => $tasklist, 'postBody' => $postBody);
199 $params = array_merge($params, $optParams);
200 $data = $this->__call('insert', array($params));
201 if ($this->useObjects()) {
202 return new Google_Task($data);
203 } else {
204 return $data;
205 }
206 }
207 /**
208 * Returns all tasks in the specified task list. (tasks.list)
209 *
210 * @param string $tasklist Task list identifier.
211 * @param array $optParams Optional parameters.
212 *
213 * @opt_param string completedMax Upper bound for a task's completion date (as a RFC 3339 timestamp) to filter by. Optional. The default is not to filter by completion date.
214 * @opt_param string completedMin Lower bound for a task's completion date (as a RFC 3339 timestamp) to filter by. Optional. The default is not to filter by completion date.
215 * @opt_param string dueMax Upper bound for a task's due date (as a RFC 3339 timestamp) to filter by. Optional. The default is not to filter by due date.
216 * @opt_param string dueMin Lower bound for a task's due date (as a RFC 3339 timestamp) to filter by. Optional. The default is not to filter by due date.
217 * @opt_param string maxResults Maximum number of task lists returned on one page. Optional. The default is 100.
218 * @opt_param string pageToken Token specifying the result page to return. Optional.
219 * @opt_param bool showCompleted Flag indicating whether completed tasks are returned in the result. Optional. The default is True.
220 * @opt_param bool showDeleted Flag indicating whether deleted tasks are returned in the result. Optional. The default is False.
221 * @opt_param bool showHidden Flag indicating whether hidden tasks are returned in the result. Optional. The default is False.
222 * @opt_param string updatedMin Lower bound for a task's last modification time (as a RFC 3339 timestamp) to filter by. Optional. The default is not to filter by last modification time.
223 * @return Google_Tasks
224 */
225 public function listTasks($tasklist, $optParams = array()) {
226 $params = array('tasklist' => $tasklist);
227 $params = array_merge($params, $optParams);
228 $data = $this->__call('list', array($params));
229 if ($this->useObjects()) {
230 return new Google_Tasks($data);
231 } else {
232 return $data;
233 }
234 }
235 /**
236 * Moves the specified task to another position in the task list. This can include putting it as a
237 * child task under a new parent and/or move it to a different position among its sibling tasks.
238 * (tasks.move)
239 *
240 * @param string $tasklist Task list identifier.
241 * @param string $task Task identifier.
242 * @param array $optParams Optional parameters.
243 *
244 * @opt_param string parent New parent task identifier. If the task is moved to the top level, this parameter is omitted. Optional.
245 * @opt_param string previous New previous sibling task identifier. If the task is moved to the first position among its siblings, this parameter is omitted. Optional.
246 * @return Google_Task
247 */
248 public function move($tasklist, $task, $optParams = array()) {
249 $params = array('tasklist' => $tasklist, 'task' => $task);
250 $params = array_merge($params, $optParams);
251 $data = $this->__call('move', array($params));
252 if ($this->useObjects()) {
253 return new Google_Task($data);
254 } else {
255 return $data;
256 }
257 }
258 /**
259 * Updates the specified task. This method supports patch semantics. (tasks.patch)
260 *
261 * @param string $tasklist Task list identifier.
262 * @param string $task Task identifier.
263 * @param Google_Task $postBody
264 * @param array $optParams Optional parameters.
265 * @return Google_Task
266 */
267 public function patch($tasklist, $task, Google_Task $postBody, $optParams = array()) {
268 $params = array('tasklist' => $tasklist, 'task' => $task, 'postBody' => $postBody);
269 $params = array_merge($params, $optParams);
270 $data = $this->__call('patch', array($params));
271 if ($this->useObjects()) {
272 return new Google_Task($data);
273 } else {
274 return $data;
275 }
276 }
277 /**
278 * Updates the specified task. (tasks.update)
279 *
280 * @param string $tasklist Task list identifier.
281 * @param string $task Task identifier.
282 * @param Google_Task $postBody
283 * @param array $optParams Optional parameters.
284 * @return Google_Task
285 */
286 public function update($tasklist, $task, Google_Task $postBody, $optParams = array()) {
287 $params = array('tasklist' => $tasklist, 'task' => $task, 'postBody' => $postBody);
288 $params = array_merge($params, $optParams);
289 $data = $this->__call('update', array($params));
290 if ($this->useObjects()) {
291 return new Google_Task($data);
292 } else {
293 return $data;
294 }
295 }
296 }
297
298 /**
299 * Service definition for Google_Tasks (v1).
300 *
301 * <p>
302 * Lets you manage your tasks and task lists.
303 * </p>
304 *
305 * <p>
306 * For more information about this service, see the
307 * <a href="https://developers.google.com/google-apps/tasks/firstapp" target="_blank">API Documentation</a>
308 * </p>
309 *
310 * @author Google, Inc.
311 */
312 class Google_TasksService extends Google_Service {
313 public $tasklists;
314 public $tasks;
315 /**
316 * Constructs the internal representation of the Tasks service.
317 *
318 * @param Google_Client $client
319 */
320 public function __construct(Google_Client $client) {
321 $this->servicePath = 'tasks/v1/';
322 $this->version = 'v1';
323 $this->serviceName = 'tasks';
324
325 $client->addService($this->serviceName, $this->version);
326 $this->tasklists = new Google_TasklistsServiceResource($this, $this->serviceName, 'tasklists', json_decode('{"methods": {"delete": {"id": "tasks.tasklists.delete", "path": "users/@me/lists/{tasklist}", "httpMethod": "DELETE", "parameters": {"tasklist": {"type": "string", "required": true, "location": "path"}}, "scopes": ["https://www.googleapis.com/auth/tasks"]}, "get": {"id": "tasks.tasklists.get", "path": "users/@me/lists/{tasklist}", "httpMethod": "GET", "parameters": {"tasklist": {"type": "string", "required": true, "location": "path"}}, "response": {"$ref": "TaskList"}, "scopes": ["https://www.googleapis.com/auth/tasks", "https://www.googleapis.com/auth/tasks.readonly"]}, "insert": {"id": "tasks.tasklists.insert", "path": "users/@me/lists", "httpMethod": "POST", "request": {"$ref": "TaskList"}, "response": {"$ref": "TaskList"}, "scopes": ["https://www.googleapis.com/auth/tasks"]}, "list": {"id": "tasks.tasklists.list", "path": "users/@me/lists", "httpMethod": "GET", "parameters": {"maxResults": {"type": "string", "format": "int64", "location": "query"}, "pageToken": {"type": "string", "location": "query"}}, "response": {"$ref": "TaskLists"}, "scopes": ["https://www.googleapis.com/auth/tasks", "https://www.googleapis.com/auth/tasks.readonly"]}, "patch": {"id": "tasks.tasklists.patch", "path": "users/@me/lists/{tasklist}", "httpMethod": "PATCH", "parameters": {"tasklist": {"type": "string", "required": true, "location": "path"}}, "request": {"$ref": "TaskList"}, "response": {"$ref": "TaskList"}, "scopes": ["https://www.googleapis.com/auth/tasks"]}, "update": {"id": "tasks.tasklists.update", "path": "users/@me/lists/{tasklist}", "httpMethod": "PUT", "parameters": {"tasklist": {"type": "string", "required": true, "location": "path"}}, "request": {"$ref": "TaskList"}, "response": {"$ref": "TaskList"}, "scopes": ["https://www.googleapis.com/auth/tasks"]}}}', true));
327 $this->tasks = new Google_TasksServiceResource($this, $this->serviceName, 'tasks', json_decode('{"methods": {"clear": {"id": "tasks.tasks.clear", "path": "lists/{tasklist}/clear", "httpMethod": "POST", "parameters": {"tasklist": {"type": "string", "required": true, "location": "path"}}, "scopes": ["https://www.googleapis.com/auth/tasks"]}, "delete": {"id": "tasks.tasks.delete", "path": "lists/{tasklist}/tasks/{task}", "httpMethod": "DELETE", "parameters": {"task": {"type": "string", "required": true, "location": "path"}, "tasklist": {"type": "string", "required": true, "location": "path"}}, "scopes": ["https://www.googleapis.com/auth/tasks"]}, "get": {"id": "tasks.tasks.get", "path": "lists/{tasklist}/tasks/{task}", "httpMethod": "GET", "parameters": {"task": {"type": "string", "required": true, "location": "path"}, "tasklist": {"type": "string", "required": true, "location": "path"}}, "response": {"$ref": "Task"}, "scopes": ["https://www.googleapis.com/auth/tasks", "https://www.googleapis.com/auth/tasks.readonly"]}, "insert": {"id": "tasks.tasks.insert", "path": "lists/{tasklist}/tasks", "httpMethod": "POST", "parameters": {"parent": {"type": "string", "location": "query"}, "previous": {"type": "string", "location": "query"}, "tasklist": {"type": "string", "required": true, "location": "path"}}, "request": {"$ref": "Task"}, "response": {"$ref": "Task"}, "scopes": ["https://www.googleapis.com/auth/tasks"]}, "list": {"id": "tasks.tasks.list", "path": "lists/{tasklist}/tasks", "httpMethod": "GET", "parameters": {"completedMax": {"type": "string", "location": "query"}, "completedMin": {"type": "string", "location": "query"}, "dueMax": {"type": "string", "location": "query"}, "dueMin": {"type": "string", "location": "query"}, "maxResults": {"type": "string", "format": "int64", "location": "query"}, "pageToken": {"type": "string", "location": "query"}, "showCompleted": {"type": "boolean", "location": "query"}, "showDeleted": {"type": "boolean", "location": "query"}, "showHidden": {"type": "boolean", "location": "query"}, "tasklist": {"type": "string", "required": true, "location": "path"}, "updatedMin": {"type": "string", "location": "query"}}, "response": {"$ref": "Tasks"}, "scopes": ["https://www.googleapis.com/auth/tasks", "https://www.googleapis.com/auth/tasks.readonly"]}, "move": {"id": "tasks.tasks.move", "path": "lists/{tasklist}/tasks/{task}/move", "httpMethod": "POST", "parameters": {"parent": {"type": "string", "location": "query"}, "previous": {"type": "string", "location": "query"}, "task": {"type": "string", "required": true, "location": "path"}, "tasklist": {"type": "string", "required": true, "location": "path"}}, "response": {"$ref": "Task"}, "scopes": ["https://www.googleapis.com/auth/tasks"]}, "patch": {"id": "tasks.tasks.patch", "path": "lists/{tasklist}/tasks/{task}", "httpMethod": "PATCH", "parameters": {"task": {"type": "string", "required": true, "location": "path"}, "tasklist": {"type": "string", "required": true, "location": "path"}}, "request": {"$ref": "Task"}, "response": {"$ref": "Task"}, "scopes": ["https://www.googleapis.com/auth/tasks"]}, "update": {"id": "tasks.tasks.update", "path": "lists/{tasklist}/tasks/{task}", "httpMethod": "PUT", "parameters": {"task": {"type": "string", "required": true, "location": "path"}, "tasklist": {"type": "string", "required": true, "location": "path"}}, "request": {"$ref": "Task"}, "response": {"$ref": "Task"}, "scopes": ["https://www.googleapis.com/auth/tasks"]}}}', true));
328
329 }
330 }
331
332
333
334 class Google_Task extends Google_Model {
335 public $completed;
336 public $deleted;
337 public $due;
338 public $etag;
339 public $hidden;
340 public $id;
341 public $kind;
342 protected $__linksType = 'Google_TaskLinks';
343 protected $__linksDataType = 'array';
344 public $links;
345 public $notes;
346 public $parent;
347 public $position;
348 public $selfLink;
349 public $status;
350 public $title;
351 public $updated;
352 public function setCompleted( $completed) {
353 $this->completed = $completed;
354 }
355 public function getCompleted() {
356 return $this->completed;
357 }
358 public function setDeleted( $deleted) {
359 $this->deleted = $deleted;
360 }
361 public function getDeleted() {
362 return $this->deleted;
363 }
364 public function setDue( $due) {
365 $this->due = $due;
366 }
367 public function getDue() {
368 return $this->due;
369 }
370 public function setEtag( $etag) {
371 $this->etag = $etag;
372 }
373 public function getEtag() {
374 return $this->etag;
375 }
376 public function setHidden( $hidden) {
377 $this->hidden = $hidden;
378 }
379 public function getHidden() {
380 return $this->hidden;
381 }
382 public function setId( $id) {
383 $this->id = $id;
384 }
385 public function getId() {
386 return $this->id;
387 }
388 public function setKind( $kind) {
389 $this->kind = $kind;
390 }
391 public function getKind() {
392 return $this->kind;
393 }
394 public function setLinks(/* array(Google_TaskLinks) */ $links) {
395 $this->assertIsArray($links, 'Google_TaskLinks', __METHOD__);
396 $this->links = $links;
397 }
398 public function getLinks() {
399 return $this->links;
400 }
401 public function setNotes( $notes) {
402 $this->notes = $notes;
403 }
404 public function getNotes() {
405 return $this->notes;
406 }
407 public function setParent( $parent) {
408 $this->parent = $parent;
409 }
410 public function getParent() {
411 return $this->parent;
412 }
413 public function setPosition( $position) {
414 $this->position = $position;
415 }
416 public function getPosition() {
417 return $this->position;
418 }
419 public function setSelfLink( $selfLink) {
420 $this->selfLink = $selfLink;
421 }
422 public function getSelfLink() {
423 return $this->selfLink;
424 }
425 public function setStatus( $status) {
426 $this->status = $status;
427 }
428 public function getStatus() {
429 return $this->status;
430 }
431 public function setTitle( $title) {
432 $this->title = $title;
433 }
434 public function getTitle() {
435 return $this->title;
436 }
437 public function setUpdated( $updated) {
438 $this->updated = $updated;
439 }
440 public function getUpdated() {
441 return $this->updated;
442 }
443 }
444
445 class Google_TaskLinks extends Google_Model {
446 public $description;
447 public $link;
448 public $type;
449 public function setDescription( $description) {
450 $this->description = $description;
451 }
452 public function getDescription() {
453 return $this->description;
454 }
455 public function setLink( $link) {
456 $this->link = $link;
457 }
458 public function getLink() {
459 return $this->link;
460 }
461 public function setType( $type) {
462 $this->type = $type;
463 }
464 public function getType() {
465 return $this->type;
466 }
467 }
468
469 class Google_TaskList extends Google_Model {
470 public $etag;
471 public $id;
472 public $kind;
473 public $selfLink;
474 public $title;
475 public $updated;
476 public function setEtag( $etag) {
477 $this->etag = $etag;
478 }
479 public function getEtag() {
480 return $this->etag;
481 }
482 public function setId( $id) {
483 $this->id = $id;
484 }
485 public function getId() {
486 return $this->id;
487 }
488 public function setKind( $kind) {
489 $this->kind = $kind;
490 }
491 public function getKind() {
492 return $this->kind;
493 }
494 public function setSelfLink( $selfLink) {
495 $this->selfLink = $selfLink;
496 }
497 public function getSelfLink() {
498 return $this->selfLink;
499 }
500 public function setTitle( $title) {
501 $this->title = $title;
502 }
503 public function getTitle() {
504 return $this->title;
505 }
506 public function setUpdated( $updated) {
507 $this->updated = $updated;
508 }
509 public function getUpdated() {
510 return $this->updated;
511 }
512 }
513
514 class Google_TaskLists extends Google_Model {
515 public $etag;
516 protected $__itemsType = 'Google_TaskList';
517 protected $__itemsDataType = 'array';
518 public $items;
519 public $kind;
520 public $nextPageToken;
521 public function setEtag( $etag) {
522 $this->etag = $etag;
523 }
524 public function getEtag() {
525 return $this->etag;
526 }
527 public function setItems(/* array(Google_TaskList) */ $items) {
528 $this->assertIsArray($items, 'Google_TaskList', __METHOD__);
529 $this->items = $items;
530 }
531 public function getItems() {
532 return $this->items;
533 }
534 public function setKind( $kind) {
535 $this->kind = $kind;
536 }
537 public function getKind() {
538 return $this->kind;
539 }
540 public function setNextPageToken( $nextPageToken) {
541 $this->nextPageToken = $nextPageToken;
542 }
543 public function getNextPageToken() {
544 return $this->nextPageToken;
545 }
546 }
547
548 class Google_Tasks extends Google_Model {
549 public $etag;
550 protected $__itemsType = 'Google_Task';
551 protected $__itemsDataType = 'array';
552 public $items;
553 public $kind;
554 public $nextPageToken;
555 public function setEtag( $etag) {
556 $this->etag = $etag;
557 }
558 public function getEtag() {
559 return $this->etag;
560 }
561 public function setItems(/* array(Google_Task) */ $items) {
562 $this->assertIsArray($items, 'Google_Task', __METHOD__);
563 $this->items = $items;
564 }
565 public function getItems() {
566 return $this->items;
567 }
568 public function setKind( $kind) {
569 $this->kind = $kind;
570 }
571 public function getKind() {
572 return $this->kind;
573 }
574 public function setNextPageToken( $nextPageToken) {
575 $this->nextPageToken = $nextPageToken;
576 }
577 public function getNextPageToken() {
578 return $this->nextPageToken;
579 }
580 }
581