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