Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
183 / 183
100.00% covered (success)
100.00%
89 / 89
CRAP
100.00% covered (success)
100.00%
1 / 1
RawDeviceAttributes
100.00% covered (success)
100.00%
183 / 183
100.00% covered (success)
100.00%
89 / 89
109
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
34 / 34
100.00% covered (success)
100.00%
1 / 1
1
 __toString
100.00% covered (success)
100.00%
4 / 4
100.00% covered (success)
100.00%
1 / 1
1
 openAPITypes
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 openAPIFormats
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 isNullable
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 isNullableSetToNull
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 attributeMap
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setters
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getters
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getModelName
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 listInvalidProperties
100.00% covered (success)
100.00%
12 / 12
100.00% covered (success)
100.00%
1 / 1
11
 valid
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getFontPreferences
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setFontPreferences
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getEmoji
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setEmoji
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getFonts
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setFonts
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getDeviceMemory
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setDeviceMemory
100.00% covered (success)
100.00%
4 / 4
100.00% covered (success)
100.00%
1 / 1
2
 getTimezone
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setTimezone
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getCanvas
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setCanvas
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getLanguages
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setLanguages
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getWebglExtensions
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setWebglExtensions
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getWebglBasics
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setWebglBasics
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getScreenResolution
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setScreenResolution
100.00% covered (success)
100.00%
6 / 6
100.00% covered (success)
100.00%
1 / 1
3
 getTouchSupport
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setTouchSupport
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getOscpu
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setOscpu
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getArchitecture
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setArchitecture
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getCookiesEnabled
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setCookiesEnabled
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getHardwareConcurrency
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setHardwareConcurrency
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getDateTimeLocale
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setDateTimeLocale
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getVendor
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setVendor
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getColorDepth
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setColorDepth
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getPlatform
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setPlatform
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getSessionStorage
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setSessionStorage
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getLocalStorage
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setLocalStorage
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getAudio
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setAudio
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getPlugins
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setPlugins
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getIndexedDb
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setIndexedDb
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getMath
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setMath
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getDeviceModel
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setDeviceModel
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getDeviceManufacturer
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setDeviceManufacturer
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getFontHash
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setFontHash
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getTimezoneOffset
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setTimezoneOffset
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getBatteryLevel
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setBatteryLevel
100.00% covered (success)
100.00%
6 / 6
100.00% covered (success)
100.00%
1 / 1
3
 getBatteryCharging
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setBatteryCharging
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getBatteryLowPowerMode
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setBatteryLowPowerMode
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getKeyboardLayoutHash
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setKeyboardLayoutHash
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getKeyboardLayoutName
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setKeyboardLayoutName
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 offsetExists
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 offsetGet
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 offsetSet
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
1 / 1
2
 offsetUnset
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 jsonSerialize
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 toHeaderValue
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 openAPINullables
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getOpenAPINullablesSetToNull
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setOpenAPINullablesSetToNull
n/a
0 / 0
n/a
0 / 0
1
 setIfExists
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
4
1<?php
2
3/**
4 * RawDeviceAttributes.
5 *
6 * @category Class
7 *
8 * @author   Fingerprint
9 *
10 * @see      https://fingerprint.com
11 */
12
13/**
14 * Server API.
15 *
16 * Fingerprint Server API allows you to get, search, and update Events in a server environment. It can be used for data exports, decision-making, and data analysis scenarios. Server API is intended for server-side usage, it's not intended to be used from the client side, whether it's a browser or a mobile device. The API also supports collection of Automation Intelligence for requests to your server in edge, pre-origin, or middleware contexts.
17 *
18 * The version of the OpenAPI document: 4
19 * Contact: support@fingerprint.com
20 * Generated by: https://openapi-generator.tech
21 * Generator version: 7.23.0
22 */
23
24/**
25 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
26 * https://openapi-generator.tech
27 * Do not edit the class manually.
28 */
29
30namespace Fingerprint\ServerSdk\Model;
31
32use Fingerprint\ServerSdk\ObjectSerializer;
33
34/**
35 * A curated subset of raw browser/device attributes that the API surface exposes. Each property contains a value or object with the data for the collected signal.
36 *
37 * @category Class
38 *
39 * @description A curated subset of raw browser/device attributes that the API surface exposes. Each property contains a value or object with the data for the collected signal.
40 *
41 * @author   Fingerprint
42 *
43 * @see      https://fingerprint.com
44 *
45 * @implements \ArrayAccess<string, mixed>
46 *
47 * @noinspection GrazieInspection
48 * @noinspection RedundantSuppression
49 */
50class RawDeviceAttributes implements ModelInterface, \ArrayAccess, \JsonSerializable
51{
52    public const DISCRIMINATOR = null;
53
54    /**
55     * The original name of the model.
56     *
57     */
58    protected static string $openAPIModelName = 'RawDeviceAttributes';
59
60    /**
61     * Array of property to type mappings. Used for (de)serialization.
62     *
63     * @var string[]
64     */
65    protected static array $openAPITypes = [
66        'font_preferences' => '\Fingerprint\ServerSdk\Model\FontPreferences',
67        'emoji' => '\Fingerprint\ServerSdk\Model\Emoji',
68        'fonts' => 'string[]',
69        'device_memory' => 'int',
70        'timezone' => 'string',
71        'canvas' => '\Fingerprint\ServerSdk\Model\Canvas',
72        'languages' => 'string[][]',
73        'webgl_extensions' => '\Fingerprint\ServerSdk\Model\WebGlExtensions',
74        'webgl_basics' => '\Fingerprint\ServerSdk\Model\WebGlBasics',
75        'screen_resolution' => 'int[]',
76        'touch_support' => '\Fingerprint\ServerSdk\Model\TouchSupport',
77        'oscpu' => 'string',
78        'architecture' => 'int',
79        'cookies_enabled' => 'bool',
80        'hardware_concurrency' => 'int',
81        'date_time_locale' => 'string',
82        'vendor' => 'string',
83        'color_depth' => 'int',
84        'platform' => 'string',
85        'session_storage' => 'bool',
86        'local_storage' => 'bool',
87        'audio' => 'float',
88        'plugins' => '\Fingerprint\ServerSdk\Model\PluginsInner[]',
89        'indexed_db' => 'bool',
90        'math' => 'string',
91        'device_model' => 'string',
92        'device_manufacturer' => 'string',
93        'font_hash' => 'string',
94        'timezone_offset' => 'string',
95        'battery_level' => 'int',
96        'battery_charging' => 'bool',
97        'battery_low_power_mode' => 'bool',
98        'keyboard_layout_hash' => 'string',
99        'keyboard_layout_name' => 'string',
100    ];
101
102    /**
103     * Array of property to format mappings. Used for (de)serialization.
104     *
105     * @var string[]
106     *
107     * @phpstan-var array<string, string|null>
108     *
109     * @psalm-var array<string, string|null>
110     */
111    protected static array $openAPIFormats = [
112        'font_preferences' => null,
113        'emoji' => null,
114        'fonts' => null,
115        'device_memory' => 'int32',
116        'timezone' => null,
117        'canvas' => null,
118        'languages' => null,
119        'webgl_extensions' => null,
120        'webgl_basics' => null,
121        'screen_resolution' => 'int32',
122        'touch_support' => null,
123        'oscpu' => null,
124        'architecture' => 'int32',
125        'cookies_enabled' => null,
126        'hardware_concurrency' => 'int32',
127        'date_time_locale' => null,
128        'vendor' => null,
129        'color_depth' => 'int32',
130        'platform' => null,
131        'session_storage' => null,
132        'local_storage' => null,
133        'audio' => 'double',
134        'plugins' => null,
135        'indexed_db' => null,
136        'math' => null,
137        'device_model' => null,
138        'device_manufacturer' => null,
139        'font_hash' => null,
140        'timezone_offset' => null,
141        'battery_level' => 'int32',
142        'battery_charging' => null,
143        'battery_low_power_mode' => null,
144        'keyboard_layout_hash' => null,
145        'keyboard_layout_name' => null,
146    ];
147
148    /**
149     * Array of nullable properties. Used for (de)serialization.
150     *
151     * @var bool[]
152     */
153    protected static array $openAPINullables = [
154        'font_preferences' => false,
155        'emoji' => false,
156        'fonts' => false,
157        'device_memory' => false,
158        'timezone' => false,
159        'canvas' => false,
160        'languages' => false,
161        'webgl_extensions' => false,
162        'webgl_basics' => false,
163        'screen_resolution' => false,
164        'touch_support' => false,
165        'oscpu' => false,
166        'architecture' => false,
167        'cookies_enabled' => false,
168        'hardware_concurrency' => false,
169        'date_time_locale' => false,
170        'vendor' => false,
171        'color_depth' => false,
172        'platform' => false,
173        'session_storage' => false,
174        'local_storage' => false,
175        'audio' => false,
176        'plugins' => false,
177        'indexed_db' => false,
178        'math' => false,
179        'device_model' => false,
180        'device_manufacturer' => false,
181        'font_hash' => false,
182        'timezone_offset' => false,
183        'battery_level' => false,
184        'battery_charging' => false,
185        'battery_low_power_mode' => false,
186        'keyboard_layout_hash' => false,
187        'keyboard_layout_name' => false,
188    ];
189
190    /**
191     * If a nullable field gets set to null, insert it here.
192     *
193     * @var bool[]
194     */
195    protected array $openAPINullablesSetToNull = [];
196
197    /**
198     * Array of attributes where the key is the local name,
199     * and the value is the original name.
200     *
201     * @var string[]
202     */
203    protected static array $attributeMap = [
204        'font_preferences' => 'font_preferences',
205        'emoji' => 'emoji',
206        'fonts' => 'fonts',
207        'device_memory' => 'device_memory',
208        'timezone' => 'timezone',
209        'canvas' => 'canvas',
210        'languages' => 'languages',
211        'webgl_extensions' => 'webgl_extensions',
212        'webgl_basics' => 'webgl_basics',
213        'screen_resolution' => 'screen_resolution',
214        'touch_support' => 'touch_support',
215        'oscpu' => 'oscpu',
216        'architecture' => 'architecture',
217        'cookies_enabled' => 'cookies_enabled',
218        'hardware_concurrency' => 'hardware_concurrency',
219        'date_time_locale' => 'date_time_locale',
220        'vendor' => 'vendor',
221        'color_depth' => 'color_depth',
222        'platform' => 'platform',
223        'session_storage' => 'session_storage',
224        'local_storage' => 'local_storage',
225        'audio' => 'audio',
226        'plugins' => 'plugins',
227        'indexed_db' => 'indexed_db',
228        'math' => 'math',
229        'device_model' => 'device_model',
230        'device_manufacturer' => 'device_manufacturer',
231        'font_hash' => 'font_hash',
232        'timezone_offset' => 'timezone_offset',
233        'battery_level' => 'battery_level',
234        'battery_charging' => 'battery_charging',
235        'battery_low_power_mode' => 'battery_low_power_mode',
236        'keyboard_layout_hash' => 'keyboard_layout_hash',
237        'keyboard_layout_name' => 'keyboard_layout_name',
238    ];
239
240    /**
241     * Array of attributes to setter functions (for deserialization of responses).
242     *
243     * @var string[]
244     */
245    protected static array $setters = [
246        'font_preferences' => 'setFontPreferences',
247        'emoji' => 'setEmoji',
248        'fonts' => 'setFonts',
249        'device_memory' => 'setDeviceMemory',
250        'timezone' => 'setTimezone',
251        'canvas' => 'setCanvas',
252        'languages' => 'setLanguages',
253        'webgl_extensions' => 'setWebglExtensions',
254        'webgl_basics' => 'setWebglBasics',
255        'screen_resolution' => 'setScreenResolution',
256        'touch_support' => 'setTouchSupport',
257        'oscpu' => 'setOscpu',
258        'architecture' => 'setArchitecture',
259        'cookies_enabled' => 'setCookiesEnabled',
260        'hardware_concurrency' => 'setHardwareConcurrency',
261        'date_time_locale' => 'setDateTimeLocale',
262        'vendor' => 'setVendor',
263        'color_depth' => 'setColorDepth',
264        'platform' => 'setPlatform',
265        'session_storage' => 'setSessionStorage',
266        'local_storage' => 'setLocalStorage',
267        'audio' => 'setAudio',
268        'plugins' => 'setPlugins',
269        'indexed_db' => 'setIndexedDb',
270        'math' => 'setMath',
271        'device_model' => 'setDeviceModel',
272        'device_manufacturer' => 'setDeviceManufacturer',
273        'font_hash' => 'setFontHash',
274        'timezone_offset' => 'setTimezoneOffset',
275        'battery_level' => 'setBatteryLevel',
276        'battery_charging' => 'setBatteryCharging',
277        'battery_low_power_mode' => 'setBatteryLowPowerMode',
278        'keyboard_layout_hash' => 'setKeyboardLayoutHash',
279        'keyboard_layout_name' => 'setKeyboardLayoutName',
280    ];
281
282    /**
283     * Array of attributes to getter functions (for serialization of requests).
284     *
285     * @var string[]
286     */
287    protected static array $getters = [
288        'font_preferences' => 'getFontPreferences',
289        'emoji' => 'getEmoji',
290        'fonts' => 'getFonts',
291        'device_memory' => 'getDeviceMemory',
292        'timezone' => 'getTimezone',
293        'canvas' => 'getCanvas',
294        'languages' => 'getLanguages',
295        'webgl_extensions' => 'getWebglExtensions',
296        'webgl_basics' => 'getWebglBasics',
297        'screen_resolution' => 'getScreenResolution',
298        'touch_support' => 'getTouchSupport',
299        'oscpu' => 'getOscpu',
300        'architecture' => 'getArchitecture',
301        'cookies_enabled' => 'getCookiesEnabled',
302        'hardware_concurrency' => 'getHardwareConcurrency',
303        'date_time_locale' => 'getDateTimeLocale',
304        'vendor' => 'getVendor',
305        'color_depth' => 'getColorDepth',
306        'platform' => 'getPlatform',
307        'session_storage' => 'getSessionStorage',
308        'local_storage' => 'getLocalStorage',
309        'audio' => 'getAudio',
310        'plugins' => 'getPlugins',
311        'indexed_db' => 'getIndexedDb',
312        'math' => 'getMath',
313        'device_model' => 'getDeviceModel',
314        'device_manufacturer' => 'getDeviceManufacturer',
315        'font_hash' => 'getFontHash',
316        'timezone_offset' => 'getTimezoneOffset',
317        'battery_level' => 'getBatteryLevel',
318        'battery_charging' => 'getBatteryCharging',
319        'battery_low_power_mode' => 'getBatteryLowPowerMode',
320        'keyboard_layout_hash' => 'getKeyboardLayoutHash',
321        'keyboard_layout_name' => 'getKeyboardLayoutName',
322    ];
323
324    /**
325     * Associative array for storing property values.
326     */
327    protected array $container = [];
328
329    /**
330     * Constructor.
331     *
332     * @param array|null $data Associated array of property values
333     *                         initializing the model
334     *
335     * @noinspection DuplicatedCode
336     */
337    public function __construct(?array $data = null)
338    {
339        $this->setIfExists('font_preferences', $data ?? [], null);
340        $this->setIfExists('emoji', $data ?? [], null);
341        $this->setIfExists('fonts', $data ?? [], null);
342        $this->setIfExists('device_memory', $data ?? [], null);
343        $this->setIfExists('timezone', $data ?? [], null);
344        $this->setIfExists('canvas', $data ?? [], null);
345        $this->setIfExists('languages', $data ?? [], null);
346        $this->setIfExists('webgl_extensions', $data ?? [], null);
347        $this->setIfExists('webgl_basics', $data ?? [], null);
348        $this->setIfExists('screen_resolution', $data ?? [], null);
349        $this->setIfExists('touch_support', $data ?? [], null);
350        $this->setIfExists('oscpu', $data ?? [], null);
351        $this->setIfExists('architecture', $data ?? [], null);
352        $this->setIfExists('cookies_enabled', $data ?? [], null);
353        $this->setIfExists('hardware_concurrency', $data ?? [], null);
354        $this->setIfExists('date_time_locale', $data ?? [], null);
355        $this->setIfExists('vendor', $data ?? [], null);
356        $this->setIfExists('color_depth', $data ?? [], null);
357        $this->setIfExists('platform', $data ?? [], null);
358        $this->setIfExists('session_storage', $data ?? [], null);
359        $this->setIfExists('local_storage', $data ?? [], null);
360        $this->setIfExists('audio', $data ?? [], null);
361        $this->setIfExists('plugins', $data ?? [], null);
362        $this->setIfExists('indexed_db', $data ?? [], null);
363        $this->setIfExists('math', $data ?? [], null);
364        $this->setIfExists('device_model', $data ?? [], null);
365        $this->setIfExists('device_manufacturer', $data ?? [], null);
366        $this->setIfExists('font_hash', $data ?? [], null);
367        $this->setIfExists('timezone_offset', $data ?? [], null);
368        $this->setIfExists('battery_level', $data ?? [], null);
369        $this->setIfExists('battery_charging', $data ?? [], null);
370        $this->setIfExists('battery_low_power_mode', $data ?? [], null);
371        $this->setIfExists('keyboard_layout_hash', $data ?? [], null);
372        $this->setIfExists('keyboard_layout_name', $data ?? [], null);
373    }
374
375    /**
376     * Gets the string presentation of the object.
377     *
378     */
379    public function __toString(): string
380    {
381        return json_encode(
382            ObjectSerializer::sanitizeForSerialization($this),
383            JSON_PRETTY_PRINT
384        );
385    }
386
387    /**
388     * Array of property to type mappings. Used for (de)serialization.
389     *
390     */
391    public static function openAPITypes(): array
392    {
393        return self::$openAPITypes;
394    }
395
396    /**
397     * Array of property to format mappings. Used for (de)serialization.
398     */
399    public static function openAPIFormats(): array
400    {
401        return self::$openAPIFormats;
402    }
403
404    /**
405     * Checks if a property is nullable.
406     *
407     */
408    public static function isNullable(string $property): bool
409    {
410        return self::openAPINullables()[$property] ?? false;
411    }
412
413    /**
414     * Checks if a nullable property is set to null.
415     *
416     */
417    public function isNullableSetToNull(string $property): bool
418    {
419        return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
420    }
421
422    /**
423     * Array of attributes where the key is the local name,
424     * and the value is the original name.
425     *
426     */
427    public static function attributeMap(): array
428    {
429        return self::$attributeMap;
430    }
431
432    /**
433     * Array of attributes to setter functions (for deserialization of responses).
434     *
435     */
436    public static function setters(): array
437    {
438        return self::$setters;
439    }
440
441    /**
442     * Array of attributes to getter functions (for serialization of requests).
443     *
444     */
445    public static function getters(): array
446    {
447        return self::$getters;
448    }
449
450    /**
451     * The original name of the model.
452     *
453     */
454    public function getModelName(): string
455    {
456        return self::$openAPIModelName;
457    }
458
459    /**
460     * Show all the invalid properties with reasons.
461     *
462     * @return array invalid properties with reasons
463     */
464    public function listInvalidProperties(): array
465    {
466        $invalidProperties = [];
467
468        if (!is_null($this->container['device_memory']) && ($this->container['device_memory'] < 0)) {
469            $invalidProperties[] = "invalid value for 'device_memory', must be bigger than or equal to 0.";
470        }
471
472        if (!is_null($this->container['screen_resolution']) && (count($this->container['screen_resolution']) > 2)) {
473            $invalidProperties[] = "invalid value for 'screen_resolution', number of items must be less than or equal to 2.";
474        }
475
476        if (!is_null($this->container['screen_resolution']) && (count($this->container['screen_resolution']) < 2)) {
477            $invalidProperties[] = "invalid value for 'screen_resolution', number of items must be greater than or equal to 2.";
478        }
479
480        if (!is_null($this->container['battery_level']) && ($this->container['battery_level'] > 100)) {
481            $invalidProperties[] = "invalid value for 'battery_level', must be smaller than or equal to 100.";
482        }
483
484        if (!is_null($this->container['battery_level']) && ($this->container['battery_level'] < 0)) {
485            $invalidProperties[] = "invalid value for 'battery_level', must be bigger than or equal to 0.";
486        }
487
488        return $invalidProperties;
489    }
490
491    /**
492     * Validate all the properties in the model
493     * return true if all passed.
494     *
495     * @return bool True if all properties are valid
496     */
497    public function valid(): bool
498    {
499        return 0 === count($this->listInvalidProperties());
500    }
501
502    /**
503     * Gets font_preferences.
504     *
505     */
506    public function getFontPreferences(): ?FontPreferences
507    {
508        return $this->container['font_preferences'];
509    }
510
511    /**
512     * Sets font_preferences.
513     *
514     * @param FontPreferences $font_preferences font_preferences
515     *
516     */
517    public function setFontPreferences(FontPreferences $font_preferences): self
518    {
519        $this->container['font_preferences'] = $font_preferences;
520
521        return $this;
522    }
523
524    /**
525     * Gets emoji.
526     *
527     */
528    public function getEmoji(): ?Emoji
529    {
530        return $this->container['emoji'];
531    }
532
533    /**
534     * Sets emoji.
535     *
536     * @param Emoji $emoji emoji
537     *
538     */
539    public function setEmoji(Emoji $emoji): self
540    {
541        $this->container['emoji'] = $emoji;
542
543        return $this;
544    }
545
546    /**
547     * Gets fonts.
548     *
549     * @return string[]|null
550     */
551    public function getFonts(): ?array
552    {
553        return $this->container['fonts'];
554    }
555
556    /**
557     * Sets fonts.
558     *
559     * @param string[] $fonts list of fonts detected on the device
560     *
561     */
562    public function setFonts(array $fonts): self
563    {
564        $this->container['fonts'] = $fonts;
565
566        return $this;
567    }
568
569    /**
570     * Gets device_memory.
571     *
572     */
573    public function getDeviceMemory(): ?int
574    {
575        return $this->container['device_memory'];
576    }
577
578    /**
579     * Sets device_memory.
580     *
581     * @param int $device_memory Rounded amount of RAM in gigabytes. Available for browsers, Android, and iOS devices.
582     *
583     */
584    public function setDeviceMemory(int $device_memory): self
585    {
586        if ($device_memory < 0) {
587            throw new \InvalidArgumentException('invalid value for $device_memory when calling RawDeviceAttributes., must be bigger than or equal to 0.');
588        }
589
590        $this->container['device_memory'] = $device_memory;
591
592        return $this;
593    }
594
595    /**
596     * Gets timezone.
597     *
598     */
599    public function getTimezone(): ?string
600    {
601        return $this->container['timezone'];
602    }
603
604    /**
605     * Sets timezone.
606     *
607     * @param string $timezone timezone identifier detected on the client
608     *
609     */
610    public function setTimezone(string $timezone): self
611    {
612        $this->container['timezone'] = $timezone;
613
614        return $this;
615    }
616
617    /**
618     * Gets canvas.
619     *
620     */
621    public function getCanvas(): ?Canvas
622    {
623        return $this->container['canvas'];
624    }
625
626    /**
627     * Sets canvas.
628     *
629     * @param Canvas $canvas canvas
630     *
631     */
632    public function setCanvas(Canvas $canvas): self
633    {
634        $this->container['canvas'] = $canvas;
635
636        return $this;
637    }
638
639    /**
640     * Gets languages.
641     *
642     * @return string[][]|null
643     */
644    public function getLanguages(): ?array
645    {
646        return $this->container['languages'];
647    }
648
649    /**
650     * Sets languages.
651     *
652     * @param string[][] $languages Navigator languages reported by the agent including fallbacks. Each inner array represents ordered language preferences reported by different APIs. Available for browsers, iOS, and Android devices.
653     *
654     */
655    public function setLanguages(array $languages): self
656    {
657        $this->container['languages'] = $languages;
658
659        return $this;
660    }
661
662    /**
663     * Gets webgl_extensions.
664     *
665     */
666    public function getWebglExtensions(): ?WebGlExtensions
667    {
668        return $this->container['webgl_extensions'];
669    }
670
671    /**
672     * Sets webgl_extensions.
673     *
674     * @param WebGlExtensions $webgl_extensions webgl_extensions
675     *
676     */
677    public function setWebglExtensions(WebGlExtensions $webgl_extensions): self
678    {
679        $this->container['webgl_extensions'] = $webgl_extensions;
680
681        return $this;
682    }
683
684    /**
685     * Gets webgl_basics.
686     *
687     */
688    public function getWebglBasics(): ?WebGlBasics
689    {
690        return $this->container['webgl_basics'];
691    }
692
693    /**
694     * Sets webgl_basics.
695     *
696     * @param WebGlBasics $webgl_basics webgl_basics
697     *
698     */
699    public function setWebglBasics(WebGlBasics $webgl_basics): self
700    {
701        $this->container['webgl_basics'] = $webgl_basics;
702
703        return $this;
704    }
705
706    /**
707     * Gets screen_resolution.
708     *
709     * @return int[]|null
710     */
711    public function getScreenResolution(): ?array
712    {
713        return $this->container['screen_resolution'];
714    }
715
716    /**
717     * Sets screen_resolution.
718     *
719     * @param int[] $screen_resolution Current screen resolution. Available for both browsers and iOS devices
720     *
721     */
722    public function setScreenResolution(array $screen_resolution): self
723    {
724        if (count($screen_resolution) > 2) {
725            throw new \InvalidArgumentException('invalid value for $screen_resolution when calling RawDeviceAttributes., number of items must be less than or equal to 2.');
726        }
727        if (count($screen_resolution) < 2) {
728            throw new \InvalidArgumentException('invalid length for $screen_resolution when calling RawDeviceAttributes., number of items must be greater than or equal to 2.');
729        }
730        $this->container['screen_resolution'] = $screen_resolution;
731
732        return $this;
733    }
734
735    /**
736     * Gets touch_support.
737     *
738     */
739    public function getTouchSupport(): ?TouchSupport
740    {
741        return $this->container['touch_support'];
742    }
743
744    /**
745     * Sets touch_support.
746     *
747     * @param TouchSupport $touch_support touch_support
748     *
749     */
750    public function setTouchSupport(TouchSupport $touch_support): self
751    {
752        $this->container['touch_support'] = $touch_support;
753
754        return $this;
755    }
756
757    /**
758     * Gets oscpu.
759     *
760     */
761    public function getOscpu(): ?string
762    {
763        return $this->container['oscpu'];
764    }
765
766    /**
767     * Sets oscpu.
768     *
769     * @param string $oscpu navigator `oscpu` string
770     *
771     */
772    public function setOscpu(string $oscpu): self
773    {
774        $this->container['oscpu'] = $oscpu;
775
776        return $this;
777    }
778
779    /**
780     * Gets architecture.
781     *
782     */
783    public function getArchitecture(): ?int
784    {
785        return $this->container['architecture'];
786    }
787
788    /**
789     * Sets architecture.
790     *
791     * @param int $architecture integer representing the CPU architecture exposed by the browser
792     *
793     */
794    public function setArchitecture(int $architecture): self
795    {
796        $this->container['architecture'] = $architecture;
797
798        return $this;
799    }
800
801    /**
802     * Gets cookies_enabled.
803     *
804     */
805    public function getCookiesEnabled(): ?bool
806    {
807        return $this->container['cookies_enabled'];
808    }
809
810    /**
811     * Sets cookies_enabled.
812     *
813     * @param bool $cookies_enabled whether the cookies are enabled in the browser
814     *
815     */
816    public function setCookiesEnabled(bool $cookies_enabled): self
817    {
818        $this->container['cookies_enabled'] = $cookies_enabled;
819
820        return $this;
821    }
822
823    /**
824     * Gets hardware_concurrency.
825     *
826     */
827    public function getHardwareConcurrency(): ?int
828    {
829        return $this->container['hardware_concurrency'];
830    }
831
832    /**
833     * Sets hardware_concurrency.
834     *
835     * @param int $hardware_concurrency number of logical CPU cores reported by the browser
836     *
837     */
838    public function setHardwareConcurrency(int $hardware_concurrency): self
839    {
840        $this->container['hardware_concurrency'] = $hardware_concurrency;
841
842        return $this;
843    }
844
845    /**
846     * Gets date_time_locale.
847     *
848     */
849    public function getDateTimeLocale(): ?string
850    {
851        return $this->container['date_time_locale'];
852    }
853
854    /**
855     * Sets date_time_locale.
856     *
857     * @param string $date_time_locale Locale derived from the Intl.DateTimeFormat API. Negative values indicate known error states. The negative statuses can be: - \"-1\": A permanent status for browsers that don't support Intl API. - \"-2\": A permanent status for browsers that don't supportDateTimeFormat constructor. - \"-3\": A permanent status for browsers in which DateTimeFormat locale is undefined or null.
858     *
859     */
860    public function setDateTimeLocale(string $date_time_locale): self
861    {
862        $this->container['date_time_locale'] = $date_time_locale;
863
864        return $this;
865    }
866
867    /**
868     * Gets vendor.
869     *
870     */
871    public function getVendor(): ?string
872    {
873        return $this->container['vendor'];
874    }
875
876    /**
877     * Sets vendor.
878     *
879     * @param string $vendor navigator vendor string
880     *
881     */
882    public function setVendor(string $vendor): self
883    {
884        $this->container['vendor'] = $vendor;
885
886        return $this;
887    }
888
889    /**
890     * Gets color_depth.
891     *
892     */
893    public function getColorDepth(): ?int
894    {
895        return $this->container['color_depth'];
896    }
897
898    /**
899     * Sets color_depth.
900     *
901     * @param int $color_depth screen color depth in bits
902     *
903     */
904    public function setColorDepth(int $color_depth): self
905    {
906        $this->container['color_depth'] = $color_depth;
907
908        return $this;
909    }
910
911    /**
912     * Gets platform.
913     *
914     */
915    public function getPlatform(): ?string
916    {
917        return $this->container['platform'];
918    }
919
920    /**
921     * Sets platform.
922     *
923     * @param string $platform navigator platform string
924     *
925     */
926    public function setPlatform(string $platform): self
927    {
928        $this->container['platform'] = $platform;
929
930        return $this;
931    }
932
933    /**
934     * Gets session_storage.
935     *
936     */
937    public function getSessionStorage(): ?bool
938    {
939        return $this->container['session_storage'];
940    }
941
942    /**
943     * Sets session_storage.
944     *
945     * @param bool $session_storage whether sessionStorage is available
946     *
947     */
948    public function setSessionStorage(bool $session_storage): self
949    {
950        $this->container['session_storage'] = $session_storage;
951
952        return $this;
953    }
954
955    /**
956     * Gets local_storage.
957     *
958     */
959    public function getLocalStorage(): ?bool
960    {
961        return $this->container['local_storage'];
962    }
963
964    /**
965     * Sets local_storage.
966     *
967     * @param bool $local_storage whether localStorage is available
968     *
969     */
970    public function setLocalStorage(bool $local_storage): self
971    {
972        $this->container['local_storage'] = $local_storage;
973
974        return $this;
975    }
976
977    /**
978     * Gets audio.
979     *
980     */
981    public function getAudio(): ?float
982    {
983        return $this->container['audio'];
984    }
985
986    /**
987     * Sets audio.
988     *
989     * @param float $audio AudioContext fingerprint or negative status when unavailable. The negative statuses can be: - -1: A permanent status for those browsers which are known to always suspend audio context - -2: A permanent status for browsers that don't support the signal - -3: A temporary status that means that an unexpected timeout has happened
990     *
991     */
992    public function setAudio(float $audio): self
993    {
994        $this->container['audio'] = $audio;
995
996        return $this;
997    }
998
999    /**
1000     * Gets plugins.
1001     *
1002     * @return PluginsInner[]|null
1003     */
1004    public function getPlugins(): ?array
1005    {
1006        return $this->container['plugins'];
1007    }
1008
1009    /**
1010     * Sets plugins.
1011     *
1012     * @param PluginsInner[] $plugins Browser plugins reported by `navigator.plugins`.
1013     *
1014     */
1015    public function setPlugins(array $plugins): self
1016    {
1017        $this->container['plugins'] = $plugins;
1018
1019        return $this;
1020    }
1021
1022    /**
1023     * Gets indexed_db.
1024     *
1025     */
1026    public function getIndexedDb(): ?bool
1027    {
1028        return $this->container['indexed_db'];
1029    }
1030
1031    /**
1032     * Sets indexed_db.
1033     *
1034     * @param bool $indexed_db whether IndexedDB is available
1035     *
1036     */
1037    public function setIndexedDb(bool $indexed_db): self
1038    {
1039        $this->container['indexed_db'] = $indexed_db;
1040
1041        return $this;
1042    }
1043
1044    /**
1045     * Gets math.
1046     *
1047     */
1048    public function getMath(): ?string
1049    {
1050        return $this->container['math'];
1051    }
1052
1053    /**
1054     * Sets math.
1055     *
1056     * @param string $math hash of Math APIs used for entropy collection
1057     *
1058     */
1059    public function setMath(string $math): self
1060    {
1061        $this->container['math'] = $math;
1062
1063        return $this;
1064    }
1065
1066    /**
1067     * Gets device_model.
1068     *
1069     */
1070    public function getDeviceModel(): ?string
1071    {
1072        return $this->container['device_model'];
1073    }
1074
1075    /**
1076     * Sets device_model.
1077     *
1078     * @param string $device_model Device model string. Available only for Android and iOS devices.
1079     *
1080     */
1081    public function setDeviceModel(string $device_model): self
1082    {
1083        $this->container['device_model'] = $device_model;
1084
1085        return $this;
1086    }
1087
1088    /**
1089     * Gets device_manufacturer.
1090     *
1091     */
1092    public function getDeviceManufacturer(): ?string
1093    {
1094        return $this->container['device_manufacturer'];
1095    }
1096
1097    /**
1098     * Sets device_manufacturer.
1099     *
1100     * @param string $device_manufacturer Device manufacturer string. Available only for Android and iOS devices.
1101     *
1102     */
1103    public function setDeviceManufacturer(string $device_manufacturer): self
1104    {
1105        $this->container['device_manufacturer'] = $device_manufacturer;
1106
1107        return $this;
1108    }
1109
1110    /**
1111     * Gets font_hash.
1112     *
1113     */
1114    public function getFontHash(): ?string
1115    {
1116        return $this->container['font_hash'];
1117    }
1118
1119    /**
1120     * Sets font_hash.
1121     *
1122     * @param string $font_hash unique identifier for the user’s installed fonts
1123     *
1124     */
1125    public function setFontHash(string $font_hash): self
1126    {
1127        $this->container['font_hash'] = $font_hash;
1128
1129        return $this;
1130    }
1131
1132    /**
1133     * Gets timezone_offset.
1134     *
1135     */
1136    public function getTimezoneOffset(): ?string
1137    {
1138        return $this->container['timezone_offset'];
1139    }
1140
1141    /**
1142     * Sets timezone_offset.
1143     *
1144     * @param string $timezone_offset UTC offset in \"±HH:MM\" format derived from the detected IANA timezone
1145     *
1146     */
1147    public function setTimezoneOffset(string $timezone_offset): self
1148    {
1149        $this->container['timezone_offset'] = $timezone_offset;
1150
1151        return $this;
1152    }
1153
1154    /**
1155     * Gets battery_level.
1156     *
1157     */
1158    public function getBatteryLevel(): ?int
1159    {
1160        return $this->container['battery_level'];
1161    }
1162
1163    /**
1164     * Sets battery_level.
1165     *
1166     * @param int $battery_level Battery charge level as a percentage (0-100). Available for Android, iOS, and web devices. On web, only available in Chromium-based browsers.
1167     *
1168     */
1169    public function setBatteryLevel(int $battery_level): self
1170    {
1171        if ($battery_level > 100) {
1172            throw new \InvalidArgumentException('invalid value for $battery_level when calling RawDeviceAttributes., must be smaller than or equal to 100.');
1173        }
1174        if ($battery_level < 0) {
1175            throw new \InvalidArgumentException('invalid value for $battery_level when calling RawDeviceAttributes., must be bigger than or equal to 0.');
1176        }
1177
1178        $this->container['battery_level'] = $battery_level;
1179
1180        return $this;
1181    }
1182
1183    /**
1184     * Gets battery_charging.
1185     *
1186     */
1187    public function getBatteryCharging(): ?bool
1188    {
1189        return $this->container['battery_charging'];
1190    }
1191
1192    /**
1193     * Sets battery_charging.
1194     *
1195     * @param bool $battery_charging When `true`, the device is currently charging. Available only for web devices on Chromium-based browsers.
1196     *
1197     */
1198    public function setBatteryCharging(bool $battery_charging): self
1199    {
1200        $this->container['battery_charging'] = $battery_charging;
1201
1202        return $this;
1203    }
1204
1205    /**
1206     * Gets battery_low_power_mode.
1207     *
1208     */
1209    public function getBatteryLowPowerMode(): ?bool
1210    {
1211        return $this->container['battery_low_power_mode'];
1212    }
1213
1214    /**
1215     * Sets battery_low_power_mode.
1216     *
1217     * @param bool $battery_low_power_mode Whether the device's low power mode is enabled. Available only for Android and iOS devices.
1218     *
1219     */
1220    public function setBatteryLowPowerMode(bool $battery_low_power_mode): self
1221    {
1222        $this->container['battery_low_power_mode'] = $battery_low_power_mode;
1223
1224        return $this;
1225    }
1226
1227    /**
1228     * Gets keyboard_layout_hash.
1229     *
1230     */
1231    public function getKeyboardLayoutHash(): ?string
1232    {
1233        return $this->container['keyboard_layout_hash'];
1234    }
1235
1236    /**
1237     * Sets keyboard_layout_hash.
1238     *
1239     * @param string $keyboard_layout_hash unique identifier for the user's keyboard layout
1240     *
1241     */
1242    public function setKeyboardLayoutHash(string $keyboard_layout_hash): self
1243    {
1244        $this->container['keyboard_layout_hash'] = $keyboard_layout_hash;
1245
1246        return $this;
1247    }
1248
1249    /**
1250     * Gets keyboard_layout_name.
1251     *
1252     */
1253    public function getKeyboardLayoutName(): ?string
1254    {
1255        return $this->container['keyboard_layout_name'];
1256    }
1257
1258    /**
1259     * Sets keyboard_layout_name.
1260     *
1261     * @param string $keyboard_layout_name Name of the user's configured keyboard layout as a BCP 47-style identifier. Only available in Chromium-based browsers, omitted otherwise.
1262     *
1263     */
1264    public function setKeyboardLayoutName(string $keyboard_layout_name): self
1265    {
1266        $this->container['keyboard_layout_name'] = $keyboard_layout_name;
1267
1268        return $this;
1269    }
1270
1271    /**
1272     * Returns true if offset exists. False otherwise.
1273     *
1274     * @param int|string $offset Offset
1275     *
1276     */
1277    public function offsetExists(mixed $offset): bool
1278    {
1279        return isset($this->container[$offset]);
1280    }
1281
1282    /**
1283     * Gets offset.
1284     *
1285     * @param int|string $offset Offset
1286     *
1287     * @return mixed|null
1288     */
1289    #[\ReturnTypeWillChange]
1290    public function offsetGet(mixed $offset): mixed
1291    {
1292        return $this->container[$offset] ?? null;
1293    }
1294
1295    /**
1296     * Sets value based on offset.
1297     *
1298     * @param int|null $offset Offset
1299     * @param mixed    $value  Value to be set
1300     *
1301     */
1302    public function offsetSet(mixed $offset, mixed $value): void
1303    {
1304        if (is_null($offset)) {
1305            $this->container[] = $value;
1306        } else {
1307            $this->container[$offset] = $value;
1308        }
1309    }
1310
1311    /**
1312     * Unsets offset.
1313     *
1314     * @param int|string $offset Offset
1315     *
1316     */
1317    public function offsetUnset(mixed $offset): void
1318    {
1319        unset($this->container[$offset]);
1320    }
1321
1322    /**
1323     * Serializes the object to a value that can be serialized natively by json_encode().
1324     *
1325     * @see https://www.php.net/manual/en/jsonserializable.jsonserialize.php
1326     *
1327     * @return mixed returns data which can be serialized by json_encode(), which is a value
1328     *               of any type other than a resource
1329     */
1330    #[\ReturnTypeWillChange]
1331    public function jsonSerialize(): mixed
1332    {
1333        return ObjectSerializer::sanitizeForSerialization($this);
1334    }
1335
1336    /**
1337     * Gets a header-safe presentation of the object.
1338     *
1339     */
1340    public function toHeaderValue(): string
1341    {
1342        return json_encode(ObjectSerializer::sanitizeForSerialization($this));
1343    }
1344
1345    /**
1346     * Array of nullable properties.
1347     */
1348    protected static function openAPINullables(): array
1349    {
1350        return self::$openAPINullables;
1351    }
1352
1353    /**
1354     * Array of nullable field names deliberately set to null.
1355     *
1356     * @return bool[]
1357     */
1358    private function getOpenAPINullablesSetToNull(): array
1359    {
1360        return $this->openAPINullablesSetToNull;
1361    }
1362
1363    /**
1364     * Setter - Array of nullable field names deliberately set to null.
1365     *
1366     * @param bool[] $openAPINullablesSetToNull
1367     *
1368     * @codeCoverageIgnore
1369     */
1370    private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
1371    {
1372        $this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
1373    }
1374
1375    /**
1376     * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
1377     * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
1378     * $this->openAPINullablesSetToNull array.
1379     *
1380     * @noinspection PhpSameParameterValueInspection
1381     */
1382    private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void
1383    {
1384        if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
1385            $this->openAPINullablesSetToNull[] = $variableName; // @codeCoverageIgnore
1386        }
1387
1388        $this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
1389    }
1390}