PluginProbe
Analytify – Google Analytics Dashboard For WordPress (GA4 analytics tracking) / 1.0.0
Analytify – Google Analytics Dashboard For WordPress (GA4 analytics tracking) v1.0.0
9.1.2 9.1.1 9.1.0 9.0.2 9.0.1 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.1.0 1.1.1 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.3.0 1.3.1 1.3.2 All 153 releases
wp-analytify / lib / Google / Service / Taskqueue.php

Taskqueue.php in Analytify – Google Analytics Dashboard For WordPress (GA4 analytics tracking) 1.0.0, at lib/Google/Service/Taskqueue.php

728 lines 19.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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 Taskqueue (v1beta2).
20 *
21 * <p>
22 * Lets you access a Google App Engine Pull Task Queue over REST.
23 * </p>
24 *
25 * <p>
26 * For more information about this service, see the API
27 * <a href="https://developers.google.com/appengine/docs/python/taskqueue/rest" target="_blank">Documentation</a>
28 * </p>
29 *
30 * @author Google, Inc.
31 */
32 class Analytify_Google_Service_Taskqueue extends Analytify_Google_Service
33 {
34 /** Manage your Tasks and Taskqueues. */
35 const TASKQUEUE = "https://www.googleapis.com/auth/taskqueue";
36 /** Consume Tasks from your Taskqueues. */
37 const TASKQUEUE_CONSUMER = "https://www.googleapis.com/auth/taskqueue.consumer";
38
39 public $taskqueues;
40 public $tasks;
41
42
43 /**
44 * Constructs the internal representation of the Taskqueue service.
45 *
46 * @param Analytify_Google_Client $client
47 */
48 public function __construct(Analytify_Google_Client $client)
49 {
50 parent::__construct($client);
51 $this->servicePath = 'taskqueue/v1beta2/projects/';
52 $this->version = 'v1beta2';
53 $this->serviceName = 'taskqueue';
54
55 $this->taskqueues = new Analytify_Google_Service_Taskqueue_Taskqueues_Resource(
56 $this,
57 $this->serviceName,
58 'taskqueues',
59 array(
60 'methods' => array(
61 'get' => array(
62 'path' => '{project}/taskqueues/{taskqueue}',
63 'httpMethod' => 'GET',
64 'parameters' => array(
65 'project' => array(
66 'location' => 'path',
67 'type' => 'string',
68 'required' => true,
69 ),
70 'taskqueue' => array(
71 'location' => 'path',
72 'type' => 'string',
73 'required' => true,
74 ),
75 'getStats' => array(
76 'location' => 'query',
77 'type' => 'boolean',
78 ),
79 ),
80 ),
81 )
82 )
83 );
84 $this->tasks = new Analytify_Google_Service_Taskqueue_Tasks_Resource(
85 $this,
86 $this->serviceName,
87 'tasks',
88 array(
89 'methods' => array(
90 'delete' => array(
91 'path' => '{project}/taskqueues/{taskqueue}/tasks/{task}',
92 'httpMethod' => 'DELETE',
93 'parameters' => array(
94 'project' => array(
95 'location' => 'path',
96 'type' => 'string',
97 'required' => true,
98 ),
99 'taskqueue' => array(
100 'location' => 'path',
101 'type' => 'string',
102 'required' => true,
103 ),
104 'task' => array(
105 'location' => 'path',
106 'type' => 'string',
107 'required' => true,
108 ),
109 ),
110 ),'get' => array(
111 'path' => '{project}/taskqueues/{taskqueue}/tasks/{task}',
112 'httpMethod' => 'GET',
113 'parameters' => array(
114 'project' => array(
115 'location' => 'path',
116 'type' => 'string',
117 'required' => true,
118 ),
119 'taskqueue' => array(
120 'location' => 'path',
121 'type' => 'string',
122 'required' => true,
123 ),
124 'task' => array(
125 'location' => 'path',
126 'type' => 'string',
127 'required' => true,
128 ),
129 ),
130 ),'insert' => array(
131 'path' => '{project}/taskqueues/{taskqueue}/tasks',
132 'httpMethod' => 'POST',
133 'parameters' => array(
134 'project' => array(
135 'location' => 'path',
136 'type' => 'string',
137 'required' => true,
138 ),
139 'taskqueue' => array(
140 'location' => 'path',
141 'type' => 'string',
142 'required' => true,
143 ),
144 ),
145 ),'lease' => array(
146 'path' => '{project}/taskqueues/{taskqueue}/tasks/lease',
147 'httpMethod' => 'POST',
148 'parameters' => array(
149 'project' => array(
150 'location' => 'path',
151 'type' => 'string',
152 'required' => true,
153 ),
154 'taskqueue' => array(
155 'location' => 'path',
156 'type' => 'string',
157 'required' => true,
158 ),
159 'numTasks' => array(
160 'location' => 'query',
161 'type' => 'integer',
162 'required' => true,
163 ),
164 'leaseSecs' => array(
165 'location' => 'query',
166 'type' => 'integer',
167 'required' => true,
168 ),
169 'groupByTag' => array(
170 'location' => 'query',
171 'type' => 'boolean',
172 ),
173 'tag' => array(
174 'location' => 'query',
175 'type' => 'string',
176 ),
177 ),
178 ),'list' => array(
179 'path' => '{project}/taskqueues/{taskqueue}/tasks',
180 'httpMethod' => 'GET',
181 'parameters' => array(
182 'project' => array(
183 'location' => 'path',
184 'type' => 'string',
185 'required' => true,
186 ),
187 'taskqueue' => array(
188 'location' => 'path',
189 'type' => 'string',
190 'required' => true,
191 ),
192 ),
193 ),'patch' => array(
194 'path' => '{project}/taskqueues/{taskqueue}/tasks/{task}',
195 'httpMethod' => 'PATCH',
196 'parameters' => array(
197 'project' => array(
198 'location' => 'path',
199 'type' => 'string',
200 'required' => true,
201 ),
202 'taskqueue' => array(
203 'location' => 'path',
204 'type' => 'string',
205 'required' => true,
206 ),
207 'task' => array(
208 'location' => 'path',
209 'type' => 'string',
210 'required' => true,
211 ),
212 'newLeaseSeconds' => array(
213 'location' => 'query',
214 'type' => 'integer',
215 'required' => true,
216 ),
217 ),
218 ),'update' => array(
219 'path' => '{project}/taskqueues/{taskqueue}/tasks/{task}',
220 'httpMethod' => 'POST',
221 'parameters' => array(
222 'project' => array(
223 'location' => 'path',
224 'type' => 'string',
225 'required' => true,
226 ),
227 'taskqueue' => array(
228 'location' => 'path',
229 'type' => 'string',
230 'required' => true,
231 ),
232 'task' => array(
233 'location' => 'path',
234 'type' => 'string',
235 'required' => true,
236 ),
237 'newLeaseSeconds' => array(
238 'location' => 'query',
239 'type' => 'integer',
240 'required' => true,
241 ),
242 ),
243 ),
244 )
245 )
246 );
247 }
248 }
249
250
251 /**
252 * The "taskqueues" collection of methods.
253 * Typical usage is:
254 * <code>
255 * $taskqueueService = new Analytify_Google_Service_Taskqueue(...);
256 * $taskqueues = $taskqueueService->taskqueues;
257 * </code>
258 */
259 class Analytify_Google_Service_Taskqueue_Taskqueues_Resource extends Analytify_Google_Service_Resource
260 {
261
262 /**
263 * Get detailed information about a TaskQueue. (taskqueues.get)
264 *
265 * @param string $project
266 * The project under which the queue lies.
267 * @param string $taskqueue
268 * The id of the taskqueue to get the properties of.
269 * @param array $optParams Optional parameters.
270 *
271 * @opt_param bool getStats
272 * Whether to get stats. Optional.
273 * @return Analytify_Google_Service_Taskqueue_TaskQueue
274 */
275 public function get($project, $taskqueue, $optParams = array())
276 {
277 $params = array('project' => $project, 'taskqueue' => $taskqueue);
278 $params = array_merge($params, $optParams);
279 return $this->call('get', array($params), "Analytify_Google_Service_Taskqueue_TaskQueue");
280 }
281 }
282
283 /**
284 * The "tasks" collection of methods.
285 * Typical usage is:
286 * <code>
287 * $taskqueueService = new Analytify_Google_Service_Taskqueue(...);
288 * $tasks = $taskqueueService->tasks;
289 * </code>
290 */
291 class Analytify_Google_Service_Taskqueue_Tasks_Resource extends Analytify_Google_Service_Resource
292 {
293
294 /**
295 * Delete a task from a TaskQueue. (tasks.delete)
296 *
297 * @param string $project
298 * The project under which the queue lies.
299 * @param string $taskqueue
300 * The taskqueue to delete a task from.
301 * @param string $task
302 * The id of the task to delete.
303 * @param array $optParams Optional parameters.
304 */
305 public function delete($project, $taskqueue, $task, $optParams = array())
306 {
307 $params = array('project' => $project, 'taskqueue' => $taskqueue, 'task' => $task);
308 $params = array_merge($params, $optParams);
309 return $this->call('delete', array($params));
310 }
311 /**
312 * Get a particular task from a TaskQueue. (tasks.get)
313 *
314 * @param string $project
315 * The project under which the queue lies.
316 * @param string $taskqueue
317 * The taskqueue in which the task belongs.
318 * @param string $task
319 * The task to get properties of.
320 * @param array $optParams Optional parameters.
321 * @return Analytify_Google_Service_Taskqueue_Task
322 */
323 public function get($project, $taskqueue, $task, $optParams = array())
324 {
325 $params = array('project' => $project, 'taskqueue' => $taskqueue, 'task' => $task);
326 $params = array_merge($params, $optParams);
327 return $this->call('get', array($params), "Analytify_Google_Service_Taskqueue_Task");
328 }
329 /**
330 * Insert a new task in a TaskQueue (tasks.insert)
331 *
332 * @param string $project
333 * The project under which the queue lies
334 * @param string $taskqueue
335 * The taskqueue to insert the task into
336 * @param Analytify_Google_Task $postBody
337 * @param array $optParams Optional parameters.
338 * @return Analytify_Google_Service_Taskqueue_Task
339 */
340 public function insert($project, $taskqueue, Analytify_Google_Service_Taskqueue_Task $postBody, $optParams = array())
341 {
342 $params = array('project' => $project, 'taskqueue' => $taskqueue, 'postBody' => $postBody);
343 $params = array_merge($params, $optParams);
344 return $this->call('insert', array($params), "Analytify_Google_Service_Taskqueue_Task");
345 }
346 /**
347 * Lease 1 or more tasks from a TaskQueue. (tasks.lease)
348 *
349 * @param string $project
350 * The project under which the queue lies.
351 * @param string $taskqueue
352 * The taskqueue to lease a task from.
353 * @param int $numTasks
354 * The number of tasks to lease.
355 * @param int $leaseSecs
356 * The lease in seconds.
357 * @param array $optParams Optional parameters.
358 *
359 * @opt_param bool groupByTag
360 * When true, all returned tasks will have the same tag
361 * @opt_param string tag
362 * The tag allowed for tasks in the response. Must only be specified if group_by_tag is true. If
363 * group_by_tag is true and tag is not specified the tag will be that of the oldest task by eta,
364 * i.e. the first available tag
365 * @return Analytify_Google_Service_Taskqueue_Tasks
366 */
367 public function lease($project, $taskqueue, $numTasks, $leaseSecs, $optParams = array())
368 {
369 $params = array('project' => $project, 'taskqueue' => $taskqueue, 'numTasks' => $numTasks, 'leaseSecs' => $leaseSecs);
370 $params = array_merge($params, $optParams);
371 return $this->call('lease', array($params), "Analytify_Google_Service_Taskqueue_Tasks");
372 }
373 /**
374 * List Tasks in a TaskQueue (tasks.listTasks)
375 *
376 * @param string $project
377 * The project under which the queue lies.
378 * @param string $taskqueue
379 * The id of the taskqueue to list tasks from.
380 * @param array $optParams Optional parameters.
381 * @return Analytify_Google_Service_Taskqueue_Tasks2
382 */
383 public function listTasks($project, $taskqueue, $optParams = array())
384 {
385 $params = array('project' => $project, 'taskqueue' => $taskqueue);
386 $params = array_merge($params, $optParams);
387 return $this->call('list', array($params), "Analytify_Google_Service_Taskqueue_Tasks2");
388 }
389 /**
390 * Update tasks that are leased out of a TaskQueue. This method supports patch
391 * semantics. (tasks.patch)
392 *
393 * @param string $project
394 * The project under which the queue lies.
395 * @param string $taskqueue
396 *
397 * @param string $task
398 *
399 * @param int $newLeaseSeconds
400 * The new lease in seconds.
401 * @param Analytify_Google_Task $postBody
402 * @param array $optParams Optional parameters.
403 * @return Analytify_Google_Service_Taskqueue_Task
404 */
405 public function patch($project, $taskqueue, $task, $newLeaseSeconds, Analytify_Google_Service_Taskqueue_Task $postBody, $optParams = array())
406 {
407 $params = array('project' => $project, 'taskqueue' => $taskqueue, 'task' => $task, 'newLeaseSeconds' => $newLeaseSeconds, 'postBody' => $postBody);
408 $params = array_merge($params, $optParams);
409 return $this->call('patch', array($params), "Analytify_Google_Service_Taskqueue_Task");
410 }
411 /**
412 * Update tasks that are leased out of a TaskQueue. (tasks.update)
413 *
414 * @param string $project
415 * The project under which the queue lies.
416 * @param string $taskqueue
417 *
418 * @param string $task
419 *
420 * @param int $newLeaseSeconds
421 * The new lease in seconds.
422 * @param Analytify_Google_Task $postBody
423 * @param array $optParams Optional parameters.
424 * @return Analytify_Google_Service_Taskqueue_Task
425 */
426 public function update($project, $taskqueue, $task, $newLeaseSeconds, Analytify_Google_Service_Taskqueue_Task $postBody, $optParams = array())
427 {
428 $params = array('project' => $project, 'taskqueue' => $taskqueue, 'task' => $task, 'newLeaseSeconds' => $newLeaseSeconds, 'postBody' => $postBody);
429 $params = array_merge($params, $optParams);
430 return $this->call('update', array($params), "Analytify_Google_Service_Taskqueue_Task");
431 }
432 }
433
434
435
436
437 class Analytify_Google_Service_Taskqueue_Task extends Analytify_Google_Model
438 {
439 public $enqueueTimestamp;
440 public $id;
441 public $kind;
442 public $leaseTimestamp;
443 public $payloadBase64;
444 public $queueName;
445 public $retryCount;
446 public $tag;
447
448 public function setEnqueueTimestamp($enqueueTimestamp)
449 {
450 $this->enqueueTimestamp = $enqueueTimestamp;
451 }
452
453 public function getEnqueueTimestamp()
454 {
455 return $this->enqueueTimestamp;
456 }
457
458 public function setId($id)
459 {
460 $this->id = $id;
461 }
462
463 public function getId()
464 {
465 return $this->id;
466 }
467
468 public function setKind($kind)
469 {
470 $this->kind = $kind;
471 }
472
473 public function getKind()
474 {
475 return $this->kind;
476 }
477
478 public function setLeaseTimestamp($leaseTimestamp)
479 {
480 $this->leaseTimestamp = $leaseTimestamp;
481 }
482
483 public function getLeaseTimestamp()
484 {
485 return $this->leaseTimestamp;
486 }
487
488 public function setPayloadBase64($payloadBase64)
489 {
490 $this->payloadBase64 = $payloadBase64;
491 }
492
493 public function getPayloadBase64()
494 {
495 return $this->payloadBase64;
496 }
497
498 public function setQueueName($queueName)
499 {
500 $this->queueName = $queueName;
501 }
502
503 public function getQueueName()
504 {
505 return $this->queueName;
506 }
507
508 public function setRetryCount($retryCount)
509 {
510 $this->retryCount = $retryCount;
511 }
512
513 public function getRetryCount()
514 {
515 return $this->retryCount;
516 }
517
518 public function setTag($tag)
519 {
520 $this->tag = $tag;
521 }
522
523 public function getTag()
524 {
525 return $this->tag;
526 }
527 }
528
529 class Analytify_Google_Service_Taskqueue_TaskQueue extends Analytify_Google_Model
530 {
531 protected $aclType = 'Analytify_Google_Service_Taskqueue_TaskQueueAcl';
532 protected $aclDataType = '';
533 public $id;
534 public $kind;
535 public $maxLeases;
536 protected $statsType = 'Analytify_Google_Service_Taskqueue_TaskQueueStats';
537 protected $statsDataType = '';
538
539 public function setAcl(Analytify_Google_Service_Taskqueue_TaskQueueAcl $acl)
540 {
541 $this->acl = $acl;
542 }
543
544 public function getAcl()
545 {
546 return $this->acl;
547 }
548
549 public function setId($id)
550 {
551 $this->id = $id;
552 }
553
554 public function getId()
555 {
556 return $this->id;
557 }
558
559 public function setKind($kind)
560 {
561 $this->kind = $kind;
562 }
563
564 public function getKind()
565 {
566 return $this->kind;
567 }
568
569 public function setMaxLeases($maxLeases)
570 {
571 $this->maxLeases = $maxLeases;
572 }
573
574 public function getMaxLeases()
575 {
576 return $this->maxLeases;
577 }
578
579 public function setStats(Analytify_Google_Service_Taskqueue_TaskQueueStats $stats)
580 {
581 $this->stats = $stats;
582 }
583
584 public function getStats()
585 {
586 return $this->stats;
587 }
588 }
589
590 class Analytify_Google_Service_Taskqueue_TaskQueueAcl extends Analytify_Google_Collection
591 {
592 public $adminEmails;
593 public $consumerEmails;
594 public $producerEmails;
595
596 public function setAdminEmails($adminEmails)
597 {
598 $this->adminEmails = $adminEmails;
599 }
600
601 public function getAdminEmails()
602 {
603 return $this->adminEmails;
604 }
605
606 public function setConsumerEmails($consumerEmails)
607 {
608 $this->consumerEmails = $consumerEmails;
609 }
610
611 public function getConsumerEmails()
612 {
613 return $this->consumerEmails;
614 }
615
616 public function setProducerEmails($producerEmails)
617 {
618 $this->producerEmails = $producerEmails;
619 }
620
621 public function getProducerEmails()
622 {
623 return $this->producerEmails;
624 }
625 }
626
627 class Analytify_Google_Service_Taskqueue_TaskQueueStats extends Analytify_Google_Model
628 {
629 public $leasedLastHour;
630 public $leasedLastMinute;
631 public $oldestTask;
632 public $totalTasks;
633
634 public function setLeasedLastHour($leasedLastHour)
635 {
636 $this->leasedLastHour = $leasedLastHour;
637 }
638
639 public function getLeasedLastHour()
640 {
641 return $this->leasedLastHour;
642 }
643
644 public function setLeasedLastMinute($leasedLastMinute)
645 {
646 $this->leasedLastMinute = $leasedLastMinute;
647 }
648
649 public function getLeasedLastMinute()
650 {
651 return $this->leasedLastMinute;
652 }
653
654 public function setOldestTask($oldestTask)
655 {
656 $this->oldestTask = $oldestTask;
657 }
658
659 public function getOldestTask()
660 {
661 return $this->oldestTask;
662 }
663
664 public function setTotalTasks($totalTasks)
665 {
666 $this->totalTasks = $totalTasks;
667 }
668
669 public function getTotalTasks()
670 {
671 return $this->totalTasks;
672 }
673 }
674
675 class Analytify_Google_Service_Taskqueue_Tasks extends Analytify_Google_Collection
676 {
677 protected $itemsType = 'Analytify_Google_Service_Taskqueue_Task';
678 protected $itemsDataType = 'array';
679 public $kind;
680
681 public function setItems($items)
682 {
683 $this->items = $items;
684 }
685
686 public function getItems()
687 {
688 return $this->items;
689 }
690
691 public function setKind($kind)
692 {
693 $this->kind = $kind;
694 }
695
696 public function getKind()
697 {
698 return $this->kind;
699 }
700 }
701
702 class Analytify_Google_Service_Taskqueue_Tasks2 extends Analytify_Google_Collection
703 {
704 protected $itemsType = 'Analytify_Google_Service_Taskqueue_Task';
705 protected $itemsDataType = 'array';
706 public $kind;
707
708 public function setItems($items)
709 {
710 $this->items = $items;
711 }
712
713 public function getItems()
714 {
715 return $this->items;
716 }
717
718 public function setKind($kind)
719 {
720 $this->kind = $kind;
721 }
722
723 public function getKind()
724 {
725 return $this->kind;
726 }
727 }
728