Cloud PubSub V1 Client - Class GetTopicRequest (2.16.0)

Reference documentation and code samples for the Cloud PubSub V1 Client class GetTopicRequest.

Request for the GetTopic method.

Generated from protobuf message google.pubsub.v1.GetTopicRequest

Namespace

Google \ Cloud \ PubSub \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ topic string

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

getTopic

Required. The name of the topic to get.

Format is projects/{project}/topics/{topic}.

Returns
Type Description
string

setTopic

Required. The name of the topic to get.

Format is projects/{project}/topics/{topic}.

Parameter
Name Description
var string
Returns
Type Description
$this

static::build

Parameter
Name Description
topic string

Required. The name of the topic to get. Format is projects/{project}/topics/{topic}. Please see PublisherClient::topicName() for help formatting this field.

Returns
Type Description
GetTopicRequest

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.