-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathEvent.php
More file actions
167 lines (164 loc) · 7.98 KB
/
Copy pathEvent.php
File metadata and controls
167 lines (164 loc) · 7.98 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
<?php
namespace Seam\Objects;
class Event
{
public static function from_json(mixed $json): Event|null
{
if (!$json) {
return null;
}
return new self(
access_code_id: $json->access_code_id ?? null,
access_code_is_managed: $json->access_code_is_managed ?? null,
access_grant_id: $json->access_grant_id ?? null,
access_grant_ids: $json->access_grant_ids ?? null,
access_grant_key: $json->access_grant_key ?? null,
access_grant_keys: $json->access_grant_keys ?? null,
access_method_id: $json->access_method_id ?? null,
acs_access_group_id: $json->acs_access_group_id ?? null,
acs_credential_id: $json->acs_credential_id ?? null,
acs_encoder_id: $json->acs_encoder_id ?? null,
acs_entrance_id: $json->acs_entrance_id ?? null,
acs_entrance_ids: $json->acs_entrance_ids ?? null,
acs_system_id: $json->acs_system_id ?? null,
acs_user_id: $json->acs_user_id ?? null,
action_attempt_id: $json->action_attempt_id ?? null,
action_type: $json->action_type ?? null,
backup_access_code_id: $json->backup_access_code_id ?? null,
battery_level: $json->battery_level ?? null,
battery_status: $json->battery_status ?? null,
client_session_id: $json->client_session_id ?? null,
climate_preset_key: $json->climate_preset_key ?? null,
code: $json->code ?? null,
connect_webview_id: $json->connect_webview_id ?? null,
connected_account_custom_metadata: $json->connected_account_custom_metadata ??
null,
connected_account_errors: array_map(
fn($c) => EventConnectedAccountErrors::from_json($c),
$json->connected_account_errors ?? [],
),
connected_account_id: $json->connected_account_id ?? null,
connected_account_type: $json->connected_account_type ?? null,
cooling_set_point_celsius: $json->cooling_set_point_celsius ?? null,
cooling_set_point_fahrenheit: $json->cooling_set_point_fahrenheit ??
null,
created_at: $json->created_at ?? null,
customer_key: $json->customer_key ?? null,
desired_temperature_celsius: $json->desired_temperature_celsius ??
null,
desired_temperature_fahrenheit: $json->desired_temperature_fahrenheit ??
null,
device_custom_metadata: $json->device_custom_metadata ?? null,
device_id: $json->device_id ?? null,
device_ids: $json->device_ids ?? null,
device_name: $json->device_name ?? null,
ends_at: $json->ends_at ?? null,
enrollment_automation_id: $json->enrollment_automation_id ?? null,
error_code: $json->error_code ?? null,
error_message: $json->error_message ?? null,
event_id: $json->event_id ?? null,
event_type: $json->event_type ?? null,
fan_mode_setting: $json->fan_mode_setting ?? null,
heating_set_point_celsius: $json->heating_set_point_celsius ?? null,
heating_set_point_fahrenheit: $json->heating_set_point_fahrenheit ??
null,
hvac_mode_setting: $json->hvac_mode_setting ?? null,
is_backup_code: $json->is_backup_code ?? null,
is_fallback_climate_preset: $json->is_fallback_climate_preset ??
null,
method: $json->method ?? null,
minut_metadata: $json->minut_metadata ?? null,
noise_level_decibels: $json->noise_level_decibels ?? null,
noise_level_nrs: $json->noise_level_nrs ?? null,
noise_threshold_id: $json->noise_threshold_id ?? null,
noise_threshold_name: $json->noise_threshold_name ?? null,
noiseaware_metadata: $json->noiseaware_metadata ?? null,
occurred_at: $json->occurred_at ?? null,
space_id: $json->space_id ?? null,
space_key: $json->space_key ?? null,
starts_at: $json->starts_at ?? null,
status: $json->status ?? null,
temperature_celsius: $json->temperature_celsius ?? null,
temperature_fahrenheit: $json->temperature_fahrenheit ?? null,
user_identity_id: $json->user_identity_id ?? null,
workspace_id: $json->workspace_id ?? null,
lower_limit_celsius: $json->lower_limit_celsius ?? null,
lower_limit_fahrenheit: $json->lower_limit_fahrenheit ?? null,
thermostat_schedule_id: $json->thermostat_schedule_id ?? null,
upper_limit_celsius: $json->upper_limit_celsius ?? null,
upper_limit_fahrenheit: $json->upper_limit_fahrenheit ?? null,
);
}
public function __construct(
public string|null $access_code_id,
public bool|null $access_code_is_managed,
public string|null $access_grant_id,
public array|null $access_grant_ids,
public string|null $access_grant_key,
public array|null $access_grant_keys,
public string|null $access_method_id,
public string|null $acs_access_group_id,
public string|null $acs_credential_id,
public string|null $acs_encoder_id,
public string|null $acs_entrance_id,
public array|null $acs_entrance_ids,
public string|null $acs_system_id,
public string|null $acs_user_id,
public string|null $action_attempt_id,
public string|null $action_type,
public string|null $backup_access_code_id,
public float|null $battery_level,
public string|null $battery_status,
public string|null $client_session_id,
public string|null $climate_preset_key,
public string|null $code,
public string|null $connect_webview_id,
public mixed $connected_account_custom_metadata,
public array|null $connected_account_errors,
public string|null $connected_account_id,
public string|null $connected_account_type,
public float|null $cooling_set_point_celsius,
public float|null $cooling_set_point_fahrenheit,
public string|null $created_at,
public string|null $customer_key,
public float|null $desired_temperature_celsius,
public float|null $desired_temperature_fahrenheit,
public mixed $device_custom_metadata,
public string|null $device_id,
public array|null $device_ids,
public string|null $device_name,
public string|null $ends_at,
public string|null $enrollment_automation_id,
public string|null $error_code,
public string|null $error_message,
public string|null $event_id,
public string|null $event_type,
public string|null $fan_mode_setting,
public float|null $heating_set_point_celsius,
public float|null $heating_set_point_fahrenheit,
public string|null $hvac_mode_setting,
public bool|null $is_backup_code,
public bool|null $is_fallback_climate_preset,
public string|null $method,
public mixed $minut_metadata,
public float|null $noise_level_decibels,
public float|null $noise_level_nrs,
public string|null $noise_threshold_id,
public string|null $noise_threshold_name,
public mixed $noiseaware_metadata,
public string|null $occurred_at,
public string|null $space_id,
public string|null $space_key,
public string|null $starts_at,
public string|null $status,
public float|null $temperature_celsius,
public float|null $temperature_fahrenheit,
public string|null $user_identity_id,
public string|null $workspace_id,
public float|null $lower_limit_celsius,
public float|null $lower_limit_fahrenheit,
public string|null $thermostat_schedule_id,
public float|null $upper_limit_celsius,
public float|null $upper_limit_fahrenheit,
) {}
}