1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace JiraRestApi\Project; |
4
|
|
|
|
5
|
|
|
use JiraRestApi\ClassSerialize; |
6
|
|
|
|
7
|
|
|
class Project implements \JsonSerializable |
8
|
|
|
{ |
9
|
|
|
use ClassSerialize; |
10
|
|
|
|
11
|
|
|
/** |
12
|
|
|
* return only if Project query by key(not id). |
13
|
|
|
* |
14
|
|
|
* @var string |
15
|
|
|
*/ |
16
|
|
|
public $expand; |
17
|
|
|
|
18
|
|
|
/** |
19
|
|
|
* Project URI. |
20
|
|
|
* |
21
|
|
|
* @var string |
22
|
|
|
*/ |
23
|
|
|
public $self; |
24
|
|
|
|
25
|
|
|
/** |
26
|
|
|
* Project id. |
27
|
|
|
* |
28
|
|
|
* @var string |
29
|
|
|
*/ |
30
|
|
|
public $id; |
31
|
|
|
|
32
|
|
|
/** |
33
|
|
|
* Project key. |
34
|
|
|
* |
35
|
|
|
* @var string |
36
|
|
|
*/ |
37
|
|
|
public $key; |
38
|
|
|
|
39
|
|
|
/** |
40
|
|
|
* Project name. |
41
|
|
|
* |
42
|
|
|
* @var string |
43
|
|
|
*/ |
44
|
|
|
public $name; |
45
|
|
|
|
46
|
|
|
/** |
47
|
|
|
* avatar URL. |
48
|
|
|
* |
49
|
|
|
* @var array |
50
|
|
|
*/ |
51
|
|
|
public $avatarUrls; |
52
|
|
|
|
53
|
|
|
/** |
54
|
|
|
* Project category. |
55
|
|
|
* |
56
|
|
|
* @var array |
57
|
|
|
*/ |
58
|
|
|
public $projectCategory; |
59
|
|
|
|
60
|
|
|
/** @var string|null */ |
61
|
|
|
public $description; |
62
|
|
|
|
63
|
|
|
/** |
64
|
|
|
* Project leader info. |
65
|
|
|
* |
66
|
|
|
* @var array |
67
|
|
|
*/ |
68
|
|
|
public $lead; |
69
|
|
|
|
70
|
|
|
/** |
71
|
|
|
* ComponentList [\JiraRestApi\Project\Component]. |
72
|
|
|
* |
73
|
|
|
* @var \JiraRestApi\Project\Component[] |
74
|
|
|
*/ |
75
|
|
|
public $components; |
76
|
|
|
|
77
|
|
|
/** |
78
|
|
|
* IssueTypeList [\JiraRestApi\Issue\IssueType]. |
79
|
|
|
* |
80
|
|
|
* @var \JiraRestApi\Issue\IssueType[] |
81
|
|
|
*/ |
82
|
|
|
public $issueTypes; |
83
|
|
|
|
84
|
|
|
/** @var string|null */ |
85
|
|
|
public $assigneeType; |
86
|
|
|
|
87
|
|
|
/** @var array|null */ |
88
|
|
|
public $versions; |
89
|
|
|
|
90
|
|
|
/** @var array|null */ |
91
|
|
|
public $roles; |
92
|
|
|
|
93
|
|
|
/** @var string */ |
94
|
|
|
public $url; |
95
|
|
|
|
96
|
|
|
/** @var string */ |
97
|
|
|
public $projectTypeKey; |
98
|
|
|
|
99
|
|
|
/** @var string */ |
100
|
|
|
public $projectTemplateKey; |
101
|
|
|
|
102
|
|
|
/** @var integer */ |
103
|
|
|
public $avatarId; |
104
|
|
|
|
105
|
|
|
/** @var integer */ |
106
|
|
|
public $issueSecurityScheme; |
107
|
|
|
|
108
|
|
|
/** @var integer */ |
109
|
|
|
public $permissionScheme; |
110
|
|
|
|
111
|
|
|
/** @var integer */ |
112
|
|
|
public $notificationScheme; |
113
|
|
|
|
114
|
|
|
/** @var integer */ |
115
|
|
|
public $categoryId; |
116
|
|
|
|
117
|
|
|
public function jsonSerialize() |
118
|
|
|
{ |
119
|
|
|
return array_filter(get_object_vars($this), function ($var) { |
120
|
|
|
return !is_null($var); |
121
|
|
|
}); |
122
|
|
|
} |
123
|
|
|
|
124
|
|
|
/** |
125
|
|
|
* @param string $id |
126
|
|
|
* @return Project |
127
|
|
|
*/ |
128
|
|
|
public function setId($id) |
129
|
|
|
{ |
130
|
|
|
$this->id = $id; |
131
|
|
|
return $this; |
132
|
|
|
} |
133
|
|
|
|
134
|
|
|
/** |
135
|
|
|
* @param string $key |
136
|
|
|
* @return Project |
137
|
|
|
*/ |
138
|
|
|
public function setKey($key) |
139
|
|
|
{ |
140
|
|
|
$this->key = $key; |
141
|
|
|
return $this; |
142
|
|
|
} |
143
|
|
|
|
144
|
|
|
/** |
145
|
|
|
* @param string $name |
146
|
|
|
* @return Project |
147
|
|
|
*/ |
148
|
|
|
public function setName($name) |
149
|
|
|
{ |
150
|
|
|
$this->name = $name; |
151
|
|
|
return $this; |
152
|
|
|
} |
153
|
|
|
|
154
|
|
|
/** |
155
|
|
|
* @param array $avatarUrls |
156
|
|
|
* @return Project |
157
|
|
|
*/ |
158
|
|
|
public function setAvatarUrls($avatarUrls) |
159
|
|
|
{ |
160
|
|
|
$this->avatarUrls = $avatarUrls; |
161
|
|
|
return $this; |
162
|
|
|
} |
163
|
|
|
|
164
|
|
|
/** |
165
|
|
|
* @param array $projectCategory |
166
|
|
|
* @return Project |
167
|
|
|
*/ |
168
|
|
|
public function setProjectCategory($projectCategory) |
169
|
|
|
{ |
170
|
|
|
$this->projectCategory = $projectCategory; |
171
|
|
|
return $this; |
172
|
|
|
} |
173
|
|
|
|
174
|
|
|
/** |
175
|
|
|
* @param null|string $description |
176
|
|
|
* @return Project |
177
|
|
|
*/ |
178
|
|
|
public function setDescription($description) |
179
|
|
|
{ |
180
|
|
|
$this->description = $description; |
181
|
|
|
return $this; |
182
|
|
|
} |
183
|
|
|
|
184
|
|
|
/** |
185
|
|
|
* @param array $lead |
186
|
|
|
* @return Project |
187
|
|
|
*/ |
188
|
|
|
public function setLead($lead) |
189
|
|
|
{ |
190
|
|
|
$this->lead = $lead; |
191
|
|
|
return $this; |
192
|
|
|
} |
193
|
|
|
|
194
|
|
|
/** |
195
|
|
|
* @param string $url |
196
|
|
|
* @return Project |
197
|
|
|
*/ |
198
|
|
|
public function setUrl($url) |
199
|
|
|
{ |
200
|
|
|
$this->url = $url; |
201
|
|
|
return $this; |
202
|
|
|
} |
203
|
|
|
|
204
|
|
|
/** |
205
|
|
|
* @param string $projectTypeKey |
206
|
|
|
* @return Project |
207
|
|
|
*/ |
208
|
|
|
public function setProjectTypeKey($projectTypeKey) |
209
|
|
|
{ |
210
|
|
|
$this->projectTypeKey = $projectTypeKey; |
211
|
|
|
return $this; |
212
|
|
|
} |
213
|
|
|
|
214
|
|
|
/** |
215
|
|
|
* @param string $projectTemplateKey |
216
|
|
|
* @return Project |
217
|
|
|
*/ |
218
|
|
|
public function setProjectTemplateKey($projectTemplateKey) |
219
|
|
|
{ |
220
|
|
|
$this->projectTemplateKey = $projectTemplateKey; |
221
|
|
|
return $this; |
222
|
|
|
} |
223
|
|
|
|
224
|
|
|
/** |
225
|
|
|
* @param int $avatarId |
226
|
|
|
* @return Project |
227
|
|
|
*/ |
228
|
|
|
public function setAvatarId($avatarId) |
229
|
|
|
{ |
230
|
|
|
$this->avatarId = $avatarId; |
231
|
|
|
return $this; |
232
|
|
|
} |
233
|
|
|
|
234
|
|
|
/** |
235
|
|
|
* @param int $issueSecurityScheme |
236
|
|
|
* @return Project |
237
|
|
|
*/ |
238
|
|
|
public function setIssueSecurityScheme($issueSecurityScheme) |
239
|
|
|
{ |
240
|
|
|
$this->issueSecurityScheme = $issueSecurityScheme; |
241
|
|
|
return $this; |
242
|
|
|
} |
243
|
|
|
|
244
|
|
|
/** |
245
|
|
|
* @param int $permissionScheme |
246
|
|
|
* @return Project |
247
|
|
|
*/ |
248
|
|
|
public function setPermissionScheme($permissionScheme) |
249
|
|
|
{ |
250
|
|
|
$this->permissionScheme = $permissionScheme; |
251
|
|
|
return $this; |
252
|
|
|
} |
253
|
|
|
|
254
|
|
|
/** |
255
|
|
|
* @param int $notificationScheme |
256
|
|
|
* @return Project |
257
|
|
|
*/ |
258
|
|
|
public function setNotificationScheme($notificationScheme) |
259
|
|
|
{ |
260
|
|
|
$this->notificationScheme = $notificationScheme; |
261
|
|
|
return $this; |
262
|
|
|
} |
263
|
|
|
|
264
|
|
|
/** |
265
|
|
|
* @param int $categoryId |
266
|
|
|
* @return Project |
267
|
|
|
*/ |
268
|
|
|
public function setCategoryId($categoryId) |
269
|
|
|
{ |
270
|
|
|
$this->categoryId = $categoryId; |
271
|
|
|
return $this; |
272
|
|
|
} |
273
|
|
|
|
274
|
|
|
/** |
275
|
|
|
* @param null|string $assigneeType |
276
|
|
|
* @return Project |
277
|
|
|
*/ |
278
|
|
|
public function setAssigneeType($assigneeType) |
279
|
|
|
{ |
280
|
|
|
$this->assigneeType = $assigneeType; |
281
|
|
|
return $this; |
282
|
|
|
} |
283
|
|
|
} |
284
|
|
|
|