Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
54.55% |
30 / 55 |
|
39.39% |
13 / 33 |
CRAP | |
0.00% |
0 / 1 |
DeprecatedGeolocation | |
54.55% |
30 / 55 |
|
39.39% |
13 / 33 |
225.82 | |
0.00% |
0 / 1 |
__construct | |
100.00% |
9 / 9 |
|
100.00% |
1 / 1 |
10 | |||
__toString | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
swaggerTypes | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
swaggerFormats | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
attributeMap | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setters | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getters | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getModelName | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
listInvalidProperties | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
valid | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getAccuracyRadius | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setAccuracyRadius | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
getLatitude | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setLatitude | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
getLongitude | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setLongitude | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
getPostalCode | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setPostalCode | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
getTimezone | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setTimezone | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
getCity | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setCity | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
getCountry | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setCountry | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
getContinent | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setContinent | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
getSubdivisions | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setSubdivisions | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
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 | * DeprecatedGeolocation. |
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 | * DeprecatedGeolocation Class Doc Comment. |
34 | * |
35 | * @category Class |
36 | * |
37 | * @description This field is **deprecated** and will not return a result for **applications created after January 23rd, 2024**. Please use the [IP Geolocation Smart signal](https://dev.fingerprint.com/docs/smart-signals-overview#ip-geolocation) for geolocation information. |
38 | * |
39 | * @author Swagger Codegen team |
40 | * |
41 | * @see https://github.com/swagger-api/swagger-codegen |
42 | */ |
43 | class DeprecatedGeolocation implements ModelInterface, \ArrayAccess |
44 | { |
45 | /** |
46 | * The original name of the model. |
47 | * |
48 | */ |
49 | protected static string $swaggerModelName = 'DeprecatedGeolocation'; |
50 | |
51 | /** |
52 | * Array of property to type mappings. Used for (de)serialization. |
53 | * |
54 | * @var string[] |
55 | */ |
56 | protected static array $swaggerTypes = [ |
57 | 'accuracy_radius' => 'int', |
58 | 'latitude' => 'double', |
59 | 'longitude' => 'double', |
60 | 'postal_code' => 'string', |
61 | 'timezone' => 'string', |
62 | 'city' => '\Fingerprint\ServerAPI\Model\GeolocationCity', |
63 | 'country' => '\Fingerprint\ServerAPI\Model\GeolocationCountry', |
64 | 'continent' => '\Fingerprint\ServerAPI\Model\GeolocationContinent', |
65 | 'subdivisions' => '\Fingerprint\ServerAPI\Model\GeolocationSubdivisions']; |
66 | |
67 | /** |
68 | * Array of property to format mappings. Used for (de)serialization. |
69 | * |
70 | * @var string[] |
71 | */ |
72 | protected static array $swaggerFormats = [ |
73 | 'accuracy_radius' => null, |
74 | 'latitude' => 'double', |
75 | 'longitude' => 'double', |
76 | 'postal_code' => null, |
77 | 'timezone' => 'timezone', |
78 | 'city' => null, |
79 | 'country' => null, |
80 | 'continent' => null, |
81 | 'subdivisions' => null]; |
82 | |
83 | /** |
84 | * Array of attributes where the key is the local name, |
85 | * and the value is the original name. |
86 | * |
87 | * @var string[] |
88 | */ |
89 | protected static array $attributeMap = [ |
90 | 'accuracy_radius' => 'accuracyRadius', |
91 | 'latitude' => 'latitude', |
92 | 'longitude' => 'longitude', |
93 | 'postal_code' => 'postalCode', |
94 | 'timezone' => 'timezone', |
95 | 'city' => 'city', |
96 | 'country' => 'country', |
97 | 'continent' => 'continent', |
98 | 'subdivisions' => 'subdivisions']; |
99 | |
100 | /** |
101 | * Array of attributes to setter functions (for deserialization of responses). |
102 | * |
103 | * @var string[] |
104 | */ |
105 | protected static array $setters = [ |
106 | 'accuracy_radius' => 'setAccuracyRadius', |
107 | 'latitude' => 'setLatitude', |
108 | 'longitude' => 'setLongitude', |
109 | 'postal_code' => 'setPostalCode', |
110 | 'timezone' => 'setTimezone', |
111 | 'city' => 'setCity', |
112 | 'country' => 'setCountry', |
113 | 'continent' => 'setContinent', |
114 | 'subdivisions' => 'setSubdivisions']; |
115 | |
116 | /** |
117 | * Array of attributes to getter functions (for serialization of requests). |
118 | * |
119 | * @var string[] |
120 | */ |
121 | protected static array $getters = [ |
122 | 'accuracy_radius' => 'getAccuracyRadius', |
123 | 'latitude' => 'getLatitude', |
124 | 'longitude' => 'getLongitude', |
125 | 'postal_code' => 'getPostalCode', |
126 | 'timezone' => 'getTimezone', |
127 | 'city' => 'getCity', |
128 | 'country' => 'getCountry', |
129 | 'continent' => 'getContinent', |
130 | 'subdivisions' => 'getSubdivisions']; |
131 | |
132 | /** |
133 | * Associative array for storing property values. |
134 | * |
135 | * @var mixed[] |
136 | */ |
137 | protected array $container = []; |
138 | |
139 | /** |
140 | * Constructor. |
141 | * |
142 | * @param mixed[] $data Associated array of property values |
143 | * initializing the model |
144 | */ |
145 | public function __construct(?array $data = null) |
146 | { |
147 | $this->container['accuracy_radius'] = isset($data['accuracy_radius']) ? $data['accuracy_radius'] : null; |
148 | $this->container['latitude'] = isset($data['latitude']) ? $data['latitude'] : null; |
149 | $this->container['longitude'] = isset($data['longitude']) ? $data['longitude'] : null; |
150 | $this->container['postal_code'] = isset($data['postal_code']) ? $data['postal_code'] : null; |
151 | $this->container['timezone'] = isset($data['timezone']) ? $data['timezone'] : null; |
152 | $this->container['city'] = isset($data['city']) ? $data['city'] : null; |
153 | $this->container['country'] = isset($data['country']) ? $data['country'] : null; |
154 | $this->container['continent'] = isset($data['continent']) ? $data['continent'] : null; |
155 | $this->container['subdivisions'] = isset($data['subdivisions']) ? $data['subdivisions'] : null; |
156 | } |
157 | |
158 | /** |
159 | * Gets the string presentation of the object. |
160 | * |
161 | */ |
162 | public function __toString(): string |
163 | { |
164 | return json_encode(ObjectSerializer::sanitizeForSerialization($this)); |
165 | } |
166 | |
167 | /** |
168 | * Array of property to type mappings. Used for (de)serialization. |
169 | */ |
170 | public static function swaggerTypes(): array |
171 | { |
172 | return self::$swaggerTypes; |
173 | } |
174 | |
175 | /** |
176 | * Array of property to format mappings. Used for (de)serialization. |
177 | */ |
178 | public static function swaggerFormats(): array |
179 | { |
180 | return self::$swaggerFormats; |
181 | } |
182 | |
183 | /** |
184 | * Array of attributes where the key is the local name, |
185 | * and the value is the original name. |
186 | */ |
187 | public static function attributeMap(): array |
188 | { |
189 | return self::$attributeMap; |
190 | } |
191 | |
192 | /** |
193 | * Array of attributes to setter functions (for deserialization of responses). |
194 | */ |
195 | public static function setters(): array |
196 | { |
197 | return self::$setters; |
198 | } |
199 | |
200 | /** |
201 | * Array of attributes to getter functions (for serialization of requests). |
202 | */ |
203 | public static function getters(): array |
204 | { |
205 | return self::$getters; |
206 | } |
207 | |
208 | /** |
209 | * The original name of the model. |
210 | */ |
211 | public function getModelName(): string |
212 | { |
213 | return self::$swaggerModelName; |
214 | } |
215 | |
216 | /** |
217 | * Show all the invalid properties with reasons. |
218 | * |
219 | * @return array invalid properties with reasons |
220 | */ |
221 | public function listInvalidProperties(): array |
222 | { |
223 | return []; |
224 | } |
225 | |
226 | /** |
227 | * Validate all the properties in the model |
228 | * return true if all passed. |
229 | * |
230 | * @return bool True if all properties are valid |
231 | */ |
232 | public function valid(): bool |
233 | { |
234 | return 0 === count($this->listInvalidProperties()); |
235 | } |
236 | |
237 | /** |
238 | * Gets accuracy_radius. |
239 | */ |
240 | public function getAccuracyRadius(): ?int |
241 | { |
242 | return $this->container['accuracy_radius']; |
243 | } |
244 | |
245 | /** |
246 | * Sets accuracy_radius. |
247 | * |
248 | * @param ?int $accuracy_radius the IP address is likely to be within this radius (in km) of the specified location |
249 | * |
250 | * @return $this |
251 | */ |
252 | public function setAccuracyRadius(?int $accuracy_radius): self |
253 | { |
254 | $this->container['accuracy_radius'] = $accuracy_radius; |
255 | |
256 | return $this; |
257 | } |
258 | |
259 | /** |
260 | * Gets latitude. |
261 | * |
262 | * @return ?double |
263 | */ |
264 | public function getLatitude(): ?float |
265 | { |
266 | return $this->container['latitude']; |
267 | } |
268 | |
269 | /** |
270 | * Sets latitude. |
271 | * |
272 | * @param ?double $latitude latitude |
273 | * |
274 | * @return $this |
275 | */ |
276 | public function setLatitude(?float $latitude): self |
277 | { |
278 | $this->container['latitude'] = $latitude; |
279 | |
280 | return $this; |
281 | } |
282 | |
283 | /** |
284 | * Gets longitude. |
285 | * |
286 | * @return ?double |
287 | */ |
288 | public function getLongitude(): ?float |
289 | { |
290 | return $this->container['longitude']; |
291 | } |
292 | |
293 | /** |
294 | * Sets longitude. |
295 | * |
296 | * @param ?double $longitude longitude |
297 | * |
298 | * @return $this |
299 | */ |
300 | public function setLongitude(?float $longitude): self |
301 | { |
302 | $this->container['longitude'] = $longitude; |
303 | |
304 | return $this; |
305 | } |
306 | |
307 | /** |
308 | * Gets postal_code. |
309 | */ |
310 | public function getPostalCode(): ?string |
311 | { |
312 | return $this->container['postal_code']; |
313 | } |
314 | |
315 | /** |
316 | * Sets postal_code. |
317 | * |
318 | * @param ?string $postal_code postal_code |
319 | * |
320 | * @return $this |
321 | */ |
322 | public function setPostalCode(?string $postal_code): self |
323 | { |
324 | $this->container['postal_code'] = $postal_code; |
325 | |
326 | return $this; |
327 | } |
328 | |
329 | /** |
330 | * Gets timezone. |
331 | */ |
332 | public function getTimezone(): ?string |
333 | { |
334 | return $this->container['timezone']; |
335 | } |
336 | |
337 | /** |
338 | * Sets timezone. |
339 | * |
340 | * @param ?string $timezone timezone |
341 | * |
342 | * @return $this |
343 | */ |
344 | public function setTimezone(?string $timezone): self |
345 | { |
346 | $this->container['timezone'] = $timezone; |
347 | |
348 | return $this; |
349 | } |
350 | |
351 | /** |
352 | * Gets city. |
353 | */ |
354 | public function getCity(): ?GeolocationCity |
355 | { |
356 | return $this->container['city']; |
357 | } |
358 | |
359 | /** |
360 | * Sets city. |
361 | * |
362 | * @param ?\Fingerprint\ServerAPI\Model\GeolocationCity $city city |
363 | * |
364 | * @return $this |
365 | */ |
366 | public function setCity(?GeolocationCity $city): self |
367 | { |
368 | $this->container['city'] = $city; |
369 | |
370 | return $this; |
371 | } |
372 | |
373 | /** |
374 | * Gets country. |
375 | */ |
376 | public function getCountry(): ?GeolocationCountry |
377 | { |
378 | return $this->container['country']; |
379 | } |
380 | |
381 | /** |
382 | * Sets country. |
383 | * |
384 | * @param ?\Fingerprint\ServerAPI\Model\GeolocationCountry $country country |
385 | * |
386 | * @return $this |
387 | */ |
388 | public function setCountry(?GeolocationCountry $country): self |
389 | { |
390 | $this->container['country'] = $country; |
391 | |
392 | return $this; |
393 | } |
394 | |
395 | /** |
396 | * Gets continent. |
397 | */ |
398 | public function getContinent(): ?GeolocationContinent |
399 | { |
400 | return $this->container['continent']; |
401 | } |
402 | |
403 | /** |
404 | * Sets continent. |
405 | * |
406 | * @param ?\Fingerprint\ServerAPI\Model\GeolocationContinent $continent continent |
407 | * |
408 | * @return $this |
409 | */ |
410 | public function setContinent(?GeolocationContinent $continent): self |
411 | { |
412 | $this->container['continent'] = $continent; |
413 | |
414 | return $this; |
415 | } |
416 | |
417 | /** |
418 | * Gets subdivisions. |
419 | */ |
420 | public function getSubdivisions(): ?GeolocationSubdivisions |
421 | { |
422 | return $this->container['subdivisions']; |
423 | } |
424 | |
425 | /** |
426 | * Sets subdivisions. |
427 | * |
428 | * @param ?\Fingerprint\ServerAPI\Model\GeolocationSubdivisions $subdivisions subdivisions |
429 | * |
430 | * @return $this |
431 | */ |
432 | public function setSubdivisions(?GeolocationSubdivisions $subdivisions): self |
433 | { |
434 | $this->container['subdivisions'] = $subdivisions; |
435 | |
436 | return $this; |
437 | } |
438 | |
439 | /** |
440 | * Returns true if offset exists. False otherwise. |
441 | * |
442 | * @param int $offset Offset |
443 | */ |
444 | public function offsetExists($offset): bool |
445 | { |
446 | return isset($this->container[$offset]); |
447 | } |
448 | |
449 | /** |
450 | * Gets offset. |
451 | * |
452 | * @param int $offset Offset |
453 | */ |
454 | public function offsetGet($offset): mixed |
455 | { |
456 | return isset($this->container[$offset]) ? $this->container[$offset] : null; |
457 | } |
458 | |
459 | /** |
460 | * Sets value based on offset. |
461 | * |
462 | * @param int $offset Offset |
463 | * @param mixed $value Value to be set |
464 | */ |
465 | public function offsetSet($offset, mixed $value): void |
466 | { |
467 | if (is_null($offset)) { |
468 | $this->container[] = $value; |
469 | } else { |
470 | $this->container[$offset] = $value; |
471 | } |
472 | } |
473 | |
474 | /** |
475 | * Unsets offset. |
476 | * |
477 | * @param int $offset Offset |
478 | */ |
479 | public function offsetUnset($offset): void |
480 | { |
481 | unset($this->container[$offset]); |
482 | } |
483 | |
484 | /** |
485 | * Gets the string presentation of the object in a pretty JSON format. |
486 | * |
487 | */ |
488 | public function toPrettyString(): string |
489 | { |
490 | return json_encode( |
491 | ObjectSerializer::sanitizeForSerialization($this), |
492 | JSON_PRETTY_PRINT |
493 | ); |
494 | } |
495 | } |