Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
33.33% |
12 / 36 |
|
33.33% |
7 / 21 |
CRAP | |
0.00% |
0 / 1 |
Proxy | |
33.33% |
12 / 36 |
|
33.33% |
7 / 21 |
260.30 | |
0.00% |
0 / 1 |
__construct | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
4 | |||
__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 / 6 |
|
0.00% |
0 / 1 |
12 | |||
valid | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getResult | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setResult | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
getConfidence | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setConfidence | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
getDetails | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setDetails | |
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 | * Proxy. |
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 | * Proxy 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 Proxy implements ModelInterface, \ArrayAccess |
42 | { |
43 | /** |
44 | * The original name of the model. |
45 | * |
46 | */ |
47 | protected static string $swaggerModelName = 'Proxy'; |
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\ProxyConfidence', |
57 | 'details' => '\Fingerprint\ServerAPI\Model\ProxyDetails']; |
58 | |
59 | /** |
60 | * Array of property to format mappings. Used for (de)serialization. |
61 | * |
62 | * @var string[] |
63 | */ |
64 | protected static array $swaggerFormats = [ |
65 | 'result' => null, |
66 | 'confidence' => null, |
67 | 'details' => null]; |
68 | |
69 | /** |
70 | * Array of attributes where the key is the local name, |
71 | * and the value is the original name. |
72 | * |
73 | * @var string[] |
74 | */ |
75 | protected static array $attributeMap = [ |
76 | 'result' => 'result', |
77 | 'confidence' => 'confidence', |
78 | 'details' => 'details']; |
79 | |
80 | /** |
81 | * Array of attributes to setter functions (for deserialization of responses). |
82 | * |
83 | * @var string[] |
84 | */ |
85 | protected static array $setters = [ |
86 | 'result' => 'setResult', |
87 | 'confidence' => 'setConfidence', |
88 | 'details' => 'setDetails']; |
89 | |
90 | /** |
91 | * Array of attributes to getter functions (for serialization of requests). |
92 | * |
93 | * @var string[] |
94 | */ |
95 | protected static array $getters = [ |
96 | 'result' => 'getResult', |
97 | 'confidence' => 'getConfidence', |
98 | 'details' => 'getDetails']; |
99 | |
100 | /** |
101 | * Associative array for storing property values. |
102 | * |
103 | * @var mixed[] |
104 | */ |
105 | protected array $container = []; |
106 | |
107 | /** |
108 | * Constructor. |
109 | * |
110 | * @param mixed[] $data Associated array of property values |
111 | * initializing the model |
112 | */ |
113 | public function __construct(?array $data = null) |
114 | { |
115 | $this->container['result'] = isset($data['result']) ? $data['result'] : null; |
116 | $this->container['confidence'] = isset($data['confidence']) ? $data['confidence'] : null; |
117 | $this->container['details'] = isset($data['details']) ? $data['details'] : null; |
118 | } |
119 | |
120 | /** |
121 | * Gets the string presentation of the object. |
122 | * |
123 | */ |
124 | public function __toString(): string |
125 | { |
126 | return json_encode(ObjectSerializer::sanitizeForSerialization($this)); |
127 | } |
128 | |
129 | /** |
130 | * Array of property to type mappings. Used for (de)serialization. |
131 | */ |
132 | public static function swaggerTypes(): array |
133 | { |
134 | return self::$swaggerTypes; |
135 | } |
136 | |
137 | /** |
138 | * Array of property to format mappings. Used for (de)serialization. |
139 | */ |
140 | public static function swaggerFormats(): array |
141 | { |
142 | return self::$swaggerFormats; |
143 | } |
144 | |
145 | /** |
146 | * Array of attributes where the key is the local name, |
147 | * and the value is the original name. |
148 | */ |
149 | public static function attributeMap(): array |
150 | { |
151 | return self::$attributeMap; |
152 | } |
153 | |
154 | /** |
155 | * Array of attributes to setter functions (for deserialization of responses). |
156 | */ |
157 | public static function setters(): array |
158 | { |
159 | return self::$setters; |
160 | } |
161 | |
162 | /** |
163 | * Array of attributes to getter functions (for serialization of requests). |
164 | */ |
165 | public static function getters(): array |
166 | { |
167 | return self::$getters; |
168 | } |
169 | |
170 | /** |
171 | * The original name of the model. |
172 | */ |
173 | public function getModelName(): string |
174 | { |
175 | return self::$swaggerModelName; |
176 | } |
177 | |
178 | /** |
179 | * Show all the invalid properties with reasons. |
180 | * |
181 | * @return array invalid properties with reasons |
182 | */ |
183 | public function listInvalidProperties(): array |
184 | { |
185 | $invalidProperties = []; |
186 | |
187 | if (null === $this->container['result']) { |
188 | $invalidProperties[] = "'result' can't be null"; |
189 | } |
190 | if (null === $this->container['confidence']) { |
191 | $invalidProperties[] = "'confidence' can't be null"; |
192 | } |
193 | |
194 | return $invalidProperties; |
195 | } |
196 | |
197 | /** |
198 | * Validate all the properties in the model |
199 | * return true if all passed. |
200 | * |
201 | * @return bool True if all properties are valid |
202 | */ |
203 | public function valid(): bool |
204 | { |
205 | return 0 === count($this->listInvalidProperties()); |
206 | } |
207 | |
208 | /** |
209 | * Gets result. |
210 | */ |
211 | public function getResult(): bool |
212 | { |
213 | return $this->container['result']; |
214 | } |
215 | |
216 | /** |
217 | * Sets result. |
218 | * |
219 | * @param bool $result IP address was used by a public proxy provider or belonged to a known recent residential proxy |
220 | * |
221 | * @return $this |
222 | */ |
223 | public function setResult(bool $result): self |
224 | { |
225 | $this->container['result'] = $result; |
226 | |
227 | return $this; |
228 | } |
229 | |
230 | /** |
231 | * Gets confidence. |
232 | */ |
233 | public function getConfidence(): ProxyConfidence |
234 | { |
235 | return $this->container['confidence']; |
236 | } |
237 | |
238 | /** |
239 | * Sets confidence. |
240 | * |
241 | * @param ProxyConfidence $confidence confidence |
242 | * |
243 | * @return $this |
244 | */ |
245 | public function setConfidence(ProxyConfidence $confidence): self |
246 | { |
247 | $this->container['confidence'] = $confidence; |
248 | |
249 | return $this; |
250 | } |
251 | |
252 | /** |
253 | * Gets details. |
254 | */ |
255 | public function getDetails(): ?ProxyDetails |
256 | { |
257 | return $this->container['details']; |
258 | } |
259 | |
260 | /** |
261 | * Sets details. |
262 | * |
263 | * @param ?\Fingerprint\ServerAPI\Model\ProxyDetails $details details |
264 | * |
265 | * @return $this |
266 | */ |
267 | public function setDetails(?ProxyDetails $details): self |
268 | { |
269 | $this->container['details'] = $details; |
270 | |
271 | return $this; |
272 | } |
273 | |
274 | /** |
275 | * Returns true if offset exists. False otherwise. |
276 | * |
277 | * @param int $offset Offset |
278 | */ |
279 | public function offsetExists($offset): bool |
280 | { |
281 | return isset($this->container[$offset]); |
282 | } |
283 | |
284 | /** |
285 | * Gets offset. |
286 | * |
287 | * @param int $offset Offset |
288 | */ |
289 | public function offsetGet($offset): mixed |
290 | { |
291 | return isset($this->container[$offset]) ? $this->container[$offset] : null; |
292 | } |
293 | |
294 | /** |
295 | * Sets value based on offset. |
296 | * |
297 | * @param int $offset Offset |
298 | * @param mixed $value Value to be set |
299 | */ |
300 | public function offsetSet($offset, mixed $value): void |
301 | { |
302 | if (is_null($offset)) { |
303 | $this->container[] = $value; |
304 | } else { |
305 | $this->container[$offset] = $value; |
306 | } |
307 | } |
308 | |
309 | /** |
310 | * Unsets offset. |
311 | * |
312 | * @param int $offset Offset |
313 | */ |
314 | public function offsetUnset($offset): void |
315 | { |
316 | unset($this->container[$offset]); |
317 | } |
318 | |
319 | /** |
320 | * Gets the string presentation of the object in a pretty JSON format. |
321 | * |
322 | */ |
323 | public function toPrettyString(): string |
324 | { |
325 | return json_encode( |
326 | ObjectSerializer::sanitizeForSerialization($this), |
327 | JSON_PRETTY_PRINT |
328 | ); |
329 | } |
330 | } |