Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 47
0.00% covered (danger)
0.00%
0 / 29
CRAP
0.00% covered (danger)
0.00%
0 / 1
WebhookVelocity
0.00% covered (danger)
0.00%
0 / 47
0.00% covered (danger)
0.00%
0 / 29
1482
0.00% covered (danger)
0.00%
0 / 1
 __construct
0.00% covered (danger)
0.00%
0 / 7
0.00% covered (danger)
0.00%
0 / 1
72
 __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
 getDistinctIp
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setDistinctIp
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
2
 getDistinctLinkedId
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setDistinctLinkedId
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
2
 getDistinctCountry
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setDistinctCountry
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
2
 getEvents
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setEvents
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
2
 getIpEvents
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setIpEvents
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
2
 getDistinctIpByLinkedId
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setDistinctIpByLinkedId
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
2
 getDistinctVisitorIdByLinkedId
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setDistinctVisitorIdByLinkedId
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 * WebhookVelocity.
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 * WebhookVelocity Class Doc Comment.
34 *
35 * @category Class
36 *
37 * @description Sums key data points for a specific `visitorId`, `ipAddress` and `linkedId` at three distinct time intervals: 5 minutes, 1 hour, and 24 hours as follows:   - Number of distinct IP addresses associated to the visitor ID. - Number of distinct linked IDs associated with the visitor ID. - Number of distinct countries associated with the visitor ID. - Number of identification events associated with the visitor ID. - Number of identification events associated with the detected IP address. - Number of distinct IP addresses associated with the provided linked ID. - Number of distinct visitor IDs associated with the provided linked ID.  The `24h` interval of `distinctIp`, `distinctLinkedId`, `distinctCountry`, `distinctIpByLinkedId` and `distinctVisitorIdByLinkedId` will be omitted  if the number of `events` for the visitor ID in the last 24 hours (`events.intervals.['24h']`) is higher than 20.000.
38 *
39 * @author   Swagger Codegen team
40 *
41 * @see     https://github.com/swagger-api/swagger-codegen
42 */
43class WebhookVelocity implements ModelInterface, \ArrayAccess
44{
45    /**
46     * The original name of the model.
47     *
48     */
49    protected static string $swaggerModelName = 'WebhookVelocity';
50
51    /**
52     * Array of property to type mappings. Used for (de)serialization.
53     *
54     * @var string[]
55     */
56    protected static array $swaggerTypes = [
57        'distinct_ip' => '\Fingerprint\ServerAPI\Model\VelocityData',
58        'distinct_linked_id' => '\Fingerprint\ServerAPI\Model\VelocityData',
59        'distinct_country' => '\Fingerprint\ServerAPI\Model\VelocityData',
60        'events' => '\Fingerprint\ServerAPI\Model\VelocityData',
61        'ip_events' => '\Fingerprint\ServerAPI\Model\VelocityData',
62        'distinct_ip_by_linked_id' => '\Fingerprint\ServerAPI\Model\VelocityData',
63        'distinct_visitor_id_by_linked_id' => '\Fingerprint\ServerAPI\Model\VelocityData'];
64
65    /**
66     * Array of property to format mappings. Used for (de)serialization.
67     *
68     * @var string[]
69     */
70    protected static array $swaggerFormats = [
71        'distinct_ip' => null,
72        'distinct_linked_id' => null,
73        'distinct_country' => null,
74        'events' => null,
75        'ip_events' => null,
76        'distinct_ip_by_linked_id' => null,
77        'distinct_visitor_id_by_linked_id' => null];
78
79    /**
80     * Array of attributes where the key is the local name,
81     * and the value is the original name.
82     *
83     * @var string[]
84     */
85    protected static array $attributeMap = [
86        'distinct_ip' => 'distinctIp',
87        'distinct_linked_id' => 'distinctLinkedId',
88        'distinct_country' => 'distinctCountry',
89        'events' => 'events',
90        'ip_events' => 'ipEvents',
91        'distinct_ip_by_linked_id' => 'distinctIpByLinkedId',
92        'distinct_visitor_id_by_linked_id' => 'distinctVisitorIdByLinkedId'];
93
94    /**
95     * Array of attributes to setter functions (for deserialization of responses).
96     *
97     * @var string[]
98     */
99    protected static array $setters = [
100        'distinct_ip' => 'setDistinctIp',
101        'distinct_linked_id' => 'setDistinctLinkedId',
102        'distinct_country' => 'setDistinctCountry',
103        'events' => 'setEvents',
104        'ip_events' => 'setIpEvents',
105        'distinct_ip_by_linked_id' => 'setDistinctIpByLinkedId',
106        'distinct_visitor_id_by_linked_id' => 'setDistinctVisitorIdByLinkedId'];
107
108    /**
109     * Array of attributes to getter functions (for serialization of requests).
110     *
111     * @var string[]
112     */
113    protected static array $getters = [
114        'distinct_ip' => 'getDistinctIp',
115        'distinct_linked_id' => 'getDistinctLinkedId',
116        'distinct_country' => 'getDistinctCountry',
117        'events' => 'getEvents',
118        'ip_events' => 'getIpEvents',
119        'distinct_ip_by_linked_id' => 'getDistinctIpByLinkedId',
120        'distinct_visitor_id_by_linked_id' => 'getDistinctVisitorIdByLinkedId'];
121
122    /**
123     * Associative array for storing property values.
124     *
125     * @var mixed[]
126     */
127    protected array $container = [];
128
129    /**
130     * Constructor.
131     *
132     * @param mixed[] $data Associated array of property values
133     *                      initializing the model
134     */
135    public function __construct(?array $data = null)
136    {
137        $this->container['distinct_ip'] = isset($data['distinct_ip']) ? $data['distinct_ip'] : null;
138        $this->container['distinct_linked_id'] = isset($data['distinct_linked_id']) ? $data['distinct_linked_id'] : null;
139        $this->container['distinct_country'] = isset($data['distinct_country']) ? $data['distinct_country'] : null;
140        $this->container['events'] = isset($data['events']) ? $data['events'] : null;
141        $this->container['ip_events'] = isset($data['ip_events']) ? $data['ip_events'] : null;
142        $this->container['distinct_ip_by_linked_id'] = isset($data['distinct_ip_by_linked_id']) ? $data['distinct_ip_by_linked_id'] : null;
143        $this->container['distinct_visitor_id_by_linked_id'] = isset($data['distinct_visitor_id_by_linked_id']) ? $data['distinct_visitor_id_by_linked_id'] : null;
144    }
145
146    /**
147     * Gets the string presentation of the object.
148     *
149     */
150    public function __toString(): string
151    {
152        return json_encode(ObjectSerializer::sanitizeForSerialization($this));
153    }
154
155    /**
156     * Array of property to type mappings. Used for (de)serialization.
157     */
158    public static function swaggerTypes(): array
159    {
160        return self::$swaggerTypes;
161    }
162
163    /**
164     * Array of property to format mappings. Used for (de)serialization.
165     */
166    public static function swaggerFormats(): array
167    {
168        return self::$swaggerFormats;
169    }
170
171    /**
172     * Array of attributes where the key is the local name,
173     * and the value is the original name.
174     */
175    public static function attributeMap(): array
176    {
177        return self::$attributeMap;
178    }
179
180    /**
181     * Array of attributes to setter functions (for deserialization of responses).
182     */
183    public static function setters(): array
184    {
185        return self::$setters;
186    }
187
188    /**
189     * Array of attributes to getter functions (for serialization of requests).
190     */
191    public static function getters(): array
192    {
193        return self::$getters;
194    }
195
196    /**
197     * The original name of the model.
198     */
199    public function getModelName(): string
200    {
201        return self::$swaggerModelName;
202    }
203
204    /**
205     * Show all the invalid properties with reasons.
206     *
207     * @return array invalid properties with reasons
208     */
209    public function listInvalidProperties(): array
210    {
211        return [];
212    }
213
214    /**
215     * Validate all the properties in the model
216     * return true if all passed.
217     *
218     * @return bool True if all properties are valid
219     */
220    public function valid(): bool
221    {
222        return 0 === count($this->listInvalidProperties());
223    }
224
225    /**
226     * Gets distinct_ip.
227     */
228    public function getDistinctIp(): ?VelocityData
229    {
230        return $this->container['distinct_ip'];
231    }
232
233    /**
234     * Sets distinct_ip.
235     *
236     * @param ?\Fingerprint\ServerAPI\Model\VelocityData $distinct_ip distinct_ip
237     *
238     * @return $this
239     */
240    public function setDistinctIp(?VelocityData $distinct_ip): self
241    {
242        $this->container['distinct_ip'] = $distinct_ip;
243
244        return $this;
245    }
246
247    /**
248     * Gets distinct_linked_id.
249     */
250    public function getDistinctLinkedId(): ?VelocityData
251    {
252        return $this->container['distinct_linked_id'];
253    }
254
255    /**
256     * Sets distinct_linked_id.
257     *
258     * @param ?\Fingerprint\ServerAPI\Model\VelocityData $distinct_linked_id distinct_linked_id
259     *
260     * @return $this
261     */
262    public function setDistinctLinkedId(?VelocityData $distinct_linked_id): self
263    {
264        $this->container['distinct_linked_id'] = $distinct_linked_id;
265
266        return $this;
267    }
268
269    /**
270     * Gets distinct_country.
271     */
272    public function getDistinctCountry(): ?VelocityData
273    {
274        return $this->container['distinct_country'];
275    }
276
277    /**
278     * Sets distinct_country.
279     *
280     * @param ?\Fingerprint\ServerAPI\Model\VelocityData $distinct_country distinct_country
281     *
282     * @return $this
283     */
284    public function setDistinctCountry(?VelocityData $distinct_country): self
285    {
286        $this->container['distinct_country'] = $distinct_country;
287
288        return $this;
289    }
290
291    /**
292     * Gets events.
293     */
294    public function getEvents(): ?VelocityData
295    {
296        return $this->container['events'];
297    }
298
299    /**
300     * Sets events.
301     *
302     * @param ?\Fingerprint\ServerAPI\Model\VelocityData $events events
303     *
304     * @return $this
305     */
306    public function setEvents(?VelocityData $events): self
307    {
308        $this->container['events'] = $events;
309
310        return $this;
311    }
312
313    /**
314     * Gets ip_events.
315     */
316    public function getIpEvents(): ?VelocityData
317    {
318        return $this->container['ip_events'];
319    }
320
321    /**
322     * Sets ip_events.
323     *
324     * @param ?\Fingerprint\ServerAPI\Model\VelocityData $ip_events ip_events
325     *
326     * @return $this
327     */
328    public function setIpEvents(?VelocityData $ip_events): self
329    {
330        $this->container['ip_events'] = $ip_events;
331
332        return $this;
333    }
334
335    /**
336     * Gets distinct_ip_by_linked_id.
337     */
338    public function getDistinctIpByLinkedId(): ?VelocityData
339    {
340        return $this->container['distinct_ip_by_linked_id'];
341    }
342
343    /**
344     * Sets distinct_ip_by_linked_id.
345     *
346     * @param ?\Fingerprint\ServerAPI\Model\VelocityData $distinct_ip_by_linked_id distinct_ip_by_linked_id
347     *
348     * @return $this
349     */
350    public function setDistinctIpByLinkedId(?VelocityData $distinct_ip_by_linked_id): self
351    {
352        $this->container['distinct_ip_by_linked_id'] = $distinct_ip_by_linked_id;
353
354        return $this;
355    }
356
357    /**
358     * Gets distinct_visitor_id_by_linked_id.
359     */
360    public function getDistinctVisitorIdByLinkedId(): ?VelocityData
361    {
362        return $this->container['distinct_visitor_id_by_linked_id'];
363    }
364
365    /**
366     * Sets distinct_visitor_id_by_linked_id.
367     *
368     * @param ?\Fingerprint\ServerAPI\Model\VelocityData $distinct_visitor_id_by_linked_id distinct_visitor_id_by_linked_id
369     *
370     * @return $this
371     */
372    public function setDistinctVisitorIdByLinkedId(?VelocityData $distinct_visitor_id_by_linked_id): self
373    {
374        $this->container['distinct_visitor_id_by_linked_id'] = $distinct_visitor_id_by_linked_id;
375
376        return $this;
377    }
378
379    /**
380     * Returns true if offset exists. False otherwise.
381     *
382     * @param int $offset Offset
383     */
384    public function offsetExists($offset): bool
385    {
386        return isset($this->container[$offset]);
387    }
388
389    /**
390     * Gets offset.
391     *
392     * @param int $offset Offset
393     */
394    public function offsetGet($offset): mixed
395    {
396        return isset($this->container[$offset]) ? $this->container[$offset] : null;
397    }
398
399    /**
400     * Sets value based on offset.
401     *
402     * @param int   $offset Offset
403     * @param mixed $value  Value to be set
404     */
405    public function offsetSet($offset, mixed $value): void
406    {
407        if (is_null($offset)) {
408            $this->container[] = $value;
409        } else {
410            $this->container[$offset] = $value;
411        }
412    }
413
414    /**
415     * Unsets offset.
416     *
417     * @param int $offset Offset
418     */
419    public function offsetUnset($offset): void
420    {
421        unset($this->container[$offset]);
422    }
423
424    /**
425     * Gets the string presentation of the object in a pretty JSON format.
426     *
427     */
428    public function toPrettyString(): string
429    {
430        return json_encode(
431            ObjectSerializer::sanitizeForSerialization($this),
432            JSON_PRETTY_PRINT
433        );
434    }
435}