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