Coverage for fingerprint_pro_server_api_sdk/models/identification.py: 91%
182 statements
« prev ^ index » next coverage.py v7.6.9, created at 2024-12-09 17:50 +0000
« prev ^ index » next coverage.py v7.6.9, created at 2024-12-09 17:50 +0000
1# coding: utf-8
3"""
4 Fingerprint Pro Server API
6 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. # 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
26class Identification(BaseModel):
27 """NOTE: This class is auto generated by the swagger code generator program.
29 Do not edit the class manually.
30 """
31 """
32 Attributes:
33 swagger_types (dict): The key is attribute name
34 and the value is attribute type.
35 attribute_map (dict): The key is attribute name
36 and the value is json key in definition.
37 """
38 swagger_types = {
39 'visitor_id': 'str',
40 'request_id': 'str',
41 'browser_details': 'BrowserDetails',
42 'incognito': 'bool',
43 'ip': 'str',
44 'ip_location': 'DeprecatedGeolocation',
45 'linked_id': 'str',
46 'suspect': 'bool',
47 'timestamp': 'int',
48 'time': 'datetime',
49 'url': 'str',
50 'tag': 'Tag',
51 'confidence': 'IdentificationConfidence',
52 'visitor_found': 'bool',
53 'first_seen_at': 'IdentificationSeenAt',
54 'last_seen_at': 'IdentificationSeenAt',
55 'components': 'RawDeviceAttributes'
56 }
58 attribute_map = {
59 'visitor_id': 'visitorId',
60 'request_id': 'requestId',
61 'browser_details': 'browserDetails',
62 'incognito': 'incognito',
63 'ip': 'ip',
64 'ip_location': 'ipLocation',
65 'linked_id': 'linkedId',
66 'suspect': 'suspect',
67 'timestamp': 'timestamp',
68 'time': 'time',
69 'url': 'url',
70 'tag': 'tag',
71 'confidence': 'confidence',
72 'visitor_found': 'visitorFound',
73 'first_seen_at': 'firstSeenAt',
74 'last_seen_at': 'lastSeenAt',
75 'components': 'components'
76 }
78 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): # noqa: E501
79 """Identification - a model defined in Swagger""" # noqa: E501
80 self._visitor_id = None
81 self._request_id = None
82 self._browser_details = None
83 self._incognito = None
84 self._ip = None
85 self._ip_location = None
86 self._linked_id = None
87 self._suspect = None
88 self._timestamp = None
89 self._time = None
90 self._url = None
91 self._tag = None
92 self._confidence = None
93 self._visitor_found = None
94 self._first_seen_at = None
95 self._last_seen_at = None
96 self._components = None
97 self.discriminator = None
98 self.visitor_id = visitor_id
99 self.request_id = request_id
100 self.browser_details = browser_details
101 self.incognito = incognito
102 self.ip = ip
103 if ip_location is not None:
104 self.ip_location = ip_location
105 if linked_id is not None:
106 self.linked_id = linked_id
107 if suspect is not None:
108 self.suspect = suspect
109 self.timestamp = timestamp
110 self.time = time
111 self.url = url
112 self.tag = tag
113 if confidence is not None:
114 self.confidence = confidence
115 self.visitor_found = visitor_found
116 self.first_seen_at = first_seen_at
117 self.last_seen_at = last_seen_at
118 if components is not None:
119 self.components = components
121 @property
122 def visitor_id(self) -> str:
123 """Gets the visitor_id of this Identification. # noqa: E501
125 String of 20 characters that uniquely identifies the visitor's browser. # noqa: E501
127 :return: The visitor_id of this Identification. # noqa: E501
128 """
129 return self._visitor_id
131 @visitor_id.setter
132 def visitor_id(self, visitor_id: str):
133 """Sets the visitor_id of this Identification.
135 String of 20 characters that uniquely identifies the visitor's browser. # noqa: E501
137 :param visitor_id: The visitor_id of this Identification. # noqa: E501
138 """
139 if visitor_id is None:
140 raise ValueError("Invalid value for `visitor_id`, must not be `None`") # noqa: E501
142 self._visitor_id = visitor_id
144 @property
145 def request_id(self) -> str:
146 """Gets the request_id of this Identification. # noqa: E501
148 Unique identifier of the user's request. # noqa: E501
150 :return: The request_id of this Identification. # noqa: E501
151 """
152 return self._request_id
154 @request_id.setter
155 def request_id(self, request_id: str):
156 """Sets the request_id of this Identification.
158 Unique identifier of the user's request. # noqa: E501
160 :param request_id: The request_id of this Identification. # noqa: E501
161 """
162 if request_id is None:
163 raise ValueError("Invalid value for `request_id`, must not be `None`") # noqa: E501
165 self._request_id = request_id
167 @property
168 def browser_details(self) -> BrowserDetails:
169 """Gets the browser_details of this Identification. # noqa: E501
172 :return: The browser_details of this Identification. # noqa: E501
173 """
174 return self._browser_details
176 @browser_details.setter
177 def browser_details(self, browser_details: BrowserDetails):
178 """Sets the browser_details of this Identification.
181 :param browser_details: The browser_details of this Identification. # noqa: E501
182 """
183 if browser_details is None:
184 raise ValueError("Invalid value for `browser_details`, must not be `None`") # noqa: E501
186 self._browser_details = browser_details
188 @property
189 def incognito(self) -> bool:
190 """Gets the incognito of this Identification. # noqa: E501
192 Flag if user used incognito session. # noqa: E501
194 :return: The incognito of this Identification. # noqa: E501
195 """
196 return self._incognito
198 @incognito.setter
199 def incognito(self, incognito: bool):
200 """Sets the incognito of this Identification.
202 Flag if user used incognito session. # noqa: E501
204 :param incognito: The incognito of this Identification. # noqa: E501
205 """
206 if incognito is None:
207 raise ValueError("Invalid value for `incognito`, must not be `None`") # noqa: E501
209 self._incognito = incognito
211 @property
212 def ip(self) -> str:
213 """Gets the ip of this Identification. # noqa: E501
215 IP address of the requesting browser or bot. # noqa: E501
217 :return: The ip of this Identification. # noqa: E501
218 """
219 return self._ip
221 @ip.setter
222 def ip(self, ip: str):
223 """Sets the ip of this Identification.
225 IP address of the requesting browser or bot. # noqa: E501
227 :param ip: The ip of this Identification. # noqa: E501
228 """
229 if ip is None:
230 raise ValueError("Invalid value for `ip`, must not be `None`") # noqa: E501
232 self._ip = ip
234 @property
235 def ip_location(self) -> Optional[DeprecatedGeolocation]:
236 """Gets the ip_location of this Identification. # noqa: E501
239 :return: The ip_location of this Identification. # noqa: E501
240 """
241 return self._ip_location
243 @ip_location.setter
244 def ip_location(self, ip_location: Optional[DeprecatedGeolocation]):
245 """Sets the ip_location of this Identification.
248 :param ip_location: The ip_location of this Identification. # noqa: E501
249 """
251 self._ip_location = ip_location
253 @property
254 def linked_id(self) -> Optional[str]:
255 """Gets the linked_id of this Identification. # noqa: E501
257 A customer-provided id that was sent with the request. # noqa: E501
259 :return: The linked_id of this Identification. # noqa: E501
260 """
261 return self._linked_id
263 @linked_id.setter
264 def linked_id(self, linked_id: Optional[str]):
265 """Sets the linked_id of this Identification.
267 A customer-provided id that was sent with the request. # noqa: E501
269 :param linked_id: The linked_id of this Identification. # noqa: E501
270 """
272 self._linked_id = linked_id
274 @property
275 def suspect(self) -> Optional[bool]:
276 """Gets the suspect of this Identification. # noqa: E501
278 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
280 :return: The suspect of this Identification. # noqa: E501
281 """
282 return self._suspect
284 @suspect.setter
285 def suspect(self, suspect: Optional[bool]):
286 """Sets the suspect of this Identification.
288 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
290 :param suspect: The suspect of this Identification. # noqa: E501
291 """
293 self._suspect = suspect
295 @property
296 def timestamp(self) -> int:
297 """Gets the timestamp of this Identification. # noqa: E501
299 Timestamp of the event with millisecond precision in Unix time. # noqa: E501
301 :return: The timestamp of this Identification. # noqa: E501
302 """
303 return self._timestamp
305 @timestamp.setter
306 def timestamp(self, timestamp: int):
307 """Sets the timestamp of this Identification.
309 Timestamp of the event with millisecond precision in Unix time. # noqa: E501
311 :param timestamp: The timestamp of this Identification. # noqa: E501
312 """
313 if timestamp is None:
314 raise ValueError("Invalid value for `timestamp`, must not be `None`") # noqa: E501
316 self._timestamp = timestamp
318 @property
319 def time(self) -> datetime:
320 """Gets the time of this Identification. # noqa: E501
322 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
324 :return: The time of this Identification. # noqa: E501
325 """
326 return self._time
328 @time.setter
329 def time(self, time: datetime):
330 """Sets the time of this Identification.
332 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
334 :param time: The time of this Identification. # noqa: E501
335 """
336 if time is None:
337 raise ValueError("Invalid value for `time`, must not be `None`") # noqa: E501
339 self._time = time
341 @property
342 def url(self) -> str:
343 """Gets the url of this Identification. # noqa: E501
345 Page URL from which the request was sent. # noqa: E501
347 :return: The url of this Identification. # noqa: E501
348 """
349 return self._url
351 @url.setter
352 def url(self, url: str):
353 """Sets the url of this Identification.
355 Page URL from which the request was sent. # noqa: E501
357 :param url: The url of this Identification. # noqa: E501
358 """
359 if url is None:
360 raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501
362 self._url = url
364 @property
365 def tag(self) -> Tag:
366 """Gets the tag of this Identification. # noqa: E501
369 :return: The tag of this Identification. # noqa: E501
370 """
371 return self._tag
373 @tag.setter
374 def tag(self, tag: Tag):
375 """Sets the tag of this Identification.
378 :param tag: The tag of this Identification. # noqa: E501
379 """
380 if tag is None:
381 raise ValueError("Invalid value for `tag`, must not be `None`") # noqa: E501
383 self._tag = tag
385 @property
386 def confidence(self) -> Optional[IdentificationConfidence]:
387 """Gets the confidence of this Identification. # noqa: E501
390 :return: The confidence of this Identification. # noqa: E501
391 """
392 return self._confidence
394 @confidence.setter
395 def confidence(self, confidence: Optional[IdentificationConfidence]):
396 """Sets the confidence of this Identification.
399 :param confidence: The confidence of this Identification. # noqa: E501
400 """
402 self._confidence = confidence
404 @property
405 def visitor_found(self) -> bool:
406 """Gets the visitor_found of this Identification. # noqa: E501
408 Attribute represents if a visitor had been identified before. # noqa: E501
410 :return: The visitor_found of this Identification. # noqa: E501
411 """
412 return self._visitor_found
414 @visitor_found.setter
415 def visitor_found(self, visitor_found: bool):
416 """Sets the visitor_found of this Identification.
418 Attribute represents if a visitor had been identified before. # noqa: E501
420 :param visitor_found: The visitor_found of this Identification. # noqa: E501
421 """
422 if visitor_found is None:
423 raise ValueError("Invalid value for `visitor_found`, must not be `None`") # noqa: E501
425 self._visitor_found = visitor_found
427 @property
428 def first_seen_at(self) -> IdentificationSeenAt:
429 """Gets the first_seen_at of this Identification. # noqa: E501
432 :return: The first_seen_at of this Identification. # noqa: E501
433 """
434 return self._first_seen_at
436 @first_seen_at.setter
437 def first_seen_at(self, first_seen_at: IdentificationSeenAt):
438 """Sets the first_seen_at of this Identification.
441 :param first_seen_at: The first_seen_at of this Identification. # noqa: E501
442 """
443 if first_seen_at is None:
444 raise ValueError("Invalid value for `first_seen_at`, must not be `None`") # noqa: E501
446 self._first_seen_at = first_seen_at
448 @property
449 def last_seen_at(self) -> IdentificationSeenAt:
450 """Gets the last_seen_at of this Identification. # noqa: E501
453 :return: The last_seen_at of this Identification. # noqa: E501
454 """
455 return self._last_seen_at
457 @last_seen_at.setter
458 def last_seen_at(self, last_seen_at: IdentificationSeenAt):
459 """Sets the last_seen_at of this Identification.
462 :param last_seen_at: The last_seen_at of this Identification. # noqa: E501
463 """
464 if last_seen_at is None:
465 raise ValueError("Invalid value for `last_seen_at`, must not be `None`") # noqa: E501
467 self._last_seen_at = last_seen_at
469 @property
470 def components(self) -> Optional[RawDeviceAttributes]:
471 """Gets the components of this Identification. # noqa: E501
474 :return: The components of this Identification. # noqa: E501
475 """
476 return self._components
478 @components.setter
479 def components(self, components: Optional[RawDeviceAttributes]):
480 """Sets the components of this Identification.
483 :param components: The components of this Identification. # noqa: E501
484 """
486 self._components = components