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
defdata()->::String
Returns
(::String) — The message payload for PubsubMessage.
Pubsub message must contain either non-empty data, or at least one
attribute.
#data=
defdata=(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
deftopic_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,
for example projects/PROJECT_ID/topics/TOPIC_ID.
The topic must be in the same project as the Cloud Scheduler job.
#topic_name=
deftopic_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,
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,
for example projects/PROJECT_ID/topics/TOPIC_ID.
The topic must be in the same project as the Cloud Scheduler job.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[],[],null,["# Cloud Scheduler V1 API - Class Google::Cloud::Scheduler::V1::PubsubTarget (v1.3.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.3.0 (latest)](/ruby/docs/reference/google-cloud-scheduler-v1/latest/Google-Cloud-Scheduler-V1-PubsubTarget)\n- [1.2.1](/ruby/docs/reference/google-cloud-scheduler-v1/1.2.1/Google-Cloud-Scheduler-V1-PubsubTarget)\n- [1.1.0](/ruby/docs/reference/google-cloud-scheduler-v1/1.1.0/Google-Cloud-Scheduler-V1-PubsubTarget)\n- [1.0.1](/ruby/docs/reference/google-cloud-scheduler-v1/1.0.1/Google-Cloud-Scheduler-V1-PubsubTarget)\n- [0.11.0](/ruby/docs/reference/google-cloud-scheduler-v1/0.11.0/Google-Cloud-Scheduler-V1-PubsubTarget)\n- [0.10.2](/ruby/docs/reference/google-cloud-scheduler-v1/0.10.2/Google-Cloud-Scheduler-V1-PubsubTarget)\n- [0.9.1](/ruby/docs/reference/google-cloud-scheduler-v1/0.9.1/Google-Cloud-Scheduler-V1-PubsubTarget)\n- [0.8.1](/ruby/docs/reference/google-cloud-scheduler-v1/0.8.1/Google-Cloud-Scheduler-V1-PubsubTarget)\n- [0.7.0](/ruby/docs/reference/google-cloud-scheduler-v1/0.7.0/Google-Cloud-Scheduler-V1-PubsubTarget)\n- [0.6.0](/ruby/docs/reference/google-cloud-scheduler-v1/0.6.0/Google-Cloud-Scheduler-V1-PubsubTarget)\n- [0.5.0](/ruby/docs/reference/google-cloud-scheduler-v1/0.5.0/Google-Cloud-Scheduler-V1-PubsubTarget)\n- [0.4.5](/ruby/docs/reference/google-cloud-scheduler-v1/0.4.5/Google-Cloud-Scheduler-V1-PubsubTarget) \nReference documentation and code samples for the Cloud Scheduler V1 API class Google::Cloud::Scheduler::V1::PubsubTarget.\n\nPub/Sub target. The job will be delivered by publishing a message to\nthe given Pub/Sub topic. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #attributes\n\n def attributes() -\u003e ::Google::Protobuf::Map{::String =\u003e ::String}\n\n**Returns**\n\n- (::Google::Protobuf::Map{::String =\\\u003e ::String}) --- Attributes for PubsubMessage.\n\n Pubsub message must contain either non-empty data, or at least one\n attribute.\n\n### #attributes=\n\n def attributes=(value) -\u003e ::Google::Protobuf::Map{::String =\u003e ::String}\n\n**Parameter**\n\n- **value** (::Google::Protobuf::Map{::String =\\\u003e ::String}) --- Attributes for PubsubMessage.\n\n\n Pubsub message must contain either non-empty data, or at least one\nattribute. \n**Returns**\n\n- (::Google::Protobuf::Map{::String =\\\u003e ::String}) --- Attributes for PubsubMessage.\n\n Pubsub message must contain either non-empty data, or at least one\n attribute.\n\n### #data\n\n def data() -\u003e ::String\n\n**Returns**\n\n- (::String) --- The message payload for PubsubMessage.\n\n Pubsub message must contain either non-empty data, or at least one\n attribute.\n\n### #data=\n\n def data=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- The message payload for PubsubMessage.\n\n\n Pubsub message must contain either non-empty data, or at least one\nattribute. \n**Returns**\n\n- (::String) --- The message payload for PubsubMessage.\n\n Pubsub message must contain either non-empty data, or at least one\n attribute.\n\n### #topic_name\n\n def topic_name() -\u003e ::String\n\n**Returns**\n\n- (::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`.\n\n\n The topic must be in the same project as the Cloud Scheduler job.\n\n### #topic_name=\n\n def topic_name=(value) -\u003e ::String\n\n**Parameter**\n\n- **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`.\n\n\nThe topic must be in the same project as the Cloud Scheduler job. \n**Returns**\n\n- (::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`.\n\n\n The topic must be in the same project as the Cloud Scheduler job."]]