Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 39
0.00% covered (danger)
0.00%
0 / 25
CRAP
0.00% covered (danger)
0.00%
0 / 1
SupplementaryID
0.00% covered (danger)
0.00%
0 / 39
0.00% covered (danger)
0.00%
0 / 25
1056
0.00% covered (danger)
0.00%
0 / 1
 __construct
0.00% covered (danger)
0.00%
0 / 5
0.00% covered (danger)
0.00%
0 / 1
42
 __toString
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 swaggerTypes
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 swaggerFormats
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 attributeMap
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setters
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 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 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 valid
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getVisitorId
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setVisitorId
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
2
 getVisitorFound
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setVisitorFound
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
2
 getConfidence
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setConfidence
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
2
 getFirstSeenAt
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setFirstSeenAt
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
2
 getLastSeenAt
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setLastSeenAt
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 * SupplementaryID.
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 * SupplementaryID 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 SupplementaryID implements ModelInterface, \ArrayAccess
42{
43    /**
44     * The original name of the model.
45     *
46     */
47    protected static string $swaggerModelName = 'SupplementaryID';
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        'visitor_found' => 'bool',
57        'confidence' => '\Fingerprint\ServerAPI\Model\IdentificationConfidence',
58        'first_seen_at' => '\Fingerprint\ServerAPI\Model\IdentificationSeenAt',
59        'last_seen_at' => '\Fingerprint\ServerAPI\Model\IdentificationSeenAt'];
60
61    /**
62     * Array of property to format mappings. Used for (de)serialization.
63     *
64     * @var string[]
65     */
66    protected static array $swaggerFormats = [
67        'visitor_id' => null,
68        'visitor_found' => null,
69        'confidence' => null,
70        'first_seen_at' => null,
71        'last_seen_at' => null];
72
73    /**
74     * Array of attributes where the key is the local name,
75     * and the value is the original name.
76     *
77     * @var string[]
78     */
79    protected static array $attributeMap = [
80        'visitor_id' => 'visitorId',
81        'visitor_found' => 'visitorFound',
82        'confidence' => 'confidence',
83        'first_seen_at' => 'firstSeenAt',
84        'last_seen_at' => 'lastSeenAt'];
85
86    /**
87     * Array of attributes to setter functions (for deserialization of responses).
88     *
89     * @var string[]
90     */
91    protected static array $setters = [
92        'visitor_id' => 'setVisitorId',
93        'visitor_found' => 'setVisitorFound',
94        'confidence' => 'setConfidence',
95        'first_seen_at' => 'setFirstSeenAt',
96        'last_seen_at' => 'setLastSeenAt'];
97
98    /**
99     * Array of attributes to getter functions (for serialization of requests).
100     *
101     * @var string[]
102     */
103    protected static array $getters = [
104        'visitor_id' => 'getVisitorId',
105        'visitor_found' => 'getVisitorFound',
106        'confidence' => 'getConfidence',
107        'first_seen_at' => 'getFirstSeenAt',
108        'last_seen_at' => 'getLastSeenAt'];
109
110    /**
111     * Associative array for storing property values.
112     *
113     * @var mixed[]
114     */
115    protected array $container = [];
116
117    /**
118     * Constructor.
119     *
120     * @param mixed[] $data Associated array of property values
121     *                      initializing the model
122     */
123    public function __construct(?array $data = null)
124    {
125        $this->container['visitor_id'] = isset($data['visitor_id']) ? $data['visitor_id'] : null;
126        $this->container['visitor_found'] = isset($data['visitor_found']) ? $data['visitor_found'] : null;
127        $this->container['confidence'] = isset($data['confidence']) ? $data['confidence'] : null;
128        $this->container['first_seen_at'] = isset($data['first_seen_at']) ? $data['first_seen_at'] : null;
129        $this->container['last_seen_at'] = isset($data['last_seen_at']) ? $data['last_seen_at'] : null;
130    }
131
132    /**
133     * Gets the string presentation of the object.
134     *
135     */
136    public function __toString(): string
137    {
138        return json_encode(ObjectSerializer::sanitizeForSerialization($this));
139    }
140
141    /**
142     * Array of property to type mappings. Used for (de)serialization.
143     */
144    public static function swaggerTypes(): array
145    {
146        return self::$swaggerTypes;
147    }
148
149    /**
150     * Array of property to format mappings. Used for (de)serialization.
151     */
152    public static function swaggerFormats(): array
153    {
154        return self::$swaggerFormats;
155    }
156
157    /**
158     * Array of attributes where the key is the local name,
159     * and the value is the original name.
160     */
161    public static function attributeMap(): array
162    {
163        return self::$attributeMap;
164    }
165
166    /**
167     * Array of attributes to setter functions (for deserialization of responses).
168     */
169    public static function setters(): array
170    {
171        return self::$setters;
172    }
173
174    /**
175     * Array of attributes to getter functions (for serialization of requests).
176     */
177    public static function getters(): array
178    {
179        return self::$getters;
180    }
181
182    /**
183     * The original name of the model.
184     */
185    public function getModelName(): string
186    {
187        return self::$swaggerModelName;
188    }
189
190    /**
191     * Show all the invalid properties with reasons.
192     *
193     * @return array invalid properties with reasons
194     */
195    public function listInvalidProperties(): array
196    {
197        return [];
198    }
199
200    /**
201     * Validate all the properties in the model
202     * return true if all passed.
203     *
204     * @return bool True if all properties are valid
205     */
206    public function valid(): bool
207    {
208        return 0 === count($this->listInvalidProperties());
209    }
210
211    /**
212     * Gets visitor_id.
213     */
214    public function getVisitorId(): ?string
215    {
216        return $this->container['visitor_id'];
217    }
218
219    /**
220     * Sets visitor_id.
221     *
222     * @param ?string $visitor_id string of 20 characters that uniquely identifies the visitor's browser or mobile device
223     *
224     * @return $this
225     */
226    public function setVisitorId(?string $visitor_id): self
227    {
228        $this->container['visitor_id'] = $visitor_id;
229
230        return $this;
231    }
232
233    /**
234     * Gets visitor_found.
235     */
236    public function getVisitorFound(): ?bool
237    {
238        return $this->container['visitor_found'];
239    }
240
241    /**
242     * Sets visitor_found.
243     *
244     * @param ?bool $visitor_found attribute represents if a visitor had been identified before
245     *
246     * @return $this
247     */
248    public function setVisitorFound(?bool $visitor_found): self
249    {
250        $this->container['visitor_found'] = $visitor_found;
251
252        return $this;
253    }
254
255    /**
256     * Gets confidence.
257     */
258    public function getConfidence(): ?IdentificationConfidence
259    {
260        return $this->container['confidence'];
261    }
262
263    /**
264     * Sets confidence.
265     *
266     * @param ?\Fingerprint\ServerAPI\Model\IdentificationConfidence $confidence confidence
267     *
268     * @return $this
269     */
270    public function setConfidence(?IdentificationConfidence $confidence): self
271    {
272        $this->container['confidence'] = $confidence;
273
274        return $this;
275    }
276
277    /**
278     * Gets first_seen_at.
279     */
280    public function getFirstSeenAt(): ?IdentificationSeenAt
281    {
282        return $this->container['first_seen_at'];
283    }
284
285    /**
286     * Sets first_seen_at.
287     *
288     * @param ?\Fingerprint\ServerAPI\Model\IdentificationSeenAt $first_seen_at first_seen_at
289     *
290     * @return $this
291     */
292    public function setFirstSeenAt(?IdentificationSeenAt $first_seen_at): self
293    {
294        $this->container['first_seen_at'] = $first_seen_at;
295
296        return $this;
297    }
298
299    /**
300     * Gets last_seen_at.
301     */
302    public function getLastSeenAt(): ?IdentificationSeenAt
303    {
304        return $this->container['last_seen_at'];
305    }
306
307    /**
308     * Sets last_seen_at.
309     *
310     * @param ?\Fingerprint\ServerAPI\Model\IdentificationSeenAt $last_seen_at last_seen_at
311     *
312     * @return $this
313     */
314    public function setLastSeenAt(?IdentificationSeenAt $last_seen_at): self
315    {
316        $this->container['last_seen_at'] = $last_seen_at;
317
318        return $this;
319    }
320
321    /**
322     * Returns true if offset exists. False otherwise.
323     *
324     * @param int $offset Offset
325     */
326    public function offsetExists($offset): bool
327    {
328        return isset($this->container[$offset]);
329    }
330
331    /**
332     * Gets offset.
333     *
334     * @param int $offset Offset
335     */
336    public function offsetGet($offset): mixed
337    {
338        return isset($this->container[$offset]) ? $this->container[$offset] : null;
339    }
340
341    /**
342     * Sets value based on offset.
343     *
344     * @param int   $offset Offset
345     * @param mixed $value  Value to be set
346     */
347    public function offsetSet($offset, mixed $value): void
348    {
349        if (is_null($offset)) {
350            $this->container[] = $value;
351        } else {
352            $this->container[$offset] = $value;
353        }
354    }
355
356    /**
357     * Unsets offset.
358     *
359     * @param int $offset Offset
360     */
361    public function offsetUnset($offset): void
362    {
363        unset($this->container[$offset]);
364    }
365
366    /**
367     * Gets the string presentation of the object in a pretty JSON format.
368     *
369     */
370    public function toPrettyString(): string
371    {
372        return json_encode(
373            ObjectSerializer::sanitizeForSerialization($this),
374            JSON_PRETTY_PRINT
375        );
376    }
377}