Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 401 and 402] [Versions 401 and 403]

   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.</p>
  23   *
  24   * <p>
  25   * For more information about this service, see the API
  26   * <a href="https://developers.google.com/pubsub/v1beta1" target="_blank">Documentation</a>
  27   * </p>
  28   *
  29   * @author Google, Inc.
  30   */
  31  class Google_Service_Pubsub extends Google_Service
  32  {
  33    /** View and manage your data across Google Cloud Platform services. */
  34    const CLOUD_PLATFORM =
  35        "https://www.googleapis.com/auth/cloud-platform";
  36    /** View and manage Pub/Sub topics and subscriptions. */
  37    const PUBSUB =
  38        "https://www.googleapis.com/auth/pubsub";
  39  
  40    public $subscriptions;
  41    public $topics;
  42    
  43  
  44    /**
  45     * Constructs the internal representation of the Pubsub service.
  46     *
  47     * @param Google_Client $client
  48     */
  49    public function __construct(Google_Client $client)
  50    {
  51      parent::__construct($client);
  52      $this->rootUrl = 'https://www.googleapis.com/';
  53      $this->servicePath = 'pubsub/v1beta1/';
  54      $this->version = 'v1beta1';
  55      $this->serviceName = 'pubsub';
  56  
  57      $this->subscriptions = new Google_Service_Pubsub_Subscriptions_Resource(
  58          $this,
  59          $this->serviceName,
  60          'subscriptions',
  61          array(
  62            'methods' => array(
  63              'acknowledge' => array(
  64                'path' => 'subscriptions/acknowledge',
  65                'httpMethod' => 'POST',
  66                'parameters' => array(),
  67              ),'create' => array(
  68                'path' => 'subscriptions',
  69                'httpMethod' => 'POST',
  70                'parameters' => array(),
  71              ),'delete' => array(
  72                'path' => 'subscriptions/{+subscription}',
  73                'httpMethod' => 'DELETE',
  74                'parameters' => array(
  75                  'subscription' => array(
  76                    'location' => 'path',
  77                    'type' => 'string',
  78                    'required' => true,
  79                  ),
  80                ),
  81              ),'get' => array(
  82                'path' => 'subscriptions/{+subscription}',
  83                'httpMethod' => 'GET',
  84                'parameters' => array(
  85                  'subscription' => array(
  86                    'location' => 'path',
  87                    'type' => 'string',
  88                    'required' => true,
  89                  ),
  90                ),
  91              ),'list' => array(
  92                'path' => 'subscriptions',
  93                'httpMethod' => 'GET',
  94                'parameters' => array(
  95                  'pageToken' => array(
  96                    'location' => 'query',
  97                    'type' => 'string',
  98                  ),
  99                  'maxResults' => array(
 100                    'location' => 'query',
 101                    'type' => 'integer',
 102                  ),
 103                  'query' => array(
 104                    'location' => 'query',
 105                    'type' => 'string',
 106                  ),
 107                ),
 108              ),'modifyAckDeadline' => array(
 109                'path' => 'subscriptions/modifyAckDeadline',
 110                'httpMethod' => 'POST',
 111                'parameters' => array(),
 112              ),'modifyPushConfig' => array(
 113                'path' => 'subscriptions/modifyPushConfig',
 114                'httpMethod' => 'POST',
 115                'parameters' => array(),
 116              ),'pull' => array(
 117                'path' => 'subscriptions/pull',
 118                'httpMethod' => 'POST',
 119                'parameters' => array(),
 120              ),'pullBatch' => array(
 121                'path' => 'subscriptions/pullBatch',
 122                'httpMethod' => 'POST',
 123                'parameters' => array(),
 124              ),
 125            )
 126          )
 127      );
 128      $this->topics = new Google_Service_Pubsub_Topics_Resource(
 129          $this,
 130          $this->serviceName,
 131          'topics',
 132          array(
 133            'methods' => array(
 134              'create' => array(
 135                'path' => 'topics',
 136                'httpMethod' => 'POST',
 137                'parameters' => array(),
 138              ),'delete' => array(
 139                'path' => 'topics/{+topic}',
 140                'httpMethod' => 'DELETE',
 141                'parameters' => array(
 142                  'topic' => array(
 143                    'location' => 'path',
 144                    'type' => 'string',
 145                    'required' => true,
 146                  ),
 147                ),
 148              ),'get' => array(
 149                'path' => 'topics/{+topic}',
 150                'httpMethod' => 'GET',
 151                'parameters' => array(
 152                  'topic' => array(
 153                    'location' => 'path',
 154                    'type' => 'string',
 155                    'required' => true,
 156                  ),
 157                ),
 158              ),'list' => array(
 159                'path' => 'topics',
 160                'httpMethod' => 'GET',
 161                'parameters' => array(
 162                  'pageToken' => array(
 163                    'location' => 'query',
 164                    'type' => 'string',
 165                  ),
 166                  'maxResults' => array(
 167                    'location' => 'query',
 168                    'type' => 'integer',
 169                  ),
 170                  'query' => array(
 171                    'location' => 'query',
 172                    'type' => 'string',
 173                  ),
 174                ),
 175              ),'publish' => array(
 176                'path' => 'topics/publish',
 177                'httpMethod' => 'POST',
 178                'parameters' => array(),
 179              ),'publishBatch' => array(
 180                'path' => 'topics/publishBatch',
 181                'httpMethod' => 'POST',
 182                'parameters' => array(),
 183              ),
 184            )
 185          )
 186      );
 187    }
 188  }
 189  
 190  
 191  /**
 192   * The "subscriptions" collection of methods.
 193   * Typical usage is:
 194   *  <code>
 195   *   $pubsubService = new Google_Service_Pubsub(...);
 196   *   $subscriptions = $pubsubService->subscriptions;
 197   *  </code>
 198   */
 199  class Google_Service_Pubsub_Subscriptions_Resource extends Google_Service_Resource
 200  {
 201  
 202    /**
 203     * Acknowledges a particular received message: the Pub/Sub system can remove the
 204     * given message from the subscription. Acknowledging a message whose Ack
 205     * deadline has expired may succeed, but the message could have been already
 206     * redelivered. Acknowledging a message more than once will not result in an
 207     * error. This is only used for messages received via pull.
 208     * (subscriptions.acknowledge)
 209     *
 210     * @param Google_AcknowledgeRequest $postBody
 211     * @param array $optParams Optional parameters.
 212     */
 213    public function acknowledge(Google_Service_Pubsub_AcknowledgeRequest $postBody, $optParams = array())
 214    {
 215      $params = array('postBody' => $postBody);
 216      $params = array_merge($params, $optParams);
 217      return $this->call('acknowledge', array($params));
 218    }
 219  
 220    /**
 221     * Creates a subscription on a given topic for a given subscriber. If the
 222     * subscription already exists, returns ALREADY_EXISTS. If the corresponding
 223     * topic doesn't exist, returns NOT_FOUND.
 224     *
 225     * If the name is not provided in the request, the server will assign a random
 226     * name for this subscription on the same project as the topic.
 227     * (subscriptions.create)
 228     *
 229     * @param Google_Subscription $postBody
 230     * @param array $optParams Optional parameters.
 231     * @return Google_Service_Pubsub_Subscription
 232     */
 233    public function create(Google_Service_Pubsub_Subscription $postBody, $optParams = array())
 234    {
 235      $params = array('postBody' => $postBody);
 236      $params = array_merge($params, $optParams);
 237      return $this->call('create', array($params), "Google_Service_Pubsub_Subscription");
 238    }
 239  
 240    /**
 241     * Deletes an existing subscription. All pending messages in the subscription
 242     * are immediately dropped. Calls to Pull after deletion will return NOT_FOUND.
 243     * (subscriptions.delete)
 244     *
 245     * @param string $subscription The subscription to delete.
 246     * @param array $optParams Optional parameters.
 247     */
 248    public function delete($subscription, $optParams = array())
 249    {
 250      $params = array('subscription' => $subscription);
 251      $params = array_merge($params, $optParams);
 252      return $this->call('delete', array($params));
 253    }
 254  
 255    /**
 256     * Gets the configuration details of a subscription. (subscriptions.get)
 257     *
 258     * @param string $subscription The name of the subscription to get.
 259     * @param array $optParams Optional parameters.
 260     * @return Google_Service_Pubsub_Subscription
 261     */
 262    public function get($subscription, $optParams = array())
 263    {
 264      $params = array('subscription' => $subscription);
 265      $params = array_merge($params, $optParams);
 266      return $this->call('get', array($params), "Google_Service_Pubsub_Subscription");
 267    }
 268  
 269    /**
 270     * Lists matching subscriptions. (subscriptions.listSubscriptions)
 271     *
 272     * @param array $optParams Optional parameters.
 273     *
 274     * @opt_param string pageToken The value obtained in the last
 275     * ListSubscriptionsResponse for continuation.
 276     * @opt_param int maxResults Maximum number of subscriptions to return.
 277     * @opt_param string query A valid label query expression.
 278     * @return Google_Service_Pubsub_ListSubscriptionsResponse
 279     */
 280    public function listSubscriptions($optParams = array())
 281    {
 282      $params = array();
 283      $params = array_merge($params, $optParams);
 284      return $this->call('list', array($params), "Google_Service_Pubsub_ListSubscriptionsResponse");
 285    }
 286  
 287    /**
 288     * Modifies the Ack deadline for a message received from a pull request.
 289     * (subscriptions.modifyAckDeadline)
 290     *
 291     * @param Google_ModifyAckDeadlineRequest $postBody
 292     * @param array $optParams Optional parameters.
 293     */
 294    public function modifyAckDeadline(Google_Service_Pubsub_ModifyAckDeadlineRequest $postBody, $optParams = array())
 295    {
 296      $params = array('postBody' => $postBody);
 297      $params = array_merge($params, $optParams);
 298      return $this->call('modifyAckDeadline', array($params));
 299    }
 300  
 301    /**
 302     * Modifies the PushConfig for a specified subscription. This method can be used
 303     * to suspend the flow of messages to an endpoint by clearing the PushConfig
 304     * field in the request. Messages will be accumulated for delivery even if no
 305     * push configuration is defined or while the configuration is modified.
 306     * (subscriptions.modifyPushConfig)
 307     *
 308     * @param Google_ModifyPushConfigRequest $postBody
 309     * @param array $optParams Optional parameters.
 310     */
 311    public function modifyPushConfig(Google_Service_Pubsub_ModifyPushConfigRequest $postBody, $optParams = array())
 312    {
 313      $params = array('postBody' => $postBody);
 314      $params = array_merge($params, $optParams);
 315      return $this->call('modifyPushConfig', array($params));
 316    }
 317  
 318    /**
 319     * Pulls a single message from the server. If return_immediately is true, and no
 320     * messages are available in the subscription, this method returns
 321     * FAILED_PRECONDITION. The system is free to return an UNAVAILABLE error if no
 322     * messages are available in a reasonable amount of time (to reduce system
 323     * load). (subscriptions.pull)
 324     *
 325     * @param Google_PullRequest $postBody
 326     * @param array $optParams Optional parameters.
 327     * @return Google_Service_Pubsub_PullResponse
 328     */
 329    public function pull(Google_Service_Pubsub_PullRequest $postBody, $optParams = array())
 330    {
 331      $params = array('postBody' => $postBody);
 332      $params = array_merge($params, $optParams);
 333      return $this->call('pull', array($params), "Google_Service_Pubsub_PullResponse");
 334    }
 335  
 336    /**
 337     * Pulls messages from the server. Returns an empty list if there are no
 338     * messages available in the backlog. The system is free to return UNAVAILABLE
 339     * if there are too many pull requests outstanding for the given subscription.
 340     * (subscriptions.pullBatch)
 341     *
 342     * @param Google_PullBatchRequest $postBody
 343     * @param array $optParams Optional parameters.
 344     * @return Google_Service_Pubsub_PullBatchResponse
 345     */
 346    public function pullBatch(Google_Service_Pubsub_PullBatchRequest $postBody, $optParams = array())
 347    {
 348      $params = array('postBody' => $postBody);
 349      $params = array_merge($params, $optParams);
 350      return $this->call('pullBatch', array($params), "Google_Service_Pubsub_PullBatchResponse");
 351    }
 352  }
 353  
 354  /**
 355   * The "topics" collection of methods.
 356   * Typical usage is:
 357   *  <code>
 358   *   $pubsubService = new Google_Service_Pubsub(...);
 359   *   $topics = $pubsubService->topics;
 360   *  </code>
 361   */
 362  class Google_Service_Pubsub_Topics_Resource extends Google_Service_Resource
 363  {
 364  
 365    /**
 366     * Creates the given topic with the given name. (topics.create)
 367     *
 368     * @param Google_Topic $postBody
 369     * @param array $optParams Optional parameters.
 370     * @return Google_Service_Pubsub_Topic
 371     */
 372    public function create(Google_Service_Pubsub_Topic $postBody, $optParams = array())
 373    {
 374      $params = array('postBody' => $postBody);
 375      $params = array_merge($params, $optParams);
 376      return $this->call('create', array($params), "Google_Service_Pubsub_Topic");
 377    }
 378  
 379    /**
 380     * Deletes the topic with the given name. Returns NOT_FOUND if the topic does
 381     * not exist. After a topic is deleted, a new topic may be created with the same
 382     * name. (topics.delete)
 383     *
 384     * @param string $topic Name of the topic to delete.
 385     * @param array $optParams Optional parameters.
 386     */
 387    public function delete($topic, $optParams = array())
 388    {
 389      $params = array('topic' => $topic);
 390      $params = array_merge($params, $optParams);
 391      return $this->call('delete', array($params));
 392    }
 393  
 394    /**
 395     * Gets the configuration of a topic. Since the topic only has the name
 396     * attribute, this method is only useful to check the existence of a topic. If
 397     * other attributes are added in the future, they will be returned here.
 398     * (topics.get)
 399     *
 400     * @param string $topic The name of the topic to get.
 401     * @param array $optParams Optional parameters.
 402     * @return Google_Service_Pubsub_Topic
 403     */
 404    public function get($topic, $optParams = array())
 405    {
 406      $params = array('topic' => $topic);
 407      $params = array_merge($params, $optParams);
 408      return $this->call('get', array($params), "Google_Service_Pubsub_Topic");
 409    }
 410  
 411    /**
 412     * Lists matching topics. (topics.listTopics)
 413     *
 414     * @param array $optParams Optional parameters.
 415     *
 416     * @opt_param string pageToken The value obtained in the last ListTopicsResponse
 417     * for continuation.
 418     * @opt_param int maxResults Maximum number of topics to return.
 419     * @opt_param string query A valid label query expression.
 420     * @return Google_Service_Pubsub_ListTopicsResponse
 421     */
 422    public function listTopics($optParams = array())
 423    {
 424      $params = array();
 425      $params = array_merge($params, $optParams);
 426      return $this->call('list', array($params), "Google_Service_Pubsub_ListTopicsResponse");
 427    }
 428  
 429    /**
 430     * Adds a message to the topic. Returns NOT_FOUND if the topic does not exist.
 431     * (topics.publish)
 432     *
 433     * @param Google_PublishRequest $postBody
 434     * @param array $optParams Optional parameters.
 435     */
 436    public function publish(Google_Service_Pubsub_PublishRequest $postBody, $optParams = array())
 437    {
 438      $params = array('postBody' => $postBody);
 439      $params = array_merge($params, $optParams);
 440      return $this->call('publish', array($params));
 441    }
 442  
 443    /**
 444     * Adds one or more messages to the topic. Returns NOT_FOUND if the topic does
 445     * not exist. (topics.publishBatch)
 446     *
 447     * @param Google_PublishBatchRequest $postBody
 448     * @param array $optParams Optional parameters.
 449     * @return Google_Service_Pubsub_PublishBatchResponse
 450     */
 451    public function publishBatch(Google_Service_Pubsub_PublishBatchRequest $postBody, $optParams = array())
 452    {
 453      $params = array('postBody' => $postBody);
 454      $params = array_merge($params, $optParams);
 455      return $this->call('publishBatch', array($params), "Google_Service_Pubsub_PublishBatchResponse");
 456    }
 457  }
 458  
 459  
 460  
 461  
 462  class Google_Service_Pubsub_AcknowledgeRequest extends Google_Collection
 463  {
 464    protected $collection_key = 'ackId';
 465    protected $internal_gapi_mappings = array(
 466    );
 467    public $ackId;
 468    public $subscription;
 469  
 470  
 471    public function setAckId($ackId)
 472    {
 473      $this->ackId = $ackId;
 474    }
 475    public function getAckId()
 476    {
 477      return $this->ackId;
 478    }
 479    public function setSubscription($subscription)
 480    {
 481      $this->subscription = $subscription;
 482    }
 483    public function getSubscription()
 484    {
 485      return $this->subscription;
 486    }
 487  }
 488  
 489  class Google_Service_Pubsub_Label extends Google_Model
 490  {
 491    protected $internal_gapi_mappings = array(
 492    );
 493    public $key;
 494    public $numValue;
 495    public $strValue;
 496  
 497  
 498    public function setKey($key)
 499    {
 500      $this->key = $key;
 501    }
 502    public function getKey()
 503    {
 504      return $this->key;
 505    }
 506    public function setNumValue($numValue)
 507    {
 508      $this->numValue = $numValue;
 509    }
 510    public function getNumValue()
 511    {
 512      return $this->numValue;
 513    }
 514    public function setStrValue($strValue)
 515    {
 516      $this->strValue = $strValue;
 517    }
 518    public function getStrValue()
 519    {
 520      return $this->strValue;
 521    }
 522  }
 523  
 524  class Google_Service_Pubsub_ListSubscriptionsResponse extends Google_Collection
 525  {
 526    protected $collection_key = 'subscription';
 527    protected $internal_gapi_mappings = array(
 528    );
 529    public $nextPageToken;
 530    protected $subscriptionType = 'Google_Service_Pubsub_Subscription';
 531    protected $subscriptionDataType = 'array';
 532  
 533  
 534    public function setNextPageToken($nextPageToken)
 535    {
 536      $this->nextPageToken = $nextPageToken;
 537    }
 538    public function getNextPageToken()
 539    {
 540      return $this->nextPageToken;
 541    }
 542    public function setSubscription($subscription)
 543    {
 544      $this->subscription = $subscription;
 545    }
 546    public function getSubscription()
 547    {
 548      return $this->subscription;
 549    }
 550  }
 551  
 552  class Google_Service_Pubsub_ListTopicsResponse extends Google_Collection
 553  {
 554    protected $collection_key = 'topic';
 555    protected $internal_gapi_mappings = array(
 556    );
 557    public $nextPageToken;
 558    protected $topicType = 'Google_Service_Pubsub_Topic';
 559    protected $topicDataType = 'array';
 560  
 561  
 562    public function setNextPageToken($nextPageToken)
 563    {
 564      $this->nextPageToken = $nextPageToken;
 565    }
 566    public function getNextPageToken()
 567    {
 568      return $this->nextPageToken;
 569    }
 570    public function setTopic($topic)
 571    {
 572      $this->topic = $topic;
 573    }
 574    public function getTopic()
 575    {
 576      return $this->topic;
 577    }
 578  }
 579  
 580  class Google_Service_Pubsub_ModifyAckDeadlineRequest extends Google_Collection
 581  {
 582    protected $collection_key = 'ackIds';
 583    protected $internal_gapi_mappings = array(
 584    );
 585    public $ackDeadlineSeconds;
 586    public $ackId;
 587    public $ackIds;
 588    public $subscription;
 589  
 590  
 591    public function setAckDeadlineSeconds($ackDeadlineSeconds)
 592    {
 593      $this->ackDeadlineSeconds = $ackDeadlineSeconds;
 594    }
 595    public function getAckDeadlineSeconds()
 596    {
 597      return $this->ackDeadlineSeconds;
 598    }
 599    public function setAckId($ackId)
 600    {
 601      $this->ackId = $ackId;
 602    }
 603    public function getAckId()
 604    {
 605      return $this->ackId;
 606    }
 607    public function setAckIds($ackIds)
 608    {
 609      $this->ackIds = $ackIds;
 610    }
 611    public function getAckIds()
 612    {
 613      return $this->ackIds;
 614    }
 615    public function setSubscription($subscription)
 616    {
 617      $this->subscription = $subscription;
 618    }
 619    public function getSubscription()
 620    {
 621      return $this->subscription;
 622    }
 623  }
 624  
 625  class Google_Service_Pubsub_ModifyPushConfigRequest extends Google_Model
 626  {
 627    protected $internal_gapi_mappings = array(
 628    );
 629    protected $pushConfigType = 'Google_Service_Pubsub_PushConfig';
 630    protected $pushConfigDataType = '';
 631    public $subscription;
 632  
 633  
 634    public function setPushConfig(Google_Service_Pubsub_PushConfig $pushConfig)
 635    {
 636      $this->pushConfig = $pushConfig;
 637    }
 638    public function getPushConfig()
 639    {
 640      return $this->pushConfig;
 641    }
 642    public function setSubscription($subscription)
 643    {
 644      $this->subscription = $subscription;
 645    }
 646    public function getSubscription()
 647    {
 648      return $this->subscription;
 649    }
 650  }
 651  
 652  class Google_Service_Pubsub_PublishBatchRequest extends Google_Collection
 653  {
 654    protected $collection_key = 'messages';
 655    protected $internal_gapi_mappings = array(
 656    );
 657    protected $messagesType = 'Google_Service_Pubsub_PubsubMessage';
 658    protected $messagesDataType = 'array';
 659    public $topic;
 660  
 661  
 662    public function setMessages($messages)
 663    {
 664      $this->messages = $messages;
 665    }
 666    public function getMessages()
 667    {
 668      return $this->messages;
 669    }
 670    public function setTopic($topic)
 671    {
 672      $this->topic = $topic;
 673    }
 674    public function getTopic()
 675    {
 676      return $this->topic;
 677    }
 678  }
 679  
 680  class Google_Service_Pubsub_PublishBatchResponse extends Google_Collection
 681  {
 682    protected $collection_key = 'messageIds';
 683    protected $internal_gapi_mappings = array(
 684    );
 685    public $messageIds;
 686  
 687  
 688    public function setMessageIds($messageIds)
 689    {
 690      $this->messageIds = $messageIds;
 691    }
 692    public function getMessageIds()
 693    {
 694      return $this->messageIds;
 695    }
 696  }
 697  
 698  class Google_Service_Pubsub_PublishRequest extends Google_Model
 699  {
 700    protected $internal_gapi_mappings = array(
 701    );
 702    protected $messageType = 'Google_Service_Pubsub_PubsubMessage';
 703    protected $messageDataType = '';
 704    public $topic;
 705  
 706  
 707    public function setMessage(Google_Service_Pubsub_PubsubMessage $message)
 708    {
 709      $this->message = $message;
 710    }
 711    public function getMessage()
 712    {
 713      return $this->message;
 714    }
 715    public function setTopic($topic)
 716    {
 717      $this->topic = $topic;
 718    }
 719    public function getTopic()
 720    {
 721      return $this->topic;
 722    }
 723  }
 724  
 725  class Google_Service_Pubsub_PubsubEvent extends Google_Model
 726  {
 727    protected $internal_gapi_mappings = array(
 728    );
 729    public $deleted;
 730    protected $messageType = 'Google_Service_Pubsub_PubsubMessage';
 731    protected $messageDataType = '';
 732    public $subscription;
 733    public $truncated;
 734  
 735  
 736    public function setDeleted($deleted)
 737    {
 738      $this->deleted = $deleted;
 739    }
 740    public function getDeleted()
 741    {
 742      return $this->deleted;
 743    }
 744    public function setMessage(Google_Service_Pubsub_PubsubMessage $message)
 745    {
 746      $this->message = $message;
 747    }
 748    public function getMessage()
 749    {
 750      return $this->message;
 751    }
 752    public function setSubscription($subscription)
 753    {
 754      $this->subscription = $subscription;
 755    }
 756    public function getSubscription()
 757    {
 758      return $this->subscription;
 759    }
 760    public function setTruncated($truncated)
 761    {
 762      $this->truncated = $truncated;
 763    }
 764    public function getTruncated()
 765    {
 766      return $this->truncated;
 767    }
 768  }
 769  
 770  class Google_Service_Pubsub_PubsubMessage extends Google_Collection
 771  {
 772    protected $collection_key = 'label';
 773    protected $internal_gapi_mappings = array(
 774    );
 775    public $data;
 776    protected $labelType = 'Google_Service_Pubsub_Label';
 777    protected $labelDataType = 'array';
 778    public $messageId;
 779  
 780  
 781    public function setData($data)
 782    {
 783      $this->data = $data;
 784    }
 785    public function getData()
 786    {
 787      return $this->data;
 788    }
 789    public function setLabel($label)
 790    {
 791      $this->label = $label;
 792    }
 793    public function getLabel()
 794    {
 795      return $this->label;
 796    }
 797    public function setMessageId($messageId)
 798    {
 799      $this->messageId = $messageId;
 800    }
 801    public function getMessageId()
 802    {
 803      return $this->messageId;
 804    }
 805  }
 806  
 807  class Google_Service_Pubsub_PullBatchRequest extends Google_Model
 808  {
 809    protected $internal_gapi_mappings = array(
 810    );
 811    public $maxEvents;
 812    public $returnImmediately;
 813    public $subscription;
 814  
 815  
 816    public function setMaxEvents($maxEvents)
 817    {
 818      $this->maxEvents = $maxEvents;
 819    }
 820    public function getMaxEvents()
 821    {
 822      return $this->maxEvents;
 823    }
 824    public function setReturnImmediately($returnImmediately)
 825    {
 826      $this->returnImmediately = $returnImmediately;
 827    }
 828    public function getReturnImmediately()
 829    {
 830      return $this->returnImmediately;
 831    }
 832    public function setSubscription($subscription)
 833    {
 834      $this->subscription = $subscription;
 835    }
 836    public function getSubscription()
 837    {
 838      return $this->subscription;
 839    }
 840  }
 841  
 842  class Google_Service_Pubsub_PullBatchResponse extends Google_Collection
 843  {
 844    protected $collection_key = 'pullResponses';
 845    protected $internal_gapi_mappings = array(
 846    );
 847    protected $pullResponsesType = 'Google_Service_Pubsub_PullResponse';
 848    protected $pullResponsesDataType = 'array';
 849  
 850  
 851    public function setPullResponses($pullResponses)
 852    {
 853      $this->pullResponses = $pullResponses;
 854    }
 855    public function getPullResponses()
 856    {
 857      return $this->pullResponses;
 858    }
 859  }
 860  
 861  class Google_Service_Pubsub_PullRequest extends Google_Model
 862  {
 863    protected $internal_gapi_mappings = array(
 864    );
 865    public $returnImmediately;
 866    public $subscription;
 867  
 868  
 869    public function setReturnImmediately($returnImmediately)
 870    {
 871      $this->returnImmediately = $returnImmediately;
 872    }
 873    public function getReturnImmediately()
 874    {
 875      return $this->returnImmediately;
 876    }
 877    public function setSubscription($subscription)
 878    {
 879      $this->subscription = $subscription;
 880    }
 881    public function getSubscription()
 882    {
 883      return $this->subscription;
 884    }
 885  }
 886  
 887  class Google_Service_Pubsub_PullResponse extends Google_Model
 888  {
 889    protected $internal_gapi_mappings = array(
 890    );
 891    public $ackId;
 892    protected $pubsubEventType = 'Google_Service_Pubsub_PubsubEvent';
 893    protected $pubsubEventDataType = '';
 894  
 895  
 896    public function setAckId($ackId)
 897    {
 898      $this->ackId = $ackId;
 899    }
 900    public function getAckId()
 901    {
 902      return $this->ackId;
 903    }
 904    public function setPubsubEvent(Google_Service_Pubsub_PubsubEvent $pubsubEvent)
 905    {
 906      $this->pubsubEvent = $pubsubEvent;
 907    }
 908    public function getPubsubEvent()
 909    {
 910      return $this->pubsubEvent;
 911    }
 912  }
 913  
 914  class Google_Service_Pubsub_PushConfig extends Google_Model
 915  {
 916    protected $internal_gapi_mappings = array(
 917    );
 918    public $pushEndpoint;
 919  
 920  
 921    public function setPushEndpoint($pushEndpoint)
 922    {
 923      $this->pushEndpoint = $pushEndpoint;
 924    }
 925    public function getPushEndpoint()
 926    {
 927      return $this->pushEndpoint;
 928    }
 929  }
 930  
 931  class Google_Service_Pubsub_Subscription extends Google_Model
 932  {
 933    protected $internal_gapi_mappings = array(
 934    );
 935    public $ackDeadlineSeconds;
 936    public $name;
 937    protected $pushConfigType = 'Google_Service_Pubsub_PushConfig';
 938    protected $pushConfigDataType = '';
 939    public $topic;
 940  
 941  
 942    public function setAckDeadlineSeconds($ackDeadlineSeconds)
 943    {
 944      $this->ackDeadlineSeconds = $ackDeadlineSeconds;
 945    }
 946    public function getAckDeadlineSeconds()
 947    {
 948      return $this->ackDeadlineSeconds;
 949    }
 950    public function setName($name)
 951    {
 952      $this->name = $name;
 953    }
 954    public function getName()
 955    {
 956      return $this->name;
 957    }
 958    public function setPushConfig(Google_Service_Pubsub_PushConfig $pushConfig)
 959    {
 960      $this->pushConfig = $pushConfig;
 961    }
 962    public function getPushConfig()
 963    {
 964      return $this->pushConfig;
 965    }
 966    public function setTopic($topic)
 967    {
 968      $this->topic = $topic;
 969    }
 970    public function getTopic()
 971    {
 972      return $this->topic;
 973    }
 974  }
 975  
 976  class Google_Service_Pubsub_Topic extends Google_Model
 977  {
 978    protected $internal_gapi_mappings = array(
 979    );
 980    public $name;
 981  
 982  
 983    public function setName($name)
 984    {
 985      $this->name = $name;
 986    }
 987    public function getName()
 988    {
 989      return $this->name;
 990    }
 991  }