-
Notifications
You must be signed in to change notification settings - Fork 319
Expand file tree
/
Copy pathStatusEvent.php
More file actions
164 lines (160 loc) · 3.53 KB
/
StatusEvent.php
File metadata and controls
164 lines (160 loc) · 3.53 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
155
156
157
158
159
160
161
162
163
164
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Batch;
class StatusEvent extends \Google\Model
{
/**
* Unknown state.
*/
public const TASK_STATE_STATE_UNSPECIFIED = 'STATE_UNSPECIFIED';
/**
* The Task is created and waiting for resources.
*/
public const TASK_STATE_PENDING = 'PENDING';
/**
* The Task is assigned to at least one VM.
*/
public const TASK_STATE_ASSIGNED = 'ASSIGNED';
/**
* The Task is running.
*/
public const TASK_STATE_RUNNING = 'RUNNING';
/**
* The Task has failed.
*/
public const TASK_STATE_FAILED = 'FAILED';
/**
* The Task has succeeded.
*/
public const TASK_STATE_SUCCEEDED = 'SUCCEEDED';
/**
* The Task has not been executed when the Job finishes.
*/
public const TASK_STATE_UNEXECUTED = 'UNEXECUTED';
/**
* Description of the event.
*
* @var string
*/
public $description;
/**
* The time this event occurred.
*
* @var string
*/
public $eventTime;
protected $taskExecutionType = TaskExecution::class;
protected $taskExecutionDataType = '';
/**
* Task State. This field is only defined for task-level status events.
*
* @var string
*/
public $taskState;
/**
* Type of the event.
*
* @var string
*/
public $type;
/**
* Description of the event.
*
* @param string $description
*/
public function setDescription($description)
{
$this->description = $description;
}
/**
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* The time this event occurred.
*
* @param string $eventTime
*/
public function setEventTime($eventTime)
{
$this->eventTime = $eventTime;
}
/**
* @return string
*/
public function getEventTime()
{
return $this->eventTime;
}
/**
* Task Execution. This field is only defined for task-level status events
* where the task fails.
*
* @param TaskExecution $taskExecution
*/
public function setTaskExecution(TaskExecution $taskExecution)
{
$this->taskExecution = $taskExecution;
}
/**
* @return TaskExecution
*/
public function getTaskExecution()
{
return $this->taskExecution;
}
/**
* Task State. This field is only defined for task-level status events.
*
* Accepted values: STATE_UNSPECIFIED, PENDING, ASSIGNED, RUNNING, FAILED,
* SUCCEEDED, UNEXECUTED
*
* @param self::TASK_STATE_* $taskState
*/
public function setTaskState($taskState)
{
$this->taskState = $taskState;
}
/**
* @return self::TASK_STATE_*
*/
public function getTaskState()
{
return $this->taskState;
}
/**
* Type of the event.
*
* @param string $type
*/
public function setType($type)
{
$this->type = $type;
}
/**
* @return string
*/
public function getType()
{
return $this->type;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(StatusEvent::class, 'Google_Service_Batch_StatusEvent');