Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
38.71% |
24 / 62 |
|
37.93% |
11 / 29 |
CRAP | |
0.00% |
0 / 1 |
BrowserDetails | |
38.71% |
24 / 62 |
|
37.93% |
11 / 29 |
511.23 | |
0.00% |
0 / 1 |
__construct | |
100.00% |
7 / 7 |
|
100.00% |
1 / 1 |
8 | |||
__toString | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
swaggerTypes | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
swaggerFormats | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
attributeMap | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setters | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getters | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getModelName | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
listInvalidProperties | |
0.00% |
0 / 16 |
|
0.00% |
0 / 1 |
72 | |||
valid | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getBrowserName | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setBrowserName | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
getBrowserMajorVersion | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setBrowserMajorVersion | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
getBrowserFullVersion | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setBrowserFullVersion | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
getOs | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setOs | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
getOsVersion | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setOsVersion | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
getDevice | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setDevice | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
getUserAgent | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setUserAgent | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
offsetExists | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
offsetGet | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
6 | |||
offsetSet | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
6 | |||
offsetUnset | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
toPrettyString | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | /** |
3 | * BrowserDetails. |
4 | * |
5 | * @category Class |
6 | * |
7 | * @author Swagger Codegen team |
8 | * |
9 | * @see https://github.com/swagger-api/swagger-codegen |
10 | */ |
11 | |
12 | /** |
13 | * Fingerprint Pro Server API. |
14 | * |
15 | * Fingerprint Pro Server API allows you to get information about visitors and about individual 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. |
16 | * |
17 | * OpenAPI spec version: 3 |
18 | * Contact: support@fingerprint.com |
19 | * Generated by: https://github.com/swagger-api/swagger-codegen.git |
20 | * Swagger Codegen version: 3.0.34 |
21 | */ |
22 | /** |
23 | * NOTE: This class is auto generated by the swagger code generator program. |
24 | * https://github.com/swagger-api/swagger-codegen |
25 | * Do not edit the class manually. |
26 | */ |
27 | |
28 | namespace Fingerprint\ServerAPI\Model; |
29 | |
30 | use Fingerprint\ServerAPI\ObjectSerializer; |
31 | |
32 | /** |
33 | * BrowserDetails Class Doc Comment. |
34 | * |
35 | * @category Class |
36 | * |
37 | * @author Swagger Codegen team |
38 | * |
39 | * @see https://github.com/swagger-api/swagger-codegen |
40 | */ |
41 | class BrowserDetails implements ModelInterface, \ArrayAccess |
42 | { |
43 | /** |
44 | * The original name of the model. |
45 | * |
46 | */ |
47 | protected static string $swaggerModelName = 'BrowserDetails'; |
48 | |
49 | /** |
50 | * Array of property to type mappings. Used for (de)serialization. |
51 | * |
52 | * @var string[] |
53 | */ |
54 | protected static array $swaggerTypes = [ |
55 | 'browser_name' => 'string', |
56 | 'browser_major_version' => 'string', |
57 | 'browser_full_version' => 'string', |
58 | 'os' => 'string', |
59 | 'os_version' => 'string', |
60 | 'device' => 'string', |
61 | 'user_agent' => 'string']; |
62 | |
63 | /** |
64 | * Array of property to format mappings. Used for (de)serialization. |
65 | * |
66 | * @var string[] |
67 | */ |
68 | protected static array $swaggerFormats = [ |
69 | 'browser_name' => null, |
70 | 'browser_major_version' => null, |
71 | 'browser_full_version' => null, |
72 | 'os' => null, |
73 | 'os_version' => null, |
74 | 'device' => null, |
75 | 'user_agent' => null]; |
76 | |
77 | /** |
78 | * Array of attributes where the key is the local name, |
79 | * and the value is the original name. |
80 | * |
81 | * @var string[] |
82 | */ |
83 | protected static array $attributeMap = [ |
84 | 'browser_name' => 'browserName', |
85 | 'browser_major_version' => 'browserMajorVersion', |
86 | 'browser_full_version' => 'browserFullVersion', |
87 | 'os' => 'os', |
88 | 'os_version' => 'osVersion', |
89 | 'device' => 'device', |
90 | 'user_agent' => 'userAgent']; |
91 | |
92 | /** |
93 | * Array of attributes to setter functions (for deserialization of responses). |
94 | * |
95 | * @var string[] |
96 | */ |
97 | protected static array $setters = [ |
98 | 'browser_name' => 'setBrowserName', |
99 | 'browser_major_version' => 'setBrowserMajorVersion', |
100 | 'browser_full_version' => 'setBrowserFullVersion', |
101 | 'os' => 'setOs', |
102 | 'os_version' => 'setOsVersion', |
103 | 'device' => 'setDevice', |
104 | 'user_agent' => 'setUserAgent']; |
105 | |
106 | /** |
107 | * Array of attributes to getter functions (for serialization of requests). |
108 | * |
109 | * @var string[] |
110 | */ |
111 | protected static array $getters = [ |
112 | 'browser_name' => 'getBrowserName', |
113 | 'browser_major_version' => 'getBrowserMajorVersion', |
114 | 'browser_full_version' => 'getBrowserFullVersion', |
115 | 'os' => 'getOs', |
116 | 'os_version' => 'getOsVersion', |
117 | 'device' => 'getDevice', |
118 | 'user_agent' => 'getUserAgent']; |
119 | |
120 | /** |
121 | * Associative array for storing property values. |
122 | * |
123 | * @var mixed[] |
124 | */ |
125 | protected array $container = []; |
126 | |
127 | /** |
128 | * Constructor. |
129 | * |
130 | * @param mixed[] $data Associated array of property values |
131 | * initializing the model |
132 | */ |
133 | public function __construct(?array $data = null) |
134 | { |
135 | $this->container['browser_name'] = isset($data['browser_name']) ? $data['browser_name'] : null; |
136 | $this->container['browser_major_version'] = isset($data['browser_major_version']) ? $data['browser_major_version'] : null; |
137 | $this->container['browser_full_version'] = isset($data['browser_full_version']) ? $data['browser_full_version'] : null; |
138 | $this->container['os'] = isset($data['os']) ? $data['os'] : null; |
139 | $this->container['os_version'] = isset($data['os_version']) ? $data['os_version'] : null; |
140 | $this->container['device'] = isset($data['device']) ? $data['device'] : null; |
141 | $this->container['user_agent'] = isset($data['user_agent']) ? $data['user_agent'] : null; |
142 | } |
143 | |
144 | /** |
145 | * Gets the string presentation of the object. |
146 | * |
147 | */ |
148 | public function __toString(): string |
149 | { |
150 | return json_encode(ObjectSerializer::sanitizeForSerialization($this)); |
151 | } |
152 | |
153 | /** |
154 | * Array of property to type mappings. Used for (de)serialization. |
155 | */ |
156 | public static function swaggerTypes(): array |
157 | { |
158 | return self::$swaggerTypes; |
159 | } |
160 | |
161 | /** |
162 | * Array of property to format mappings. Used for (de)serialization. |
163 | */ |
164 | public static function swaggerFormats(): array |
165 | { |
166 | return self::$swaggerFormats; |
167 | } |
168 | |
169 | /** |
170 | * Array of attributes where the key is the local name, |
171 | * and the value is the original name. |
172 | */ |
173 | public static function attributeMap(): array |
174 | { |
175 | return self::$attributeMap; |
176 | } |
177 | |
178 | /** |
179 | * Array of attributes to setter functions (for deserialization of responses). |
180 | */ |
181 | public static function setters(): array |
182 | { |
183 | return self::$setters; |
184 | } |
185 | |
186 | /** |
187 | * Array of attributes to getter functions (for serialization of requests). |
188 | */ |
189 | public static function getters(): array |
190 | { |
191 | return self::$getters; |
192 | } |
193 | |
194 | /** |
195 | * The original name of the model. |
196 | */ |
197 | public function getModelName(): string |
198 | { |
199 | return self::$swaggerModelName; |
200 | } |
201 | |
202 | /** |
203 | * Show all the invalid properties with reasons. |
204 | * |
205 | * @return array invalid properties with reasons |
206 | */ |
207 | public function listInvalidProperties(): array |
208 | { |
209 | $invalidProperties = []; |
210 | |
211 | if (null === $this->container['browser_name']) { |
212 | $invalidProperties[] = "'browser_name' can't be null"; |
213 | } |
214 | if (null === $this->container['browser_major_version']) { |
215 | $invalidProperties[] = "'browser_major_version' can't be null"; |
216 | } |
217 | if (null === $this->container['browser_full_version']) { |
218 | $invalidProperties[] = "'browser_full_version' can't be null"; |
219 | } |
220 | if (null === $this->container['os']) { |
221 | $invalidProperties[] = "'os' can't be null"; |
222 | } |
223 | if (null === $this->container['os_version']) { |
224 | $invalidProperties[] = "'os_version' can't be null"; |
225 | } |
226 | if (null === $this->container['device']) { |
227 | $invalidProperties[] = "'device' can't be null"; |
228 | } |
229 | if (null === $this->container['user_agent']) { |
230 | $invalidProperties[] = "'user_agent' can't be null"; |
231 | } |
232 | |
233 | return $invalidProperties; |
234 | } |
235 | |
236 | /** |
237 | * Validate all the properties in the model |
238 | * return true if all passed. |
239 | * |
240 | * @return bool True if all properties are valid |
241 | */ |
242 | public function valid(): bool |
243 | { |
244 | return 0 === count($this->listInvalidProperties()); |
245 | } |
246 | |
247 | /** |
248 | * Gets browser_name. |
249 | */ |
250 | public function getBrowserName(): string |
251 | { |
252 | return $this->container['browser_name']; |
253 | } |
254 | |
255 | /** |
256 | * Sets browser_name. |
257 | * |
258 | * @param string $browser_name browser_name |
259 | * |
260 | * @return $this |
261 | */ |
262 | public function setBrowserName(string $browser_name): self |
263 | { |
264 | $this->container['browser_name'] = $browser_name; |
265 | |
266 | return $this; |
267 | } |
268 | |
269 | /** |
270 | * Gets browser_major_version. |
271 | */ |
272 | public function getBrowserMajorVersion(): string |
273 | { |
274 | return $this->container['browser_major_version']; |
275 | } |
276 | |
277 | /** |
278 | * Sets browser_major_version. |
279 | * |
280 | * @param string $browser_major_version browser_major_version |
281 | * |
282 | * @return $this |
283 | */ |
284 | public function setBrowserMajorVersion(string $browser_major_version): self |
285 | { |
286 | $this->container['browser_major_version'] = $browser_major_version; |
287 | |
288 | return $this; |
289 | } |
290 | |
291 | /** |
292 | * Gets browser_full_version. |
293 | */ |
294 | public function getBrowserFullVersion(): string |
295 | { |
296 | return $this->container['browser_full_version']; |
297 | } |
298 | |
299 | /** |
300 | * Sets browser_full_version. |
301 | * |
302 | * @param string $browser_full_version browser_full_version |
303 | * |
304 | * @return $this |
305 | */ |
306 | public function setBrowserFullVersion(string $browser_full_version): self |
307 | { |
308 | $this->container['browser_full_version'] = $browser_full_version; |
309 | |
310 | return $this; |
311 | } |
312 | |
313 | /** |
314 | * Gets os. |
315 | */ |
316 | public function getOs(): string |
317 | { |
318 | return $this->container['os']; |
319 | } |
320 | |
321 | /** |
322 | * Sets os. |
323 | * |
324 | * @param string $os os |
325 | * |
326 | * @return $this |
327 | */ |
328 | public function setOs(string $os): self |
329 | { |
330 | $this->container['os'] = $os; |
331 | |
332 | return $this; |
333 | } |
334 | |
335 | /** |
336 | * Gets os_version. |
337 | */ |
338 | public function getOsVersion(): string |
339 | { |
340 | return $this->container['os_version']; |
341 | } |
342 | |
343 | /** |
344 | * Sets os_version. |
345 | * |
346 | * @param string $os_version os_version |
347 | * |
348 | * @return $this |
349 | */ |
350 | public function setOsVersion(string $os_version): self |
351 | { |
352 | $this->container['os_version'] = $os_version; |
353 | |
354 | return $this; |
355 | } |
356 | |
357 | /** |
358 | * Gets device. |
359 | */ |
360 | public function getDevice(): string |
361 | { |
362 | return $this->container['device']; |
363 | } |
364 | |
365 | /** |
366 | * Sets device. |
367 | * |
368 | * @param string $device device |
369 | * |
370 | * @return $this |
371 | */ |
372 | public function setDevice(string $device): self |
373 | { |
374 | $this->container['device'] = $device; |
375 | |
376 | return $this; |
377 | } |
378 | |
379 | /** |
380 | * Gets user_agent. |
381 | */ |
382 | public function getUserAgent(): string |
383 | { |
384 | return $this->container['user_agent']; |
385 | } |
386 | |
387 | /** |
388 | * Sets user_agent. |
389 | * |
390 | * @param string $user_agent user_agent |
391 | * |
392 | * @return $this |
393 | */ |
394 | public function setUserAgent(string $user_agent): self |
395 | { |
396 | $this->container['user_agent'] = $user_agent; |
397 | |
398 | return $this; |
399 | } |
400 | |
401 | /** |
402 | * Returns true if offset exists. False otherwise. |
403 | * |
404 | * @param int $offset Offset |
405 | */ |
406 | public function offsetExists($offset): bool |
407 | { |
408 | return isset($this->container[$offset]); |
409 | } |
410 | |
411 | /** |
412 | * Gets offset. |
413 | * |
414 | * @param int $offset Offset |
415 | */ |
416 | public function offsetGet($offset): mixed |
417 | { |
418 | return isset($this->container[$offset]) ? $this->container[$offset] : null; |
419 | } |
420 | |
421 | /** |
422 | * Sets value based on offset. |
423 | * |
424 | * @param int $offset Offset |
425 | * @param mixed $value Value to be set |
426 | */ |
427 | public function offsetSet($offset, mixed $value): void |
428 | { |
429 | if (is_null($offset)) { |
430 | $this->container[] = $value; |
431 | } else { |
432 | $this->container[$offset] = $value; |
433 | } |
434 | } |
435 | |
436 | /** |
437 | * Unsets offset. |
438 | * |
439 | * @param int $offset Offset |
440 | */ |
441 | public function offsetUnset($offset): void |
442 | { |
443 | unset($this->container[$offset]); |
444 | } |
445 | |
446 | /** |
447 | * Gets the string presentation of the object in a pretty JSON format. |
448 | * |
449 | */ |
450 | public function toPrettyString(): string |
451 | { |
452 | return json_encode( |
453 | ObjectSerializer::sanitizeForSerialization($this), |
454 | JSON_PRETTY_PRINT |
455 | ); |
456 | } |
457 | } |