Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 50 |
|
0.00% |
0 / 25 |
CRAP | |
0.00% |
0 / 1 |
VPN | |
0.00% |
0 / 50 |
|
0.00% |
0 / 25 |
1406 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 5 |
|
0.00% |
0 / 1 |
42 | |||
__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 / 12 |
|
0.00% |
0 / 1 |
42 | |||
valid | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getResult | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setResult | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
getConfidence | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setConfidence | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
getOriginTimezone | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setOriginTimezone | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
getOriginCountry | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setOriginCountry | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
getMethods | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setMethods | |
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 | * VPN. |
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 | * VPN Class Doc Comment. |
34 | * |
35 | * @category Class |
36 | * |
37 | * @author Swagger Codegen team |
38 | * |
39 | * @see https://github.com/swagger-api/swagger-codegen |
40 | */ |
41 | class VPN implements ModelInterface, \ArrayAccess |
42 | { |
43 | /** |
44 | * The original name of the model. |
45 | * |
46 | */ |
47 | protected static string $swaggerModelName = 'VPN'; |
48 | |
49 | /** |
50 | * Array of property to type mappings. Used for (de)serialization. |
51 | * |
52 | * @var string[] |
53 | */ |
54 | protected static array $swaggerTypes = [ |
55 | 'result' => 'bool', |
56 | 'confidence' => '\Fingerprint\ServerAPI\Model\VPNConfidence', |
57 | 'origin_timezone' => 'string', |
58 | 'origin_country' => 'string', |
59 | 'methods' => '\Fingerprint\ServerAPI\Model\VPNMethods']; |
60 | |
61 | /** |
62 | * Array of property to format mappings. Used for (de)serialization. |
63 | * |
64 | * @var string[] |
65 | */ |
66 | protected static array $swaggerFormats = [ |
67 | 'result' => null, |
68 | 'confidence' => null, |
69 | 'origin_timezone' => null, |
70 | 'origin_country' => null, |
71 | 'methods' => 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 | 'result' => 'result', |
81 | 'confidence' => 'confidence', |
82 | 'origin_timezone' => 'originTimezone', |
83 | 'origin_country' => 'originCountry', |
84 | 'methods' => 'methods']; |
85 | |
86 | /** |
87 | * Array of attributes to setter functions (for deserialization of responses). |
88 | * |
89 | * @var string[] |
90 | */ |
91 | protected static array $setters = [ |
92 | 'result' => 'setResult', |
93 | 'confidence' => 'setConfidence', |
94 | 'origin_timezone' => 'setOriginTimezone', |
95 | 'origin_country' => 'setOriginCountry', |
96 | 'methods' => 'setMethods']; |
97 | |
98 | /** |
99 | * Array of attributes to getter functions (for serialization of requests). |
100 | * |
101 | * @var string[] |
102 | */ |
103 | protected static array $getters = [ |
104 | 'result' => 'getResult', |
105 | 'confidence' => 'getConfidence', |
106 | 'origin_timezone' => 'getOriginTimezone', |
107 | 'origin_country' => 'getOriginCountry', |
108 | 'methods' => 'getMethods']; |
109 | |
110 | /** |
111 | * Associative array for storing property values. |
112 | * |
113 | * @var mixed[] |
114 | */ |
115 | protected array $container = []; |
116 | |
117 | /** |
118 | * Constructor. |
119 | * |
120 | * @param mixed[] $data Associated array of property values |
121 | * initializing the model |
122 | */ |
123 | public function __construct(?array $data = null) |
124 | { |
125 | $this->container['result'] = isset($data['result']) ? $data['result'] : null; |
126 | $this->container['confidence'] = isset($data['confidence']) ? $data['confidence'] : null; |
127 | $this->container['origin_timezone'] = isset($data['origin_timezone']) ? $data['origin_timezone'] : null; |
128 | $this->container['origin_country'] = isset($data['origin_country']) ? $data['origin_country'] : null; |
129 | $this->container['methods'] = isset($data['methods']) ? $data['methods'] : null; |
130 | } |
131 | |
132 | /** |
133 | * Gets the string presentation of the object. |
134 | * |
135 | */ |
136 | public function __toString(): string |
137 | { |
138 | return json_encode(ObjectSerializer::sanitizeForSerialization($this)); |
139 | } |
140 | |
141 | /** |
142 | * Array of property to type mappings. Used for (de)serialization. |
143 | */ |
144 | public static function swaggerTypes(): array |
145 | { |
146 | return self::$swaggerTypes; |
147 | } |
148 | |
149 | /** |
150 | * Array of property to format mappings. Used for (de)serialization. |
151 | */ |
152 | public static function swaggerFormats(): array |
153 | { |
154 | return self::$swaggerFormats; |
155 | } |
156 | |
157 | /** |
158 | * Array of attributes where the key is the local name, |
159 | * and the value is the original name. |
160 | */ |
161 | public static function attributeMap(): array |
162 | { |
163 | return self::$attributeMap; |
164 | } |
165 | |
166 | /** |
167 | * Array of attributes to setter functions (for deserialization of responses). |
168 | */ |
169 | public static function setters(): array |
170 | { |
171 | return self::$setters; |
172 | } |
173 | |
174 | /** |
175 | * Array of attributes to getter functions (for serialization of requests). |
176 | */ |
177 | public static function getters(): array |
178 | { |
179 | return self::$getters; |
180 | } |
181 | |
182 | /** |
183 | * The original name of the model. |
184 | */ |
185 | public function getModelName(): string |
186 | { |
187 | return self::$swaggerModelName; |
188 | } |
189 | |
190 | /** |
191 | * Show all the invalid properties with reasons. |
192 | * |
193 | * @return array invalid properties with reasons |
194 | */ |
195 | public function listInvalidProperties(): array |
196 | { |
197 | $invalidProperties = []; |
198 | |
199 | if (null === $this->container['result']) { |
200 | $invalidProperties[] = "'result' can't be null"; |
201 | } |
202 | if (null === $this->container['confidence']) { |
203 | $invalidProperties[] = "'confidence' can't be null"; |
204 | } |
205 | if (null === $this->container['origin_timezone']) { |
206 | $invalidProperties[] = "'origin_timezone' can't be null"; |
207 | } |
208 | if (null === $this->container['origin_country']) { |
209 | $invalidProperties[] = "'origin_country' can't be null"; |
210 | } |
211 | if (null === $this->container['methods']) { |
212 | $invalidProperties[] = "'methods' can't be null"; |
213 | } |
214 | |
215 | return $invalidProperties; |
216 | } |
217 | |
218 | /** |
219 | * Validate all the properties in the model |
220 | * return true if all passed. |
221 | * |
222 | * @return bool True if all properties are valid |
223 | */ |
224 | public function valid(): bool |
225 | { |
226 | return 0 === count($this->listInvalidProperties()); |
227 | } |
228 | |
229 | /** |
230 | * Gets result. |
231 | */ |
232 | public function getResult(): bool |
233 | { |
234 | return $this->container['result']; |
235 | } |
236 | |
237 | /** |
238 | * Sets result. |
239 | * |
240 | * @param bool $result VPN or other anonymizing service has been used when sending the request |
241 | * |
242 | * @return $this |
243 | */ |
244 | public function setResult(bool $result): self |
245 | { |
246 | $this->container['result'] = $result; |
247 | |
248 | return $this; |
249 | } |
250 | |
251 | /** |
252 | * Gets confidence. |
253 | */ |
254 | public function getConfidence(): VPNConfidence |
255 | { |
256 | return $this->container['confidence']; |
257 | } |
258 | |
259 | /** |
260 | * Sets confidence. |
261 | * |
262 | * @param VPNConfidence $confidence confidence |
263 | * |
264 | * @return $this |
265 | */ |
266 | public function setConfidence(VPNConfidence $confidence): self |
267 | { |
268 | $this->container['confidence'] = $confidence; |
269 | |
270 | return $this; |
271 | } |
272 | |
273 | /** |
274 | * Gets origin_timezone. |
275 | */ |
276 | public function getOriginTimezone(): string |
277 | { |
278 | return $this->container['origin_timezone']; |
279 | } |
280 | |
281 | /** |
282 | * Sets origin_timezone. |
283 | * |
284 | * @param string $origin_timezone local timezone which is used in timezoneMismatch method |
285 | * |
286 | * @return $this |
287 | */ |
288 | public function setOriginTimezone(string $origin_timezone): self |
289 | { |
290 | $this->container['origin_timezone'] = $origin_timezone; |
291 | |
292 | return $this; |
293 | } |
294 | |
295 | /** |
296 | * Gets origin_country. |
297 | */ |
298 | public function getOriginCountry(): string |
299 | { |
300 | return $this->container['origin_country']; |
301 | } |
302 | |
303 | /** |
304 | * Sets origin_country. |
305 | * |
306 | * @param string $origin_country Country of the request (only for Android SDK version >= 2.4.0, ISO 3166 format or unknown). |
307 | * |
308 | * @return $this |
309 | */ |
310 | public function setOriginCountry(string $origin_country): self |
311 | { |
312 | $this->container['origin_country'] = $origin_country; |
313 | |
314 | return $this; |
315 | } |
316 | |
317 | /** |
318 | * Gets methods. |
319 | */ |
320 | public function getMethods(): VPNMethods |
321 | { |
322 | return $this->container['methods']; |
323 | } |
324 | |
325 | /** |
326 | * Sets methods. |
327 | * |
328 | * @param VPNMethods $methods methods |
329 | * |
330 | * @return $this |
331 | */ |
332 | public function setMethods(VPNMethods $methods): self |
333 | { |
334 | $this->container['methods'] = $methods; |
335 | |
336 | return $this; |
337 | } |
338 | |
339 | /** |
340 | * Returns true if offset exists. False otherwise. |
341 | * |
342 | * @param int $offset Offset |
343 | */ |
344 | public function offsetExists($offset): bool |
345 | { |
346 | return isset($this->container[$offset]); |
347 | } |
348 | |
349 | /** |
350 | * Gets offset. |
351 | * |
352 | * @param int $offset Offset |
353 | */ |
354 | public function offsetGet($offset): mixed |
355 | { |
356 | return isset($this->container[$offset]) ? $this->container[$offset] : null; |
357 | } |
358 | |
359 | /** |
360 | * Sets value based on offset. |
361 | * |
362 | * @param int $offset Offset |
363 | * @param mixed $value Value to be set |
364 | */ |
365 | public function offsetSet($offset, mixed $value): void |
366 | { |
367 | if (is_null($offset)) { |
368 | $this->container[] = $value; |
369 | } else { |
370 | $this->container[$offset] = $value; |
371 | } |
372 | } |
373 | |
374 | /** |
375 | * Unsets offset. |
376 | * |
377 | * @param int $offset Offset |
378 | */ |
379 | public function offsetUnset($offset): void |
380 | { |
381 | unset($this->container[$offset]); |
382 | } |
383 | |
384 | /** |
385 | * Gets the string presentation of the object in a pretty JSON format. |
386 | * |
387 | */ |
388 | public function toPrettyString(): string |
389 | { |
390 | return json_encode( |
391 | ObjectSerializer::sanitizeForSerialization($this), |
392 | JSON_PRETTY_PRINT |
393 | ); |
394 | } |
395 | } |