Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
44.12% |
45 / 102 |
|
40.00% |
18 / 45 |
CRAP | |
0.00% |
0 / 1 |
| Visit | |
44.12% |
45 / 102 |
|
40.00% |
18 / 45 |
1002.97 | |
0.00% |
0 / 1 |
| __construct | |
100.00% |
15 / 15 |
|
100.00% |
1 / 1 |
16 | |||
| __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 / 24 |
|
0.00% |
0 / 1 |
156 | |||
| valid | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getRequestId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setRequestId | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| getBrowserDetails | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setBrowserDetails | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| getIncognito | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setIncognito | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| getIp | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setIp | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| getIpLocation | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setIpLocation | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| getLinkedId | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setLinkedId | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getTimestamp | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setTimestamp | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| getTime | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setTime | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| getUrl | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setUrl | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| getTag | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setTag | |
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 | |||
| getVisitorFound | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setVisitorFound | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| getFirstSeenAt | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setFirstSeenAt | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| getLastSeenAt | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setLastSeenAt | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| getComponents | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setComponents | |
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 | * Visit. |
| 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 | * Visit 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 Visit implements ModelInterface, \ArrayAccess |
| 42 | { |
| 43 | /** |
| 44 | * The original name of the model. |
| 45 | * |
| 46 | */ |
| 47 | protected static string $swaggerModelName = 'Visit'; |
| 48 | |
| 49 | /** |
| 50 | * Array of property to type mappings. Used for (de)serialization. |
| 51 | * |
| 52 | * @var string[] |
| 53 | */ |
| 54 | protected static array $swaggerTypes = [ |
| 55 | 'request_id' => 'string', |
| 56 | 'browser_details' => '\Fingerprint\ServerAPI\Model\BrowserDetails', |
| 57 | 'incognito' => 'bool', |
| 58 | 'ip' => 'string', |
| 59 | 'ip_location' => '\Fingerprint\ServerAPI\Model\DeprecatedGeolocation', |
| 60 | 'linked_id' => 'string', |
| 61 | 'timestamp' => 'int', |
| 62 | 'time' => '\DateTime', |
| 63 | 'url' => 'string', |
| 64 | 'tag' => 'array', |
| 65 | 'confidence' => '\Fingerprint\ServerAPI\Model\IdentificationConfidence', |
| 66 | 'visitor_found' => 'bool', |
| 67 | 'first_seen_at' => '\Fingerprint\ServerAPI\Model\IdentificationSeenAt', |
| 68 | 'last_seen_at' => '\Fingerprint\ServerAPI\Model\IdentificationSeenAt', |
| 69 | 'components' => 'array']; |
| 70 | |
| 71 | /** |
| 72 | * Array of property to format mappings. Used for (de)serialization. |
| 73 | * |
| 74 | * @var string[] |
| 75 | */ |
| 76 | protected static array $swaggerFormats = [ |
| 77 | 'request_id' => null, |
| 78 | 'browser_details' => null, |
| 79 | 'incognito' => null, |
| 80 | 'ip' => null, |
| 81 | 'ip_location' => null, |
| 82 | 'linked_id' => null, |
| 83 | 'timestamp' => 'int64', |
| 84 | 'time' => 'date-time', |
| 85 | 'url' => null, |
| 86 | 'tag' => null, |
| 87 | 'confidence' => null, |
| 88 | 'visitor_found' => null, |
| 89 | 'first_seen_at' => null, |
| 90 | 'last_seen_at' => null, |
| 91 | 'components' => null]; |
| 92 | |
| 93 | /** |
| 94 | * Array of attributes where the key is the local name, |
| 95 | * and the value is the original name. |
| 96 | * |
| 97 | * @var string[] |
| 98 | */ |
| 99 | protected static array $attributeMap = [ |
| 100 | 'request_id' => 'requestId', |
| 101 | 'browser_details' => 'browserDetails', |
| 102 | 'incognito' => 'incognito', |
| 103 | 'ip' => 'ip', |
| 104 | 'ip_location' => 'ipLocation', |
| 105 | 'linked_id' => 'linkedId', |
| 106 | 'timestamp' => 'timestamp', |
| 107 | 'time' => 'time', |
| 108 | 'url' => 'url', |
| 109 | 'tag' => 'tag', |
| 110 | 'confidence' => 'confidence', |
| 111 | 'visitor_found' => 'visitorFound', |
| 112 | 'first_seen_at' => 'firstSeenAt', |
| 113 | 'last_seen_at' => 'lastSeenAt', |
| 114 | 'components' => 'components']; |
| 115 | |
| 116 | /** |
| 117 | * Array of attributes to setter functions (for deserialization of responses). |
| 118 | * |
| 119 | * @var string[] |
| 120 | */ |
| 121 | protected static array $setters = [ |
| 122 | 'request_id' => 'setRequestId', |
| 123 | 'browser_details' => 'setBrowserDetails', |
| 124 | 'incognito' => 'setIncognito', |
| 125 | 'ip' => 'setIp', |
| 126 | 'ip_location' => 'setIpLocation', |
| 127 | 'linked_id' => 'setLinkedId', |
| 128 | 'timestamp' => 'setTimestamp', |
| 129 | 'time' => 'setTime', |
| 130 | 'url' => 'setUrl', |
| 131 | 'tag' => 'setTag', |
| 132 | 'confidence' => 'setConfidence', |
| 133 | 'visitor_found' => 'setVisitorFound', |
| 134 | 'first_seen_at' => 'setFirstSeenAt', |
| 135 | 'last_seen_at' => 'setLastSeenAt', |
| 136 | 'components' => 'setComponents']; |
| 137 | |
| 138 | /** |
| 139 | * Array of attributes to getter functions (for serialization of requests). |
| 140 | * |
| 141 | * @var string[] |
| 142 | */ |
| 143 | protected static array $getters = [ |
| 144 | 'request_id' => 'getRequestId', |
| 145 | 'browser_details' => 'getBrowserDetails', |
| 146 | 'incognito' => 'getIncognito', |
| 147 | 'ip' => 'getIp', |
| 148 | 'ip_location' => 'getIpLocation', |
| 149 | 'linked_id' => 'getLinkedId', |
| 150 | 'timestamp' => 'getTimestamp', |
| 151 | 'time' => 'getTime', |
| 152 | 'url' => 'getUrl', |
| 153 | 'tag' => 'getTag', |
| 154 | 'confidence' => 'getConfidence', |
| 155 | 'visitor_found' => 'getVisitorFound', |
| 156 | 'first_seen_at' => 'getFirstSeenAt', |
| 157 | 'last_seen_at' => 'getLastSeenAt', |
| 158 | 'components' => 'getComponents']; |
| 159 | |
| 160 | /** |
| 161 | * Associative array for storing property values. |
| 162 | * |
| 163 | * @var mixed[] |
| 164 | */ |
| 165 | protected array $container = []; |
| 166 | |
| 167 | /** |
| 168 | * Constructor. |
| 169 | * |
| 170 | * @param mixed[] $data Associated array of property values |
| 171 | * initializing the model |
| 172 | */ |
| 173 | public function __construct(?array $data = null) |
| 174 | { |
| 175 | $this->container['request_id'] = isset($data['request_id']) ? $data['request_id'] : null; |
| 176 | $this->container['browser_details'] = isset($data['browser_details']) ? $data['browser_details'] : null; |
| 177 | $this->container['incognito'] = isset($data['incognito']) ? $data['incognito'] : null; |
| 178 | $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; |
| 179 | $this->container['ip_location'] = isset($data['ip_location']) ? $data['ip_location'] : null; |
| 180 | $this->container['linked_id'] = isset($data['linked_id']) ? $data['linked_id'] : null; |
| 181 | $this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null; |
| 182 | $this->container['time'] = isset($data['time']) ? $data['time'] : null; |
| 183 | $this->container['url'] = isset($data['url']) ? $data['url'] : null; |
| 184 | $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; |
| 185 | $this->container['confidence'] = isset($data['confidence']) ? $data['confidence'] : null; |
| 186 | $this->container['visitor_found'] = isset($data['visitor_found']) ? $data['visitor_found'] : null; |
| 187 | $this->container['first_seen_at'] = isset($data['first_seen_at']) ? $data['first_seen_at'] : null; |
| 188 | $this->container['last_seen_at'] = isset($data['last_seen_at']) ? $data['last_seen_at'] : null; |
| 189 | $this->container['components'] = isset($data['components']) ? $data['components'] : null; |
| 190 | } |
| 191 | |
| 192 | /** |
| 193 | * Gets the string presentation of the object. |
| 194 | * |
| 195 | */ |
| 196 | public function __toString(): string |
| 197 | { |
| 198 | return json_encode(ObjectSerializer::sanitizeForSerialization($this)); |
| 199 | } |
| 200 | |
| 201 | /** |
| 202 | * Array of property to type mappings. Used for (de)serialization. |
| 203 | */ |
| 204 | public static function swaggerTypes(): array |
| 205 | { |
| 206 | return self::$swaggerTypes; |
| 207 | } |
| 208 | |
| 209 | /** |
| 210 | * Array of property to format mappings. Used for (de)serialization. |
| 211 | */ |
| 212 | public static function swaggerFormats(): array |
| 213 | { |
| 214 | return self::$swaggerFormats; |
| 215 | } |
| 216 | |
| 217 | /** |
| 218 | * Array of attributes where the key is the local name, |
| 219 | * and the value is the original name. |
| 220 | */ |
| 221 | public static function attributeMap(): array |
| 222 | { |
| 223 | return self::$attributeMap; |
| 224 | } |
| 225 | |
| 226 | /** |
| 227 | * Array of attributes to setter functions (for deserialization of responses). |
| 228 | */ |
| 229 | public static function setters(): array |
| 230 | { |
| 231 | return self::$setters; |
| 232 | } |
| 233 | |
| 234 | /** |
| 235 | * Array of attributes to getter functions (for serialization of requests). |
| 236 | */ |
| 237 | public static function getters(): array |
| 238 | { |
| 239 | return self::$getters; |
| 240 | } |
| 241 | |
| 242 | /** |
| 243 | * The original name of the model. |
| 244 | */ |
| 245 | public function getModelName(): string |
| 246 | { |
| 247 | return self::$swaggerModelName; |
| 248 | } |
| 249 | |
| 250 | /** |
| 251 | * Show all the invalid properties with reasons. |
| 252 | * |
| 253 | * @return array invalid properties with reasons |
| 254 | */ |
| 255 | public function listInvalidProperties(): array |
| 256 | { |
| 257 | $invalidProperties = []; |
| 258 | |
| 259 | if (null === $this->container['request_id']) { |
| 260 | $invalidProperties[] = "'request_id' can't be null"; |
| 261 | } |
| 262 | if (null === $this->container['browser_details']) { |
| 263 | $invalidProperties[] = "'browser_details' can't be null"; |
| 264 | } |
| 265 | if (null === $this->container['incognito']) { |
| 266 | $invalidProperties[] = "'incognito' can't be null"; |
| 267 | } |
| 268 | if (null === $this->container['ip']) { |
| 269 | $invalidProperties[] = "'ip' can't be null"; |
| 270 | } |
| 271 | if (null === $this->container['timestamp']) { |
| 272 | $invalidProperties[] = "'timestamp' can't be null"; |
| 273 | } |
| 274 | if (null === $this->container['time']) { |
| 275 | $invalidProperties[] = "'time' can't be null"; |
| 276 | } |
| 277 | if (null === $this->container['url']) { |
| 278 | $invalidProperties[] = "'url' can't be null"; |
| 279 | } |
| 280 | if (null === $this->container['tag']) { |
| 281 | $invalidProperties[] = "'tag' can't be null"; |
| 282 | } |
| 283 | if (null === $this->container['visitor_found']) { |
| 284 | $invalidProperties[] = "'visitor_found' can't be null"; |
| 285 | } |
| 286 | if (null === $this->container['first_seen_at']) { |
| 287 | $invalidProperties[] = "'first_seen_at' can't be null"; |
| 288 | } |
| 289 | if (null === $this->container['last_seen_at']) { |
| 290 | $invalidProperties[] = "'last_seen_at' can't be null"; |
| 291 | } |
| 292 | |
| 293 | return $invalidProperties; |
| 294 | } |
| 295 | |
| 296 | /** |
| 297 | * Validate all the properties in the model |
| 298 | * return true if all passed. |
| 299 | * |
| 300 | * @return bool True if all properties are valid |
| 301 | */ |
| 302 | public function valid(): bool |
| 303 | { |
| 304 | return 0 === count($this->listInvalidProperties()); |
| 305 | } |
| 306 | |
| 307 | /** |
| 308 | * Gets request_id. |
| 309 | */ |
| 310 | public function getRequestId(): string |
| 311 | { |
| 312 | return $this->container['request_id']; |
| 313 | } |
| 314 | |
| 315 | /** |
| 316 | * Sets request_id. |
| 317 | * |
| 318 | * @param string $request_id unique identifier of the user's request |
| 319 | * |
| 320 | * @return $this |
| 321 | */ |
| 322 | public function setRequestId(string $request_id): self |
| 323 | { |
| 324 | $this->container['request_id'] = $request_id; |
| 325 | |
| 326 | return $this; |
| 327 | } |
| 328 | |
| 329 | /** |
| 330 | * Gets browser_details. |
| 331 | */ |
| 332 | public function getBrowserDetails(): BrowserDetails |
| 333 | { |
| 334 | return $this->container['browser_details']; |
| 335 | } |
| 336 | |
| 337 | /** |
| 338 | * Sets browser_details. |
| 339 | * |
| 340 | * @param BrowserDetails $browser_details browser_details |
| 341 | * |
| 342 | * @return $this |
| 343 | */ |
| 344 | public function setBrowserDetails(BrowserDetails $browser_details): self |
| 345 | { |
| 346 | $this->container['browser_details'] = $browser_details; |
| 347 | |
| 348 | return $this; |
| 349 | } |
| 350 | |
| 351 | /** |
| 352 | * Gets incognito. |
| 353 | */ |
| 354 | public function getIncognito(): bool |
| 355 | { |
| 356 | return $this->container['incognito']; |
| 357 | } |
| 358 | |
| 359 | /** |
| 360 | * Sets incognito. |
| 361 | * |
| 362 | * @param bool $incognito flag if user used incognito session |
| 363 | * |
| 364 | * @return $this |
| 365 | */ |
| 366 | public function setIncognito(bool $incognito): self |
| 367 | { |
| 368 | $this->container['incognito'] = $incognito; |
| 369 | |
| 370 | return $this; |
| 371 | } |
| 372 | |
| 373 | /** |
| 374 | * Gets ip. |
| 375 | */ |
| 376 | public function getIp(): string |
| 377 | { |
| 378 | return $this->container['ip']; |
| 379 | } |
| 380 | |
| 381 | /** |
| 382 | * Sets ip. |
| 383 | * |
| 384 | * @param string $ip IP address of the requesting browser or bot |
| 385 | * |
| 386 | * @return $this |
| 387 | */ |
| 388 | public function setIp(string $ip): self |
| 389 | { |
| 390 | $this->container['ip'] = $ip; |
| 391 | |
| 392 | return $this; |
| 393 | } |
| 394 | |
| 395 | /** |
| 396 | * Gets ip_location. |
| 397 | */ |
| 398 | public function getIpLocation(): ?DeprecatedGeolocation |
| 399 | { |
| 400 | return $this->container['ip_location']; |
| 401 | } |
| 402 | |
| 403 | /** |
| 404 | * Sets ip_location. |
| 405 | * |
| 406 | * @param ?\Fingerprint\ServerAPI\Model\DeprecatedGeolocation $ip_location ip_location |
| 407 | * |
| 408 | * @return $this |
| 409 | */ |
| 410 | public function setIpLocation(?DeprecatedGeolocation $ip_location): self |
| 411 | { |
| 412 | $this->container['ip_location'] = $ip_location; |
| 413 | |
| 414 | return $this; |
| 415 | } |
| 416 | |
| 417 | /** |
| 418 | * Gets linked_id. |
| 419 | */ |
| 420 | public function getLinkedId(): ?string |
| 421 | { |
| 422 | return $this->container['linked_id']; |
| 423 | } |
| 424 | |
| 425 | /** |
| 426 | * Sets linked_id. |
| 427 | * |
| 428 | * @param ?string $linked_id a customer-provided id that was sent with the request |
| 429 | * |
| 430 | * @return $this |
| 431 | */ |
| 432 | public function setLinkedId(?string $linked_id): self |
| 433 | { |
| 434 | $this->container['linked_id'] = $linked_id; |
| 435 | |
| 436 | return $this; |
| 437 | } |
| 438 | |
| 439 | /** |
| 440 | * Gets timestamp. |
| 441 | */ |
| 442 | public function getTimestamp(): int |
| 443 | { |
| 444 | return $this->container['timestamp']; |
| 445 | } |
| 446 | |
| 447 | /** |
| 448 | * Sets timestamp. |
| 449 | * |
| 450 | * @param int $timestamp timestamp of the event with millisecond precision in Unix time |
| 451 | * |
| 452 | * @return $this |
| 453 | */ |
| 454 | public function setTimestamp(int $timestamp): self |
| 455 | { |
| 456 | $this->container['timestamp'] = $timestamp; |
| 457 | |
| 458 | return $this; |
| 459 | } |
| 460 | |
| 461 | /** |
| 462 | * Gets time. |
| 463 | */ |
| 464 | public function getTime(): \DateTime |
| 465 | { |
| 466 | return $this->container['time']; |
| 467 | } |
| 468 | |
| 469 | /** |
| 470 | * Sets time. |
| 471 | * |
| 472 | * @param \DateTime $time Time expressed according to ISO 8601 in UTC format, when the request from the client agent was made. We recommend to treat requests that are older than 2 minutes as malicious. Otherwise, request replay attacks are possible. |
| 473 | * |
| 474 | * @return $this |
| 475 | */ |
| 476 | public function setTime(\DateTime $time): self |
| 477 | { |
| 478 | $this->container['time'] = $time; |
| 479 | |
| 480 | return $this; |
| 481 | } |
| 482 | |
| 483 | /** |
| 484 | * Gets url. |
| 485 | */ |
| 486 | public function getUrl(): string |
| 487 | { |
| 488 | return $this->container['url']; |
| 489 | } |
| 490 | |
| 491 | /** |
| 492 | * Sets url. |
| 493 | * |
| 494 | * @param string $url page URL from which the request was sent |
| 495 | * |
| 496 | * @return $this |
| 497 | */ |
| 498 | public function setUrl(string $url): self |
| 499 | { |
| 500 | $this->container['url'] = $url; |
| 501 | |
| 502 | return $this; |
| 503 | } |
| 504 | |
| 505 | /** |
| 506 | * Gets tag. |
| 507 | */ |
| 508 | public function getTag(): array |
| 509 | { |
| 510 | return $this->container['tag']; |
| 511 | } |
| 512 | |
| 513 | /** |
| 514 | * Sets tag. |
| 515 | * |
| 516 | * @param array $tag tag |
| 517 | * |
| 518 | * @return $this |
| 519 | */ |
| 520 | public function setTag(array $tag): self |
| 521 | { |
| 522 | $this->container['tag'] = $tag; |
| 523 | |
| 524 | return $this; |
| 525 | } |
| 526 | |
| 527 | /** |
| 528 | * Gets confidence. |
| 529 | */ |
| 530 | public function getConfidence(): ?IdentificationConfidence |
| 531 | { |
| 532 | return $this->container['confidence']; |
| 533 | } |
| 534 | |
| 535 | /** |
| 536 | * Sets confidence. |
| 537 | * |
| 538 | * @param ?\Fingerprint\ServerAPI\Model\IdentificationConfidence $confidence confidence |
| 539 | * |
| 540 | * @return $this |
| 541 | */ |
| 542 | public function setConfidence(?IdentificationConfidence $confidence): self |
| 543 | { |
| 544 | $this->container['confidence'] = $confidence; |
| 545 | |
| 546 | return $this; |
| 547 | } |
| 548 | |
| 549 | /** |
| 550 | * Gets visitor_found. |
| 551 | */ |
| 552 | public function getVisitorFound(): bool |
| 553 | { |
| 554 | return $this->container['visitor_found']; |
| 555 | } |
| 556 | |
| 557 | /** |
| 558 | * Sets visitor_found. |
| 559 | * |
| 560 | * @param bool $visitor_found attribute represents if a visitor had been identified before |
| 561 | * |
| 562 | * @return $this |
| 563 | */ |
| 564 | public function setVisitorFound(bool $visitor_found): self |
| 565 | { |
| 566 | $this->container['visitor_found'] = $visitor_found; |
| 567 | |
| 568 | return $this; |
| 569 | } |
| 570 | |
| 571 | /** |
| 572 | * Gets first_seen_at. |
| 573 | */ |
| 574 | public function getFirstSeenAt(): IdentificationSeenAt |
| 575 | { |
| 576 | return $this->container['first_seen_at']; |
| 577 | } |
| 578 | |
| 579 | /** |
| 580 | * Sets first_seen_at. |
| 581 | * |
| 582 | * @param IdentificationSeenAt $first_seen_at first_seen_at |
| 583 | * |
| 584 | * @return $this |
| 585 | */ |
| 586 | public function setFirstSeenAt(IdentificationSeenAt $first_seen_at): self |
| 587 | { |
| 588 | $this->container['first_seen_at'] = $first_seen_at; |
| 589 | |
| 590 | return $this; |
| 591 | } |
| 592 | |
| 593 | /** |
| 594 | * Gets last_seen_at. |
| 595 | */ |
| 596 | public function getLastSeenAt(): IdentificationSeenAt |
| 597 | { |
| 598 | return $this->container['last_seen_at']; |
| 599 | } |
| 600 | |
| 601 | /** |
| 602 | * Sets last_seen_at. |
| 603 | * |
| 604 | * @param IdentificationSeenAt $last_seen_at last_seen_at |
| 605 | * |
| 606 | * @return $this |
| 607 | */ |
| 608 | public function setLastSeenAt(IdentificationSeenAt $last_seen_at): self |
| 609 | { |
| 610 | $this->container['last_seen_at'] = $last_seen_at; |
| 611 | |
| 612 | return $this; |
| 613 | } |
| 614 | |
| 615 | /** |
| 616 | * Gets components. |
| 617 | */ |
| 618 | public function getComponents(): ?array |
| 619 | { |
| 620 | return $this->container['components']; |
| 621 | } |
| 622 | |
| 623 | /** |
| 624 | * Sets components. |
| 625 | * |
| 626 | * @param ?array $components components |
| 627 | * |
| 628 | * @return $this |
| 629 | */ |
| 630 | public function setComponents(?array $components): self |
| 631 | { |
| 632 | $this->container['components'] = $components; |
| 633 | |
| 634 | return $this; |
| 635 | } |
| 636 | |
| 637 | /** |
| 638 | * Returns true if offset exists. False otherwise. |
| 639 | * |
| 640 | * @param int $offset Offset |
| 641 | */ |
| 642 | public function offsetExists($offset): bool |
| 643 | { |
| 644 | return isset($this->container[$offset]); |
| 645 | } |
| 646 | |
| 647 | /** |
| 648 | * Gets offset. |
| 649 | * |
| 650 | * @param int $offset Offset |
| 651 | */ |
| 652 | public function offsetGet($offset): mixed |
| 653 | { |
| 654 | return isset($this->container[$offset]) ? $this->container[$offset] : null; |
| 655 | } |
| 656 | |
| 657 | /** |
| 658 | * Sets value based on offset. |
| 659 | * |
| 660 | * @param int $offset Offset |
| 661 | * @param mixed $value Value to be set |
| 662 | */ |
| 663 | public function offsetSet($offset, mixed $value): void |
| 664 | { |
| 665 | if (is_null($offset)) { |
| 666 | $this->container[] = $value; |
| 667 | } else { |
| 668 | $this->container[$offset] = $value; |
| 669 | } |
| 670 | } |
| 671 | |
| 672 | /** |
| 673 | * Unsets offset. |
| 674 | * |
| 675 | * @param int $offset Offset |
| 676 | */ |
| 677 | public function offsetUnset($offset): void |
| 678 | { |
| 679 | unset($this->container[$offset]); |
| 680 | } |
| 681 | |
| 682 | /** |
| 683 | * Gets the string presentation of the object in a pretty JSON format. |
| 684 | * |
| 685 | */ |
| 686 | public function toPrettyString(): string |
| 687 | { |
| 688 | return json_encode( |
| 689 | ObjectSerializer::sanitizeForSerialization($this), |
| 690 | JSON_PRETTY_PRINT |
| 691 | ); |
| 692 | } |
| 693 | } |