1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
namespace VasilDakov\Speedy\Model; |
6
|
|
|
|
7
|
|
|
use JMS\Serializer\Annotation as Serializer; |
8
|
|
|
use VasilDakov\Speedy\ToArray; |
9
|
|
|
|
10
|
|
|
/** |
11
|
|
|
* Class Address |
12
|
|
|
* |
13
|
|
|
* @Serializer\AccessType("public_method") |
14
|
|
|
* @author Vasil Dakov <[email protected]> |
15
|
|
|
* @copyright 2009-2022 Neutrino.bg |
16
|
|
|
* @version 1.0 |
17
|
|
|
* @psalm-suppress MissingConstructor |
18
|
|
|
*/ |
19
|
|
|
class Address |
20
|
|
|
{ |
21
|
|
|
use ToArray; |
22
|
|
|
|
23
|
|
|
/** |
24
|
|
|
* @var int|null |
25
|
|
|
* @Serializer\Type("integer") |
26
|
|
|
*/ |
27
|
|
|
private ?int $countryId = null; |
28
|
|
|
|
29
|
|
|
/** |
30
|
|
|
* @var string|null |
31
|
|
|
* @Serializer\Type("string") |
32
|
|
|
*/ |
33
|
|
|
private ?string $stateId = null; |
34
|
|
|
|
35
|
|
|
/** |
36
|
|
|
* @var int|null |
37
|
|
|
* @Serializer\Type("integer") |
38
|
|
|
* |
39
|
|
|
*/ |
40
|
|
|
private ?int $siteId = null; |
41
|
|
|
|
42
|
|
|
/** |
43
|
|
|
* @var string|null |
44
|
|
|
* @Serializer\Type("string") |
45
|
|
|
*/ |
46
|
|
|
private ?string $siteType = null; |
47
|
|
|
|
48
|
|
|
/** |
49
|
|
|
* @var string|null |
50
|
|
|
* @Serializer\Type("string") |
51
|
|
|
*/ |
52
|
|
|
private ?string $siteName = null; |
53
|
|
|
|
54
|
|
|
/** |
55
|
|
|
* @var string|null |
56
|
|
|
* @Serializer\Type("string") |
57
|
|
|
*/ |
58
|
|
|
private ?string $postCode = null; |
59
|
|
|
|
60
|
|
|
/** |
61
|
|
|
* @var int|null |
62
|
|
|
* @Serializer\Type("integer") |
63
|
|
|
*/ |
64
|
|
|
private ?int $streetId = null; |
65
|
|
|
|
66
|
|
|
/** |
67
|
|
|
* @var string|null |
68
|
|
|
* @Serializer\Type("string") |
69
|
|
|
*/ |
70
|
|
|
private ?string $streetType = null; |
71
|
|
|
|
72
|
|
|
/** |
73
|
|
|
* @var string|null |
74
|
|
|
* @Serializer\Type("string") |
75
|
|
|
*/ |
76
|
|
|
private ?string $streetName = null; |
77
|
|
|
|
78
|
|
|
/** |
79
|
|
|
* @var string|null |
80
|
|
|
* @Serializer\Type("string") |
81
|
|
|
*/ |
82
|
|
|
private ?string $streetNo = null; |
83
|
|
|
|
84
|
|
|
/** |
85
|
|
|
* @var int|null |
86
|
|
|
* @Serializer\Type("integer") |
87
|
|
|
*/ |
88
|
|
|
private ?int $complexId = null; |
89
|
|
|
|
90
|
|
|
/** |
91
|
|
|
* @var string|null |
92
|
|
|
* @Serializer\Type("string") |
93
|
|
|
*/ |
94
|
|
|
private ?string $complexType = null; |
95
|
|
|
|
96
|
|
|
/** |
97
|
|
|
* @var string|null |
98
|
|
|
* @Serializer\Type("string") |
99
|
|
|
*/ |
100
|
|
|
private ?string $complexName = null; |
101
|
|
|
|
102
|
|
|
/** |
103
|
|
|
* @var string|null |
104
|
|
|
* @Serializer\Type("string") |
105
|
|
|
*/ |
106
|
|
|
private ?string $blockNo = null; |
107
|
|
|
|
108
|
|
|
/** |
109
|
|
|
* @var string|null |
110
|
|
|
* @Serializer\Type("string") |
111
|
|
|
*/ |
112
|
|
|
private ?string $entranceNo = null; |
113
|
|
|
|
114
|
|
|
/** |
115
|
|
|
* @var string|null |
116
|
|
|
* @Serializer\Type("string") |
117
|
|
|
*/ |
118
|
|
|
private ?string $floorNo = null; |
119
|
|
|
|
120
|
|
|
/** |
121
|
|
|
* @var string|null |
122
|
|
|
* @Serializer\Type("string") |
123
|
|
|
*/ |
124
|
|
|
private ?string $apartmentNo = null; |
125
|
|
|
|
126
|
|
|
/** |
127
|
|
|
* @var int|null |
128
|
|
|
* @Serializer\Type("integer") |
129
|
|
|
*/ |
130
|
|
|
private ?int $poiId = null; |
131
|
|
|
|
132
|
|
|
/** |
133
|
|
|
* @var string|null |
134
|
|
|
* @Serializer\Type("string") |
135
|
|
|
*/ |
136
|
|
|
private ?string $addressNote = null; |
137
|
|
|
|
138
|
|
|
/** |
139
|
|
|
* @var string|null |
140
|
|
|
* @Serializer\Type("string") |
141
|
|
|
*/ |
142
|
|
|
private ?string $addressLine1 = null; |
143
|
|
|
|
144
|
|
|
/** |
145
|
|
|
* @var string|null |
146
|
|
|
* @Serializer\Type("string") |
147
|
|
|
*/ |
148
|
|
|
private ?string $addressLine2 = null; |
149
|
|
|
|
150
|
|
|
/** |
151
|
|
|
* @var float|null |
152
|
|
|
* @Serializer\Type("float") |
153
|
|
|
*/ |
154
|
|
|
private ?float $x = null; |
155
|
|
|
|
156
|
|
|
/** |
157
|
|
|
* @var float|null |
158
|
|
|
* @Serializer\Type("float") |
159
|
|
|
*/ |
160
|
|
|
private ?float $y = null; |
161
|
|
|
|
162
|
|
|
/** |
163
|
|
|
* @var string|null |
164
|
|
|
*/ |
165
|
|
|
private ?string $fullAddressString = null; |
166
|
|
|
|
167
|
|
|
/** |
168
|
|
|
* @var string|null |
169
|
|
|
*/ |
170
|
|
|
private ?string $siteAddressString = null; |
171
|
|
|
|
172
|
|
|
/** |
173
|
|
|
* @var string|null |
174
|
|
|
*/ |
175
|
|
|
private ?string $localAddressString = null; |
176
|
|
|
|
177
|
|
|
/** |
178
|
|
|
* @param int $siteId |
179
|
|
|
*/ |
180
|
1 |
|
public function __construct(int $siteId) |
181
|
|
|
{ |
182
|
1 |
|
$this->siteId = $siteId; |
183
|
|
|
} |
184
|
|
|
|
185
|
|
|
/** |
186
|
|
|
* @return int|null |
187
|
|
|
*/ |
188
|
2 |
|
public function getCountryId(): ?int |
189
|
|
|
{ |
190
|
2 |
|
return $this->countryId; |
191
|
|
|
} |
192
|
|
|
|
193
|
|
|
/** |
194
|
|
|
* @param int|null $countryId |
195
|
|
|
*/ |
196
|
7 |
|
public function setCountryId(?int $countryId): void |
197
|
|
|
{ |
198
|
7 |
|
$this->countryId = $countryId; |
199
|
|
|
} |
200
|
|
|
|
201
|
|
|
/** |
202
|
|
|
* @return string|null |
203
|
|
|
*/ |
204
|
1 |
|
public function getStateId(): ?string |
205
|
|
|
{ |
206
|
1 |
|
return $this->stateId; |
207
|
|
|
} |
208
|
|
|
|
209
|
|
|
/** |
210
|
|
|
* @param string|null $stateId |
211
|
|
|
*/ |
212
|
2 |
|
public function setStateId(?string $stateId): void |
213
|
|
|
{ |
214
|
2 |
|
$this->stateId = $stateId; |
215
|
|
|
} |
216
|
|
|
|
217
|
|
|
/** |
218
|
|
|
* @return int |
219
|
|
|
*/ |
220
|
2 |
|
public function getSiteId(): int |
221
|
|
|
{ |
222
|
2 |
|
return $this->siteId; |
|
|
|
|
223
|
|
|
} |
224
|
|
|
|
225
|
|
|
/** |
226
|
|
|
* @param int $siteId |
227
|
|
|
*/ |
228
|
7 |
|
public function setSiteId(int $siteId): void |
229
|
|
|
{ |
230
|
7 |
|
$this->siteId = $siteId; |
231
|
|
|
} |
232
|
|
|
|
233
|
|
|
/** |
234
|
|
|
* @return string|null |
235
|
|
|
*/ |
236
|
2 |
|
public function getSiteType(): ?string |
237
|
|
|
{ |
238
|
2 |
|
return $this->siteType; |
239
|
|
|
} |
240
|
|
|
|
241
|
|
|
/** |
242
|
|
|
* @param string|null $siteType |
243
|
|
|
*/ |
244
|
6 |
|
public function setSiteType(?string $siteType): void |
245
|
|
|
{ |
246
|
6 |
|
$this->siteType = $siteType; |
247
|
|
|
} |
248
|
|
|
|
249
|
|
|
/** |
250
|
|
|
* @return string|null |
251
|
|
|
*/ |
252
|
2 |
|
public function getSiteName(): ?string |
253
|
|
|
{ |
254
|
2 |
|
return $this->siteName; |
255
|
|
|
} |
256
|
|
|
|
257
|
|
|
/** |
258
|
|
|
* @param string|null $siteName |
259
|
|
|
*/ |
260
|
6 |
|
public function setSiteName(?string $siteName): void |
261
|
|
|
{ |
262
|
6 |
|
$this->siteName = $siteName; |
263
|
|
|
} |
264
|
|
|
|
265
|
|
|
/** |
266
|
|
|
* @return string|null |
267
|
|
|
*/ |
268
|
2 |
|
public function getPostCode(): ?string |
269
|
|
|
{ |
270
|
2 |
|
return $this->postCode; |
271
|
|
|
} |
272
|
|
|
|
273
|
|
|
/** |
274
|
|
|
* @param string|null $postCode |
275
|
|
|
*/ |
276
|
6 |
|
public function setPostCode(?string $postCode): void |
277
|
|
|
{ |
278
|
6 |
|
$this->postCode = $postCode; |
279
|
|
|
} |
280
|
|
|
|
281
|
|
|
/** |
282
|
|
|
* @return int|null |
283
|
|
|
*/ |
284
|
2 |
|
public function getStreetId(): ?int |
285
|
|
|
{ |
286
|
2 |
|
return $this->streetId; |
287
|
|
|
} |
288
|
|
|
|
289
|
|
|
/** |
290
|
|
|
* @param int|null $streetId |
291
|
|
|
*/ |
292
|
6 |
|
public function setStreetId(?int $streetId): void |
293
|
|
|
{ |
294
|
6 |
|
$this->streetId = $streetId; |
295
|
|
|
} |
296
|
|
|
|
297
|
|
|
/** |
298
|
|
|
* @return string|null |
299
|
|
|
*/ |
300
|
2 |
|
public function getStreetType(): ?string |
301
|
|
|
{ |
302
|
2 |
|
return $this->streetType; |
303
|
|
|
} |
304
|
|
|
|
305
|
|
|
/** |
306
|
|
|
* @param string|null $streetType |
307
|
|
|
*/ |
308
|
6 |
|
public function setStreetType(?string $streetType): void |
309
|
|
|
{ |
310
|
6 |
|
$this->streetType = $streetType; |
311
|
|
|
} |
312
|
|
|
|
313
|
|
|
/** |
314
|
|
|
* @return string|null |
315
|
|
|
*/ |
316
|
2 |
|
public function getStreetName(): ?string |
317
|
|
|
{ |
318
|
2 |
|
return $this->streetName; |
319
|
|
|
} |
320
|
|
|
|
321
|
|
|
/** |
322
|
|
|
* @param string|null $streetName |
323
|
|
|
*/ |
324
|
6 |
|
public function setStreetName(?string $streetName): void |
325
|
|
|
{ |
326
|
6 |
|
$this->streetName = $streetName; |
327
|
|
|
} |
328
|
|
|
|
329
|
|
|
/** |
330
|
|
|
* @return string|null |
331
|
|
|
*/ |
332
|
2 |
|
public function getStreetNo(): ?string |
333
|
|
|
{ |
334
|
2 |
|
return $this->streetNo; |
335
|
|
|
} |
336
|
|
|
|
337
|
|
|
/** |
338
|
|
|
* @param string|null $streetNo |
339
|
|
|
*/ |
340
|
6 |
|
public function setStreetNo(?string $streetNo): void |
341
|
|
|
{ |
342
|
6 |
|
$this->streetNo = $streetNo; |
343
|
|
|
} |
344
|
|
|
|
345
|
|
|
/** |
346
|
|
|
* @return int|null |
347
|
|
|
*/ |
348
|
2 |
|
public function getComplexId(): ?int |
349
|
|
|
{ |
350
|
2 |
|
return $this->complexId; |
351
|
|
|
} |
352
|
|
|
|
353
|
|
|
/** |
354
|
|
|
* @param int|null $complexId |
355
|
|
|
*/ |
356
|
2 |
|
public function setComplexId(?int $complexId): void |
357
|
|
|
{ |
358
|
2 |
|
$this->complexId = $complexId; |
359
|
|
|
} |
360
|
|
|
|
361
|
|
|
/** |
362
|
|
|
* @return string|null |
363
|
|
|
*/ |
364
|
1 |
|
public function getComplexType(): ?string |
365
|
|
|
{ |
366
|
1 |
|
return $this->complexType; |
367
|
|
|
} |
368
|
|
|
|
369
|
|
|
/** |
370
|
|
|
* @param string|null $complexType |
371
|
|
|
*/ |
372
|
2 |
|
public function setComplexType(?string $complexType): void |
373
|
|
|
{ |
374
|
2 |
|
$this->complexType = $complexType; |
375
|
|
|
} |
376
|
|
|
|
377
|
|
|
/** |
378
|
|
|
* @return string|null |
379
|
|
|
*/ |
380
|
1 |
|
public function getComplexName(): ?string |
381
|
|
|
{ |
382
|
1 |
|
return $this->complexName; |
383
|
|
|
} |
384
|
|
|
|
385
|
|
|
/** |
386
|
|
|
* @param string|null $complexName |
387
|
|
|
*/ |
388
|
2 |
|
public function setComplexName(?string $complexName): void |
389
|
|
|
{ |
390
|
2 |
|
$this->complexName = $complexName; |
391
|
|
|
} |
392
|
|
|
|
393
|
|
|
/** |
394
|
|
|
* @return string|null |
395
|
|
|
*/ |
396
|
1 |
|
public function getBlockNo(): ?string |
397
|
|
|
{ |
398
|
1 |
|
return $this->blockNo; |
399
|
|
|
} |
400
|
|
|
|
401
|
|
|
/** |
402
|
|
|
* @param string|null $blockNo |
403
|
|
|
*/ |
404
|
2 |
|
public function setBlockNo(?string $blockNo): void |
405
|
|
|
{ |
406
|
2 |
|
$this->blockNo = $blockNo; |
407
|
|
|
} |
408
|
|
|
|
409
|
|
|
/** |
410
|
|
|
* @return string|null |
411
|
|
|
*/ |
412
|
2 |
|
public function getEntranceNo(): ?string |
413
|
|
|
{ |
414
|
2 |
|
return $this->entranceNo; |
415
|
|
|
} |
416
|
|
|
|
417
|
|
|
/** |
418
|
|
|
* @param string|null $entranceNo |
419
|
|
|
*/ |
420
|
6 |
|
public function setEntranceNo(?string $entranceNo): void |
421
|
|
|
{ |
422
|
6 |
|
$this->entranceNo = $entranceNo; |
423
|
|
|
} |
424
|
|
|
|
425
|
|
|
/** |
426
|
|
|
* @return string|null |
427
|
|
|
*/ |
428
|
2 |
|
public function getFloorNo(): ?string |
429
|
|
|
{ |
430
|
2 |
|
return $this->floorNo; |
431
|
|
|
} |
432
|
|
|
|
433
|
|
|
/** |
434
|
|
|
* @param string|null $floorNo |
435
|
|
|
*/ |
436
|
6 |
|
public function setFloorNo(?string $floorNo): void |
437
|
|
|
{ |
438
|
6 |
|
$this->floorNo = $floorNo; |
439
|
|
|
} |
440
|
|
|
|
441
|
|
|
/** |
442
|
|
|
* @return string|null |
443
|
|
|
*/ |
444
|
2 |
|
public function getApartmentNo(): ?string |
445
|
|
|
{ |
446
|
2 |
|
return $this->apartmentNo; |
447
|
|
|
} |
448
|
|
|
|
449
|
|
|
/** |
450
|
|
|
* @param string|null $apartmentNo |
451
|
|
|
*/ |
452
|
6 |
|
public function setApartmentNo(?string $apartmentNo): void |
453
|
|
|
{ |
454
|
6 |
|
$this->apartmentNo = $apartmentNo; |
455
|
|
|
} |
456
|
|
|
|
457
|
|
|
/** |
458
|
|
|
* @return int|null |
459
|
|
|
*/ |
460
|
1 |
|
public function getPoiId(): ?int |
461
|
|
|
{ |
462
|
1 |
|
return $this->poiId; |
463
|
|
|
} |
464
|
|
|
|
465
|
|
|
/** |
466
|
|
|
* @param int|null $poiId |
467
|
|
|
*/ |
468
|
2 |
|
public function setPoiId(?int $poiId): void |
469
|
|
|
{ |
470
|
2 |
|
$this->poiId = $poiId; |
471
|
|
|
} |
472
|
|
|
|
473
|
|
|
/** |
474
|
|
|
* @return string|null |
475
|
|
|
*/ |
476
|
1 |
|
public function getAddressNote(): ?string |
477
|
|
|
{ |
478
|
1 |
|
return $this->addressNote; |
479
|
|
|
} |
480
|
|
|
|
481
|
|
|
/** |
482
|
|
|
* @param string|null $addressNote |
483
|
|
|
*/ |
484
|
2 |
|
public function setAddressNote(?string $addressNote): void |
485
|
|
|
{ |
486
|
2 |
|
$this->addressNote = $addressNote; |
487
|
|
|
} |
488
|
|
|
|
489
|
|
|
/** |
490
|
|
|
* @return string|null |
491
|
|
|
*/ |
492
|
1 |
|
public function getAddressLine1(): ?string |
493
|
|
|
{ |
494
|
1 |
|
return $this->addressLine1; |
495
|
|
|
} |
496
|
|
|
|
497
|
|
|
/** |
498
|
|
|
* @param string|null $addressLine1 |
499
|
|
|
*/ |
500
|
2 |
|
public function setAddressLine1(?string $addressLine1): void |
501
|
|
|
{ |
502
|
2 |
|
$this->addressLine1 = $addressLine1; |
503
|
|
|
} |
504
|
|
|
|
505
|
|
|
/** |
506
|
|
|
* @return string|null |
507
|
|
|
*/ |
508
|
1 |
|
public function getAddressLine2(): ?string |
509
|
|
|
{ |
510
|
1 |
|
return $this->addressLine2; |
511
|
|
|
} |
512
|
|
|
|
513
|
|
|
/** |
514
|
|
|
* @param string|null $addressLine2 |
515
|
|
|
*/ |
516
|
2 |
|
public function setAddressLine2(?string $addressLine2): void |
517
|
|
|
{ |
518
|
2 |
|
$this->addressLine2 = $addressLine2; |
519
|
|
|
} |
520
|
|
|
|
521
|
|
|
/** |
522
|
|
|
* @return float|null |
523
|
|
|
*/ |
524
|
2 |
|
public function getX(): ?float |
525
|
|
|
{ |
526
|
2 |
|
return $this->x; |
527
|
|
|
} |
528
|
|
|
|
529
|
|
|
/** |
530
|
|
|
* @param float|null $x |
531
|
|
|
*/ |
532
|
6 |
|
public function setX(?float $x): void |
533
|
|
|
{ |
534
|
6 |
|
$this->x = $x; |
535
|
|
|
} |
536
|
|
|
|
537
|
|
|
/** |
538
|
|
|
* @return float|null |
539
|
|
|
*/ |
540
|
2 |
|
public function getY(): ?float |
541
|
|
|
{ |
542
|
2 |
|
return $this->y; |
543
|
|
|
} |
544
|
|
|
|
545
|
|
|
/** |
546
|
|
|
* @param float|null $y |
547
|
|
|
*/ |
548
|
6 |
|
public function setY(?float $y): void |
549
|
|
|
{ |
550
|
6 |
|
$this->y = $y; |
551
|
|
|
} |
552
|
|
|
|
553
|
|
|
/** |
554
|
|
|
* @param string|null $fullAddressString |
555
|
|
|
*/ |
556
|
6 |
|
public function setFullAddressString(?string $fullAddressString): void |
557
|
|
|
{ |
558
|
6 |
|
$this->fullAddressString = $fullAddressString; |
559
|
|
|
} |
560
|
|
|
|
561
|
|
|
/** |
562
|
|
|
* @return string|null |
563
|
|
|
*/ |
564
|
2 |
|
public function getFullAddressString(): ?string |
565
|
|
|
{ |
566
|
2 |
|
return $this->fullAddressString; |
567
|
|
|
} |
568
|
|
|
|
569
|
|
|
/** |
570
|
|
|
* @return string|null |
571
|
|
|
*/ |
572
|
2 |
|
public function getSiteAddressString(): ?string |
573
|
|
|
{ |
574
|
2 |
|
return $this->siteAddressString; |
575
|
|
|
} |
576
|
|
|
|
577
|
|
|
/** |
578
|
|
|
* @param ?string $siteAddressString |
579
|
|
|
*/ |
580
|
6 |
|
public function setSiteAddressString(?string $siteAddressString): void |
581
|
|
|
{ |
582
|
6 |
|
$this->siteAddressString = $siteAddressString; |
583
|
|
|
} |
584
|
|
|
|
585
|
|
|
/** |
586
|
|
|
* @return string|null |
587
|
|
|
*/ |
588
|
2 |
|
public function getLocalAddressString(): ?string |
589
|
|
|
{ |
590
|
2 |
|
return $this->localAddressString; |
591
|
|
|
} |
592
|
|
|
|
593
|
|
|
/** |
594
|
|
|
* @param string $localAddressString |
595
|
|
|
*/ |
596
|
6 |
|
public function setLocalAddressString(string $localAddressString): void |
597
|
|
|
{ |
598
|
6 |
|
$this->localAddressString = $localAddressString; |
599
|
|
|
} |
600
|
|
|
} |
601
|
|
|
|