Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
Google_Service_Pubsub_Topics_Resource Class Reference

The "topics" collection of methods. More...

Inheritance diagram for Google_Service_Pubsub_Topics_Resource:
Google_Service_Resource

Public Member Functions

 call ($name, $arguments, $expected_class=null)
 TODO: This function needs simplifying.
 
 create (Google_Service_Pubsub_Topic $postBody, $optParams=array())
 Creates the given topic with the given name.
 
 delete ($topic, $optParams=array())
 Deletes the topic with the given name.
 
 get ($topic, $optParams=array())
 Gets the configuration of a topic.
 
 listTopics ($optParams=array())
 Lists matching topics.
 
 publish (Google_Service_Pubsub_PublishRequest $postBody, $optParams=array())
 Adds a message to the topic.
 
 publishBatch (Google_Service_Pubsub_PublishBatchRequest $postBody, $optParams=array())
 Adds one or more messages to the topic.
 

Protected Member Functions

 convertToArrayAndStripNulls ($o)
 

Detailed Description

The "topics" collection of methods.

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

Member Function Documentation

◆ 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_Topics_Resource::create ( Google_Service_Pubsub_Topic $postBody,
$optParams = array() )

Creates the given topic with the given name.

(topics.create)

Parameters
Google_Topic$postBody
array$optParamsOptional parameters.
Return values
Google_Service_Pubsub_Topic

◆ delete()

Google_Service_Pubsub_Topics_Resource::delete ( $topic,
$optParams = array() )

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)

Parameters
string$topicName of the topic to delete.
array$optParamsOptional parameters.

◆ get()

Google_Service_Pubsub_Topics_Resource::get ( $topic,
$optParams = array() )

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)

Parameters
string$topicThe name of the topic to get.
array$optParamsOptional parameters.
Return values
Google_Service_Pubsub_Topic

◆ listTopics()

Google_Service_Pubsub_Topics_Resource::listTopics ( $optParams = array())

Lists matching topics.

(topics.listTopics)

Parameters
array$optParamsOptional parameters.

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

Return values
Google_Service_Pubsub_ListTopicsResponse

◆ publish()

Google_Service_Pubsub_Topics_Resource::publish ( Google_Service_Pubsub_PublishRequest $postBody,
$optParams = array() )

Adds a message to the topic.

Returns NOT_FOUND if the topic does not exist. (topics.publish)

Parameters
Google_PublishRequest$postBody
array$optParamsOptional parameters.

◆ publishBatch()

Google_Service_Pubsub_Topics_Resource::publishBatch ( Google_Service_Pubsub_PublishBatchRequest $postBody,
$optParams = array() )

Adds one or more messages to the topic.

Returns NOT_FOUND if the topic does not exist. (topics.publishBatch)

Parameters
Google_PublishBatchRequest$postBody
array$optParamsOptional parameters.
Return values
Google_Service_Pubsub_PublishBatchResponse

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