Reference documentation and code samples for the Cloud Scheduler V1beta1 Client class PubsubTarget.
Pub/Sub target. The job will be delivered by publishing a message to the given Pub/Sub topic.
Generated from protobuf message google.cloud.scheduler.v1beta1.PubsubTarget
Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ topic_name |
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 PubSub's PublishRequest.name, for example |
↳ data |
string
The message payload for PubsubMessage. Pubsub message must contain either non-empty data, or at least one attribute. |
↳ attributes |
array|Google\Protobuf\Internal\MapField
Attributes for PubsubMessage. Pubsub message must contain either non-empty data, or at least one attribute. |
getTopicName
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 PubSub's
PublishRequest.name,
for example projects/PROJECT_ID/topics/TOPIC_ID
.
The topic must be in the same project as the Cloud Scheduler job.
Generated from protobuf field string topic_name = 1 [(.google.api.resource_reference) = {
Returns | |
---|---|
Type | Description |
string |
setTopicName
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 PubSub's
PublishRequest.name,
for example projects/PROJECT_ID/topics/TOPIC_ID
.
The topic must be in the same project as the Cloud Scheduler job.
Generated from protobuf field string topic_name = 1 [(.google.api.resource_reference) = {
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getData
The message payload for PubsubMessage.
Pubsub message must contain either non-empty data, or at least one attribute.
Generated from protobuf field bytes data = 3;
Returns | |
---|---|
Type | Description |
string |
setData
The message payload for PubsubMessage.
Pubsub message must contain either non-empty data, or at least one attribute.
Generated from protobuf field bytes data = 3;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getAttributes
Attributes for PubsubMessage.
Pubsub message must contain either non-empty data, or at least one attribute.
Generated from protobuf field map<string, string> attributes = 4;
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\MapField |
setAttributes
Attributes for PubsubMessage.
Pubsub message must contain either non-empty data, or at least one attribute.
Generated from protobuf field map<string, string> attributes = 4;
Parameter | |
---|---|
Name | Description |
var |
array|Google\Protobuf\Internal\MapField
|
Returns | |
---|---|
Type | Description |
$this |