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