Google_Service_Pubsub_Subscriptions_Resource

The "subscriptions" collection of methods.

Defined (1)

The class is defined in the following location(s).

/includes/api-libs/Google/Service/Pubsub.php  
  1. class Google_Service_Pubsub_Subscriptions_Resource extends Google_Service_Resource 
  2.  
  3. /** 
  4. * Acknowledges a particular received message: the Pub/Sub system can remove the 
  5. * given message from the subscription. Acknowledging a message whose Ack 
  6. * deadline has expired may succeed, but the message could have been already 
  7. * redelivered. Acknowledging a message more than once will not result in an 
  8. * error. This is only used for messages received via pull. 
  9. * (subscriptions.acknowledge) 
  10. * @param Google_AcknowledgeRequest $postBody 
  11. * @param array $optParams Optional parameters. 
  12. */ 
  13. public function acknowledge(Google_Service_Pubsub_AcknowledgeRequest $postBody, $optParams = array()) 
  14. $params = array('postBody' => $postBody); 
  15. $params = array_merge($params, $optParams); 
  16. return $this->call('acknowledge', array($params)); 
  17.  
  18. /** 
  19. * Creates a subscription on a given topic for a given subscriber. If the 
  20. * subscription already exists, returns ALREADY_EXISTS. If the corresponding 
  21. * topic doesn't exist, returns NOT_FOUND. 
  22. * If the name is not provided in the request, the server will assign a random 
  23. * name for this subscription on the same project as the topic. 
  24. * (subscriptions.create) 
  25. * @param Google_Subscription $postBody 
  26. * @param array $optParams Optional parameters. 
  27. * @return Google_Service_Pubsub_Subscription 
  28. */ 
  29. public function create(Google_Service_Pubsub_Subscription $postBody, $optParams = array()) 
  30. $params = array('postBody' => $postBody); 
  31. $params = array_merge($params, $optParams); 
  32. return $this->call('create', array($params), "Google_Service_Pubsub_Subscription"); 
  33.  
  34. /** 
  35. * Deletes an existing subscription. All pending messages in the subscription 
  36. * are immediately dropped. Calls to Pull after deletion will return NOT_FOUND. 
  37. * (subscriptions.delete) 
  38. * @param string $subscription The subscription to delete. 
  39. * @param array $optParams Optional parameters. 
  40. */ 
  41. public function delete($subscription, $optParams = array()) 
  42. $params = array('subscription' => $subscription); 
  43. $params = array_merge($params, $optParams); 
  44. return $this->call('delete', array($params)); 
  45.  
  46. /** 
  47. * Gets the configuration details of a subscription. (subscriptions.get) 
  48. * @param string $subscription The name of the subscription to get. 
  49. * @param array $optParams Optional parameters. 
  50. * @return Google_Service_Pubsub_Subscription 
  51. */ 
  52. public function get($subscription, $optParams = array()) 
  53. $params = array('subscription' => $subscription); 
  54. $params = array_merge($params, $optParams); 
  55. return $this->call('get', array($params), "Google_Service_Pubsub_Subscription"); 
  56.  
  57. /** 
  58. * Lists matching subscriptions. (subscriptions.listSubscriptions) 
  59. * @param array $optParams Optional parameters. 
  60. * @opt_param string pageToken The value obtained in the last 
  61. * ListSubscriptionsResponse for continuation. 
  62. * @opt_param int maxResults Maximum number of subscriptions to return. 
  63. * @opt_param string query A valid label query expression. 
  64. * @return Google_Service_Pubsub_ListSubscriptionsResponse 
  65. */ 
  66. public function listSubscriptions($optParams = array()) 
  67. $params = array(); 
  68. $params = array_merge($params, $optParams); 
  69. return $this->call('list', array($params), "Google_Service_Pubsub_ListSubscriptionsResponse"); 
  70.  
  71. /** 
  72. * Modifies the Ack deadline for a message received from a pull request. 
  73. * (subscriptions.modifyAckDeadline) 
  74. * @param Google_ModifyAckDeadlineRequest $postBody 
  75. * @param array $optParams Optional parameters. 
  76. */ 
  77. public function modifyAckDeadline(Google_Service_Pubsub_ModifyAckDeadlineRequest $postBody, $optParams = array()) 
  78. $params = array('postBody' => $postBody); 
  79. $params = array_merge($params, $optParams); 
  80. return $this->call('modifyAckDeadline', array($params)); 
  81.  
  82. /** 
  83. * Modifies the PushConfig for a specified subscription. This method can be used 
  84. * to suspend the flow of messages to an endpoint by clearing the PushConfig 
  85. * field in the request. Messages will be accumulated for delivery even if no 
  86. * push configuration is defined or while the configuration is modified. 
  87. * (subscriptions.modifyPushConfig) 
  88. * @param Google_ModifyPushConfigRequest $postBody 
  89. * @param array $optParams Optional parameters. 
  90. */ 
  91. public function modifyPushConfig(Google_Service_Pubsub_ModifyPushConfigRequest $postBody, $optParams = array()) 
  92. $params = array('postBody' => $postBody); 
  93. $params = array_merge($params, $optParams); 
  94. return $this->call('modifyPushConfig', array($params)); 
  95.  
  96. /** 
  97. * Pulls a single message from the server. If return_immediately is true, and no 
  98. * messages are available in the subscription, this method returns 
  99. * FAILED_PRECONDITION. The system is free to return an UNAVAILABLE error if no 
  100. * messages are available in a reasonable amount of time (to reduce system 
  101. * load). (subscriptions.pull) 
  102. * @param Google_PullRequest $postBody 
  103. * @param array $optParams Optional parameters. 
  104. * @return Google_Service_Pubsub_PullResponse 
  105. */ 
  106. public function pull(Google_Service_Pubsub_PullRequest $postBody, $optParams = array()) 
  107. $params = array('postBody' => $postBody); 
  108. $params = array_merge($params, $optParams); 
  109. return $this->call('pull', array($params), "Google_Service_Pubsub_PullResponse"); 
  110.  
  111. /** 
  112. * Pulls messages from the server. Returns an empty list if there are no 
  113. * messages available in the backlog. The system is free to return UNAVAILABLE 
  114. * if there are too many pull requests outstanding for the given subscription. 
  115. * (subscriptions.pullBatch) 
  116. * @param Google_PullBatchRequest $postBody 
  117. * @param array $optParams Optional parameters. 
  118. * @return Google_Service_Pubsub_PullBatchResponse 
  119. */ 
  120. public function pullBatch(Google_Service_Pubsub_PullBatchRequest $postBody, $optParams = array()) 
  121. $params = array('postBody' => $postBody); 
  122. $params = array_merge($params, $optParams); 
  123. return $this->call('pullBatch', array($params), "Google_Service_Pubsub_PullBatchResponse");