|
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\Group; |
|
13
|
|
|
|
|
14
|
|
|
use JMS\Serializer\Annotation as SA; |
|
15
|
|
|
use Zibios\WrikePhpJmsserializer\Model\AbstractModel; |
|
16
|
|
|
use Zibios\WrikePhpJmsserializer\Model\Common\MetadataModel; |
|
17
|
|
|
use Zibios\WrikePhpJmsserializer\Model\ResourceModelInterface; |
|
18
|
|
|
|
|
19
|
|
|
/** |
|
20
|
|
|
* Group Resource Model. |
|
21
|
|
|
*/ |
|
22
|
|
|
class GroupResourceModel extends AbstractModel implements ResourceModelInterface |
|
23
|
|
|
{ |
|
24
|
|
|
/** |
|
25
|
|
|
* Contact ID. |
|
26
|
|
|
* |
|
27
|
|
|
* Comment: Contact ID |
|
28
|
|
|
* |
|
29
|
|
|
* @SA\Type("string") |
|
30
|
|
|
* @SA\SerializedName("id") |
|
31
|
|
|
* |
|
32
|
|
|
* @var string|null |
|
33
|
|
|
*/ |
|
34
|
|
|
protected $id; |
|
35
|
|
|
|
|
36
|
|
|
/** |
|
37
|
|
|
* Account ID. |
|
38
|
|
|
* |
|
39
|
|
|
* Comment: Account ID |
|
40
|
|
|
* |
|
41
|
|
|
* @SA\Type("string") |
|
42
|
|
|
* @SA\SerializedName("accountId") |
|
43
|
|
|
* |
|
44
|
|
|
* @var string|null |
|
45
|
|
|
*/ |
|
46
|
|
|
protected $accountId; |
|
47
|
|
|
|
|
48
|
|
|
/** |
|
49
|
|
|
* Group Title. |
|
50
|
|
|
* |
|
51
|
|
|
* @SA\Type("string") |
|
52
|
|
|
* @SA\SerializedName("title") |
|
53
|
|
|
* |
|
54
|
|
|
* @var string|null |
|
55
|
|
|
*/ |
|
56
|
|
|
protected $title; |
|
57
|
|
|
|
|
58
|
|
|
/** |
|
59
|
|
|
* List of group members user IDs. |
|
60
|
|
|
* |
|
61
|
|
|
* Comment: Contact ID list |
|
62
|
|
|
* |
|
63
|
|
|
* @SA\Type("array<string>") |
|
64
|
|
|
* @SA\SerializedName("memberIds") |
|
65
|
|
|
* |
|
66
|
|
|
* @var array|string[]|null |
|
67
|
|
|
*/ |
|
68
|
|
|
protected $memberIds; |
|
69
|
|
|
|
|
70
|
|
|
/** |
|
71
|
|
|
* List of child group IDs. |
|
72
|
|
|
* |
|
73
|
|
|
* Comment: Contact ID list |
|
74
|
|
|
* |
|
75
|
|
|
* @SA\Type("array<string>") |
|
76
|
|
|
* @SA\SerializedName("childIds") |
|
77
|
|
|
* |
|
78
|
|
|
* @var array|string[]|null |
|
79
|
|
|
*/ |
|
80
|
|
|
protected $childIds; |
|
81
|
|
|
|
|
82
|
|
|
/** |
|
83
|
|
|
* List of parent group IDs. |
|
84
|
|
|
* |
|
85
|
|
|
* Comment: Contact ID list |
|
86
|
|
|
* |
|
87
|
|
|
* @SA\Type("array<string>") |
|
88
|
|
|
* @SA\SerializedName("parentIds") |
|
89
|
|
|
* |
|
90
|
|
|
* @var array|string[]|null |
|
91
|
|
|
*/ |
|
92
|
|
|
protected $parentIds; |
|
93
|
|
|
|
|
94
|
|
|
/** |
|
95
|
|
|
* Avatar URL. |
|
96
|
|
|
* |
|
97
|
|
|
* @SA\Type("string") |
|
98
|
|
|
* @SA\SerializedName("avatarUrl") |
|
99
|
|
|
* |
|
100
|
|
|
* @var string|null |
|
101
|
|
|
*/ |
|
102
|
|
|
protected $avatarUrl; |
|
103
|
|
|
|
|
104
|
|
|
/** |
|
105
|
|
|
* Field is present and set to true for My Team (default) group |
|
106
|
|
|
* Optional. |
|
107
|
|
|
* |
|
108
|
|
|
* Comment: Optional |
|
109
|
|
|
* |
|
110
|
|
|
* @SA\Type("boolean") |
|
111
|
|
|
* @SA\SerializedName("myTeam") |
|
112
|
|
|
* |
|
113
|
|
|
* @var bool|null |
|
114
|
|
|
*/ |
|
115
|
|
|
protected $myTeam; |
|
116
|
|
|
|
|
117
|
|
|
/** |
|
118
|
|
|
* List of group metadata entries |
|
119
|
|
|
* Metadata entry key-value pair |
|
120
|
|
|
* Metadata entries are isolated on per-client (application) basis |
|
121
|
|
|
* Optional. |
|
122
|
|
|
* |
|
123
|
|
|
* Comment: Optional |
|
124
|
|
|
* |
|
125
|
|
|
* @SA\Type("array<Zibios\WrikePhpJmsserializer\Model\Common\MetadataModel>") |
|
126
|
|
|
* @SA\SerializedName("metadata") |
|
127
|
|
|
* |
|
128
|
|
|
* @var array|MetadataModel[]|null |
|
129
|
|
|
*/ |
|
130
|
|
|
protected $metadata; |
|
131
|
|
|
|
|
132
|
|
|
/** |
|
133
|
|
|
* @return null|string |
|
134
|
|
|
*/ |
|
135
|
1 |
|
public function getId() |
|
136
|
|
|
{ |
|
137
|
1 |
|
return $this->id; |
|
138
|
|
|
} |
|
139
|
|
|
|
|
140
|
|
|
/** |
|
141
|
|
|
* @param null|string $id |
|
142
|
|
|
* |
|
143
|
|
|
* @return $this |
|
144
|
|
|
*/ |
|
145
|
1 |
|
public function setId($id) |
|
146
|
|
|
{ |
|
147
|
1 |
|
$this->id = $id; |
|
148
|
|
|
|
|
149
|
1 |
|
return $this; |
|
150
|
|
|
} |
|
151
|
|
|
|
|
152
|
|
|
/** |
|
153
|
|
|
* @return null|string |
|
154
|
|
|
*/ |
|
155
|
1 |
|
public function getAccountId() |
|
156
|
|
|
{ |
|
157
|
1 |
|
return $this->accountId; |
|
158
|
|
|
} |
|
159
|
|
|
|
|
160
|
|
|
/** |
|
161
|
|
|
* @param null|string $accountId |
|
162
|
|
|
* |
|
163
|
|
|
* @return $this |
|
164
|
|
|
*/ |
|
165
|
1 |
|
public function setAccountId($accountId) |
|
166
|
|
|
{ |
|
167
|
1 |
|
$this->accountId = $accountId; |
|
168
|
|
|
|
|
169
|
1 |
|
return $this; |
|
170
|
|
|
} |
|
171
|
|
|
|
|
172
|
|
|
/** |
|
173
|
|
|
* @return null|string |
|
174
|
|
|
*/ |
|
175
|
1 |
|
public function getTitle() |
|
176
|
|
|
{ |
|
177
|
1 |
|
return $this->title; |
|
178
|
|
|
} |
|
179
|
|
|
|
|
180
|
|
|
/** |
|
181
|
|
|
* @param null|string $title |
|
182
|
|
|
* |
|
183
|
|
|
* @return $this |
|
184
|
|
|
*/ |
|
185
|
1 |
|
public function setTitle($title) |
|
186
|
|
|
{ |
|
187
|
1 |
|
$this->title = $title; |
|
188
|
|
|
|
|
189
|
1 |
|
return $this; |
|
190
|
|
|
} |
|
191
|
|
|
|
|
192
|
|
|
/** |
|
193
|
|
|
* @return array|null|\string[] |
|
194
|
|
|
*/ |
|
195
|
1 |
|
public function getMemberIds() |
|
196
|
|
|
{ |
|
197
|
1 |
|
return $this->memberIds; |
|
198
|
|
|
} |
|
199
|
|
|
|
|
200
|
|
|
/** |
|
201
|
|
|
* @param array|null|\string[] $memberIds |
|
202
|
|
|
* |
|
203
|
|
|
* @return $this |
|
204
|
|
|
*/ |
|
205
|
1 |
|
public function setMemberIds($memberIds) |
|
206
|
|
|
{ |
|
207
|
1 |
|
$this->memberIds = $memberIds; |
|
208
|
|
|
|
|
209
|
1 |
|
return $this; |
|
210
|
|
|
} |
|
211
|
|
|
|
|
212
|
|
|
/** |
|
213
|
|
|
* @return array|null|\string[] |
|
214
|
|
|
*/ |
|
215
|
1 |
|
public function getChildIds() |
|
216
|
|
|
{ |
|
217
|
1 |
|
return $this->childIds; |
|
218
|
|
|
} |
|
219
|
|
|
|
|
220
|
|
|
/** |
|
221
|
|
|
* @param array|null|\string[] $childIds |
|
222
|
|
|
* |
|
223
|
|
|
* @return $this |
|
224
|
|
|
*/ |
|
225
|
1 |
|
public function setChildIds($childIds) |
|
226
|
|
|
{ |
|
227
|
1 |
|
$this->childIds = $childIds; |
|
228
|
|
|
|
|
229
|
1 |
|
return $this; |
|
230
|
|
|
} |
|
231
|
|
|
|
|
232
|
|
|
/** |
|
233
|
|
|
* @return array|null|\string[] |
|
234
|
|
|
*/ |
|
235
|
1 |
|
public function getParentIds() |
|
236
|
|
|
{ |
|
237
|
1 |
|
return $this->parentIds; |
|
238
|
|
|
} |
|
239
|
|
|
|
|
240
|
|
|
/** |
|
241
|
|
|
* @param array|null|\string[] $parentIds |
|
242
|
|
|
* |
|
243
|
|
|
* @return $this |
|
244
|
|
|
*/ |
|
245
|
1 |
|
public function setParentIds($parentIds) |
|
246
|
|
|
{ |
|
247
|
1 |
|
$this->parentIds = $parentIds; |
|
248
|
|
|
|
|
249
|
1 |
|
return $this; |
|
250
|
|
|
} |
|
251
|
|
|
|
|
252
|
|
|
/** |
|
253
|
|
|
* @return null|string |
|
254
|
|
|
*/ |
|
255
|
1 |
|
public function getAvatarUrl() |
|
256
|
|
|
{ |
|
257
|
1 |
|
return $this->avatarUrl; |
|
258
|
|
|
} |
|
259
|
|
|
|
|
260
|
|
|
/** |
|
261
|
|
|
* @param null|string $avatarUrl |
|
262
|
|
|
* |
|
263
|
|
|
* @return $this |
|
264
|
|
|
*/ |
|
265
|
1 |
|
public function setAvatarUrl($avatarUrl) |
|
266
|
|
|
{ |
|
267
|
1 |
|
$this->avatarUrl = $avatarUrl; |
|
268
|
|
|
|
|
269
|
1 |
|
return $this; |
|
270
|
|
|
} |
|
271
|
|
|
|
|
272
|
|
|
/** |
|
273
|
|
|
* @return bool|null |
|
274
|
|
|
*/ |
|
275
|
1 |
|
public function getMyTeam() |
|
276
|
|
|
{ |
|
277
|
1 |
|
return $this->myTeam; |
|
278
|
|
|
} |
|
279
|
|
|
|
|
280
|
|
|
/** |
|
281
|
|
|
* @param bool|null $myTeam |
|
282
|
|
|
* |
|
283
|
|
|
* @return $this |
|
284
|
|
|
*/ |
|
285
|
1 |
|
public function setMyTeam($myTeam) |
|
286
|
|
|
{ |
|
287
|
1 |
|
$this->myTeam = $myTeam; |
|
288
|
|
|
|
|
289
|
1 |
|
return $this; |
|
290
|
|
|
} |
|
291
|
|
|
|
|
292
|
|
|
/** |
|
293
|
|
|
* @return array|null|MetadataModel[] |
|
294
|
|
|
*/ |
|
295
|
1 |
|
public function getMetadata() |
|
296
|
|
|
{ |
|
297
|
1 |
|
return $this->metadata; |
|
298
|
|
|
} |
|
299
|
|
|
|
|
300
|
|
|
/** |
|
301
|
|
|
* @param array|null|MetadataModel[] $metadata |
|
302
|
|
|
* |
|
303
|
|
|
* @return $this |
|
304
|
|
|
*/ |
|
305
|
1 |
|
public function setMetadata($metadata) |
|
306
|
|
|
{ |
|
307
|
1 |
|
$this->metadata = $metadata; |
|
308
|
|
|
|
|
309
|
1 |
|
return $this; |
|
310
|
|
|
} |
|
311
|
|
|
} |
|
312
|
|
|
|