Coverage for fingerprint_pro_server_api_sdk/models/identification.py: 91%
212 statements
« prev ^ index » next coverage.py v7.10.6, created at 2025-09-15 16:20 +0000
« prev ^ index » next coverage.py v7.10.6, created at 2025-09-15 16:20 +0000
1# coding: utf-8
3"""
4 Fingerprint Server API
6 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. # noqa: E501
8 OpenAPI spec version: 3
9 Contact: support@fingerprint.com
10 Generated by: https://github.com/swagger-api/swagger-codegen.git
11"""
13import re # noqa: F401
14from typing import Dict, List, Optional # noqa: F401
15from fingerprint_pro_server_api_sdk.base_model import BaseModel
16from fingerprint_pro_server_api_sdk.models.browser_details import BrowserDetails
17from fingerprint_pro_server_api_sdk.models.deprecated_geolocation import DeprecatedGeolocation
18from datetime import datetime
19from fingerprint_pro_server_api_sdk.models.tag import Tag
20from fingerprint_pro_server_api_sdk.models.identification_confidence import IdentificationConfidence
21from fingerprint_pro_server_api_sdk.models.identification_seen_at import IdentificationSeenAt
22from fingerprint_pro_server_api_sdk.models.identification_seen_at import IdentificationSeenAt
23from fingerprint_pro_server_api_sdk.models.raw_device_attributes import RawDeviceAttributes
24from fingerprint_pro_server_api_sdk.models.sdk import SDK
27class Identification(BaseModel):
28 """NOTE: This class is auto generated by the swagger code generator program.
30 Do not edit the class manually.
31 """
32 """
33 Attributes:
34 swagger_types (dict): The key is attribute name
35 and the value is attribute type.
36 attribute_map (dict): The key is attribute name
37 and the value is json key in definition.
38 """
39 swagger_types = {
40 'visitor_id': 'str',
41 'request_id': 'str',
42 'browser_details': 'BrowserDetails',
43 'incognito': 'bool',
44 'ip': 'str',
45 'ip_location': 'DeprecatedGeolocation',
46 'linked_id': 'str',
47 'suspect': 'bool',
48 'timestamp': 'int',
49 'time': 'datetime',
50 'url': 'str',
51 'tag': 'Tag',
52 'confidence': 'IdentificationConfidence',
53 'visitor_found': 'bool',
54 'first_seen_at': 'IdentificationSeenAt',
55 'last_seen_at': 'IdentificationSeenAt',
56 'components': 'RawDeviceAttributes',
57 'replayed': 'bool',
58 'sdk': 'SDK',
59 'environment_id': 'str'
60 }
62 nullable_map = {
63 'visitor_id': False,
64 'request_id': False,
65 'browser_details': False,
66 'incognito': False,
67 'ip': False,
68 'ip_location': False,
69 'linked_id': False,
70 'suspect': False,
71 'timestamp': False,
72 'time': False,
73 'url': False,
74 'tag': False,
75 'confidence': False,
76 'visitor_found': False,
77 'first_seen_at': False,
78 'last_seen_at': False,
79 'components': False,
80 'replayed': False,
81 'sdk': False,
82 'environment_id': False
83 }
85 attribute_map = {
86 'visitor_id': 'visitorId',
87 'request_id': 'requestId',
88 'browser_details': 'browserDetails',
89 'incognito': 'incognito',
90 'ip': 'ip',
91 'ip_location': 'ipLocation',
92 'linked_id': 'linkedId',
93 'suspect': 'suspect',
94 'timestamp': 'timestamp',
95 'time': 'time',
96 'url': 'url',
97 'tag': 'tag',
98 'confidence': 'confidence',
99 'visitor_found': 'visitorFound',
100 'first_seen_at': 'firstSeenAt',
101 'last_seen_at': 'lastSeenAt',
102 'components': 'components',
103 'replayed': 'replayed',
104 'sdk': 'sdk',
105 'environment_id': 'environmentId'
106 }
108 def __init__(self, visitor_id=None, request_id=None, browser_details=None, incognito=None, ip=None, ip_location=None, linked_id=None, suspect=None, timestamp=None, time=None, url=None, tag=None, confidence=None, visitor_found=None, first_seen_at=None, last_seen_at=None, components=None, replayed=None, sdk=None, environment_id=None): # noqa: E501
109 """Identification - a model defined in Swagger""" # noqa: E501
110 self._visitor_id = None
111 self._request_id = None
112 self._browser_details = None
113 self._incognito = None
114 self._ip = None
115 self._ip_location = None
116 self._linked_id = None
117 self._suspect = None
118 self._timestamp = None
119 self._time = None
120 self._url = None
121 self._tag = None
122 self._confidence = None
123 self._visitor_found = None
124 self._first_seen_at = None
125 self._last_seen_at = None
126 self._components = None
127 self._replayed = None
128 self._sdk = None
129 self._environment_id = None
130 self.discriminator = None
131 self.visitor_id = visitor_id
132 self.request_id = request_id
133 self.browser_details = browser_details
134 self.incognito = incognito
135 self.ip = ip
136 if ip_location is not None:
137 self.ip_location = ip_location
138 if linked_id is not None:
139 self.linked_id = linked_id
140 if suspect is not None:
141 self.suspect = suspect
142 self.timestamp = timestamp
143 self.time = time
144 self.url = url
145 self.tag = tag
146 if confidence is not None:
147 self.confidence = confidence
148 self.visitor_found = visitor_found
149 self.first_seen_at = first_seen_at
150 self.last_seen_at = last_seen_at
151 if components is not None:
152 self.components = components
153 self.replayed = replayed
154 if sdk is not None:
155 self.sdk = sdk
156 if environment_id is not None:
157 self.environment_id = environment_id
159 @property
160 def visitor_id(self) -> str:
161 """Gets the visitor_id of this Identification. # noqa: E501
163 String of 20 characters that uniquely identifies the visitor's browser or mobile device. # noqa: E501
165 :return: The visitor_id of this Identification. # noqa: E501
166 """
167 return self._visitor_id
169 @visitor_id.setter
170 def visitor_id(self, visitor_id: str):
171 """Sets the visitor_id of this Identification.
173 String of 20 characters that uniquely identifies the visitor's browser or mobile device. # noqa: E501
175 :param visitor_id: The visitor_id of this Identification. # noqa: E501
176 """
177 if visitor_id is None:
178 raise ValueError("Invalid value for `visitor_id`, must not be `None`") # noqa: E501
180 self._visitor_id = visitor_id
182 @property
183 def request_id(self) -> str:
184 """Gets the request_id of this Identification. # noqa: E501
186 Unique identifier of the user's request. # noqa: E501
188 :return: The request_id of this Identification. # noqa: E501
189 """
190 return self._request_id
192 @request_id.setter
193 def request_id(self, request_id: str):
194 """Sets the request_id of this Identification.
196 Unique identifier of the user's request. # noqa: E501
198 :param request_id: The request_id of this Identification. # noqa: E501
199 """
200 if request_id is None:
201 raise ValueError("Invalid value for `request_id`, must not be `None`") # noqa: E501
203 self._request_id = request_id
205 @property
206 def browser_details(self) -> BrowserDetails:
207 """Gets the browser_details of this Identification. # noqa: E501
210 :return: The browser_details of this Identification. # noqa: E501
211 """
212 return self._browser_details
214 @browser_details.setter
215 def browser_details(self, browser_details: BrowserDetails):
216 """Sets the browser_details of this Identification.
219 :param browser_details: The browser_details of this Identification. # noqa: E501
220 """
221 if browser_details is None:
222 raise ValueError("Invalid value for `browser_details`, must not be `None`") # noqa: E501
224 self._browser_details = browser_details
226 @property
227 def incognito(self) -> bool:
228 """Gets the incognito of this Identification. # noqa: E501
230 Flag if user used incognito session. # noqa: E501
232 :return: The incognito of this Identification. # noqa: E501
233 """
234 return self._incognito
236 @incognito.setter
237 def incognito(self, incognito: bool):
238 """Sets the incognito of this Identification.
240 Flag if user used incognito session. # noqa: E501
242 :param incognito: The incognito of this Identification. # noqa: E501
243 """
244 if incognito is None:
245 raise ValueError("Invalid value for `incognito`, must not be `None`") # noqa: E501
247 self._incognito = incognito
249 @property
250 def ip(self) -> str:
251 """Gets the ip of this Identification. # noqa: E501
253 IP address of the requesting browser or bot. # noqa: E501
255 :return: The ip of this Identification. # noqa: E501
256 """
257 return self._ip
259 @ip.setter
260 def ip(self, ip: str):
261 """Sets the ip of this Identification.
263 IP address of the requesting browser or bot. # noqa: E501
265 :param ip: The ip of this Identification. # noqa: E501
266 """
267 if ip is None:
268 raise ValueError("Invalid value for `ip`, must not be `None`") # noqa: E501
270 self._ip = ip
272 @property
273 def ip_location(self) -> Optional[DeprecatedGeolocation]:
274 """Gets the ip_location of this Identification. # noqa: E501
277 :return: The ip_location of this Identification. # noqa: E501
278 """
279 return self._ip_location
281 @ip_location.setter
282 def ip_location(self, ip_location: Optional[DeprecatedGeolocation]):
283 """Sets the ip_location of this Identification.
286 :param ip_location: The ip_location of this Identification. # noqa: E501
287 """
289 self._ip_location = ip_location
291 @property
292 def linked_id(self) -> Optional[str]:
293 """Gets the linked_id of this Identification. # noqa: E501
295 A customer-provided id that was sent with the request. # noqa: E501
297 :return: The linked_id of this Identification. # noqa: E501
298 """
299 return self._linked_id
301 @linked_id.setter
302 def linked_id(self, linked_id: Optional[str]):
303 """Sets the linked_id of this Identification.
305 A customer-provided id that was sent with the request. # noqa: E501
307 :param linked_id: The linked_id of this Identification. # noqa: E501
308 """
310 self._linked_id = linked_id
312 @property
313 def suspect(self) -> Optional[bool]:
314 """Gets the suspect of this Identification. # noqa: E501
316 Field is `true` if you have previously set the `suspect` flag for this event using the [Server API Update event endpoint](https://dev.fingerprint.com/reference/updateevent). # noqa: E501
318 :return: The suspect of this Identification. # noqa: E501
319 """
320 return self._suspect
322 @suspect.setter
323 def suspect(self, suspect: Optional[bool]):
324 """Sets the suspect of this Identification.
326 Field is `true` if you have previously set the `suspect` flag for this event using the [Server API Update event endpoint](https://dev.fingerprint.com/reference/updateevent). # noqa: E501
328 :param suspect: The suspect of this Identification. # noqa: E501
329 """
331 self._suspect = suspect
333 @property
334 def timestamp(self) -> int:
335 """Gets the timestamp of this Identification. # noqa: E501
337 Timestamp of the event with millisecond precision in Unix time. # noqa: E501
339 :return: The timestamp of this Identification. # noqa: E501
340 """
341 return self._timestamp
343 @timestamp.setter
344 def timestamp(self, timestamp: int):
345 """Sets the timestamp of this Identification.
347 Timestamp of the event with millisecond precision in Unix time. # noqa: E501
349 :param timestamp: The timestamp of this Identification. # noqa: E501
350 """
351 if timestamp is None:
352 raise ValueError("Invalid value for `timestamp`, must not be `None`") # noqa: E501
354 self._timestamp = timestamp
356 @property
357 def time(self) -> datetime:
358 """Gets the time of this Identification. # noqa: E501
360 Time expressed according to ISO 8601 in UTC format, when the request from the JS agent was made. We recommend to treat requests that are older than 2 minutes as malicious. Otherwise, request replay attacks are possible. # noqa: E501
362 :return: The time of this Identification. # noqa: E501
363 """
364 return self._time
366 @time.setter
367 def time(self, time: datetime):
368 """Sets the time of this Identification.
370 Time expressed according to ISO 8601 in UTC format, when the request from the JS agent was made. We recommend to treat requests that are older than 2 minutes as malicious. Otherwise, request replay attacks are possible. # noqa: E501
372 :param time: The time of this Identification. # noqa: E501
373 """
374 if time is None:
375 raise ValueError("Invalid value for `time`, must not be `None`") # noqa: E501
377 self._time = time
379 @property
380 def url(self) -> str:
381 """Gets the url of this Identification. # noqa: E501
383 Page URL from which the request was sent. # noqa: E501
385 :return: The url of this Identification. # noqa: E501
386 """
387 return self._url
389 @url.setter
390 def url(self, url: str):
391 """Sets the url of this Identification.
393 Page URL from which the request was sent. # noqa: E501
395 :param url: The url of this Identification. # noqa: E501
396 """
397 if url is None:
398 raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501
400 self._url = url
402 @property
403 def tag(self) -> Tag:
404 """Gets the tag of this Identification. # noqa: E501
407 :return: The tag of this Identification. # noqa: E501
408 """
409 return self._tag
411 @tag.setter
412 def tag(self, tag: Tag):
413 """Sets the tag of this Identification.
416 :param tag: The tag of this Identification. # noqa: E501
417 """
418 if tag is None:
419 raise ValueError("Invalid value for `tag`, must not be `None`") # noqa: E501
421 self._tag = tag
423 @property
424 def confidence(self) -> Optional[IdentificationConfidence]:
425 """Gets the confidence of this Identification. # noqa: E501
428 :return: The confidence of this Identification. # noqa: E501
429 """
430 return self._confidence
432 @confidence.setter
433 def confidence(self, confidence: Optional[IdentificationConfidence]):
434 """Sets the confidence of this Identification.
437 :param confidence: The confidence of this Identification. # noqa: E501
438 """
440 self._confidence = confidence
442 @property
443 def visitor_found(self) -> bool:
444 """Gets the visitor_found of this Identification. # noqa: E501
446 Attribute represents if a visitor had been identified before. # noqa: E501
448 :return: The visitor_found of this Identification. # noqa: E501
449 """
450 return self._visitor_found
452 @visitor_found.setter
453 def visitor_found(self, visitor_found: bool):
454 """Sets the visitor_found of this Identification.
456 Attribute represents if a visitor had been identified before. # noqa: E501
458 :param visitor_found: The visitor_found of this Identification. # noqa: E501
459 """
460 if visitor_found is None:
461 raise ValueError("Invalid value for `visitor_found`, must not be `None`") # noqa: E501
463 self._visitor_found = visitor_found
465 @property
466 def first_seen_at(self) -> IdentificationSeenAt:
467 """Gets the first_seen_at of this Identification. # noqa: E501
470 :return: The first_seen_at of this Identification. # noqa: E501
471 """
472 return self._first_seen_at
474 @first_seen_at.setter
475 def first_seen_at(self, first_seen_at: IdentificationSeenAt):
476 """Sets the first_seen_at of this Identification.
479 :param first_seen_at: The first_seen_at of this Identification. # noqa: E501
480 """
481 if first_seen_at is None:
482 raise ValueError("Invalid value for `first_seen_at`, must not be `None`") # noqa: E501
484 self._first_seen_at = first_seen_at
486 @property
487 def last_seen_at(self) -> IdentificationSeenAt:
488 """Gets the last_seen_at of this Identification. # noqa: E501
491 :return: The last_seen_at of this Identification. # noqa: E501
492 """
493 return self._last_seen_at
495 @last_seen_at.setter
496 def last_seen_at(self, last_seen_at: IdentificationSeenAt):
497 """Sets the last_seen_at of this Identification.
500 :param last_seen_at: The last_seen_at of this Identification. # noqa: E501
501 """
502 if last_seen_at is None:
503 raise ValueError("Invalid value for `last_seen_at`, must not be `None`") # noqa: E501
505 self._last_seen_at = last_seen_at
507 @property
508 def components(self) -> Optional[RawDeviceAttributes]:
509 """Gets the components of this Identification. # noqa: E501
512 :return: The components of this Identification. # noqa: E501
513 """
514 return self._components
516 @components.setter
517 def components(self, components: Optional[RawDeviceAttributes]):
518 """Sets the components of this Identification.
521 :param components: The components of this Identification. # noqa: E501
522 """
524 self._components = components
526 @property
527 def replayed(self) -> bool:
528 """Gets the replayed of this Identification. # noqa: E501
530 `true` if we determined that this payload was replayed, `false` otherwise. # noqa: E501
532 :return: The replayed of this Identification. # noqa: E501
533 """
534 return self._replayed
536 @replayed.setter
537 def replayed(self, replayed: bool):
538 """Sets the replayed of this Identification.
540 `true` if we determined that this payload was replayed, `false` otherwise. # noqa: E501
542 :param replayed: The replayed of this Identification. # noqa: E501
543 """
544 if replayed is None:
545 raise ValueError("Invalid value for `replayed`, must not be `None`") # noqa: E501
547 self._replayed = replayed
549 @property
550 def sdk(self) -> Optional[SDK]:
551 """Gets the sdk of this Identification. # noqa: E501
554 :return: The sdk of this Identification. # noqa: E501
555 """
556 return self._sdk
558 @sdk.setter
559 def sdk(self, sdk: Optional[SDK]):
560 """Sets the sdk of this Identification.
563 :param sdk: The sdk of this Identification. # noqa: E501
564 """
566 self._sdk = sdk
568 @property
569 def environment_id(self) -> Optional[str]:
570 """Gets the environment_id of this Identification. # noqa: E501
572 Environment ID associated with the event # noqa: E501
574 :return: The environment_id of this Identification. # noqa: E501
575 """
576 return self._environment_id
578 @environment_id.setter
579 def environment_id(self, environment_id: Optional[str]):
580 """Sets the environment_id of this Identification.
582 Environment ID associated with the event # noqa: E501
584 :param environment_id: The environment_id of this Identification. # noqa: E501
585 """
587 self._environment_id = environment_id