-
Notifications
You must be signed in to change notification settings - Fork 144
Expand file tree
/
Copy pathAdmin.php
More file actions
331 lines (291 loc) · 7.01 KB
/
Admin.php
File metadata and controls
331 lines (291 loc) · 7.01 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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
<?php
namespace Intercom\Admins\Types;
use Intercom\Core\Json\JsonSerializableType;
use Intercom\Core\Json\JsonProperty;
use Intercom\Core\Types\ArrayType;
use Intercom\Types\TeamPriorityLevel;
/**
* Admins are teammate accounts that have access to a workspace.
*/
class Admin extends JsonSerializableType
{
/**
* @var ?string $type String representing the object's type. Always has the value `admin`.
*/
#[JsonProperty('type')]
private ?string $type;
/**
* @var string $id The id representing the admin.
*/
#[JsonProperty('id')]
private string $id;
/**
* @var string $name The name of the admin.
*/
#[JsonProperty('name')]
private string $name;
/**
* @var string $email The email of the admin.
*/
#[JsonProperty('email')]
private string $email;
/**
* @var ?string $jobTitle The job title of the admin.
*/
#[JsonProperty('job_title')]
private ?string $jobTitle;
/**
* @var bool $awayModeEnabled Identifies if this admin is currently set in away mode.
*/
#[JsonProperty('away_mode_enabled')]
private bool $awayModeEnabled;
/**
* @var bool $awayModeReassign Identifies if this admin is set to automatically reassign new conversations to the apps default inbox.
*/
#[JsonProperty('away_mode_reassign')]
private bool $awayModeReassign;
/**
* @var ?int $awayStatusReasonId The unique identifier of the away status reason
*/
#[JsonProperty('away_status_reason_id')]
private ?int $awayStatusReasonId;
/**
* @var bool $hasInboxSeat Identifies if this admin has a paid inbox seat to restrict/allow features that require them.
*/
#[JsonProperty('has_inbox_seat')]
private bool $hasInboxSeat;
/**
* @var array<int> $teamIds This object represents the avatar associated with the admin.
*/
#[JsonProperty('team_ids'), ArrayType(['integer'])]
private array $teamIds;
/**
* @var ?string $avatar Image for the associated team or teammate
*/
#[JsonProperty('avatar')]
private ?string $avatar;
/**
* @var ?TeamPriorityLevel $teamPriorityLevel
*/
#[JsonProperty('team_priority_level')]
private ?TeamPriorityLevel $teamPriorityLevel;
/**
* @param array{
* id: string,
* name: string,
* email: string,
* awayModeEnabled: bool,
* awayModeReassign: bool,
* hasInboxSeat: bool,
* teamIds: array<int>,
* type?: ?string,
* jobTitle?: ?string,
* awayStatusReasonId?: ?int,
* avatar?: ?string,
* teamPriorityLevel?: ?TeamPriorityLevel,
* } $values
*/
public function __construct(
array $values,
) {
$this->type = $values['type'] ?? null;
$this->id = $values['id'];
$this->name = $values['name'];
$this->email = $values['email'];
$this->jobTitle = $values['jobTitle'] ?? null;
$this->awayModeEnabled = $values['awayModeEnabled'];
$this->awayModeReassign = $values['awayModeReassign'];
$this->awayStatusReasonId = $values['awayStatusReasonId'] ?? null;
$this->hasInboxSeat = $values['hasInboxSeat'];
$this->teamIds = $values['teamIds'];
$this->avatar = $values['avatar'] ?? null;
$this->teamPriorityLevel = $values['teamPriorityLevel'] ?? null;
}
/**
* @return ?string
*/
public function getType(): ?string
{
return $this->type;
}
/**
* @param ?string $value
*/
public function setType(?string $value = null): self
{
$this->type = $value;
return $this;
}
/**
* @return string
*/
public function getId(): string
{
return $this->id;
}
/**
* @param string $value
*/
public function setId(string $value): self
{
$this->id = $value;
return $this;
}
/**
* @return string
*/
public function getName(): string
{
return $this->name;
}
/**
* @param string $value
*/
public function setName(string $value): self
{
$this->name = $value;
return $this;
}
/**
* @return string
*/
public function getEmail(): string
{
return $this->email;
}
/**
* @param string $value
*/
public function setEmail(string $value): self
{
$this->email = $value;
return $this;
}
/**
* @return ?string
*/
public function getJobTitle(): ?string
{
return $this->jobTitle;
}
/**
* @param ?string $value
*/
public function setJobTitle(?string $value = null): self
{
$this->jobTitle = $value;
return $this;
}
/**
* @return bool
*/
public function getAwayModeEnabled(): bool
{
return $this->awayModeEnabled;
}
/**
* @param bool $value
*/
public function setAwayModeEnabled(bool $value): self
{
$this->awayModeEnabled = $value;
return $this;
}
/**
* @return bool
*/
public function getAwayModeReassign(): bool
{
return $this->awayModeReassign;
}
/**
* @param bool $value
*/
public function setAwayModeReassign(bool $value): self
{
$this->awayModeReassign = $value;
return $this;
}
/**
* @return ?int
*/
public function getAwayStatusReasonId(): ?int
{
return $this->awayStatusReasonId;
}
/**
* @param ?int $value
*/
public function setAwayStatusReasonId(?int $value = null): self
{
$this->awayStatusReasonId = $value;
return $this;
}
/**
* @return bool
*/
public function getHasInboxSeat(): bool
{
return $this->hasInboxSeat;
}
/**
* @param bool $value
*/
public function setHasInboxSeat(bool $value): self
{
$this->hasInboxSeat = $value;
return $this;
}
/**
* @return array<int>
*/
public function getTeamIds(): array
{
return $this->teamIds;
}
/**
* @param array<int> $value
*/
public function setTeamIds(array $value): self
{
$this->teamIds = $value;
return $this;
}
/**
* @return ?string
*/
public function getAvatar(): ?string
{
return $this->avatar;
}
/**
* @param ?string $value
*/
public function setAvatar(?string $value = null): self
{
$this->avatar = $value;
return $this;
}
/**
* @return ?TeamPriorityLevel
*/
public function getTeamPriorityLevel(): ?TeamPriorityLevel
{
return $this->teamPriorityLevel;
}
/**
* @param ?TeamPriorityLevel $value
*/
public function setTeamPriorityLevel(?TeamPriorityLevel $value = null): self
{
$this->teamPriorityLevel = $value;
return $this;
}
/**
* @return string
*/
public function __toString(): string
{
return $this->toJson();
}
}