# Cloud Scheduler V1beta1 API - Class Google::Cloud::Scheduler::V1beta1::PubsubTarget (v0.18.0)

0.18.0 (latest) 0.17.1 0.16.0 0.15.1 0.14.0 0.13.1 0.12.0 0.11.1 0.10.2 0.9.1 0.8.1 0.7.0 0.6.0 0.5.0 0.4.5 Reference documentation and code samples for the Cloud Scheduler V1beta1 API class Google::Cloud::Scheduler::V1beta1::PubsubTarget.

Pub/Sub target. The job will be delivered by publishing a message to
the given Pub/Sub topic.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #attributes

    def attributes() -> ::Google::Protobuf::Map{::String => ::String}

**Returns**

- (::Google::Protobuf::Map{::String =\> ::String}) --- Attributes for PubsubMessage.

  Pubsub message must contain either non-empty data, or at least one
  attribute.

### #attributes=

    def attributes=(value) -> ::Google::Protobuf::Map{::String => ::String}

**Parameter**

- **value** (::Google::Protobuf::Map{::String =\> ::String}) --- Attributes for PubsubMessage.


  Pubsub message must contain either non-empty data, or at least one
  attribute.
**Returns**

- (::Google::Protobuf::Map{::String =\> ::String}) --- Attributes for PubsubMessage.

  Pubsub message must contain either non-empty data, or at least one
  attribute.

### #data

    def data() -> ::String

**Returns**

- (::String) --- The message payload for PubsubMessage.

  Pubsub message must contain either non-empty data, or at least one
  attribute.

### #data=

    def data=(value) -> ::String

**Parameter**

- **value** (::String) --- The message payload for PubsubMessage.


  Pubsub message must contain either non-empty data, or at least one
  attribute.
**Returns**

- (::String) --- The message payload for PubsubMessage.

  Pubsub message must contain either non-empty data, or at least one
  attribute.

### #topic_name

    def topic_name() -> ::String

**Returns**

- (::String) --- Required. The name of the Cloud Pub/Sub topic to which messages will be published when a job is delivered. The topic name must be in the same format as required by Pub/Sub's [PublishRequest.name](https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#publishrequest), for example `projects/PROJECT_ID/topics/TOPIC_ID`.


  The topic must be in the same project as the Cloud Scheduler job.

### #topic_name=

    def topic_name=(value) -> ::String

**Parameter**

- **value** (::String) --- Required. The name of the Cloud Pub/Sub topic to which messages will be published when a job is delivered. The topic name must be in the same format as required by Pub/Sub's [PublishRequest.name](https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#publishrequest), for example `projects/PROJECT_ID/topics/TOPIC_ID`.


  The topic must be in the same project as the Cloud Scheduler job.
**Returns**

- (::String) --- Required. The name of the Cloud Pub/Sub topic to which messages will be published when a job is delivered. The topic name must be in the same format as required by Pub/Sub's [PublishRequest.name](https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#publishrequest), for example `projects/PROJECT_ID/topics/TOPIC_ID`.


  The topic must be in the same project as the Cloud Scheduler job.