Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 50 |
|
0.00% |
0 / 25 |
CRAP | |
0.00% |
0 / 1 |
VPNMethods | |
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 | |||
getTimezoneMismatch | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setTimezoneMismatch | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
getPublicVpn | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setPublicVpn | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
getAuxiliaryMobile | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setAuxiliaryMobile | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
getOsMismatch | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setOsMismatch | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
getRelay | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setRelay | |
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 | * VPNMethods. |
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 | * VPNMethods 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 VPNMethods implements ModelInterface, \ArrayAccess |
42 | { |
43 | /** |
44 | * The original name of the model. |
45 | * |
46 | */ |
47 | protected static string $swaggerModelName = 'VPNMethods'; |
48 | |
49 | /** |
50 | * Array of property to type mappings. Used for (de)serialization. |
51 | * |
52 | * @var string[] |
53 | */ |
54 | protected static array $swaggerTypes = [ |
55 | 'timezone_mismatch' => 'bool', |
56 | 'public_vpn' => 'bool', |
57 | 'auxiliary_mobile' => 'bool', |
58 | 'os_mismatch' => 'bool', |
59 | 'relay' => 'bool']; |
60 | |
61 | /** |
62 | * Array of property to format mappings. Used for (de)serialization. |
63 | * |
64 | * @var string[] |
65 | */ |
66 | protected static array $swaggerFormats = [ |
67 | 'timezone_mismatch' => null, |
68 | 'public_vpn' => null, |
69 | 'auxiliary_mobile' => null, |
70 | 'os_mismatch' => null, |
71 | 'relay' => 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 | 'timezone_mismatch' => 'timezoneMismatch', |
81 | 'public_vpn' => 'publicVPN', |
82 | 'auxiliary_mobile' => 'auxiliaryMobile', |
83 | 'os_mismatch' => 'osMismatch', |
84 | 'relay' => 'relay']; |
85 | |
86 | /** |
87 | * Array of attributes to setter functions (for deserialization of responses). |
88 | * |
89 | * @var string[] |
90 | */ |
91 | protected static array $setters = [ |
92 | 'timezone_mismatch' => 'setTimezoneMismatch', |
93 | 'public_vpn' => 'setPublicVpn', |
94 | 'auxiliary_mobile' => 'setAuxiliaryMobile', |
95 | 'os_mismatch' => 'setOsMismatch', |
96 | 'relay' => 'setRelay']; |
97 | |
98 | /** |
99 | * Array of attributes to getter functions (for serialization of requests). |
100 | * |
101 | * @var string[] |
102 | */ |
103 | protected static array $getters = [ |
104 | 'timezone_mismatch' => 'getTimezoneMismatch', |
105 | 'public_vpn' => 'getPublicVpn', |
106 | 'auxiliary_mobile' => 'getAuxiliaryMobile', |
107 | 'os_mismatch' => 'getOsMismatch', |
108 | 'relay' => 'getRelay']; |
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['timezone_mismatch'] = isset($data['timezone_mismatch']) ? $data['timezone_mismatch'] : null; |
126 | $this->container['public_vpn'] = isset($data['public_vpn']) ? $data['public_vpn'] : null; |
127 | $this->container['auxiliary_mobile'] = isset($data['auxiliary_mobile']) ? $data['auxiliary_mobile'] : null; |
128 | $this->container['os_mismatch'] = isset($data['os_mismatch']) ? $data['os_mismatch'] : null; |
129 | $this->container['relay'] = isset($data['relay']) ? $data['relay'] : 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['timezone_mismatch']) { |
200 | $invalidProperties[] = "'timezone_mismatch' can't be null"; |
201 | } |
202 | if (null === $this->container['public_vpn']) { |
203 | $invalidProperties[] = "'public_vpn' can't be null"; |
204 | } |
205 | if (null === $this->container['auxiliary_mobile']) { |
206 | $invalidProperties[] = "'auxiliary_mobile' can't be null"; |
207 | } |
208 | if (null === $this->container['os_mismatch']) { |
209 | $invalidProperties[] = "'os_mismatch' can't be null"; |
210 | } |
211 | if (null === $this->container['relay']) { |
212 | $invalidProperties[] = "'relay' 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 timezone_mismatch. |
231 | */ |
232 | public function getTimezoneMismatch(): bool |
233 | { |
234 | return $this->container['timezone_mismatch']; |
235 | } |
236 | |
237 | /** |
238 | * Sets timezone_mismatch. |
239 | * |
240 | * @param bool $timezone_mismatch the browser timezone doesn't match the timezone inferred from the request IP address |
241 | * |
242 | * @return $this |
243 | */ |
244 | public function setTimezoneMismatch(bool $timezone_mismatch): self |
245 | { |
246 | $this->container['timezone_mismatch'] = $timezone_mismatch; |
247 | |
248 | return $this; |
249 | } |
250 | |
251 | /** |
252 | * Gets public_vpn. |
253 | */ |
254 | public function getPublicVpn(): bool |
255 | { |
256 | return $this->container['public_vpn']; |
257 | } |
258 | |
259 | /** |
260 | * Sets public_vpn. |
261 | * |
262 | * @param bool $public_vpn request IP address is owned and used by a public VPN service provider |
263 | * |
264 | * @return $this |
265 | */ |
266 | public function setPublicVpn(bool $public_vpn): self |
267 | { |
268 | $this->container['public_vpn'] = $public_vpn; |
269 | |
270 | return $this; |
271 | } |
272 | |
273 | /** |
274 | * Gets auxiliary_mobile. |
275 | */ |
276 | public function getAuxiliaryMobile(): bool |
277 | { |
278 | return $this->container['auxiliary_mobile']; |
279 | } |
280 | |
281 | /** |
282 | * Sets auxiliary_mobile. |
283 | * |
284 | * @param bool $auxiliary_mobile This method applies to mobile devices only. Indicates the result of additional methods used to detect a VPN in mobile devices. |
285 | * |
286 | * @return $this |
287 | */ |
288 | public function setAuxiliaryMobile(bool $auxiliary_mobile): self |
289 | { |
290 | $this->container['auxiliary_mobile'] = $auxiliary_mobile; |
291 | |
292 | return $this; |
293 | } |
294 | |
295 | /** |
296 | * Gets os_mismatch. |
297 | */ |
298 | public function getOsMismatch(): bool |
299 | { |
300 | return $this->container['os_mismatch']; |
301 | } |
302 | |
303 | /** |
304 | * Sets os_mismatch. |
305 | * |
306 | * @param bool $os_mismatch the browser runs on a different operating system than the operating system inferred from the request network signature |
307 | * |
308 | * @return $this |
309 | */ |
310 | public function setOsMismatch(bool $os_mismatch): self |
311 | { |
312 | $this->container['os_mismatch'] = $os_mismatch; |
313 | |
314 | return $this; |
315 | } |
316 | |
317 | /** |
318 | * Gets relay. |
319 | */ |
320 | public function getRelay(): bool |
321 | { |
322 | return $this->container['relay']; |
323 | } |
324 | |
325 | /** |
326 | * Sets relay. |
327 | * |
328 | * @param bool $relay Request IP address belongs to a relay service provider, indicating the use of relay services like [Apple Private relay](https://support.apple.com/en-us/102602) or [Cloudflare Warp](https://developers.cloudflare.com/warp-client/). * Like VPNs, relay services anonymize the visitor's true IP address. * Unlike traditional VPNs, relay services don't let visitors spoof their location by choosing an exit node in a different country. This field allows you to differentiate VPN users and relay service users in your fraud prevention logic. |
329 | * |
330 | * @return $this |
331 | */ |
332 | public function setRelay(bool $relay): self |
333 | { |
334 | $this->container['relay'] = $relay; |
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 | } |