1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types = 1); |
4
|
|
|
|
5
|
|
|
namespace Speicher210\KontaktIO\Model; |
6
|
|
|
|
7
|
|
|
use JMS\Serializer\Annotation as JMS; |
8
|
|
|
|
9
|
|
|
/** |
10
|
|
|
* Model representing a manager. |
11
|
|
|
*/ |
12
|
|
|
final class Manager |
13
|
|
|
{ |
14
|
|
|
const ROLE_SUPERUSER = 'SUPERUSER'; |
15
|
|
|
const ROLE_ADMIN = 'ADMIN'; |
16
|
|
|
const ROLE_OPERATOR = 'OPERATOR'; |
17
|
|
|
|
18
|
|
|
/** |
19
|
|
|
* The manager ID. |
20
|
|
|
* |
21
|
|
|
* @var string |
22
|
|
|
* |
23
|
|
|
* @JMS\Type("string") |
24
|
|
|
* @JMS\SerializedName("id") |
25
|
|
|
*/ |
26
|
|
|
private $id; |
27
|
|
|
|
28
|
|
|
/** |
29
|
|
|
* The manager unique ID. |
30
|
|
|
* |
31
|
|
|
* @var string |
32
|
|
|
* |
33
|
|
|
* @JMS\Type("string") |
34
|
|
|
* @JMS\SerializedName("uniqueId") |
35
|
|
|
*/ |
36
|
|
|
private $uniqueId; |
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* First name. |
40
|
|
|
* |
41
|
|
|
* @var string |
42
|
|
|
* |
43
|
|
|
* @JMS\Type("string") |
44
|
|
|
* @JMS\SerializedName("firstName") |
45
|
|
|
*/ |
46
|
|
|
private $firstName; |
47
|
|
|
|
48
|
|
|
/** |
49
|
|
|
* Last name. |
50
|
|
|
* |
51
|
|
|
* @var string |
52
|
|
|
* |
53
|
|
|
* @JMS\Type("string") |
54
|
|
|
* @JMS\SerializedName("lastName") |
55
|
|
|
*/ |
56
|
|
|
private $lastName; |
57
|
|
|
|
58
|
|
|
/** |
59
|
|
|
* Email address. |
60
|
|
|
* |
61
|
|
|
* @var string |
62
|
|
|
* |
63
|
|
|
* @JMS\Type("string") |
64
|
|
|
* @JMS\SerializedName("email") |
65
|
|
|
*/ |
66
|
|
|
private $email; |
67
|
|
|
|
68
|
|
|
/** |
69
|
|
|
* Manager role. One of the ROLE_* constants. |
70
|
|
|
* |
71
|
|
|
* @var string |
72
|
|
|
* |
73
|
|
|
* @JMS\Type("string") |
74
|
|
|
* @JMS\SerializedName("role") |
75
|
|
|
*/ |
76
|
|
|
private $role; |
77
|
|
|
|
78
|
|
|
/** |
79
|
|
|
* Get the ID. |
80
|
|
|
* |
81
|
|
|
* @return string |
82
|
|
|
*/ |
83
|
|
|
public function id() |
84
|
|
|
{ |
85
|
|
|
return $this->id; |
86
|
|
|
} |
87
|
|
|
|
88
|
|
|
/** |
89
|
|
|
* Set the ID. |
90
|
|
|
* |
91
|
|
|
* @param string $id The ID. |
92
|
|
|
* @return Manager |
93
|
|
|
*/ |
94
|
|
|
public function setId($id) |
95
|
|
|
{ |
96
|
|
|
$this->id = $id; |
97
|
|
|
|
98
|
|
|
return $this; |
99
|
|
|
} |
100
|
|
|
|
101
|
|
|
/** |
102
|
|
|
* Get the unique ID. |
103
|
|
|
* |
104
|
|
|
* @return string |
105
|
|
|
*/ |
106
|
|
|
public function uniqueId() |
107
|
|
|
{ |
108
|
|
|
return $this->uniqueId; |
109
|
|
|
} |
110
|
|
|
|
111
|
|
|
/** |
112
|
|
|
* Set the unique ID. |
113
|
|
|
* |
114
|
|
|
* @param string $uniqueId The unique ID. |
115
|
|
|
* @return Manager |
116
|
|
|
*/ |
117
|
|
|
public function setUniqueId($uniqueId) |
118
|
|
|
{ |
119
|
|
|
$this->uniqueId = $uniqueId; |
120
|
|
|
|
121
|
|
|
return $this; |
122
|
|
|
} |
123
|
|
|
|
124
|
|
|
/** |
125
|
|
|
* Get the first name. |
126
|
|
|
* |
127
|
|
|
* @return string |
128
|
|
|
*/ |
129
|
|
|
public function firstName() |
130
|
|
|
{ |
131
|
|
|
return $this->firstName; |
132
|
|
|
} |
133
|
|
|
|
134
|
|
|
/** |
135
|
|
|
* Set the first name. |
136
|
|
|
* |
137
|
|
|
* @param string $firstName The first name. |
138
|
|
|
* @return Manager |
139
|
|
|
*/ |
140
|
|
|
public function setFirstName($firstName) |
141
|
|
|
{ |
142
|
|
|
$this->firstName = $firstName; |
143
|
|
|
|
144
|
|
|
return $this; |
145
|
|
|
} |
146
|
|
|
|
147
|
|
|
/** |
148
|
|
|
* Get the last name. |
149
|
|
|
* |
150
|
|
|
* @return string |
151
|
|
|
*/ |
152
|
|
|
public function lastName() |
153
|
|
|
{ |
154
|
|
|
return $this->lastName; |
155
|
|
|
} |
156
|
|
|
|
157
|
|
|
/** |
158
|
|
|
* Set the last name. |
159
|
|
|
* |
160
|
|
|
* @param string $lastName The last name. |
161
|
|
|
* @return Manager |
162
|
|
|
*/ |
163
|
|
|
public function setLastName($lastName) |
164
|
|
|
{ |
165
|
|
|
$this->lastName = $lastName; |
166
|
|
|
|
167
|
|
|
return $this; |
168
|
|
|
} |
169
|
|
|
|
170
|
|
|
/** |
171
|
|
|
* Get the role. |
172
|
|
|
* |
173
|
|
|
* @return string |
174
|
|
|
*/ |
175
|
|
|
public function role() |
176
|
|
|
{ |
177
|
|
|
return $this->role; |
178
|
|
|
} |
179
|
|
|
|
180
|
|
|
/** |
181
|
|
|
* Set the role. |
182
|
|
|
* |
183
|
|
|
* @param string $role The role. One of the ROLE_* constants. |
184
|
|
|
* @return Manager |
185
|
|
|
*/ |
186
|
|
|
public function setRole($role) |
187
|
|
|
{ |
188
|
|
|
$this->role = $role; |
189
|
|
|
|
190
|
|
|
return $this; |
191
|
|
|
} |
192
|
|
|
|
193
|
|
|
/** |
194
|
|
|
* Get the email address. |
195
|
|
|
* |
196
|
|
|
* @return string |
197
|
|
|
*/ |
198
|
|
|
public function email() |
199
|
|
|
{ |
200
|
|
|
return $this->email; |
201
|
|
|
} |
202
|
|
|
|
203
|
|
|
/** |
204
|
|
|
* Set the email address. |
205
|
|
|
* |
206
|
|
|
* @param string $email The email address. |
207
|
|
|
* @return Manager |
208
|
|
|
*/ |
209
|
|
|
public function setEmail($email) |
210
|
|
|
{ |
211
|
|
|
$this->email = $email; |
212
|
|
|
|
213
|
|
|
return $this; |
214
|
|
|
} |
215
|
|
|
} |
216
|
|
|
|