-
Notifications
You must be signed in to change notification settings - Fork 460
Expand file tree
/
Copy pathLifecyclePolicy.php
More file actions
128 lines (114 loc) · 4.49 KB
/
LifecyclePolicy.php
File metadata and controls
128 lines (114 loc) · 4.49 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
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/cloud/batch/v1/task.proto
namespace Google\Cloud\Batch\V1;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\RepeatedField;
/**
* LifecyclePolicy describes how to deal with task failures
* based on different conditions.
*
* Generated from protobuf message <code>google.cloud.batch.v1.LifecyclePolicy</code>
*/
class LifecyclePolicy extends \Google\Protobuf\Internal\Message
{
/**
* Action to execute when ActionCondition is true.
* When RETRY_TASK is specified, we will retry failed tasks
* if we notice any exit code match and fail tasks if no match is found.
* Likewise, when FAIL_TASK is specified, we will fail tasks
* if we notice any exit code match and retry tasks if no match is found.
*
* Generated from protobuf field <code>.google.cloud.batch.v1.LifecyclePolicy.Action action = 1;</code>
*/
protected $action = 0;
/**
* Conditions that decide why a task failure is dealt with a specific action.
*
* Generated from protobuf field <code>.google.cloud.batch.v1.LifecyclePolicy.ActionCondition action_condition = 2;</code>
*/
protected $action_condition = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type int $action
* Action to execute when ActionCondition is true.
* When RETRY_TASK is specified, we will retry failed tasks
* if we notice any exit code match and fail tasks if no match is found.
* Likewise, when FAIL_TASK is specified, we will fail tasks
* if we notice any exit code match and retry tasks if no match is found.
* @type \Google\Cloud\Batch\V1\LifecyclePolicy\ActionCondition $action_condition
* Conditions that decide why a task failure is dealt with a specific action.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce();
parent::__construct($data);
}
/**
* Action to execute when ActionCondition is true.
* When RETRY_TASK is specified, we will retry failed tasks
* if we notice any exit code match and fail tasks if no match is found.
* Likewise, when FAIL_TASK is specified, we will fail tasks
* if we notice any exit code match and retry tasks if no match is found.
*
* Generated from protobuf field <code>.google.cloud.batch.v1.LifecyclePolicy.Action action = 1;</code>
* @return int
*/
public function getAction()
{
return $this->action;
}
/**
* Action to execute when ActionCondition is true.
* When RETRY_TASK is specified, we will retry failed tasks
* if we notice any exit code match and fail tasks if no match is found.
* Likewise, when FAIL_TASK is specified, we will fail tasks
* if we notice any exit code match and retry tasks if no match is found.
*
* Generated from protobuf field <code>.google.cloud.batch.v1.LifecyclePolicy.Action action = 1;</code>
* @param int $var
* @return $this
*/
public function setAction($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\LifecyclePolicy\Action::class);
$this->action = $var;
return $this;
}
/**
* Conditions that decide why a task failure is dealt with a specific action.
*
* Generated from protobuf field <code>.google.cloud.batch.v1.LifecyclePolicy.ActionCondition action_condition = 2;</code>
* @return \Google\Cloud\Batch\V1\LifecyclePolicy\ActionCondition|null
*/
public function getActionCondition()
{
return $this->action_condition;
}
public function hasActionCondition()
{
return isset($this->action_condition);
}
public function clearActionCondition()
{
unset($this->action_condition);
}
/**
* Conditions that decide why a task failure is dealt with a specific action.
*
* Generated from protobuf field <code>.google.cloud.batch.v1.LifecyclePolicy.ActionCondition action_condition = 2;</code>
* @param \Google\Cloud\Batch\V1\LifecyclePolicy\ActionCondition $var
* @return $this
*/
public function setActionCondition($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\LifecyclePolicy\ActionCondition::class);
$this->action_condition = $var;
return $this;
}
}