Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
Google_Service_Pubsub_Subscriptions_Resource Class Reference

The "subscriptions" collection of methods. More...

Inheritance diagram for Google_Service_Pubsub_Subscriptions_Resource:
Google_Service_Resource

Public Member Functions

 acknowledge (Google_Service_Pubsub_AcknowledgeRequest $postBody, $optParams=array())
 Acknowledges a particular received message: the Pub/Sub system can remove the given message from the subscription.
 
 call ($name, $arguments, $expected_class=null)
 TODO: This function needs simplifying.
 
 create (Google_Service_Pubsub_Subscription $postBody, $optParams=array())
 Creates a subscription on a given topic for a given subscriber.
 
 delete ($subscription, $optParams=array())
 Deletes an existing subscription.
 
 get ($subscription, $optParams=array())
 Gets the configuration details of a subscription.
 
 listSubscriptions ($optParams=array())
 Lists matching subscriptions.
 
 modifyAckDeadline (Google_Service_Pubsub_ModifyAckDeadlineRequest $postBody, $optParams=array())
 Modifies the Ack deadline for a message received from a pull request.
 
 modifyPushConfig (Google_Service_Pubsub_ModifyPushConfigRequest $postBody, $optParams=array())
 Modifies the PushConfig for a specified subscription.
 
 pull (Google_Service_Pubsub_PullRequest $postBody, $optParams=array())
 Pulls a single message from the server.
 
 pullBatch (Google_Service_Pubsub_PullBatchRequest $postBody, $optParams=array())
 Pulls messages from the server.
 

Protected Member Functions

 convertToArrayAndStripNulls ($o)
 

Detailed Description

The "subscriptions" collection of methods.

Typical usage is: $pubsubService = new Google_Service_Pubsub(...); $subscriptions = $pubsubService->subscriptions;

Member Function Documentation

◆ acknowledge()

Google_Service_Pubsub_Subscriptions_Resource::acknowledge ( Google_Service_Pubsub_AcknowledgeRequest $postBody,
$optParams = array() )

Acknowledges a particular received message: the Pub/Sub system can remove the given message from the subscription.

Acknowledging a message whose Ack deadline has expired may succeed, but the message could have been already redelivered. Acknowledging a message more than once will not result in an error. This is only used for messages received via pull. (subscriptions.acknowledge)

Parameters
Google_AcknowledgeRequest$postBody
array$optParamsOptional parameters.

◆ call()

Google_Service_Resource::call ( $name,
$arguments,
$expected_class = null )
inherited

TODO: This function needs simplifying.

Parameters
$name
$arguments
$expected_class- optional, the expected class name
Return values
Google_Http_Request|expected_class
Exceptions
Google_Exception

◆ create()

Google_Service_Pubsub_Subscriptions_Resource::create ( Google_Service_Pubsub_Subscription $postBody,
$optParams = array() )

Creates a subscription on a given topic for a given subscriber.

If the subscription already exists, returns ALREADY_EXISTS. If the corresponding topic doesn't exist, returns NOT_FOUND.

If the name is not provided in the request, the server will assign a random name for this subscription on the same project as the topic. (subscriptions.create)

Parameters
Google_Subscription$postBody
array$optParamsOptional parameters.
Return values
Google_Service_Pubsub_Subscription

◆ delete()

Google_Service_Pubsub_Subscriptions_Resource::delete ( $subscription,
$optParams = array() )

Deletes an existing subscription.

All pending messages in the subscription are immediately dropped. Calls to Pull after deletion will return NOT_FOUND. (subscriptions.delete)

Parameters
string$subscriptionThe subscription to delete.
array$optParamsOptional parameters.

◆ get()

Google_Service_Pubsub_Subscriptions_Resource::get ( $subscription,
$optParams = array() )

Gets the configuration details of a subscription.

(subscriptions.get)

Parameters
string$subscriptionThe name of the subscription to get.
array$optParamsOptional parameters.
Return values
Google_Service_Pubsub_Subscription

◆ listSubscriptions()

Google_Service_Pubsub_Subscriptions_Resource::listSubscriptions ( $optParams = array())

Lists matching subscriptions.

(subscriptions.listSubscriptions)

Parameters
array$optParamsOptional parameters.

@opt_param string pageToken The value obtained in the last ListSubscriptionsResponse for continuation. @opt_param int maxResults Maximum number of subscriptions to return. @opt_param string query A valid label query expression.

Return values
Google_Service_Pubsub_ListSubscriptionsResponse

◆ modifyAckDeadline()

Google_Service_Pubsub_Subscriptions_Resource::modifyAckDeadline ( Google_Service_Pubsub_ModifyAckDeadlineRequest $postBody,
$optParams = array() )

Modifies the Ack deadline for a message received from a pull request.

(subscriptions.modifyAckDeadline)

Parameters
Google_ModifyAckDeadlineRequest$postBody
array$optParamsOptional parameters.

◆ modifyPushConfig()

Google_Service_Pubsub_Subscriptions_Resource::modifyPushConfig ( Google_Service_Pubsub_ModifyPushConfigRequest $postBody,
$optParams = array() )

Modifies the PushConfig for a specified subscription.

This method can be used to suspend the flow of messages to an endpoint by clearing the PushConfig field in the request. Messages will be accumulated for delivery even if no push configuration is defined or while the configuration is modified. (subscriptions.modifyPushConfig)

Parameters
Google_ModifyPushConfigRequest$postBody
array$optParamsOptional parameters.

◆ pull()

Google_Service_Pubsub_Subscriptions_Resource::pull ( Google_Service_Pubsub_PullRequest $postBody,
$optParams = array() )

Pulls a single message from the server.

If return_immediately is true, and no messages are available in the subscription, this method returns FAILED_PRECONDITION. The system is free to return an UNAVAILABLE error if no messages are available in a reasonable amount of time (to reduce system load). (subscriptions.pull)

Parameters
Google_PullRequest$postBody
array$optParamsOptional parameters.
Return values
Google_Service_Pubsub_PullResponse

◆ pullBatch()

Google_Service_Pubsub_Subscriptions_Resource::pullBatch ( Google_Service_Pubsub_PullBatchRequest $postBody,
$optParams = array() )

Pulls messages from the server.

Returns an empty list if there are no messages available in the backlog. The system is free to return UNAVAILABLE if there are too many pull requests outstanding for the given subscription. (subscriptions.pullBatch)

Parameters
Google_PullBatchRequest$postBody
array$optParamsOptional parameters.
Return values
Google_Service_Pubsub_PullBatchResponse

The documentation for this class was generated from the following file: