Documentation

Google_Service_Pubsub_Resource_ProjectsTopics extends Google_Service_Resource
in package

The "topics" collection of methods.

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

Table of Contents

$client  : Google_Client
$methods  : array<string|int, mixed>
$resourceName  : string
$rootUrl  : string
$serviceName  : string
$servicePath  : string
$stackParameters  : mixed
__construct()  : mixed
call()  : Google_Http_Request|expectedClass
TODO: This function needs simplifying.
create()  : Google_Service_Pubsub_Topic
Creates the given topic with the given name. See the [resource name rules]( https://cloud.google.com/pubsub/docs/admin#resource_names). (topics.create)
createRequestUri()  : string
Parse/expand request parameters and create a fully qualified request uri.
delete()  : Google_Service_Pubsub_PubsubEmpty
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; this is an entirely new topic with none of the old configuration or subscriptions. Existing subscriptions to this topic are not deleted, but their `topic` field is set to `_deleted-topic_`. (topics.delete)
get()  : Google_Service_Pubsub_Topic
Gets the configuration of a topic. (topics.get)
getIamPolicy()  : Google_Service_Pubsub_Policy
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. (topics.getIamPolicy)
listProjectsTopics()  : Google_Service_Pubsub_ListTopicsResponse
Lists matching topics. (topics.listProjectsTopics)
patch()  : Google_Service_Pubsub_Topic
Updates an existing topic. Note that certain properties of a topic are not modifiable. (topics.patch)
publish()  : Google_Service_Pubsub_PublishResponse
Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic does not exist. (topics.publish)
setIamPolicy()  : Google_Service_Pubsub_Policy
Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. (topics.setIamPolicy)
testIamPermissions()  : Google_Service_Pubsub_TestIamPermissionsResponse
Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking.
convertToArrayAndStripNulls()  : mixed

Properties

$methods

private array<string|int, mixed> $methods

$resourceName

private string $resourceName

$serviceName

private string $serviceName

$servicePath

private string $servicePath

$stackParameters

private mixed $stackParameters = array('alt' => array('type' => 'string', 'location' => 'query'), 'fields' => array('type' => 'string', 'location' => 'query'), 'trace' => array('type' => 'string', 'location' => 'query'), 'userIp' => array('type' => 'string', 'location' => 'query'), 'quotaUser' => array('type' => 'string', 'location' => 'query'), 'data' => array('type' => 'string', 'location' => 'body'), 'mimeType' => array('type' => 'string', 'location' => 'header'), 'uploadType' => array('type' => 'string', 'location' => 'query'), 'mediaUpload' => array('type' => 'complex', 'location' => 'query'), 'prettyPrint' => array('type' => 'string', 'location' => 'query'))

Methods

__construct()

public __construct(mixed $service, mixed $serviceName, mixed $resourceName, mixed $resource) : mixed
Parameters
$service : mixed
$serviceName : mixed
$resourceName : mixed
$resource : mixed
Return values
mixed

call()

TODO: This function needs simplifying.

public call( $name,  $arguments[,  $expectedClass = null ]) : Google_Http_Request|expectedClass
Parameters
$name :
$arguments :
$expectedClass : = null
  • optional, the expected class name
Tags
throws
Google_Exception
Return values
Google_Http_Request|expectedClass

create()

Creates the given topic with the given name. See the [resource name rules]( https://cloud.google.com/pubsub/docs/admin#resource_names). (topics.create)

public create(string $name, Google_Service_Pubsub_Topic $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Pubsub_Topic
Parameters
$name : string

Required. The name of the topic. It must have the format "projects/{project}/topics/{topic}". {topic} must start with a letter, and contain only letters ([A-Za-z]), numbers ([0-9]), dashes (-), underscores (_), periods (.), tildes (~), plus (+) or percent signs (%). It must be between 3 and 255 characters in length, and it must not start with "goog".

$postBody : Google_Service_Pubsub_Topic
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_Pubsub_Topic

createRequestUri()

Parse/expand request parameters and create a fully qualified request uri.

public createRequestUri(string $restPath, array<string|int, mixed> $params) : string
Parameters
$restPath : string
$params : array<string|int, mixed>
Tags
static
Return values
string

$requestUrl

delete()

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; this is an entirely new topic with none of the old configuration or subscriptions. Existing subscriptions to this topic are not deleted, but their `topic` field is set to `_deleted-topic_`. (topics.delete)

public delete(string $topic[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Pubsub_PubsubEmpty
Parameters
$topic : string

Required. Name of the topic to delete. Format is projects/{project}/topics/{topic}.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_Pubsub_PubsubEmpty

get()

Gets the configuration of a topic. (topics.get)

public get(string $topic[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Pubsub_Topic
Parameters
$topic : string

Required. The name of the topic to get. Format is projects/{project}/topics/{topic}.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_Pubsub_Topic

getIamPolicy()

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. (topics.getIamPolicy)

public getIamPolicy(string $resource[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Pubsub_Policy
Parameters
$resource : string

REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

int options.requestedPolicyVersion Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource- policies).

Return values
Google_Service_Pubsub_Policy

listProjectsTopics()

Lists matching topics. (topics.listProjectsTopics)

public listProjectsTopics(string $project[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Pubsub_ListTopicsResponse
Parameters
$project : string

Required. The name of the project in which to list topics. Format is projects/{project-id}.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

int pageSize Maximum number of topics to return.

opt_param

string pageToken The value returned by the last ListTopicsResponse; indicates that this is a continuation of a prior ListTopics call, and that the system should return the next page of data.

Return values
Google_Service_Pubsub_ListTopicsResponse

patch()

Updates an existing topic. Note that certain properties of a topic are not modifiable. (topics.patch)

public patch(string $name, Google_Service_Pubsub_UpdateTopicRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Pubsub_Topic
Parameters
$name : string

Required. The name of the topic. It must have the format "projects/{project}/topics/{topic}". {topic} must start with a letter, and contain only letters ([A-Za-z]), numbers ([0-9]), dashes (-), underscores (_), periods (.), tildes (~), plus (+) or percent signs (%). It must be between 3 and 255 characters in length, and it must not start with "goog".

$postBody : Google_Service_Pubsub_UpdateTopicRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_Pubsub_Topic

publish()

Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic does not exist. (topics.publish)

public publish(string $topic, Google_Service_Pubsub_PublishRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Pubsub_PublishResponse
Parameters
$topic : string

Required. The messages in the request will be published on this topic. Format is projects/{project}/topics/{topic}.

$postBody : Google_Service_Pubsub_PublishRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_Pubsub_PublishResponse

setIamPolicy()

Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. (topics.setIamPolicy)

public setIamPolicy(string $resource, Google_Service_Pubsub_SetIamPolicyRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Pubsub_Policy
Parameters
$resource : string

REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

$postBody : Google_Service_Pubsub_SetIamPolicyRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_Pubsub_Policy

testIamPermissions()

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking.

public testIamPermissions(string $resource, Google_Service_Pubsub_TestIamPermissionsRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Pubsub_TestIamPermissionsResponse

This operation may "fail open" without warning. (topics.testIamPermissions)

Parameters
$resource : string

REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.

$postBody : Google_Service_Pubsub_TestIamPermissionsRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_Pubsub_TestIamPermissionsResponse

convertToArrayAndStripNulls()

protected convertToArrayAndStripNulls(mixed $o) : mixed
Parameters
$o : mixed
Return values
mixed

Search results