PluginProbe
Analytify – Google Analytics Dashboard For WordPress (GA4 analytics tracking) / 1.0.3
Analytify – Google Analytics Dashboard For WordPress (GA4 analytics tracking) v1.0.3
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 / Pubsub.php

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

828 lines 23.0 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 Pubsub (v1beta1).
20 *
21 * <p>
22 * Provides reliable, many-to-many, asynchronous messaging between applications.
23 * </p>
24 *
25 * <p>
26 * For more information about this service, see the API
27 * <a href="https://developers.google.com/pubsub/v1beta1" target="_blank">Documentation</a>
28 * </p>
29 *
30 * @author Google, Inc.
31 */
32 class Analytify_Google_Service_Pubsub extends Analytify_Google_Service
33 {
34 /** View and manage your data across Google Cloud Platform services. */
35 const CLOUD_PLATFORM = "https://www.googleapis.com/auth/cloud-platform";
36 /** View and manage Pub/Sub topics and subscriptions. */
37 const PUBSUB = "https://www.googleapis.com/auth/pubsub";
38
39 public $subscriptions;
40 public $topics;
41
42
43 /**
44 * Constructs the internal representation of the Pubsub 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 = 'pubsub/v1beta1/';
52 $this->version = 'v1beta1';
53 $this->serviceName = 'pubsub';
54
55 $this->subscriptions = new Analytify_Google_Service_Pubsub_Subscriptions_Resource(
56 $this,
57 $this->serviceName,
58 'subscriptions',
59 array(
60 'methods' => array(
61 'acknowledge' => array(
62 'path' => 'subscriptions/acknowledge',
63 'httpMethod' => 'POST',
64 'parameters' => array(),
65 ),'create' => array(
66 'path' => 'subscriptions',
67 'httpMethod' => 'POST',
68 'parameters' => array(),
69 ),'delete' => array(
70 'path' => 'subscriptions/{+subscription}',
71 'httpMethod' => 'DELETE',
72 'parameters' => array(
73 'subscription' => array(
74 'location' => 'path',
75 'type' => 'string',
76 'required' => true,
77 ),
78 ),
79 ),'get' => array(
80 'path' => 'subscriptions/{+subscription}',
81 'httpMethod' => 'GET',
82 'parameters' => array(
83 'subscription' => array(
84 'location' => 'path',
85 'type' => 'string',
86 'required' => true,
87 ),
88 ),
89 ),'list' => array(
90 'path' => 'subscriptions',
91 'httpMethod' => 'GET',
92 'parameters' => array(
93 'pageToken' => array(
94 'location' => 'query',
95 'type' => 'string',
96 ),
97 'maxResults' => array(
98 'location' => 'query',
99 'type' => 'integer',
100 ),
101 'query' => array(
102 'location' => 'query',
103 'type' => 'string',
104 ),
105 ),
106 ),'modifyAckDeadline' => array(
107 'path' => 'subscriptions/modifyAckDeadline',
108 'httpMethod' => 'POST',
109 'parameters' => array(),
110 ),'modifyPushConfig' => array(
111 'path' => 'subscriptions/modifyPushConfig',
112 'httpMethod' => 'POST',
113 'parameters' => array(),
114 ),'pull' => array(
115 'path' => 'subscriptions/pull',
116 'httpMethod' => 'POST',
117 'parameters' => array(),
118 ),
119 )
120 )
121 );
122 $this->topics = new Analytify_Google_Service_Pubsub_Topics_Resource(
123 $this,
124 $this->serviceName,
125 'topics',
126 array(
127 'methods' => array(
128 'create' => array(
129 'path' => 'topics',
130 'httpMethod' => 'POST',
131 'parameters' => array(),
132 ),'delete' => array(
133 'path' => 'topics/{+topic}',
134 'httpMethod' => 'DELETE',
135 'parameters' => array(
136 'topic' => array(
137 'location' => 'path',
138 'type' => 'string',
139 'required' => true,
140 ),
141 ),
142 ),'get' => array(
143 'path' => 'topics/{+topic}',
144 'httpMethod' => 'GET',
145 'parameters' => array(
146 'topic' => array(
147 'location' => 'path',
148 'type' => 'string',
149 'required' => true,
150 ),
151 ),
152 ),'list' => array(
153 'path' => 'topics',
154 'httpMethod' => 'GET',
155 'parameters' => array(
156 'pageToken' => array(
157 'location' => 'query',
158 'type' => 'string',
159 ),
160 'maxResults' => array(
161 'location' => 'query',
162 'type' => 'integer',
163 ),
164 'query' => array(
165 'location' => 'query',
166 'type' => 'string',
167 ),
168 ),
169 ),'publish' => array(
170 'path' => 'topics/publish',
171 'httpMethod' => 'POST',
172 'parameters' => array(),
173 ),
174 )
175 )
176 );
177 }
178 }
179
180
181 /**
182 * The "subscriptions" collection of methods.
183 * Typical usage is:
184 * <code>
185 * $pubsubService = new Analytify_Google_Service_Pubsub(...);
186 * $subscriptions = $pubsubService->subscriptions;
187 * </code>
188 */
189 class Analytify_Google_Service_Pubsub_Subscriptions_Resource extends Analytify_Google_Service_Resource
190 {
191
192 /**
193 * Acknowledges a particular received message: the Pub/Sub system can remove the
194 * given message from the subscription. Acknowledging a message whose Ack
195 * deadline has expired may succeed, but the message could have been already
196 * redelivered. Acknowledging a message more than once will not result in an
197 * error. This is only used for messages received via pull.
198 * (subscriptions.acknowledge)
199 *
200 * @param Analytify_Google_AcknowledgeRequest $postBody
201 * @param array $optParams Optional parameters.
202 */
203 public function acknowledge(Analytify_Google_Service_Pubsub_AcknowledgeRequest $postBody, $optParams = array())
204 {
205 $params = array('postBody' => $postBody);
206 $params = array_merge($params, $optParams);
207 return $this->call('acknowledge', array($params));
208 }
209 /**
210 * Creates a subscription on a given topic for a given subscriber. If the
211 * subscription already exists, returns ALREADY_EXISTS. If the corresponding
212 * topic doesn't exist, returns NOT_FOUND. (subscriptions.create)
213 *
214 * @param Analytify_Google_Subscription $postBody
215 * @param array $optParams Optional parameters.
216 * @return Analytify_Google_Service_Pubsub_Subscription
217 */
218 public function create(Analytify_Google_Service_Pubsub_Subscription $postBody, $optParams = array())
219 {
220 $params = array('postBody' => $postBody);
221 $params = array_merge($params, $optParams);
222 return $this->call('create', array($params), "Analytify_Google_Service_Pubsub_Subscription");
223 }
224 /**
225 * Deletes an existing subscription. All pending messages in the subscription
226 * are immediately dropped. Calls to Pull after deletion will return NOT_FOUND.
227 * (subscriptions.delete)
228 *
229 * @param string $subscription
230 * The subscription to delete.
231 * @param array $optParams Optional parameters.
232 */
233 public function delete($subscription, $optParams = array())
234 {
235 $params = array('subscription' => $subscription);
236 $params = array_merge($params, $optParams);
237 return $this->call('delete', array($params));
238 }
239 /**
240 * Gets the configuration details of a subscription. (subscriptions.get)
241 *
242 * @param string $subscription
243 * The name of the subscription to get.
244 * @param array $optParams Optional parameters.
245 * @return Analytify_Google_Service_Pubsub_Subscription
246 */
247 public function get($subscription, $optParams = array())
248 {
249 $params = array('subscription' => $subscription);
250 $params = array_merge($params, $optParams);
251 return $this->call('get', array($params), "Analytify_Google_Service_Pubsub_Subscription");
252 }
253 /**
254 * Lists matching subscriptions. (subscriptions.listSubscriptions)
255 *
256 * @param array $optParams Optional parameters.
257 *
258 * @opt_param string pageToken
259 * The value obtained in the last ListSubscriptionsResponse for continuation.
260 * @opt_param int maxResults
261 * Maximum number of subscriptions to return.
262 * @opt_param string query
263 * A valid label query expression.
264 * @return Analytify_Google_Service_Pubsub_ListSubscriptionsResponse
265 */
266 public function listSubscriptions($optParams = array())
267 {
268 $params = array();
269 $params = array_merge($params, $optParams);
270 return $this->call('list', array($params), "Analytify_Google_Service_Pubsub_ListSubscriptionsResponse");
271 }
272 /**
273 * Modifies the Ack deadline for a message received from a pull request.
274 * (subscriptions.modifyAckDeadline)
275 *
276 * @param Analytify_Google_ModifyAckDeadlineRequest $postBody
277 * @param array $optParams Optional parameters.
278 */
279 public function modifyAckDeadline(Analytify_Google_Service_Pubsub_ModifyAckDeadlineRequest $postBody, $optParams = array())
280 {
281 $params = array('postBody' => $postBody);
282 $params = array_merge($params, $optParams);
283 return $this->call('modifyAckDeadline', array($params));
284 }
285 /**
286 * Modifies the PushConfig for a specified subscription. This method can be used
287 * to suspend the flow of messages to an end point by clearing the PushConfig
288 * field in the request. Messages will be accumulated for delivery even if no
289 * push configuration is defined or while the configuration is modified.
290 * (subscriptions.modifyPushConfig)
291 *
292 * @param Analytify_Google_ModifyPushConfigRequest $postBody
293 * @param array $optParams Optional parameters.
294 */
295 public function modifyPushConfig(Analytify_Google_Service_Pubsub_ModifyPushConfigRequest $postBody, $optParams = array())
296 {
297 $params = array('postBody' => $postBody);
298 $params = array_merge($params, $optParams);
299 return $this->call('modifyPushConfig', array($params));
300 }
301 /**
302 * Pulls a single message from the server. If return_immediately is true, and no
303 * messages are available in the subscription, this method returns
304 * FAILED_PRECONDITION. The system is free to return an UNAVAILABLE error if no
305 * messages are available in a reasonable amount of time (to reduce system
306 * load). (subscriptions.pull)
307 *
308 * @param Analytify_Google_PullRequest $postBody
309 * @param array $optParams Optional parameters.
310 * @return Analytify_Google_Service_Pubsub_PullResponse
311 */
312 public function pull(Analytify_Google_Service_Pubsub_PullRequest $postBody, $optParams = array())
313 {
314 $params = array('postBody' => $postBody);
315 $params = array_merge($params, $optParams);
316 return $this->call('pull', array($params), "Analytify_Google_Service_Pubsub_PullResponse");
317 }
318 }
319
320 /**
321 * The "topics" collection of methods.
322 * Typical usage is:
323 * <code>
324 * $pubsubService = new Analytify_Google_Service_Pubsub(...);
325 * $topics = $pubsubService->topics;
326 * </code>
327 */
328 class Analytify_Google_Service_Pubsub_Topics_Resource extends Analytify_Google_Service_Resource
329 {
330
331 /**
332 * Creates the given topic with the given name. (topics.create)
333 *
334 * @param Analytify_Google_Topic $postBody
335 * @param array $optParams Optional parameters.
336 * @return Analytify_Google_Service_Pubsub_Topic
337 */
338 public function create(Analytify_Google_Service_Pubsub_Topic $postBody, $optParams = array())
339 {
340 $params = array('postBody' => $postBody);
341 $params = array_merge($params, $optParams);
342 return $this->call('create', array($params), "Analytify_Google_Service_Pubsub_Topic");
343 }
344 /**
345 * Deletes the topic with the given name. All subscriptions to this topic are
346 * also deleted. Returns NOT_FOUND if the topic does not exist. After a topic is
347 * deleted, a new topic may be created with the same name. (topics.delete)
348 *
349 * @param string $topic
350 * Name of the topic to delete.
351 * @param array $optParams Optional parameters.
352 */
353 public function delete($topic, $optParams = array())
354 {
355 $params = array('topic' => $topic);
356 $params = array_merge($params, $optParams);
357 return $this->call('delete', array($params));
358 }
359 /**
360 * Gets the configuration of a topic. Since the topic only has the name
361 * attribute, this method is only useful to check the existence of a topic. If
362 * other attributes are added in the future, they will be returned here.
363 * (topics.get)
364 *
365 * @param string $topic
366 * The name of the topic to get.
367 * @param array $optParams Optional parameters.
368 * @return Analytify_Google_Service_Pubsub_Topic
369 */
370 public function get($topic, $optParams = array())
371 {
372 $params = array('topic' => $topic);
373 $params = array_merge($params, $optParams);
374 return $this->call('get', array($params), "Analytify_Google_Service_Pubsub_Topic");
375 }
376 /**
377 * Lists matching topics. (topics.listTopics)
378 *
379 * @param array $optParams Optional parameters.
380 *
381 * @opt_param string pageToken
382 * The value obtained in the last ListTopicsResponse for continuation.
383 * @opt_param int maxResults
384 * Maximum number of topics to return.
385 * @opt_param string query
386 * A valid label query expression.
387 * @return Analytify_Google_Service_Pubsub_ListTopicsResponse
388 */
389 public function listTopics($optParams = array())
390 {
391 $params = array();
392 $params = array_merge($params, $optParams);
393 return $this->call('list', array($params), "Analytify_Google_Service_Pubsub_ListTopicsResponse");
394 }
395 /**
396 * Adds a message to the topic. Returns NOT_FOUND if the topic does not exist.
397 * (topics.publish)
398 *
399 * @param Analytify_Google_PublishRequest $postBody
400 * @param array $optParams Optional parameters.
401 */
402 public function publish(Analytify_Google_Service_Pubsub_PublishRequest $postBody, $optParams = array())
403 {
404 $params = array('postBody' => $postBody);
405 $params = array_merge($params, $optParams);
406 return $this->call('publish', array($params));
407 }
408 }
409
410
411
412
413 class Analytify_Google_Service_Pubsub_AcknowledgeRequest extends Analytify_Google_Collection
414 {
415 public $ackId;
416 public $subscription;
417
418 public function setAckId($ackId)
419 {
420 $this->ackId = $ackId;
421 }
422
423 public function getAckId()
424 {
425 return $this->ackId;
426 }
427
428 public function setSubscription($subscription)
429 {
430 $this->subscription = $subscription;
431 }
432
433 public function getSubscription()
434 {
435 return $this->subscription;
436 }
437 }
438
439 class Analytify_Google_Service_Pubsub_Label extends Analytify_Google_Model
440 {
441 public $key;
442 public $numValue;
443 public $strValue;
444
445 public function setKey($key)
446 {
447 $this->key = $key;
448 }
449
450 public function getKey()
451 {
452 return $this->key;
453 }
454
455 public function setNumValue($numValue)
456 {
457 $this->numValue = $numValue;
458 }
459
460 public function getNumValue()
461 {
462 return $this->numValue;
463 }
464
465 public function setStrValue($strValue)
466 {
467 $this->strValue = $strValue;
468 }
469
470 public function getStrValue()
471 {
472 return $this->strValue;
473 }
474 }
475
476 class Analytify_Google_Service_Pubsub_ListSubscriptionsResponse extends Analytify_Google_Collection
477 {
478 public $nextPageToken;
479 protected $subscriptionType = 'Analytify_Google_Service_Pubsub_Subscription';
480 protected $subscriptionDataType = 'array';
481
482 public function setNextPageToken($nextPageToken)
483 {
484 $this->nextPageToken = $nextPageToken;
485 }
486
487 public function getNextPageToken()
488 {
489 return $this->nextPageToken;
490 }
491
492 public function setSubscription($subscription)
493 {
494 $this->subscription = $subscription;
495 }
496
497 public function getSubscription()
498 {
499 return $this->subscription;
500 }
501 }
502
503 class Analytify_Google_Service_Pubsub_ListTopicsResponse extends Analytify_Google_Collection
504 {
505 public $nextPageToken;
506 protected $topicType = 'Analytify_Google_Service_Pubsub_Topic';
507 protected $topicDataType = 'array';
508
509 public function setNextPageToken($nextPageToken)
510 {
511 $this->nextPageToken = $nextPageToken;
512 }
513
514 public function getNextPageToken()
515 {
516 return $this->nextPageToken;
517 }
518
519 public function setTopic($topic)
520 {
521 $this->topic = $topic;
522 }
523
524 public function getTopic()
525 {
526 return $this->topic;
527 }
528 }
529
530 class Analytify_Google_Service_Pubsub_ModifyAckDeadlineRequest extends Analytify_Google_Model
531 {
532 public $ackDeadlineSeconds;
533 public $ackId;
534 public $subscription;
535
536 public function setAckDeadlineSeconds($ackDeadlineSeconds)
537 {
538 $this->ackDeadlineSeconds = $ackDeadlineSeconds;
539 }
540
541 public function getAckDeadlineSeconds()
542 {
543 return $this->ackDeadlineSeconds;
544 }
545
546 public function setAckId($ackId)
547 {
548 $this->ackId = $ackId;
549 }
550
551 public function getAckId()
552 {
553 return $this->ackId;
554 }
555
556 public function setSubscription($subscription)
557 {
558 $this->subscription = $subscription;
559 }
560
561 public function getSubscription()
562 {
563 return $this->subscription;
564 }
565 }
566
567 class Analytify_Google_Service_Pubsub_ModifyPushConfigRequest extends Analytify_Google_Model
568 {
569 protected $pushConfigType = 'Analytify_Google_Service_Pubsub_PushConfig';
570 protected $pushConfigDataType = '';
571 public $subscription;
572
573 public function setPushConfig(Analytify_Google_Service_Pubsub_PushConfig $pushConfig)
574 {
575 $this->pushConfig = $pushConfig;
576 }
577
578 public function getPushConfig()
579 {
580 return $this->pushConfig;
581 }
582
583 public function setSubscription($subscription)
584 {
585 $this->subscription = $subscription;
586 }
587
588 public function getSubscription()
589 {
590 return $this->subscription;
591 }
592 }
593
594 class Analytify_Google_Service_Pubsub_PublishRequest extends Analytify_Google_Model
595 {
596 protected $messageType = 'Analytify_Google_Service_Pubsub_PubsubMessage';
597 protected $messageDataType = '';
598 public $topic;
599
600 public function setMessage(Analytify_Google_Service_Pubsub_PubsubMessage $message)
601 {
602 $this->message = $message;
603 }
604
605 public function getMessage()
606 {
607 return $this->message;
608 }
609
610 public function setTopic($topic)
611 {
612 $this->topic = $topic;
613 }
614
615 public function getTopic()
616 {
617 return $this->topic;
618 }
619 }
620
621 class Analytify_Google_Service_Pubsub_PubsubEvent extends Analytify_Google_Model
622 {
623 public $deleted;
624 protected $messageType = 'Analytify_Google_Service_Pubsub_PubsubMessage';
625 protected $messageDataType = '';
626 public $subscription;
627 public $truncated;
628
629 public function setDeleted($deleted)
630 {
631 $this->deleted = $deleted;
632 }
633
634 public function getDeleted()
635 {
636 return $this->deleted;
637 }
638
639 public function setMessage(Analytify_Google_Service_Pubsub_PubsubMessage $message)
640 {
641 $this->message = $message;
642 }
643
644 public function getMessage()
645 {
646 return $this->message;
647 }
648
649 public function setSubscription($subscription)
650 {
651 $this->subscription = $subscription;
652 }
653
654 public function getSubscription()
655 {
656 return $this->subscription;
657 }
658
659 public function setTruncated($truncated)
660 {
661 $this->truncated = $truncated;
662 }
663
664 public function getTruncated()
665 {
666 return $this->truncated;
667 }
668 }
669
670 class Analytify_Google_Service_Pubsub_PubsubMessage extends Analytify_Google_Collection
671 {
672 public $data;
673 protected $labelType = 'Analytify_Google_Service_Pubsub_Label';
674 protected $labelDataType = 'array';
675
676 public function setData($data)
677 {
678 $this->data = $data;
679 }
680
681 public function getData()
682 {
683 return $this->data;
684 }
685
686 public function setLabel($label)
687 {
688 $this->label = $label;
689 }
690
691 public function getLabel()
692 {
693 return $this->label;
694 }
695 }
696
697 class Analytify_Google_Service_Pubsub_PullRequest extends Analytify_Google_Model
698 {
699 public $returnImmediately;
700 public $subscription;
701
702 public function setReturnImmediately($returnImmediately)
703 {
704 $this->returnImmediately = $returnImmediately;
705 }
706
707 public function getReturnImmediately()
708 {
709 return $this->returnImmediately;
710 }
711
712 public function setSubscription($subscription)
713 {
714 $this->subscription = $subscription;
715 }
716
717 public function getSubscription()
718 {
719 return $this->subscription;
720 }
721 }
722
723 class Analytify_Google_Service_Pubsub_PullResponse extends Analytify_Google_Model
724 {
725 public $ackId;
726 protected $pubsubEventType = 'Analytify_Google_Service_Pubsub_PubsubEvent';
727 protected $pubsubEventDataType = '';
728
729 public function setAckId($ackId)
730 {
731 $this->ackId = $ackId;
732 }
733
734 public function getAckId()
735 {
736 return $this->ackId;
737 }
738
739 public function setPubsubEvent(Analytify_Google_Service_Pubsub_PubsubEvent $pubsubEvent)
740 {
741 $this->pubsubEvent = $pubsubEvent;
742 }
743
744 public function getPubsubEvent()
745 {
746 return $this->pubsubEvent;
747 }
748 }
749
750 class Analytify_Google_Service_Pubsub_PushConfig extends Analytify_Google_Model
751 {
752 public $pushEndpoint;
753
754 public function setPushEndpoint($pushEndpoint)
755 {
756 $this->pushEndpoint = $pushEndpoint;
757 }
758
759 public function getPushEndpoint()
760 {
761 return $this->pushEndpoint;
762 }
763 }
764
765 class Analytify_Google_Service_Pubsub_Subscription extends Analytify_Google_Model
766 {
767 public $ackDeadlineSeconds;
768 public $name;
769 protected $pushConfigType = 'Analytify_Google_Service_Pubsub_PushConfig';
770 protected $pushConfigDataType = '';
771 public $topic;
772
773 public function setAckDeadlineSeconds($ackDeadlineSeconds)
774 {
775 $this->ackDeadlineSeconds = $ackDeadlineSeconds;
776 }
777
778 public function getAckDeadlineSeconds()
779 {
780 return $this->ackDeadlineSeconds;
781 }
782
783 public function setName($name)
784 {
785 $this->name = $name;
786 }
787
788 public function getName()
789 {
790 return $this->name;
791 }
792
793 public function setPushConfig(Analytify_Google_Service_Pubsub_PushConfig $pushConfig)
794 {
795 $this->pushConfig = $pushConfig;
796 }
797
798 public function getPushConfig()
799 {
800 return $this->pushConfig;
801 }
802
803 public function setTopic($topic)
804 {
805 $this->topic = $topic;
806 }
807
808 public function getTopic()
809 {
810 return $this->topic;
811 }
812 }
813
814 class Analytify_Google_Service_Pubsub_Topic extends Analytify_Google_Model
815 {
816 public $name;
817
818 public function setName($name)
819 {
820 $this->name = $name;
821 }
822
823 public function getName()
824 {
825 return $this->name;
826 }
827 }
828