public function setPubSub($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\Action_PublishToPubSub::class);
        $this->writeOneof(2, $var);

        return $this;
    }
public function setPubSub($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\Action_PublishToPubSub::class);
        $this->writeOneof(2, $var);

        return $this;
    }
public function setPubSub ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ Dlp \ V2 \ Action_PublishToPubSub :: class ) ; $ this -> writeOneof ( 2 , $ var ) ; return $ this ; }
Publish a notification to a pubsub topic.

Generated from protobuf field <code>.google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2;</code>
@param \Google\Cloud\Dlp\V2\Action\PublishToPubSub $var
@return $this
Publish a notification to a pubsub topic .