1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
* This file is part of the zibios/wrike-php-jmsserializer package. |
5
|
|
|
* |
6
|
|
|
* (c) Zbigniew Ślązak |
7
|
|
|
* |
8
|
|
|
* For the full copyright and license information, please view the LICENSE |
9
|
|
|
* file that was distributed with this source code. |
10
|
|
|
*/ |
11
|
|
|
|
12
|
|
|
namespace Zibios\WrikePhpJmsserializer\Model\Workflow; |
13
|
|
|
|
14
|
|
|
use Zibios\WrikePhpJmsserializer\Model\Common\CustomStatusModel; |
15
|
|
|
use Zibios\WrikePhpJmsserializer\Model\ResourceModelInterface; |
16
|
|
|
|
17
|
|
|
/** |
18
|
|
|
* Workflow Resource Model. |
19
|
|
|
*/ |
20
|
|
|
class WorkflowResourceModel implements ResourceModelInterface |
21
|
|
|
{ |
22
|
|
|
/** |
23
|
|
|
* Workflow ID. |
24
|
|
|
* |
25
|
|
|
* Comment: Workflow ID |
26
|
|
|
* |
27
|
|
|
* @SA\Type("string") |
28
|
|
|
* @SA\SerializedName("id") |
29
|
|
|
* |
30
|
|
|
* @var string|null |
31
|
|
|
*/ |
32
|
|
|
protected $id; |
33
|
|
|
|
34
|
|
|
/** |
35
|
|
|
* Name (128 symbols max). |
36
|
|
|
* |
37
|
|
|
* @SA\Type("string") |
38
|
|
|
* @SA\SerializedName("name") |
39
|
|
|
* |
40
|
|
|
* @var string|null |
41
|
|
|
*/ |
42
|
|
|
protected $name; |
43
|
|
|
|
44
|
|
|
/** |
45
|
|
|
* Defines default workflow. |
46
|
|
|
* |
47
|
|
|
* @SA\Type("boolean") |
48
|
|
|
* @SA\SerializedName("standard") |
49
|
|
|
* |
50
|
|
|
* @var bool|null |
51
|
|
|
*/ |
52
|
|
|
protected $standard; |
53
|
|
|
|
54
|
|
|
/** |
55
|
|
|
* Workflow is hidden. |
56
|
|
|
* |
57
|
|
|
* @SA\Type("boolean") |
58
|
|
|
* @SA\SerializedName("hidden") |
59
|
|
|
* |
60
|
|
|
* @var bool|null |
61
|
|
|
*/ |
62
|
|
|
protected $hidden; |
63
|
|
|
|
64
|
|
|
/** |
65
|
|
|
* Custom statuses. |
66
|
|
|
* |
67
|
|
|
* ID and group cannot be set simultaneously in request parameter, |
68
|
|
|
* but ID is required for update, and group is required for insert |
69
|
|
|
* |
70
|
|
|
* @SA\Type("array<Zibios\WrikePhpJmsserializer\Model\Common\CustomStatusModel>") |
71
|
|
|
* @SA\SerializedName("customStatuses") |
72
|
|
|
* |
73
|
|
|
* @var array|CustomStatusModel[]|null |
74
|
|
|
*/ |
75
|
|
|
protected $customStatuses; |
76
|
|
|
|
77
|
|
|
/** |
78
|
|
|
* @return null|string |
79
|
|
|
*/ |
80
|
1 |
|
public function getId() |
81
|
|
|
{ |
82
|
1 |
|
return $this->id; |
83
|
|
|
} |
84
|
|
|
|
85
|
|
|
/** |
86
|
|
|
* @param null|string $id |
87
|
|
|
* |
88
|
|
|
* @return WorkflowResourceModel |
89
|
|
|
*/ |
90
|
1 |
|
public function setId($id) |
91
|
|
|
{ |
92
|
1 |
|
$this->id = $id; |
93
|
|
|
|
94
|
1 |
|
return $this; |
95
|
|
|
} |
96
|
|
|
|
97
|
|
|
/** |
98
|
|
|
* @return null|string |
99
|
|
|
*/ |
100
|
1 |
|
public function getName() |
101
|
|
|
{ |
102
|
1 |
|
return $this->name; |
103
|
|
|
} |
104
|
|
|
|
105
|
|
|
/** |
106
|
|
|
* @param null|string $name |
107
|
|
|
* |
108
|
|
|
* @return $this |
109
|
|
|
*/ |
110
|
1 |
|
public function setName($name) |
111
|
|
|
{ |
112
|
1 |
|
$this->name = $name; |
113
|
|
|
|
114
|
1 |
|
return $this; |
115
|
|
|
} |
116
|
|
|
|
117
|
|
|
/** |
118
|
|
|
* @return bool|null |
119
|
|
|
*/ |
120
|
1 |
|
public function getStandard() |
121
|
|
|
{ |
122
|
1 |
|
return $this->standard; |
123
|
|
|
} |
124
|
|
|
|
125
|
|
|
/** |
126
|
|
|
* @param bool|null $standard |
127
|
|
|
* |
128
|
|
|
* @return $this |
129
|
|
|
*/ |
130
|
1 |
|
public function setStandard($standard) |
131
|
|
|
{ |
132
|
1 |
|
$this->standard = $standard; |
133
|
|
|
|
134
|
1 |
|
return $this; |
135
|
|
|
} |
136
|
|
|
|
137
|
|
|
/** |
138
|
|
|
* @return bool|null |
139
|
|
|
*/ |
140
|
1 |
|
public function getHidden() |
141
|
|
|
{ |
142
|
1 |
|
return $this->hidden; |
143
|
|
|
} |
144
|
|
|
|
145
|
|
|
/** |
146
|
|
|
* @param bool|null $hidden |
147
|
|
|
* |
148
|
|
|
* @return $this |
149
|
|
|
*/ |
150
|
1 |
|
public function setHidden($hidden) |
151
|
|
|
{ |
152
|
1 |
|
$this->hidden = $hidden; |
153
|
|
|
|
154
|
1 |
|
return $this; |
155
|
|
|
} |
156
|
|
|
|
157
|
|
|
/** |
158
|
|
|
* @return array|null|CustomStatusModel[] |
159
|
|
|
*/ |
160
|
1 |
|
public function getCustomStatuses() |
161
|
|
|
{ |
162
|
1 |
|
return $this->customStatuses; |
163
|
|
|
} |
164
|
|
|
|
165
|
|
|
/** |
166
|
|
|
* @param array|null|CustomStatusModel[] $customStatuses |
167
|
|
|
* |
168
|
|
|
* @return $this |
169
|
|
|
*/ |
170
|
1 |
|
public function setCustomStatuses($customStatuses) |
171
|
|
|
{ |
172
|
1 |
|
$this->customStatuses = $customStatuses; |
173
|
|
|
|
174
|
1 |
|
return $this; |
175
|
|
|
} |
176
|
|
|
} |
177
|
|
|
|