Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

Differences Between: [Versions 310 and 403] [Versions 311 and 403] [Versions 39 and 403] [Versions 400 and 403] [Versions 401 and 403]

(no description)

File Size: 1012 lines (28 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 21 classes

Google_Service_Pubsub:: (1 method):
  __construct()

Google_Service_Pubsub_Subscriptions_Resource:: (9 methods):
  acknowledge()
  create()
  delete()
  get()
  listSubscriptions()
  modifyAckDeadline()
  modifyPushConfig()
  pull()
  pullBatch()

Google_Service_Pubsub_Topics_Resource:: (6 methods):
  create()
  delete()
  get()
  listTopics()
  publish()
  publishBatch()

Google_Service_Pubsub_AcknowledgeRequest:: (4 methods):
  setAckId()
  getAckId()
  setSubscription()
  getSubscription()

Google_Service_Pubsub_Label:: (6 methods):
  setKey()
  getKey()
  setNumValue()
  getNumValue()
  setStrValue()
  getStrValue()

Google_Service_Pubsub_ListSubscriptionsResponse:: (4 methods):
  setNextPageToken()
  getNextPageToken()
  setSubscription()
  getSubscription()

Google_Service_Pubsub_ListTopicsResponse:: (4 methods):
  setNextPageToken()
  getNextPageToken()
  setTopic()
  getTopic()

Google_Service_Pubsub_ModifyAckDeadlineRequest:: (8 methods):
  setAckDeadlineSeconds()
  getAckDeadlineSeconds()
  setAckId()
  getAckId()
  setAckIds()
  getAckIds()
  setSubscription()
  getSubscription()

Google_Service_Pubsub_ModifyPushConfigRequest:: (4 methods):
  setPushConfig()
  getPushConfig()
  setSubscription()
  getSubscription()

Google_Service_Pubsub_PublishBatchRequest:: (4 methods):
  setMessages()
  getMessages()
  setTopic()
  getTopic()

Google_Service_Pubsub_PublishBatchResponse:: (2 methods):
  setMessageIds()
  getMessageIds()

Google_Service_Pubsub_PublishRequest:: (4 methods):
  setMessage()
  getMessage()
  setTopic()
  getTopic()

Google_Service_Pubsub_PubsubEvent:: (8 methods):
  setDeleted()
  getDeleted()
  setMessage()
  getMessage()
  setSubscription()
  getSubscription()
  setTruncated()
  getTruncated()

Google_Service_Pubsub_PubsubMessage:: (6 methods):
  setData()
  getData()
  setLabel()
  getLabel()
  setMessageId()
  getMessageId()

Google_Service_Pubsub_PullBatchRequest:: (6 methods):
  setMaxEvents()
  getMaxEvents()
  setReturnImmediately()
  getReturnImmediately()
  setSubscription()
  getSubscription()

Google_Service_Pubsub_PullBatchResponse:: (2 methods):
  setPullResponses()
  getPullResponses()

Google_Service_Pubsub_PullRequest:: (4 methods):
  setReturnImmediately()
  getReturnImmediately()
  setSubscription()
  getSubscription()

Google_Service_Pubsub_PullResponse:: (4 methods):
  setAckId()
  getAckId()
  setPubsubEvent()
  getPubsubEvent()

Google_Service_Pubsub_PushConfig:: (2 methods):
  setPushEndpoint()
  getPushEndpoint()

Google_Service_Pubsub_Subscription:: (8 methods):
  setAckDeadlineSeconds()
  getAckDeadlineSeconds()
  setName()
  getName()
  setPushConfig()
  getPushConfig()
  setTopic()
  getTopic()

Google_Service_Pubsub_Topic:: (2 methods):
  setName()
  getName()


Class: Google_Service_Pubsub  - X-Ref

Service definition for Pubsub (v1beta1).

<p>
Provides reliable, many-to-many, asynchronous messaging between applications.</p>

<p>
For more information about this service, see the API
<a href="https://developers.google.com/pubsub/v1beta1" target="_blank">Documentation</a>
</p>

__construct(Google_Client $client)   X-Ref
Constructs the internal representation of the Pubsub service.

param: Google_Client $client

Class: Google_Service_Pubsub_Subscriptions_Resource  - X-Ref

The "subscriptions" collection of methods.
Typical usage is:
<code>
$pubsubService = new Google_Service_Pubsub(...);
$subscriptions = $pubsubService->subscriptions;
</code>

acknowledge(Google_Service_Pubsub_AcknowledgeRequest $postBody, $optParams = array()   X-Ref
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)

param: Google_AcknowledgeRequest $postBody
param: array $optParams Optional parameters.

create(Google_Service_Pubsub_Subscription $postBody, $optParams = array()   X-Ref
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)

param: Google_Subscription $postBody
param: array $optParams Optional parameters.
return: Google_Service_Pubsub_Subscription

delete($subscription, $optParams = array()   X-Ref
Deletes an existing subscription. All pending messages in the subscription
are immediately dropped. Calls to Pull after deletion will return NOT_FOUND.
(subscriptions.delete)

param: string $subscription The subscription to delete.
param: array $optParams Optional parameters.

get($subscription, $optParams = array()   X-Ref
Gets the configuration details of a subscription. (subscriptions.get)

param: string $subscription The name of the subscription to get.
param: array $optParams Optional parameters.
return: Google_Service_Pubsub_Subscription

listSubscriptions($optParams = array()   X-Ref
Lists matching subscriptions. (subscriptions.listSubscriptions)

param: array $optParams Optional parameters.
return: Google_Service_Pubsub_ListSubscriptionsResponse

modifyAckDeadline(Google_Service_Pubsub_ModifyAckDeadlineRequest $postBody, $optParams = array()   X-Ref
Modifies the Ack deadline for a message received from a pull request.
(subscriptions.modifyAckDeadline)

param: Google_ModifyAckDeadlineRequest $postBody
param: array $optParams Optional parameters.

modifyPushConfig(Google_Service_Pubsub_ModifyPushConfigRequest $postBody, $optParams = array()   X-Ref
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)

param: Google_ModifyPushConfigRequest $postBody
param: array $optParams Optional parameters.

pull(Google_Service_Pubsub_PullRequest $postBody, $optParams = array()   X-Ref
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)

param: Google_PullRequest $postBody
param: array $optParams Optional parameters.
return: Google_Service_Pubsub_PullResponse

pullBatch(Google_Service_Pubsub_PullBatchRequest $postBody, $optParams = array()   X-Ref
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)

param: Google_PullBatchRequest $postBody
param: array $optParams Optional parameters.
return: Google_Service_Pubsub_PullBatchResponse

Class: Google_Service_Pubsub_Topics_Resource  - X-Ref

The "topics" collection of methods.
Typical usage is:
<code>
$pubsubService = new Google_Service_Pubsub(...);
$topics = $pubsubService->topics;
</code>

create(Google_Service_Pubsub_Topic $postBody, $optParams = array()   X-Ref
Creates the given topic with the given name. (topics.create)

param: Google_Topic $postBody
param: array $optParams Optional parameters.
return: Google_Service_Pubsub_Topic

delete($topic, $optParams = array()   X-Ref
Deletes the topic with the given name. Returns NOT_FOUND if the topic does
not exist. After a topic is deleted, a new topic may be created with the same
name. (topics.delete)

param: string $topic Name of the topic to delete.
param: array $optParams Optional parameters.

get($topic, $optParams = array()   X-Ref
Gets the configuration of a topic. Since the topic only has the name
attribute, this method is only useful to check the existence of a topic. If
other attributes are added in the future, they will be returned here.
(topics.get)

param: string $topic The name of the topic to get.
param: array $optParams Optional parameters.
return: Google_Service_Pubsub_Topic

listTopics($optParams = array()   X-Ref
Lists matching topics. (topics.listTopics)

param: array $optParams Optional parameters.
return: Google_Service_Pubsub_ListTopicsResponse

publish(Google_Service_Pubsub_PublishRequest $postBody, $optParams = array()   X-Ref
Adds a message to the topic. Returns NOT_FOUND if the topic does not exist.
(topics.publish)

param: Google_PublishRequest $postBody
param: array $optParams Optional parameters.

publishBatch(Google_Service_Pubsub_PublishBatchRequest $postBody, $optParams = array()   X-Ref
Adds one or more messages to the topic. Returns NOT_FOUND if the topic does
not exist. (topics.publishBatch)

param: Google_PublishBatchRequest $postBody
param: array $optParams Optional parameters.
return: Google_Service_Pubsub_PublishBatchResponse

Class: Google_Service_Pubsub_AcknowledgeRequest  - X-Ref

setAckId($ackId)   X-Ref
No description

getAckId()   X-Ref
No description

setSubscription($subscription)   X-Ref
No description

getSubscription()   X-Ref
No description

Class: Google_Service_Pubsub_Label  - X-Ref

setKey($key)   X-Ref
No description

getKey()   X-Ref
No description

setNumValue($numValue)   X-Ref
No description

getNumValue()   X-Ref
No description

setStrValue($strValue)   X-Ref
No description

getStrValue()   X-Ref
No description

Class: Google_Service_Pubsub_ListTopicsResponse  - X-Ref

setNextPageToken($nextPageToken)   X-Ref
No description

getNextPageToken()   X-Ref
No description

setTopic($topic)   X-Ref
No description

getTopic()   X-Ref
No description

Class: Google_Service_Pubsub_ModifyAckDeadlineRequest  - X-Ref

setAckDeadlineSeconds($ackDeadlineSeconds)   X-Ref
No description

getAckDeadlineSeconds()   X-Ref
No description

setAckId($ackId)   X-Ref
No description

getAckId()   X-Ref
No description

setAckIds($ackIds)   X-Ref
No description

getAckIds()   X-Ref
No description

setSubscription($subscription)   X-Ref
No description

getSubscription()   X-Ref
No description

Class: Google_Service_Pubsub_ModifyPushConfigRequest  - X-Ref

setPushConfig(Google_Service_Pubsub_PushConfig $pushConfig)   X-Ref
No description

getPushConfig()   X-Ref
No description

setSubscription($subscription)   X-Ref
No description

getSubscription()   X-Ref
No description

Class: Google_Service_Pubsub_PublishBatchRequest  - X-Ref

setMessages($messages)   X-Ref
No description

getMessages()   X-Ref
No description

setTopic($topic)   X-Ref
No description

getTopic()   X-Ref
No description

Class: Google_Service_Pubsub_PublishRequest  - X-Ref

setMessage(Google_Service_Pubsub_PubsubMessage $message)   X-Ref
No description

getMessage()   X-Ref
No description

setTopic($topic)   X-Ref
No description

getTopic()   X-Ref
No description

Class: Google_Service_Pubsub_PubsubEvent  - X-Ref

setDeleted($deleted)   X-Ref
No description

getDeleted()   X-Ref
No description

setMessage(Google_Service_Pubsub_PubsubMessage $message)   X-Ref
No description

getMessage()   X-Ref
No description

setSubscription($subscription)   X-Ref
No description

getSubscription()   X-Ref
No description

setTruncated($truncated)   X-Ref
No description

getTruncated()   X-Ref
No description

Class: Google_Service_Pubsub_PubsubMessage  - X-Ref

setData($data)   X-Ref
No description

getData()   X-Ref
No description

setLabel($label)   X-Ref
No description

getLabel()   X-Ref
No description

setMessageId($messageId)   X-Ref
No description

getMessageId()   X-Ref
No description

Class: Google_Service_Pubsub_PullBatchRequest  - X-Ref

setMaxEvents($maxEvents)   X-Ref
No description

getMaxEvents()   X-Ref
No description

setReturnImmediately($returnImmediately)   X-Ref
No description

getReturnImmediately()   X-Ref
No description

setSubscription($subscription)   X-Ref
No description

getSubscription()   X-Ref
No description

Class: Google_Service_Pubsub_PullRequest  - X-Ref

setReturnImmediately($returnImmediately)   X-Ref
No description

getReturnImmediately()   X-Ref
No description

setSubscription($subscription)   X-Ref
No description

getSubscription()   X-Ref
No description

Class: Google_Service_Pubsub_PullResponse  - X-Ref

setAckId($ackId)   X-Ref
No description

getAckId()   X-Ref
No description

setPubsubEvent(Google_Service_Pubsub_PubsubEvent $pubsubEvent)   X-Ref
No description

getPubsubEvent()   X-Ref
No description

Class: Google_Service_Pubsub_PushConfig  - X-Ref

setPushEndpoint($pushEndpoint)   X-Ref
No description

getPushEndpoint()   X-Ref
No description

Class: Google_Service_Pubsub_Subscription  - X-Ref

setAckDeadlineSeconds($ackDeadlineSeconds)   X-Ref
No description

getAckDeadlineSeconds()   X-Ref
No description

setName($name)   X-Ref
No description

getName()   X-Ref
No description

setPushConfig(Google_Service_Pubsub_PushConfig $pushConfig)   X-Ref
No description

getPushConfig()   X-Ref
No description

setTopic($topic)   X-Ref
No description

getTopic()   X-Ref
No description

Class: Google_Service_Pubsub_Topic  - X-Ref

setName($name)   X-Ref
No description

getName()   X-Ref
No description