Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
50.89% covered (warning)
50.89%
57 / 112
53.06% covered (warning)
53.06%
26 / 49
CRAP
0.00% covered (danger)
0.00%
0 / 1
Identification
50.89% covered (warning)
50.89%
57 / 112
53.06% covered (warning)
53.06%
26 / 49
837.90
0.00% covered (danger)
0.00%
0 / 1
 __construct
100.00% covered (success)
100.00%
17 / 17
100.00% covered (success)
100.00%
1 / 1
18
 __toString
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 swaggerTypes
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 swaggerFormats
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 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
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getModelName
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 listInvalidProperties
0.00% covered (danger)
0.00%
0 / 26
0.00% covered (danger)
0.00%
0 / 1
182
 valid
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getVisitorId
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setVisitorId
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getRequestId
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setRequestId
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getBrowserDetails
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setBrowserDetails
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getIncognito
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setIncognito
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getIp
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setIp
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getIpLocation
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setIpLocation
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getLinkedId
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setLinkedId
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getSuspect
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setSuspect
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
2
 getTimestamp
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setTimestamp
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getTime
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setTime
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getUrl
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setUrl
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getTag
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setTag
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getConfidence
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setConfidence
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getVisitorFound
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setVisitorFound
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getFirstSeenAt
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setFirstSeenAt
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getLastSeenAt
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setLastSeenAt
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getComponents
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setComponents
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
2
 offsetExists
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 offsetGet
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
6
 offsetSet
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 1
6
 offsetUnset
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 toPrettyString
0.00% covered (danger)
0.00%
0 / 4
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2/**
3 * Identification.
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
28namespace Fingerprint\ServerAPI\Model;
29
30use Fingerprint\ServerAPI\ObjectSerializer;
31
32/**
33 * Identification Class Doc Comment.
34 *
35 * @category Class
36 *
37 * @author   Swagger Codegen team
38 *
39 * @see     https://github.com/swagger-api/swagger-codegen
40 */
41class Identification implements ModelInterface, \ArrayAccess
42{
43    /**
44     * The original name of the model.
45     *
46     */
47    protected static string $swaggerModelName = 'Identification';
48
49    /**
50     * Array of property to type mappings. Used for (de)serialization.
51     *
52     * @var string[]
53     */
54    protected static array $swaggerTypes = [
55        'visitor_id' => 'string',
56        'request_id' => 'string',
57        'browser_details' => '\Fingerprint\ServerAPI\Model\BrowserDetails',
58        'incognito' => 'bool',
59        'ip' => 'string',
60        'ip_location' => '\Fingerprint\ServerAPI\Model\DeprecatedGeolocation',
61        'linked_id' => 'string',
62        'suspect' => 'bool',
63        'timestamp' => 'int',
64        'time' => '\DateTime',
65        'url' => 'string',
66        'tag' => 'array',
67        'confidence' => '\Fingerprint\ServerAPI\Model\IdentificationConfidence',
68        'visitor_found' => 'bool',
69        'first_seen_at' => '\Fingerprint\ServerAPI\Model\IdentificationSeenAt',
70        'last_seen_at' => '\Fingerprint\ServerAPI\Model\IdentificationSeenAt',
71        'components' => 'array'];
72
73    /**
74     * Array of property to format mappings. Used for (de)serialization.
75     *
76     * @var string[]
77     */
78    protected static array $swaggerFormats = [
79        'visitor_id' => null,
80        'request_id' => null,
81        'browser_details' => null,
82        'incognito' => null,
83        'ip' => null,
84        'ip_location' => null,
85        'linked_id' => null,
86        'suspect' => null,
87        'timestamp' => 'int64',
88        'time' => 'date-time',
89        'url' => null,
90        'tag' => null,
91        'confidence' => null,
92        'visitor_found' => null,
93        'first_seen_at' => null,
94        'last_seen_at' => null,
95        'components' => null];
96
97    /**
98     * Array of attributes where the key is the local name,
99     * and the value is the original name.
100     *
101     * @var string[]
102     */
103    protected static array $attributeMap = [
104        'visitor_id' => 'visitorId',
105        'request_id' => 'requestId',
106        'browser_details' => 'browserDetails',
107        'incognito' => 'incognito',
108        'ip' => 'ip',
109        'ip_location' => 'ipLocation',
110        'linked_id' => 'linkedId',
111        'suspect' => 'suspect',
112        'timestamp' => 'timestamp',
113        'time' => 'time',
114        'url' => 'url',
115        'tag' => 'tag',
116        'confidence' => 'confidence',
117        'visitor_found' => 'visitorFound',
118        'first_seen_at' => 'firstSeenAt',
119        'last_seen_at' => 'lastSeenAt',
120        'components' => 'components'];
121
122    /**
123     * Array of attributes to setter functions (for deserialization of responses).
124     *
125     * @var string[]
126     */
127    protected static array $setters = [
128        'visitor_id' => 'setVisitorId',
129        'request_id' => 'setRequestId',
130        'browser_details' => 'setBrowserDetails',
131        'incognito' => 'setIncognito',
132        'ip' => 'setIp',
133        'ip_location' => 'setIpLocation',
134        'linked_id' => 'setLinkedId',
135        'suspect' => 'setSuspect',
136        'timestamp' => 'setTimestamp',
137        'time' => 'setTime',
138        'url' => 'setUrl',
139        'tag' => 'setTag',
140        'confidence' => 'setConfidence',
141        'visitor_found' => 'setVisitorFound',
142        'first_seen_at' => 'setFirstSeenAt',
143        'last_seen_at' => 'setLastSeenAt',
144        'components' => 'setComponents'];
145
146    /**
147     * Array of attributes to getter functions (for serialization of requests).
148     *
149     * @var string[]
150     */
151    protected static array $getters = [
152        'visitor_id' => 'getVisitorId',
153        'request_id' => 'getRequestId',
154        'browser_details' => 'getBrowserDetails',
155        'incognito' => 'getIncognito',
156        'ip' => 'getIp',
157        'ip_location' => 'getIpLocation',
158        'linked_id' => 'getLinkedId',
159        'suspect' => 'getSuspect',
160        'timestamp' => 'getTimestamp',
161        'time' => 'getTime',
162        'url' => 'getUrl',
163        'tag' => 'getTag',
164        'confidence' => 'getConfidence',
165        'visitor_found' => 'getVisitorFound',
166        'first_seen_at' => 'getFirstSeenAt',
167        'last_seen_at' => 'getLastSeenAt',
168        'components' => 'getComponents'];
169
170    /**
171     * Associative array for storing property values.
172     *
173     * @var mixed[]
174     */
175    protected array $container = [];
176
177    /**
178     * Constructor.
179     *
180     * @param mixed[] $data Associated array of property values
181     *                      initializing the model
182     */
183    public function __construct(?array $data = null)
184    {
185        $this->container['visitor_id'] = isset($data['visitor_id']) ? $data['visitor_id'] : null;
186        $this->container['request_id'] = isset($data['request_id']) ? $data['request_id'] : null;
187        $this->container['browser_details'] = isset($data['browser_details']) ? $data['browser_details'] : null;
188        $this->container['incognito'] = isset($data['incognito']) ? $data['incognito'] : null;
189        $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null;
190        $this->container['ip_location'] = isset($data['ip_location']) ? $data['ip_location'] : null;
191        $this->container['linked_id'] = isset($data['linked_id']) ? $data['linked_id'] : null;
192        $this->container['suspect'] = isset($data['suspect']) ? $data['suspect'] : null;
193        $this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null;
194        $this->container['time'] = isset($data['time']) ? $data['time'] : null;
195        $this->container['url'] = isset($data['url']) ? $data['url'] : null;
196        $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null;
197        $this->container['confidence'] = isset($data['confidence']) ? $data['confidence'] : null;
198        $this->container['visitor_found'] = isset($data['visitor_found']) ? $data['visitor_found'] : null;
199        $this->container['first_seen_at'] = isset($data['first_seen_at']) ? $data['first_seen_at'] : null;
200        $this->container['last_seen_at'] = isset($data['last_seen_at']) ? $data['last_seen_at'] : null;
201        $this->container['components'] = isset($data['components']) ? $data['components'] : null;
202    }
203
204    /**
205     * Gets the string presentation of the object.
206     *
207     */
208    public function __toString(): string
209    {
210        return json_encode(ObjectSerializer::sanitizeForSerialization($this));
211    }
212
213    /**
214     * Array of property to type mappings. Used for (de)serialization.
215     */
216    public static function swaggerTypes(): array
217    {
218        return self::$swaggerTypes;
219    }
220
221    /**
222     * Array of property to format mappings. Used for (de)serialization.
223     */
224    public static function swaggerFormats(): array
225    {
226        return self::$swaggerFormats;
227    }
228
229    /**
230     * Array of attributes where the key is the local name,
231     * and the value is the original name.
232     */
233    public static function attributeMap(): array
234    {
235        return self::$attributeMap;
236    }
237
238    /**
239     * Array of attributes to setter functions (for deserialization of responses).
240     */
241    public static function setters(): array
242    {
243        return self::$setters;
244    }
245
246    /**
247     * Array of attributes to getter functions (for serialization of requests).
248     */
249    public static function getters(): array
250    {
251        return self::$getters;
252    }
253
254    /**
255     * The original name of the model.
256     */
257    public function getModelName(): string
258    {
259        return self::$swaggerModelName;
260    }
261
262    /**
263     * Show all the invalid properties with reasons.
264     *
265     * @return array invalid properties with reasons
266     */
267    public function listInvalidProperties(): array
268    {
269        $invalidProperties = [];
270
271        if (null === $this->container['visitor_id']) {
272            $invalidProperties[] = "'visitor_id' can't be null";
273        }
274        if (null === $this->container['request_id']) {
275            $invalidProperties[] = "'request_id' can't be null";
276        }
277        if (null === $this->container['browser_details']) {
278            $invalidProperties[] = "'browser_details' can't be null";
279        }
280        if (null === $this->container['incognito']) {
281            $invalidProperties[] = "'incognito' can't be null";
282        }
283        if (null === $this->container['ip']) {
284            $invalidProperties[] = "'ip' can't be null";
285        }
286        if (null === $this->container['timestamp']) {
287            $invalidProperties[] = "'timestamp' can't be null";
288        }
289        if (null === $this->container['time']) {
290            $invalidProperties[] = "'time' can't be null";
291        }
292        if (null === $this->container['url']) {
293            $invalidProperties[] = "'url' can't be null";
294        }
295        if (null === $this->container['tag']) {
296            $invalidProperties[] = "'tag' can't be null";
297        }
298        if (null === $this->container['visitor_found']) {
299            $invalidProperties[] = "'visitor_found' can't be null";
300        }
301        if (null === $this->container['first_seen_at']) {
302            $invalidProperties[] = "'first_seen_at' can't be null";
303        }
304        if (null === $this->container['last_seen_at']) {
305            $invalidProperties[] = "'last_seen_at' can't be null";
306        }
307
308        return $invalidProperties;
309    }
310
311    /**
312     * Validate all the properties in the model
313     * return true if all passed.
314     *
315     * @return bool True if all properties are valid
316     */
317    public function valid(): bool
318    {
319        return 0 === count($this->listInvalidProperties());
320    }
321
322    /**
323     * Gets visitor_id.
324     */
325    public function getVisitorId(): string
326    {
327        return $this->container['visitor_id'];
328    }
329
330    /**
331     * Sets visitor_id.
332     *
333     * @param string $visitor_id string of 20 characters that uniquely identifies the visitor's browser
334     *
335     * @return $this
336     */
337    public function setVisitorId(string $visitor_id): self
338    {
339        $this->container['visitor_id'] = $visitor_id;
340
341        return $this;
342    }
343
344    /**
345     * Gets request_id.
346     */
347    public function getRequestId(): string
348    {
349        return $this->container['request_id'];
350    }
351
352    /**
353     * Sets request_id.
354     *
355     * @param string $request_id unique identifier of the user's request
356     *
357     * @return $this
358     */
359    public function setRequestId(string $request_id): self
360    {
361        $this->container['request_id'] = $request_id;
362
363        return $this;
364    }
365
366    /**
367     * Gets browser_details.
368     */
369    public function getBrowserDetails(): BrowserDetails
370    {
371        return $this->container['browser_details'];
372    }
373
374    /**
375     * Sets browser_details.
376     *
377     * @param BrowserDetails $browser_details browser_details
378     *
379     * @return $this
380     */
381    public function setBrowserDetails(BrowserDetails $browser_details): self
382    {
383        $this->container['browser_details'] = $browser_details;
384
385        return $this;
386    }
387
388    /**
389     * Gets incognito.
390     */
391    public function getIncognito(): bool
392    {
393        return $this->container['incognito'];
394    }
395
396    /**
397     * Sets incognito.
398     *
399     * @param bool $incognito flag if user used incognito session
400     *
401     * @return $this
402     */
403    public function setIncognito(bool $incognito): self
404    {
405        $this->container['incognito'] = $incognito;
406
407        return $this;
408    }
409
410    /**
411     * Gets ip.
412     */
413    public function getIp(): string
414    {
415        return $this->container['ip'];
416    }
417
418    /**
419     * Sets ip.
420     *
421     * @param string $ip IP address of the requesting browser or bot
422     *
423     * @return $this
424     */
425    public function setIp(string $ip): self
426    {
427        $this->container['ip'] = $ip;
428
429        return $this;
430    }
431
432    /**
433     * Gets ip_location.
434     */
435    public function getIpLocation(): ?DeprecatedGeolocation
436    {
437        return $this->container['ip_location'];
438    }
439
440    /**
441     * Sets ip_location.
442     *
443     * @param ?\Fingerprint\ServerAPI\Model\DeprecatedGeolocation $ip_location ip_location
444     *
445     * @return $this
446     */
447    public function setIpLocation(?DeprecatedGeolocation $ip_location): self
448    {
449        $this->container['ip_location'] = $ip_location;
450
451        return $this;
452    }
453
454    /**
455     * Gets linked_id.
456     */
457    public function getLinkedId(): ?string
458    {
459        return $this->container['linked_id'];
460    }
461
462    /**
463     * Sets linked_id.
464     *
465     * @param ?string $linked_id a customer-provided id that was sent with the request
466     *
467     * @return $this
468     */
469    public function setLinkedId(?string $linked_id): self
470    {
471        $this->container['linked_id'] = $linked_id;
472
473        return $this;
474    }
475
476    /**
477     * Gets suspect.
478     */
479    public function getSuspect(): ?bool
480    {
481        return $this->container['suspect'];
482    }
483
484    /**
485     * Sets suspect.
486     *
487     * @param ?bool $suspect Field is `true` if you have previously set the `suspect` flag for this event using the [Server API Update event endpoint](https://dev.fingerprint.com/reference/updateevent).
488     *
489     * @return $this
490     */
491    public function setSuspect(?bool $suspect): self
492    {
493        $this->container['suspect'] = $suspect;
494
495        return $this;
496    }
497
498    /**
499     * Gets timestamp.
500     */
501    public function getTimestamp(): int
502    {
503        return $this->container['timestamp'];
504    }
505
506    /**
507     * Sets timestamp.
508     *
509     * @param int $timestamp timestamp of the event with millisecond precision in Unix time
510     *
511     * @return $this
512     */
513    public function setTimestamp(int $timestamp): self
514    {
515        $this->container['timestamp'] = $timestamp;
516
517        return $this;
518    }
519
520    /**
521     * Gets time.
522     */
523    public function getTime(): \DateTime
524    {
525        return $this->container['time'];
526    }
527
528    /**
529     * Sets time.
530     *
531     * @param \DateTime $time Time expressed according to ISO 8601 in UTC format, when the request from the JS agent was made. We recommend to treat requests that are older than 2 minutes as malicious. Otherwise, request replay attacks are possible.
532     *
533     * @return $this
534     */
535    public function setTime(\DateTime $time): self
536    {
537        $this->container['time'] = $time;
538
539        return $this;
540    }
541
542    /**
543     * Gets url.
544     */
545    public function getUrl(): string
546    {
547        return $this->container['url'];
548    }
549
550    /**
551     * Sets url.
552     *
553     * @param string $url page URL from which the request was sent
554     *
555     * @return $this
556     */
557    public function setUrl(string $url): self
558    {
559        $this->container['url'] = $url;
560
561        return $this;
562    }
563
564    /**
565     * Gets tag.
566     */
567    public function getTag(): array
568    {
569        return $this->container['tag'];
570    }
571
572    /**
573     * Sets tag.
574     *
575     * @param array $tag tag
576     *
577     * @return $this
578     */
579    public function setTag(array $tag): self
580    {
581        $this->container['tag'] = $tag;
582
583        return $this;
584    }
585
586    /**
587     * Gets confidence.
588     */
589    public function getConfidence(): ?IdentificationConfidence
590    {
591        return $this->container['confidence'];
592    }
593
594    /**
595     * Sets confidence.
596     *
597     * @param ?\Fingerprint\ServerAPI\Model\IdentificationConfidence $confidence confidence
598     *
599     * @return $this
600     */
601    public function setConfidence(?IdentificationConfidence $confidence): self
602    {
603        $this->container['confidence'] = $confidence;
604
605        return $this;
606    }
607
608    /**
609     * Gets visitor_found.
610     */
611    public function getVisitorFound(): bool
612    {
613        return $this->container['visitor_found'];
614    }
615
616    /**
617     * Sets visitor_found.
618     *
619     * @param bool $visitor_found attribute represents if a visitor had been identified before
620     *
621     * @return $this
622     */
623    public function setVisitorFound(bool $visitor_found): self
624    {
625        $this->container['visitor_found'] = $visitor_found;
626
627        return $this;
628    }
629
630    /**
631     * Gets first_seen_at.
632     */
633    public function getFirstSeenAt(): IdentificationSeenAt
634    {
635        return $this->container['first_seen_at'];
636    }
637
638    /**
639     * Sets first_seen_at.
640     *
641     * @param IdentificationSeenAt $first_seen_at first_seen_at
642     *
643     * @return $this
644     */
645    public function setFirstSeenAt(IdentificationSeenAt $first_seen_at): self
646    {
647        $this->container['first_seen_at'] = $first_seen_at;
648
649        return $this;
650    }
651
652    /**
653     * Gets last_seen_at.
654     */
655    public function getLastSeenAt(): IdentificationSeenAt
656    {
657        return $this->container['last_seen_at'];
658    }
659
660    /**
661     * Sets last_seen_at.
662     *
663     * @param IdentificationSeenAt $last_seen_at last_seen_at
664     *
665     * @return $this
666     */
667    public function setLastSeenAt(IdentificationSeenAt $last_seen_at): self
668    {
669        $this->container['last_seen_at'] = $last_seen_at;
670
671        return $this;
672    }
673
674    /**
675     * Gets components.
676     */
677    public function getComponents(): ?array
678    {
679        return $this->container['components'];
680    }
681
682    /**
683     * Sets components.
684     *
685     * @param ?array $components components
686     *
687     * @return $this
688     */
689    public function setComponents(?array $components): self
690    {
691        $this->container['components'] = $components;
692
693        return $this;
694    }
695
696    /**
697     * Returns true if offset exists. False otherwise.
698     *
699     * @param int $offset Offset
700     */
701    public function offsetExists($offset): bool
702    {
703        return isset($this->container[$offset]);
704    }
705
706    /**
707     * Gets offset.
708     *
709     * @param int $offset Offset
710     */
711    public function offsetGet($offset): mixed
712    {
713        return isset($this->container[$offset]) ? $this->container[$offset] : null;
714    }
715
716    /**
717     * Sets value based on offset.
718     *
719     * @param int   $offset Offset
720     * @param mixed $value  Value to be set
721     */
722    public function offsetSet($offset, mixed $value): void
723    {
724        if (is_null($offset)) {
725            $this->container[] = $value;
726        } else {
727            $this->container[$offset] = $value;
728        }
729    }
730
731    /**
732     * Unsets offset.
733     *
734     * @param int $offset Offset
735     */
736    public function offsetUnset($offset): void
737    {
738        unset($this->container[$offset]);
739    }
740
741    /**
742     * Gets the string presentation of the object in a pretty JSON format.
743     *
744     */
745    public function toPrettyString(): string
746    {
747        return json_encode(
748            ObjectSerializer::sanitizeForSerialization($this),
749            JSON_PRETTY_PRINT
750        );
751    }
752}