Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 27 |
|
0.00% |
0 / 19 |
CRAP | |
0.00% |
0 / 1 |
IPInfo | |
0.00% |
0 / 27 |
|
0.00% |
0 / 19 |
552 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
12 | |||
__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 / 1 |
|
0.00% |
0 / 1 |
2 | |||
valid | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getV4 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setV4 | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
getV6 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setV6 | |
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 | * IPInfo. |
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 | * IPInfo Class Doc Comment. |
34 | * |
35 | * @category Class |
36 | * |
37 | * @description Details about the request IP address. Has separate fields for v4 and v6 IP address versions. |
38 | * |
39 | * @author Swagger Codegen team |
40 | * |
41 | * @see https://github.com/swagger-api/swagger-codegen |
42 | */ |
43 | class IPInfo implements ModelInterface, \ArrayAccess |
44 | { |
45 | /** |
46 | * The original name of the model. |
47 | * |
48 | */ |
49 | protected static string $swaggerModelName = 'IPInfo'; |
50 | |
51 | /** |
52 | * Array of property to type mappings. Used for (de)serialization. |
53 | * |
54 | * @var string[] |
55 | */ |
56 | protected static array $swaggerTypes = [ |
57 | 'v4' => '\Fingerprint\ServerAPI\Model\IPInfoV4', |
58 | 'v6' => '\Fingerprint\ServerAPI\Model\IPInfoV6']; |
59 | |
60 | /** |
61 | * Array of property to format mappings. Used for (de)serialization. |
62 | * |
63 | * @var string[] |
64 | */ |
65 | protected static array $swaggerFormats = [ |
66 | 'v4' => null, |
67 | 'v6' => 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 | 'v4' => 'v4', |
77 | 'v6' => 'v6']; |
78 | |
79 | /** |
80 | * Array of attributes to setter functions (for deserialization of responses). |
81 | * |
82 | * @var string[] |
83 | */ |
84 | protected static array $setters = [ |
85 | 'v4' => 'setV4', |
86 | 'v6' => 'setV6']; |
87 | |
88 | /** |
89 | * Array of attributes to getter functions (for serialization of requests). |
90 | * |
91 | * @var string[] |
92 | */ |
93 | protected static array $getters = [ |
94 | 'v4' => 'getV4', |
95 | 'v6' => 'getV6']; |
96 | |
97 | /** |
98 | * Associative array for storing property values. |
99 | * |
100 | * @var mixed[] |
101 | */ |
102 | protected array $container = []; |
103 | |
104 | /** |
105 | * Constructor. |
106 | * |
107 | * @param mixed[] $data Associated array of property values |
108 | * initializing the model |
109 | */ |
110 | public function __construct(?array $data = null) |
111 | { |
112 | $this->container['v4'] = isset($data['v4']) ? $data['v4'] : null; |
113 | $this->container['v6'] = isset($data['v6']) ? $data['v6'] : null; |
114 | } |
115 | |
116 | /** |
117 | * Gets the string presentation of the object. |
118 | * |
119 | */ |
120 | public function __toString(): string |
121 | { |
122 | return json_encode(ObjectSerializer::sanitizeForSerialization($this)); |
123 | } |
124 | |
125 | /** |
126 | * Array of property to type mappings. Used for (de)serialization. |
127 | */ |
128 | public static function swaggerTypes(): array |
129 | { |
130 | return self::$swaggerTypes; |
131 | } |
132 | |
133 | /** |
134 | * Array of property to format mappings. Used for (de)serialization. |
135 | */ |
136 | public static function swaggerFormats(): array |
137 | { |
138 | return self::$swaggerFormats; |
139 | } |
140 | |
141 | /** |
142 | * Array of attributes where the key is the local name, |
143 | * and the value is the original name. |
144 | */ |
145 | public static function attributeMap(): array |
146 | { |
147 | return self::$attributeMap; |
148 | } |
149 | |
150 | /** |
151 | * Array of attributes to setter functions (for deserialization of responses). |
152 | */ |
153 | public static function setters(): array |
154 | { |
155 | return self::$setters; |
156 | } |
157 | |
158 | /** |
159 | * Array of attributes to getter functions (for serialization of requests). |
160 | */ |
161 | public static function getters(): array |
162 | { |
163 | return self::$getters; |
164 | } |
165 | |
166 | /** |
167 | * The original name of the model. |
168 | */ |
169 | public function getModelName(): string |
170 | { |
171 | return self::$swaggerModelName; |
172 | } |
173 | |
174 | /** |
175 | * Show all the invalid properties with reasons. |
176 | * |
177 | * @return array invalid properties with reasons |
178 | */ |
179 | public function listInvalidProperties(): array |
180 | { |
181 | return []; |
182 | } |
183 | |
184 | /** |
185 | * Validate all the properties in the model |
186 | * return true if all passed. |
187 | * |
188 | * @return bool True if all properties are valid |
189 | */ |
190 | public function valid(): bool |
191 | { |
192 | return 0 === count($this->listInvalidProperties()); |
193 | } |
194 | |
195 | /** |
196 | * Gets v4. |
197 | */ |
198 | public function getV4(): ?IPInfoV4 |
199 | { |
200 | return $this->container['v4']; |
201 | } |
202 | |
203 | /** |
204 | * Sets v4. |
205 | * |
206 | * @param ?\Fingerprint\ServerAPI\Model\IPInfoV4 $v4 v4 |
207 | * |
208 | * @return $this |
209 | */ |
210 | public function setV4(?IPInfoV4 $v4): self |
211 | { |
212 | $this->container['v4'] = $v4; |
213 | |
214 | return $this; |
215 | } |
216 | |
217 | /** |
218 | * Gets v6. |
219 | */ |
220 | public function getV6(): ?IPInfoV6 |
221 | { |
222 | return $this->container['v6']; |
223 | } |
224 | |
225 | /** |
226 | * Sets v6. |
227 | * |
228 | * @param ?\Fingerprint\ServerAPI\Model\IPInfoV6 $v6 v6 |
229 | * |
230 | * @return $this |
231 | */ |
232 | public function setV6(?IPInfoV6 $v6): self |
233 | { |
234 | $this->container['v6'] = $v6; |
235 | |
236 | return $this; |
237 | } |
238 | |
239 | /** |
240 | * Returns true if offset exists. False otherwise. |
241 | * |
242 | * @param int $offset Offset |
243 | */ |
244 | public function offsetExists($offset): bool |
245 | { |
246 | return isset($this->container[$offset]); |
247 | } |
248 | |
249 | /** |
250 | * Gets offset. |
251 | * |
252 | * @param int $offset Offset |
253 | */ |
254 | public function offsetGet($offset): mixed |
255 | { |
256 | return isset($this->container[$offset]) ? $this->container[$offset] : null; |
257 | } |
258 | |
259 | /** |
260 | * Sets value based on offset. |
261 | * |
262 | * @param int $offset Offset |
263 | * @param mixed $value Value to be set |
264 | */ |
265 | public function offsetSet($offset, mixed $value): void |
266 | { |
267 | if (is_null($offset)) { |
268 | $this->container[] = $value; |
269 | } else { |
270 | $this->container[$offset] = $value; |
271 | } |
272 | } |
273 | |
274 | /** |
275 | * Unsets offset. |
276 | * |
277 | * @param int $offset Offset |
278 | */ |
279 | public function offsetUnset($offset): void |
280 | { |
281 | unset($this->container[$offset]); |
282 | } |
283 | |
284 | /** |
285 | * Gets the string presentation of the object in a pretty JSON format. |
286 | * |
287 | */ |
288 | public function toPrettyString(): string |
289 | { |
290 | return json_encode( |
291 | ObjectSerializer::sanitizeForSerialization($this), |
292 | JSON_PRETTY_PRINT |
293 | ); |
294 | } |
295 | } |