Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 36 |
|
0.00% |
0 / 21 |
CRAP | |
0.00% |
0 / 1 |
VelocityIntervals | |
0.00% |
0 / 36 |
|
0.00% |
0 / 21 |
812 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
20 | |||
__toString | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
swaggerTypes | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
swaggerFormats | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
attributeMap | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setters | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getters | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getModelName | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
listInvalidProperties | |
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
12 | |||
valid | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
get5m | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
set5m | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
get1h | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
set1h | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
get24h | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
set24h | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
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 | * VelocityIntervals. |
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 | * VelocityIntervals Class Doc Comment. |
34 | * |
35 | * @category Class |
36 | * |
37 | * @description Is absent if the velocity data could not be generated for the visitor ID. |
38 | * |
39 | * @author Swagger Codegen team |
40 | * |
41 | * @see https://github.com/swagger-api/swagger-codegen |
42 | */ |
43 | class VelocityIntervals implements ModelInterface, \ArrayAccess |
44 | { |
45 | /** |
46 | * The original name of the model. |
47 | * |
48 | */ |
49 | protected static string $swaggerModelName = 'VelocityIntervals'; |
50 | |
51 | /** |
52 | * Array of property to type mappings. Used for (de)serialization. |
53 | * |
54 | * @var string[] |
55 | */ |
56 | protected static array $swaggerTypes = [ |
57 | '_5m' => 'int', |
58 | '_1h' => 'int', |
59 | '_24h' => 'int']; |
60 | |
61 | /** |
62 | * Array of property to format mappings. Used for (de)serialization. |
63 | * |
64 | * @var string[] |
65 | */ |
66 | protected static array $swaggerFormats = [ |
67 | '_5m' => null, |
68 | '_1h' => null, |
69 | '_24h' => null]; |
70 | |
71 | /** |
72 | * Array of attributes where the key is the local name, |
73 | * and the value is the original name. |
74 | * |
75 | * @var string[] |
76 | */ |
77 | protected static array $attributeMap = [ |
78 | '_5m' => '5m', |
79 | '_1h' => '1h', |
80 | '_24h' => '24h']; |
81 | |
82 | /** |
83 | * Array of attributes to setter functions (for deserialization of responses). |
84 | * |
85 | * @var string[] |
86 | */ |
87 | protected static array $setters = [ |
88 | '_5m' => 'set5m', |
89 | '_1h' => 'set1h', |
90 | '_24h' => 'set24h']; |
91 | |
92 | /** |
93 | * Array of attributes to getter functions (for serialization of requests). |
94 | * |
95 | * @var string[] |
96 | */ |
97 | protected static array $getters = [ |
98 | '_5m' => 'get5m', |
99 | '_1h' => 'get1h', |
100 | '_24h' => 'get24h']; |
101 | |
102 | /** |
103 | * Associative array for storing property values. |
104 | * |
105 | * @var mixed[] |
106 | */ |
107 | protected array $container = []; |
108 | |
109 | /** |
110 | * Constructor. |
111 | * |
112 | * @param mixed[] $data Associated array of property values |
113 | * initializing the model |
114 | */ |
115 | public function __construct(?array $data = null) |
116 | { |
117 | $this->container['_5m'] = isset($data['_5m']) ? $data['_5m'] : null; |
118 | $this->container['_1h'] = isset($data['_1h']) ? $data['_1h'] : null; |
119 | $this->container['_24h'] = isset($data['_24h']) ? $data['_24h'] : null; |
120 | } |
121 | |
122 | /** |
123 | * Gets the string presentation of the object. |
124 | * |
125 | */ |
126 | public function __toString(): string |
127 | { |
128 | return json_encode(ObjectSerializer::sanitizeForSerialization($this)); |
129 | } |
130 | |
131 | /** |
132 | * Array of property to type mappings. Used for (de)serialization. |
133 | */ |
134 | public static function swaggerTypes(): array |
135 | { |
136 | return self::$swaggerTypes; |
137 | } |
138 | |
139 | /** |
140 | * Array of property to format mappings. Used for (de)serialization. |
141 | */ |
142 | public static function swaggerFormats(): array |
143 | { |
144 | return self::$swaggerFormats; |
145 | } |
146 | |
147 | /** |
148 | * Array of attributes where the key is the local name, |
149 | * and the value is the original name. |
150 | */ |
151 | public static function attributeMap(): array |
152 | { |
153 | return self::$attributeMap; |
154 | } |
155 | |
156 | /** |
157 | * Array of attributes to setter functions (for deserialization of responses). |
158 | */ |
159 | public static function setters(): array |
160 | { |
161 | return self::$setters; |
162 | } |
163 | |
164 | /** |
165 | * Array of attributes to getter functions (for serialization of requests). |
166 | */ |
167 | public static function getters(): array |
168 | { |
169 | return self::$getters; |
170 | } |
171 | |
172 | /** |
173 | * The original name of the model. |
174 | */ |
175 | public function getModelName(): string |
176 | { |
177 | return self::$swaggerModelName; |
178 | } |
179 | |
180 | /** |
181 | * Show all the invalid properties with reasons. |
182 | * |
183 | * @return array invalid properties with reasons |
184 | */ |
185 | public function listInvalidProperties(): array |
186 | { |
187 | $invalidProperties = []; |
188 | |
189 | if (null === $this->container['_5m']) { |
190 | $invalidProperties[] = "'_5m' can't be null"; |
191 | } |
192 | if (null === $this->container['_1h']) { |
193 | $invalidProperties[] = "'_1h' can't be null"; |
194 | } |
195 | |
196 | return $invalidProperties; |
197 | } |
198 | |
199 | /** |
200 | * Validate all the properties in the model |
201 | * return true if all passed. |
202 | * |
203 | * @return bool True if all properties are valid |
204 | */ |
205 | public function valid(): bool |
206 | { |
207 | return 0 === count($this->listInvalidProperties()); |
208 | } |
209 | |
210 | /** |
211 | * Gets _5m. |
212 | */ |
213 | public function get5m(): int |
214 | { |
215 | return $this->container['_5m']; |
216 | } |
217 | |
218 | /** |
219 | * Sets _5m. |
220 | * |
221 | * @param int $_5m _5m |
222 | * |
223 | * @return $this |
224 | */ |
225 | public function set5m(int $_5m): self |
226 | { |
227 | $this->container['_5m'] = $_5m; |
228 | |
229 | return $this; |
230 | } |
231 | |
232 | /** |
233 | * Gets _1h. |
234 | */ |
235 | public function get1h(): int |
236 | { |
237 | return $this->container['_1h']; |
238 | } |
239 | |
240 | /** |
241 | * Sets _1h. |
242 | * |
243 | * @param int $_1h _1h |
244 | * |
245 | * @return $this |
246 | */ |
247 | public function set1h(int $_1h): self |
248 | { |
249 | $this->container['_1h'] = $_1h; |
250 | |
251 | return $this; |
252 | } |
253 | |
254 | /** |
255 | * Gets _24h. |
256 | */ |
257 | public function get24h(): ?int |
258 | { |
259 | return $this->container['_24h']; |
260 | } |
261 | |
262 | /** |
263 | * Sets _24h. |
264 | * |
265 | * @param ?int $_24h 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. |
266 | * |
267 | * @return $this |
268 | */ |
269 | public function set24h(?int $_24h): self |
270 | { |
271 | $this->container['_24h'] = $_24h; |
272 | |
273 | return $this; |
274 | } |
275 | |
276 | /** |
277 | * Returns true if offset exists. False otherwise. |
278 | * |
279 | * @param int $offset Offset |
280 | */ |
281 | public function offsetExists($offset): bool |
282 | { |
283 | return isset($this->container[$offset]); |
284 | } |
285 | |
286 | /** |
287 | * Gets offset. |
288 | * |
289 | * @param int $offset Offset |
290 | */ |
291 | public function offsetGet($offset): mixed |
292 | { |
293 | return isset($this->container[$offset]) ? $this->container[$offset] : null; |
294 | } |
295 | |
296 | /** |
297 | * Sets value based on offset. |
298 | * |
299 | * @param int $offset Offset |
300 | * @param mixed $value Value to be set |
301 | */ |
302 | public function offsetSet($offset, mixed $value): void |
303 | { |
304 | if (is_null($offset)) { |
305 | $this->container[] = $value; |
306 | } else { |
307 | $this->container[$offset] = $value; |
308 | } |
309 | } |
310 | |
311 | /** |
312 | * Unsets offset. |
313 | * |
314 | * @param int $offset Offset |
315 | */ |
316 | public function offsetUnset($offset): void |
317 | { |
318 | unset($this->container[$offset]); |
319 | } |
320 | |
321 | /** |
322 | * Gets the string presentation of the object in a pretty JSON format. |
323 | * |
324 | */ |
325 | public function toPrettyString(): string |
326 | { |
327 | return json_encode( |
328 | ObjectSerializer::sanitizeForSerialization($this), |
329 | JSON_PRETTY_PRINT |
330 | ); |
331 | } |
332 | } |