PubSub/src/V1/UpdateTopicRequest.php
public function setTopic($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\PubSub\V1\Topic::class);
        $this->topic = $var;

        return $this;
    }
public function setTopic($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\PubSub\V1\Topic::class);
        $this->topic = $var;

        return $this;
    }
public function setTopic ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ PubSub \ V1 \ Topic :: class ) ; $ this -> topic = $ var ; return $ this ; }
The updated topic object.

Generated from protobuf field <code>.google.pubsub.v1.Topic topic = 1;</code>
@param \Google\Cloud\PubSub\V1\Topic $var
@return $this
The updated topic object .