# Eventarc V1 API - Class Google::Cloud::Eventarc::V1::Pubsub (v2.8.0)

2.8.0 (latest) 2.7.1 2.6.0 2.5.0 2.4.1 2.3.0 2.2.0 2.1.0 2.0.1 1.3.0 1.2.0 1.1.0 1.0.1 0.10.0 0.9.2 0.8.0 0.7.0 0.6.0 0.5.0 0.4.0 0.3.0 0.2.1 0.1.4 Reference documentation and code samples for the Eventarc V1 API class Google::Cloud::Eventarc::V1::Pubsub.

Represents a Pub/Sub transport.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #subscription

    def subscription() -> ::String

**Returns**

- (::String) --- Output only. The name of the Pub/Sub subscription created and managed by Eventarc as a transport for the event delivery. Format: `projects/{PROJECT_ID}/subscriptions/{SUBSCRIPTION_NAME}`.

### #topic

    def topic() -> ::String

**Returns**

- (::String) --- Optional. The name of the Pub/Sub topic created and managed by Eventarc as a transport for the event delivery. Format: `projects/{PROJECT_ID}/topics/{TOPIC_NAME}`.


  You can set an existing topic for triggers of the type
  `google.cloud.pubsub.topic.v1.messagePublished`. The topic you provide
  here is not deleted by Eventarc at trigger deletion.

### #topic=

    def topic=(value) -> ::String

**Parameter**

- **value** (::String) --- Optional. The name of the Pub/Sub topic created and managed by Eventarc as a transport for the event delivery. Format: `projects/{PROJECT_ID}/topics/{TOPIC_NAME}`.


  You can set an existing topic for triggers of the type
  `google.cloud.pubsub.topic.v1.messagePublished`. The topic you provide
  here is not deleted by Eventarc at trigger deletion.
**Returns**

- (::String) --- Optional. The name of the Pub/Sub topic created and managed by Eventarc as a transport for the event delivery. Format: `projects/{PROJECT_ID}/topics/{TOPIC_NAME}`.


  You can set an existing topic for triggers of the type
  `google.cloud.pubsub.topic.v1.messagePublished`. The topic you provide
  here is not deleted by Eventarc at trigger deletion.