Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 40 |
|
0.00% |
0 / 23 |
CRAP | |
0.00% |
0 / 1 |
VisitorsGetResponse | |
0.00% |
0 / 40 |
|
0.00% |
0 / 23 |
992 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
30 | |||
__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 | |||
getVisitorId | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setVisitorId | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
getVisits | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setVisits | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
getLastTimestamp | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setLastTimestamp | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
getPaginationKey | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setPaginationKey | |
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 | * VisitorsGetResponse. |
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 | * VisitorsGetResponse Class Doc Comment. |
34 | * |
35 | * @category Class |
36 | * |
37 | * @description Pagination-related fields `lastTimestamp` and `paginationKey` are included if you use a pagination parameter like `limit` or `before` and there is more data available on the next page. |
38 | * |
39 | * @author Swagger Codegen team |
40 | * |
41 | * @see https://github.com/swagger-api/swagger-codegen |
42 | */ |
43 | class VisitorsGetResponse implements ModelInterface, \ArrayAccess |
44 | { |
45 | /** |
46 | * The original name of the model. |
47 | * |
48 | */ |
49 | protected static string $swaggerModelName = 'VisitorsGetResponse'; |
50 | |
51 | /** |
52 | * Array of property to type mappings. Used for (de)serialization. |
53 | * |
54 | * @var string[] |
55 | */ |
56 | protected static array $swaggerTypes = [ |
57 | 'visitor_id' => 'string', |
58 | 'visits' => '\Fingerprint\ServerAPI\Model\Visit[]', |
59 | 'last_timestamp' => 'int', |
60 | 'pagination_key' => 'string']; |
61 | |
62 | /** |
63 | * Array of property to format mappings. Used for (de)serialization. |
64 | * |
65 | * @var string[] |
66 | */ |
67 | protected static array $swaggerFormats = [ |
68 | 'visitor_id' => null, |
69 | 'visits' => null, |
70 | 'last_timestamp' => 'int64', |
71 | 'pagination_key' => 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 | 'visits' => 'visits', |
82 | 'last_timestamp' => 'lastTimestamp', |
83 | 'pagination_key' => 'paginationKey']; |
84 | |
85 | /** |
86 | * Array of attributes to setter functions (for deserialization of responses). |
87 | * |
88 | * @var string[] |
89 | */ |
90 | protected static array $setters = [ |
91 | 'visitor_id' => 'setVisitorId', |
92 | 'visits' => 'setVisits', |
93 | 'last_timestamp' => 'setLastTimestamp', |
94 | 'pagination_key' => 'setPaginationKey']; |
95 | |
96 | /** |
97 | * Array of attributes to getter functions (for serialization of requests). |
98 | * |
99 | * @var string[] |
100 | */ |
101 | protected static array $getters = [ |
102 | 'visitor_id' => 'getVisitorId', |
103 | 'visits' => 'getVisits', |
104 | 'last_timestamp' => 'getLastTimestamp', |
105 | 'pagination_key' => 'getPaginationKey']; |
106 | |
107 | /** |
108 | * Associative array for storing property values. |
109 | * |
110 | * @var mixed[] |
111 | */ |
112 | protected array $container = []; |
113 | |
114 | /** |
115 | * Constructor. |
116 | * |
117 | * @param mixed[] $data Associated array of property values |
118 | * initializing the model |
119 | */ |
120 | public function __construct(?array $data = null) |
121 | { |
122 | $this->container['visitor_id'] = isset($data['visitor_id']) ? $data['visitor_id'] : null; |
123 | $this->container['visits'] = isset($data['visits']) ? $data['visits'] : null; |
124 | $this->container['last_timestamp'] = isset($data['last_timestamp']) ? $data['last_timestamp'] : null; |
125 | $this->container['pagination_key'] = isset($data['pagination_key']) ? $data['pagination_key'] : null; |
126 | } |
127 | |
128 | /** |
129 | * Gets the string presentation of the object. |
130 | * |
131 | */ |
132 | public function __toString(): string |
133 | { |
134 | return json_encode(ObjectSerializer::sanitizeForSerialization($this)); |
135 | } |
136 | |
137 | /** |
138 | * Array of property to type mappings. Used for (de)serialization. |
139 | */ |
140 | public static function swaggerTypes(): array |
141 | { |
142 | return self::$swaggerTypes; |
143 | } |
144 | |
145 | /** |
146 | * Array of property to format mappings. Used for (de)serialization. |
147 | */ |
148 | public static function swaggerFormats(): array |
149 | { |
150 | return self::$swaggerFormats; |
151 | } |
152 | |
153 | /** |
154 | * Array of attributes where the key is the local name, |
155 | * and the value is the original name. |
156 | */ |
157 | public static function attributeMap(): array |
158 | { |
159 | return self::$attributeMap; |
160 | } |
161 | |
162 | /** |
163 | * Array of attributes to setter functions (for deserialization of responses). |
164 | */ |
165 | public static function setters(): array |
166 | { |
167 | return self::$setters; |
168 | } |
169 | |
170 | /** |
171 | * Array of attributes to getter functions (for serialization of requests). |
172 | */ |
173 | public static function getters(): array |
174 | { |
175 | return self::$getters; |
176 | } |
177 | |
178 | /** |
179 | * The original name of the model. |
180 | */ |
181 | public function getModelName(): string |
182 | { |
183 | return self::$swaggerModelName; |
184 | } |
185 | |
186 | /** |
187 | * Show all the invalid properties with reasons. |
188 | * |
189 | * @return array invalid properties with reasons |
190 | */ |
191 | public function listInvalidProperties(): array |
192 | { |
193 | $invalidProperties = []; |
194 | |
195 | if (null === $this->container['visitor_id']) { |
196 | $invalidProperties[] = "'visitor_id' can't be null"; |
197 | } |
198 | if (null === $this->container['visits']) { |
199 | $invalidProperties[] = "'visits' can't be null"; |
200 | } |
201 | |
202 | return $invalidProperties; |
203 | } |
204 | |
205 | /** |
206 | * Validate all the properties in the model |
207 | * return true if all passed. |
208 | * |
209 | * @return bool True if all properties are valid |
210 | */ |
211 | public function valid(): bool |
212 | { |
213 | return 0 === count($this->listInvalidProperties()); |
214 | } |
215 | |
216 | /** |
217 | * Gets visitor_id. |
218 | */ |
219 | public function getVisitorId(): string |
220 | { |
221 | return $this->container['visitor_id']; |
222 | } |
223 | |
224 | /** |
225 | * Sets visitor_id. |
226 | * |
227 | * @param string $visitor_id visitor_id |
228 | * |
229 | * @return $this |
230 | */ |
231 | public function setVisitorId(string $visitor_id): self |
232 | { |
233 | $this->container['visitor_id'] = $visitor_id; |
234 | |
235 | return $this; |
236 | } |
237 | |
238 | /** |
239 | * Gets visits. |
240 | * |
241 | * @return \Fingerprint\ServerAPI\Model\Visit[] |
242 | */ |
243 | public function getVisits(): array |
244 | { |
245 | return $this->container['visits']; |
246 | } |
247 | |
248 | /** |
249 | * Sets visits. |
250 | * |
251 | * @param \Fingerprint\ServerAPI\Model\Visit[] $visits visits |
252 | * |
253 | * @return $this |
254 | */ |
255 | public function setVisits(array $visits): self |
256 | { |
257 | $this->container['visits'] = $visits; |
258 | |
259 | return $this; |
260 | } |
261 | |
262 | /** |
263 | * Gets last_timestamp. |
264 | */ |
265 | public function getLastTimestamp(): ?int |
266 | { |
267 | return $this->container['last_timestamp']; |
268 | } |
269 | |
270 | /** |
271 | * Sets last_timestamp. |
272 | * |
273 | * @param ?int $last_timestamp ⚠️ Deprecated paging attribute, please use `paginationKey` instead. Timestamp of the last visit in the current page of results. |
274 | * |
275 | * @return $this |
276 | */ |
277 | public function setLastTimestamp(?int $last_timestamp): self |
278 | { |
279 | $this->container['last_timestamp'] = $last_timestamp; |
280 | |
281 | return $this; |
282 | } |
283 | |
284 | /** |
285 | * Gets pagination_key. |
286 | */ |
287 | public function getPaginationKey(): ?string |
288 | { |
289 | return $this->container['pagination_key']; |
290 | } |
291 | |
292 | /** |
293 | * Sets pagination_key. |
294 | * |
295 | * @param ?string $pagination_key Request ID of the last visit in the current page of results. Use this value in the following request as the `paginationKey` parameter to get the next page of results. |
296 | * |
297 | * @return $this |
298 | */ |
299 | public function setPaginationKey(?string $pagination_key): self |
300 | { |
301 | $this->container['pagination_key'] = $pagination_key; |
302 | |
303 | return $this; |
304 | } |
305 | |
306 | /** |
307 | * Returns true if offset exists. False otherwise. |
308 | * |
309 | * @param int $offset Offset |
310 | */ |
311 | public function offsetExists($offset): bool |
312 | { |
313 | return isset($this->container[$offset]); |
314 | } |
315 | |
316 | /** |
317 | * Gets offset. |
318 | * |
319 | * @param int $offset Offset |
320 | */ |
321 | public function offsetGet($offset): mixed |
322 | { |
323 | return isset($this->container[$offset]) ? $this->container[$offset] : null; |
324 | } |
325 | |
326 | /** |
327 | * Sets value based on offset. |
328 | * |
329 | * @param int $offset Offset |
330 | * @param mixed $value Value to be set |
331 | */ |
332 | public function offsetSet($offset, mixed $value): void |
333 | { |
334 | if (is_null($offset)) { |
335 | $this->container[] = $value; |
336 | } else { |
337 | $this->container[$offset] = $value; |
338 | } |
339 | } |
340 | |
341 | /** |
342 | * Unsets offset. |
343 | * |
344 | * @param int $offset Offset |
345 | */ |
346 | public function offsetUnset($offset): void |
347 | { |
348 | unset($this->container[$offset]); |
349 | } |
350 | |
351 | /** |
352 | * Gets the string presentation of the object in a pretty JSON format. |
353 | * |
354 | */ |
355 | public function toPrettyString(): string |
356 | { |
357 | return json_encode( |
358 | ObjectSerializer::sanitizeForSerialization($this), |
359 | JSON_PRETTY_PRINT |
360 | ); |
361 | } |
362 | } |