-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathPhoneSessionAcsEntrances.php
More file actions
96 lines (93 loc) · 4.02 KB
/
Copy pathPhoneSessionAcsEntrances.php
File metadata and controls
96 lines (93 loc) · 4.02 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
<?php
namespace Seam\Objects;
class PhoneSessionAcsEntrances
{
public static function from_json(mixed $json): PhoneSessionAcsEntrances|null
{
if (!$json) {
return null;
}
return new self(
acs_entrance_id: $json->acs_entrance_id,
acs_system_id: $json->acs_system_id,
connected_account_id: $json->connected_account_id,
created_at: $json->created_at,
display_name: $json->display_name,
errors: array_map(
fn($e) => PhoneSessionErrors::from_json($e),
$json->errors ?? [],
),
space_ids: $json->space_ids,
assa_abloy_vostio_metadata: isset($json->assa_abloy_vostio_metadata)
? PhoneSessionAssaAbloyVostioMetadata::from_json(
$json->assa_abloy_vostio_metadata,
)
: null,
brivo_metadata: isset($json->brivo_metadata)
? PhoneSessionBrivoMetadata::from_json($json->brivo_metadata)
: null,
can_belong_to_reservation: $json->can_belong_to_reservation ?? null,
can_unlock_with_card: $json->can_unlock_with_card ?? null,
can_unlock_with_code: $json->can_unlock_with_code ?? null,
can_unlock_with_mobile_key: $json->can_unlock_with_mobile_key ??
null,
dormakaba_ambiance_metadata: isset(
$json->dormakaba_ambiance_metadata,
)
? PhoneSessionDormakabaAmbianceMetadata::from_json(
$json->dormakaba_ambiance_metadata,
)
: null,
dormakaba_community_metadata: isset(
$json->dormakaba_community_metadata,
)
? PhoneSessionDormakabaCommunityMetadata::from_json(
$json->dormakaba_community_metadata,
)
: null,
hotek_metadata: isset($json->hotek_metadata)
? PhoneSessionHotekMetadata::from_json($json->hotek_metadata)
: null,
latch_metadata: isset($json->latch_metadata)
? PhoneSessionLatchMetadata::from_json($json->latch_metadata)
: null,
salto_ks_metadata: isset($json->salto_ks_metadata)
? PhoneSessionSaltoKsMetadata::from_json(
$json->salto_ks_metadata,
)
: null,
salto_space_metadata: isset($json->salto_space_metadata)
? PhoneSessionSaltoSpaceMetadata::from_json(
$json->salto_space_metadata,
)
: null,
visionline_metadata: isset($json->visionline_metadata)
? PhoneSessionVisionlineMetadata::from_json(
$json->visionline_metadata,
)
: null,
);
}
public function __construct(
public string $acs_entrance_id,
public string $acs_system_id,
public string $connected_account_id,
public string $created_at,
public string $display_name,
public array $errors,
public array $space_ids,
public PhoneSessionAssaAbloyVostioMetadata|null $assa_abloy_vostio_metadata,
public PhoneSessionBrivoMetadata|null $brivo_metadata,
public bool|null $can_belong_to_reservation,
public bool|null $can_unlock_with_card,
public bool|null $can_unlock_with_code,
public bool|null $can_unlock_with_mobile_key,
public PhoneSessionDormakabaAmbianceMetadata|null $dormakaba_ambiance_metadata,
public PhoneSessionDormakabaCommunityMetadata|null $dormakaba_community_metadata,
public PhoneSessionHotekMetadata|null $hotek_metadata,
public PhoneSessionLatchMetadata|null $latch_metadata,
public PhoneSessionSaltoKsMetadata|null $salto_ks_metadata,
public PhoneSessionSaltoSpaceMetadata|null $salto_space_metadata,
public PhoneSessionVisionlineMetadata|null $visionline_metadata,
) {}
}