Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
23.53% |
8 / 34 |
|
23.81% |
5 / 21 |
CRAP | |
0.00% |
0 / 1 |
IdentificationConfidence | |
23.53% |
8 / 34 |
|
23.81% |
5 / 21 |
352.99 | |
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 / 4 |
|
0.00% |
0 / 1 |
6 | |||
valid | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getScore | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setScore | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
getRevision | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setRevision | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
getComment | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setComment | |
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 | * IdentificationConfidence. |
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 | * IdentificationConfidence 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 IdentificationConfidence implements ModelInterface, \ArrayAccess |
42 | { |
43 | /** |
44 | * The original name of the model. |
45 | * |
46 | */ |
47 | protected static string $swaggerModelName = 'IdentificationConfidence'; |
48 | |
49 | /** |
50 | * Array of property to type mappings. Used for (de)serialization. |
51 | * |
52 | * @var string[] |
53 | */ |
54 | protected static array $swaggerTypes = [ |
55 | 'score' => 'double', |
56 | 'revision' => 'string', |
57 | 'comment' => 'string']; |
58 | |
59 | /** |
60 | * Array of property to format mappings. Used for (de)serialization. |
61 | * |
62 | * @var string[] |
63 | */ |
64 | protected static array $swaggerFormats = [ |
65 | 'score' => 'double', |
66 | 'revision' => null, |
67 | 'comment' => 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 | 'score' => 'score', |
77 | 'revision' => 'revision', |
78 | 'comment' => 'comment']; |
79 | |
80 | /** |
81 | * Array of attributes to setter functions (for deserialization of responses). |
82 | * |
83 | * @var string[] |
84 | */ |
85 | protected static array $setters = [ |
86 | 'score' => 'setScore', |
87 | 'revision' => 'setRevision', |
88 | 'comment' => 'setComment']; |
89 | |
90 | /** |
91 | * Array of attributes to getter functions (for serialization of requests). |
92 | * |
93 | * @var string[] |
94 | */ |
95 | protected static array $getters = [ |
96 | 'score' => 'getScore', |
97 | 'revision' => 'getRevision', |
98 | 'comment' => 'getComment']; |
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['score'] = isset($data['score']) ? $data['score'] : null; |
116 | $this->container['revision'] = isset($data['revision']) ? $data['revision'] : null; |
117 | $this->container['comment'] = isset($data['comment']) ? $data['comment'] : 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['score']) { |
188 | $invalidProperties[] = "'score' can't be null"; |
189 | } |
190 | |
191 | return $invalidProperties; |
192 | } |
193 | |
194 | /** |
195 | * Validate all the properties in the model |
196 | * return true if all passed. |
197 | * |
198 | * @return bool True if all properties are valid |
199 | */ |
200 | public function valid(): bool |
201 | { |
202 | return 0 === count($this->listInvalidProperties()); |
203 | } |
204 | |
205 | /** |
206 | * Gets score. |
207 | */ |
208 | public function getScore(): float |
209 | { |
210 | return $this->container['score']; |
211 | } |
212 | |
213 | /** |
214 | * Sets score. |
215 | * |
216 | * @param float $score the confidence score is a floating-point number between 0 and 1 that represents the probability of accurate identification |
217 | * |
218 | * @return $this |
219 | */ |
220 | public function setScore(float $score): self |
221 | { |
222 | $this->container['score'] = $score; |
223 | |
224 | return $this; |
225 | } |
226 | |
227 | /** |
228 | * Gets revision. |
229 | */ |
230 | public function getRevision(): ?string |
231 | { |
232 | return $this->container['revision']; |
233 | } |
234 | |
235 | /** |
236 | * Sets revision. |
237 | * |
238 | * @param ?string $revision The revision name of the method used to calculate the Confidence score. This field is only present for customers who opted in to an alternative calculation method. |
239 | * |
240 | * @return $this |
241 | */ |
242 | public function setRevision(?string $revision): self |
243 | { |
244 | $this->container['revision'] = $revision; |
245 | |
246 | return $this; |
247 | } |
248 | |
249 | /** |
250 | * Gets comment. |
251 | */ |
252 | public function getComment(): ?string |
253 | { |
254 | return $this->container['comment']; |
255 | } |
256 | |
257 | /** |
258 | * Sets comment. |
259 | * |
260 | * @param ?string $comment comment |
261 | * |
262 | * @return $this |
263 | */ |
264 | public function setComment(?string $comment): self |
265 | { |
266 | $this->container['comment'] = $comment; |
267 | |
268 | return $this; |
269 | } |
270 | |
271 | /** |
272 | * Returns true if offset exists. False otherwise. |
273 | * |
274 | * @param int $offset Offset |
275 | */ |
276 | public function offsetExists($offset): bool |
277 | { |
278 | return isset($this->container[$offset]); |
279 | } |
280 | |
281 | /** |
282 | * Gets offset. |
283 | * |
284 | * @param int $offset Offset |
285 | */ |
286 | public function offsetGet($offset): mixed |
287 | { |
288 | return isset($this->container[$offset]) ? $this->container[$offset] : null; |
289 | } |
290 | |
291 | /** |
292 | * Sets value based on offset. |
293 | * |
294 | * @param int $offset Offset |
295 | * @param mixed $value Value to be set |
296 | */ |
297 | public function offsetSet($offset, mixed $value): void |
298 | { |
299 | if (is_null($offset)) { |
300 | $this->container[] = $value; |
301 | } else { |
302 | $this->container[$offset] = $value; |
303 | } |
304 | } |
305 | |
306 | /** |
307 | * Unsets offset. |
308 | * |
309 | * @param int $offset Offset |
310 | */ |
311 | public function offsetUnset($offset): void |
312 | { |
313 | unset($this->container[$offset]); |
314 | } |
315 | |
316 | /** |
317 | * Gets the string presentation of the object in a pretty JSON format. |
318 | * |
319 | */ |
320 | public function toPrettyString(): string |
321 | { |
322 | return json_encode( |
323 | ObjectSerializer::sanitizeForSerialization($this), |
324 | JSON_PRETTY_PRINT |
325 | ); |
326 | } |
327 | } |