-
Notifications
You must be signed in to change notification settings - Fork 460
Expand file tree
/
Copy pathJobNotification.php
More file actions
155 lines (141 loc) · 5.61 KB
/
JobNotification.php
File metadata and controls
155 lines (141 loc) · 5.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/cloud/batch/v1/job.proto
namespace Google\Cloud\Batch\V1;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\RepeatedField;
/**
* Notification configurations.
*
* Generated from protobuf message <code>google.cloud.batch.v1.JobNotification</code>
*/
class JobNotification extends \Google\Protobuf\Internal\Message
{
/**
* The Pub/Sub topic where notifications for the job, like state
* changes, will be published. If undefined, no Pub/Sub notifications
* are sent for this job.
* Specify the topic using the following format:
* `projects/{project}/topics/{topic}`.
* Notably, if you want to specify a Pub/Sub topic that is in a
* different project than the job, your administrator must grant your
* project's Batch service agent permission to publish to that topic.
* For more information about configuring Pub/Sub notifications for
* a job, see
* https://cloud.google.com/batch/docs/enable-notifications.
*
* Generated from protobuf field <code>string pubsub_topic = 1;</code>
*/
protected $pubsub_topic = '';
/**
* The attribute requirements of messages to be sent to this Pub/Sub topic.
* Without this field, no message will be sent.
*
* Generated from protobuf field <code>.google.cloud.batch.v1.JobNotification.Message message = 2;</code>
*/
protected $message = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $pubsub_topic
* The Pub/Sub topic where notifications for the job, like state
* changes, will be published. If undefined, no Pub/Sub notifications
* are sent for this job.
* Specify the topic using the following format:
* `projects/{project}/topics/{topic}`.
* Notably, if you want to specify a Pub/Sub topic that is in a
* different project than the job, your administrator must grant your
* project's Batch service agent permission to publish to that topic.
* For more information about configuring Pub/Sub notifications for
* a job, see
* https://cloud.google.com/batch/docs/enable-notifications.
* @type \Google\Cloud\Batch\V1\JobNotification\Message $message
* The attribute requirements of messages to be sent to this Pub/Sub topic.
* Without this field, no message will be sent.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce();
parent::__construct($data);
}
/**
* The Pub/Sub topic where notifications for the job, like state
* changes, will be published. If undefined, no Pub/Sub notifications
* are sent for this job.
* Specify the topic using the following format:
* `projects/{project}/topics/{topic}`.
* Notably, if you want to specify a Pub/Sub topic that is in a
* different project than the job, your administrator must grant your
* project's Batch service agent permission to publish to that topic.
* For more information about configuring Pub/Sub notifications for
* a job, see
* https://cloud.google.com/batch/docs/enable-notifications.
*
* Generated from protobuf field <code>string pubsub_topic = 1;</code>
* @return string
*/
public function getPubsubTopic()
{
return $this->pubsub_topic;
}
/**
* The Pub/Sub topic where notifications for the job, like state
* changes, will be published. If undefined, no Pub/Sub notifications
* are sent for this job.
* Specify the topic using the following format:
* `projects/{project}/topics/{topic}`.
* Notably, if you want to specify a Pub/Sub topic that is in a
* different project than the job, your administrator must grant your
* project's Batch service agent permission to publish to that topic.
* For more information about configuring Pub/Sub notifications for
* a job, see
* https://cloud.google.com/batch/docs/enable-notifications.
*
* Generated from protobuf field <code>string pubsub_topic = 1;</code>
* @param string $var
* @return $this
*/
public function setPubsubTopic($var)
{
GPBUtil::checkString($var, True);
$this->pubsub_topic = $var;
return $this;
}
/**
* The attribute requirements of messages to be sent to this Pub/Sub topic.
* Without this field, no message will be sent.
*
* Generated from protobuf field <code>.google.cloud.batch.v1.JobNotification.Message message = 2;</code>
* @return \Google\Cloud\Batch\V1\JobNotification\Message|null
*/
public function getMessage()
{
return $this->message;
}
public function hasMessage()
{
return isset($this->message);
}
public function clearMessage()
{
unset($this->message);
}
/**
* The attribute requirements of messages to be sent to this Pub/Sub topic.
* Without this field, no message will be sent.
*
* Generated from protobuf field <code>.google.cloud.batch.v1.JobNotification.Message message = 2;</code>
* @param \Google\Cloud\Batch\V1\JobNotification\Message $var
* @return $this
*/
public function setMessage($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\JobNotification\Message::class);
$this->message = $var;
return $this;
}
}