Coverage for fingerprint_pro_server_api_sdk/models/visit.py: 82%
164 statements
« prev ^ index » next coverage.py v7.6.12, created at 2025-02-21 15:03 +0000
« prev ^ index » next coverage.py v7.6.12, created at 2025-02-21 15:03 +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 Visit(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 'request_id': 'str',
40 'browser_details': 'BrowserDetails',
41 'incognito': 'bool',
42 'ip': 'str',
43 'ip_location': 'DeprecatedGeolocation',
44 'linked_id': 'str',
45 'timestamp': 'int',
46 'time': 'datetime',
47 'url': 'str',
48 'tag': 'Tag',
49 'confidence': 'IdentificationConfidence',
50 'visitor_found': 'bool',
51 'first_seen_at': 'IdentificationSeenAt',
52 'last_seen_at': 'IdentificationSeenAt',
53 'components': 'RawDeviceAttributes'
54 }
56 nullable_map = {
57 'request_id': False,
58 'browser_details': False,
59 'incognito': False,
60 'ip': False,
61 'ip_location': False,
62 'linked_id': False,
63 'timestamp': False,
64 'time': False,
65 'url': False,
66 'tag': False,
67 'confidence': False,
68 'visitor_found': False,
69 'first_seen_at': False,
70 'last_seen_at': False,
71 'components': False
72 }
74 attribute_map = {
75 'request_id': 'requestId',
76 'browser_details': 'browserDetails',
77 'incognito': 'incognito',
78 'ip': 'ip',
79 'ip_location': 'ipLocation',
80 'linked_id': 'linkedId',
81 'timestamp': 'timestamp',
82 'time': 'time',
83 'url': 'url',
84 'tag': 'tag',
85 'confidence': 'confidence',
86 'visitor_found': 'visitorFound',
87 'first_seen_at': 'firstSeenAt',
88 'last_seen_at': 'lastSeenAt',
89 'components': 'components'
90 }
92 def __init__(self, request_id=None, browser_details=None, incognito=None, ip=None, ip_location=None, linked_id=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
93 """Visit - a model defined in Swagger""" # noqa: E501
94 self._request_id = None
95 self._browser_details = None
96 self._incognito = None
97 self._ip = None
98 self._ip_location = None
99 self._linked_id = None
100 self._timestamp = None
101 self._time = None
102 self._url = None
103 self._tag = None
104 self._confidence = None
105 self._visitor_found = None
106 self._first_seen_at = None
107 self._last_seen_at = None
108 self._components = None
109 self.discriminator = None
110 self.request_id = request_id
111 self.browser_details = browser_details
112 self.incognito = incognito
113 self.ip = ip
114 if ip_location is not None:
115 self.ip_location = ip_location
116 if linked_id is not None:
117 self.linked_id = linked_id
118 self.timestamp = timestamp
119 self.time = time
120 self.url = url
121 self.tag = tag
122 if confidence is not None:
123 self.confidence = confidence
124 self.visitor_found = visitor_found
125 self.first_seen_at = first_seen_at
126 self.last_seen_at = last_seen_at
127 if components is not None:
128 self.components = components
130 @property
131 def request_id(self) -> str:
132 """Gets the request_id of this Visit. # noqa: E501
134 Unique identifier of the user's request. # noqa: E501
136 :return: The request_id of this Visit. # noqa: E501
137 """
138 return self._request_id
140 @request_id.setter
141 def request_id(self, request_id: str):
142 """Sets the request_id of this Visit.
144 Unique identifier of the user's request. # noqa: E501
146 :param request_id: The request_id of this Visit. # noqa: E501
147 """
148 if request_id is None:
149 raise ValueError("Invalid value for `request_id`, must not be `None`") # noqa: E501
151 self._request_id = request_id
153 @property
154 def browser_details(self) -> BrowserDetails:
155 """Gets the browser_details of this Visit. # noqa: E501
158 :return: The browser_details of this Visit. # noqa: E501
159 """
160 return self._browser_details
162 @browser_details.setter
163 def browser_details(self, browser_details: BrowserDetails):
164 """Sets the browser_details of this Visit.
167 :param browser_details: The browser_details of this Visit. # noqa: E501
168 """
169 if browser_details is None:
170 raise ValueError("Invalid value for `browser_details`, must not be `None`") # noqa: E501
172 self._browser_details = browser_details
174 @property
175 def incognito(self) -> bool:
176 """Gets the incognito of this Visit. # noqa: E501
178 Flag if user used incognito session. # noqa: E501
180 :return: The incognito of this Visit. # noqa: E501
181 """
182 return self._incognito
184 @incognito.setter
185 def incognito(self, incognito: bool):
186 """Sets the incognito of this Visit.
188 Flag if user used incognito session. # noqa: E501
190 :param incognito: The incognito of this Visit. # noqa: E501
191 """
192 if incognito is None:
193 raise ValueError("Invalid value for `incognito`, must not be `None`") # noqa: E501
195 self._incognito = incognito
197 @property
198 def ip(self) -> str:
199 """Gets the ip of this Visit. # noqa: E501
201 IP address of the requesting browser or bot. # noqa: E501
203 :return: The ip of this Visit. # noqa: E501
204 """
205 return self._ip
207 @ip.setter
208 def ip(self, ip: str):
209 """Sets the ip of this Visit.
211 IP address of the requesting browser or bot. # noqa: E501
213 :param ip: The ip of this Visit. # noqa: E501
214 """
215 if ip is None:
216 raise ValueError("Invalid value for `ip`, must not be `None`") # noqa: E501
218 self._ip = ip
220 @property
221 def ip_location(self) -> Optional[DeprecatedGeolocation]:
222 """Gets the ip_location of this Visit. # noqa: E501
225 :return: The ip_location of this Visit. # noqa: E501
226 """
227 return self._ip_location
229 @ip_location.setter
230 def ip_location(self, ip_location: Optional[DeprecatedGeolocation]):
231 """Sets the ip_location of this Visit.
234 :param ip_location: The ip_location of this Visit. # noqa: E501
235 """
237 self._ip_location = ip_location
239 @property
240 def linked_id(self) -> Optional[str]:
241 """Gets the linked_id of this Visit. # noqa: E501
243 A customer-provided id that was sent with the request. # noqa: E501
245 :return: The linked_id of this Visit. # noqa: E501
246 """
247 return self._linked_id
249 @linked_id.setter
250 def linked_id(self, linked_id: Optional[str]):
251 """Sets the linked_id of this Visit.
253 A customer-provided id that was sent with the request. # noqa: E501
255 :param linked_id: The linked_id of this Visit. # noqa: E501
256 """
258 self._linked_id = linked_id
260 @property
261 def timestamp(self) -> int:
262 """Gets the timestamp of this Visit. # noqa: E501
264 Timestamp of the event with millisecond precision in Unix time. # noqa: E501
266 :return: The timestamp of this Visit. # noqa: E501
267 """
268 return self._timestamp
270 @timestamp.setter
271 def timestamp(self, timestamp: int):
272 """Sets the timestamp of this Visit.
274 Timestamp of the event with millisecond precision in Unix time. # noqa: E501
276 :param timestamp: The timestamp of this Visit. # noqa: E501
277 """
278 if timestamp is None:
279 raise ValueError("Invalid value for `timestamp`, must not be `None`") # noqa: E501
281 self._timestamp = timestamp
283 @property
284 def time(self) -> datetime:
285 """Gets the time of this Visit. # noqa: E501
287 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. # noqa: E501
289 :return: The time of this Visit. # noqa: E501
290 """
291 return self._time
293 @time.setter
294 def time(self, time: datetime):
295 """Sets the time of this Visit.
297 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. # noqa: E501
299 :param time: The time of this Visit. # noqa: E501
300 """
301 if time is None:
302 raise ValueError("Invalid value for `time`, must not be `None`") # noqa: E501
304 self._time = time
306 @property
307 def url(self) -> str:
308 """Gets the url of this Visit. # noqa: E501
310 Page URL from which the request was sent. # noqa: E501
312 :return: The url of this Visit. # noqa: E501
313 """
314 return self._url
316 @url.setter
317 def url(self, url: str):
318 """Sets the url of this Visit.
320 Page URL from which the request was sent. # noqa: E501
322 :param url: The url of this Visit. # noqa: E501
323 """
324 if url is None:
325 raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501
327 self._url = url
329 @property
330 def tag(self) -> Tag:
331 """Gets the tag of this Visit. # noqa: E501
334 :return: The tag of this Visit. # noqa: E501
335 """
336 return self._tag
338 @tag.setter
339 def tag(self, tag: Tag):
340 """Sets the tag of this Visit.
343 :param tag: The tag of this Visit. # noqa: E501
344 """
345 if tag is None:
346 raise ValueError("Invalid value for `tag`, must not be `None`") # noqa: E501
348 self._tag = tag
350 @property
351 def confidence(self) -> Optional[IdentificationConfidence]:
352 """Gets the confidence of this Visit. # noqa: E501
355 :return: The confidence of this Visit. # noqa: E501
356 """
357 return self._confidence
359 @confidence.setter
360 def confidence(self, confidence: Optional[IdentificationConfidence]):
361 """Sets the confidence of this Visit.
364 :param confidence: The confidence of this Visit. # noqa: E501
365 """
367 self._confidence = confidence
369 @property
370 def visitor_found(self) -> bool:
371 """Gets the visitor_found of this Visit. # noqa: E501
373 Attribute represents if a visitor had been identified before. # noqa: E501
375 :return: The visitor_found of this Visit. # noqa: E501
376 """
377 return self._visitor_found
379 @visitor_found.setter
380 def visitor_found(self, visitor_found: bool):
381 """Sets the visitor_found of this Visit.
383 Attribute represents if a visitor had been identified before. # noqa: E501
385 :param visitor_found: The visitor_found of this Visit. # noqa: E501
386 """
387 if visitor_found is None:
388 raise ValueError("Invalid value for `visitor_found`, must not be `None`") # noqa: E501
390 self._visitor_found = visitor_found
392 @property
393 def first_seen_at(self) -> IdentificationSeenAt:
394 """Gets the first_seen_at of this Visit. # noqa: E501
397 :return: The first_seen_at of this Visit. # noqa: E501
398 """
399 return self._first_seen_at
401 @first_seen_at.setter
402 def first_seen_at(self, first_seen_at: IdentificationSeenAt):
403 """Sets the first_seen_at of this Visit.
406 :param first_seen_at: The first_seen_at of this Visit. # noqa: E501
407 """
408 if first_seen_at is None:
409 raise ValueError("Invalid value for `first_seen_at`, must not be `None`") # noqa: E501
411 self._first_seen_at = first_seen_at
413 @property
414 def last_seen_at(self) -> IdentificationSeenAt:
415 """Gets the last_seen_at of this Visit. # noqa: E501
418 :return: The last_seen_at of this Visit. # noqa: E501
419 """
420 return self._last_seen_at
422 @last_seen_at.setter
423 def last_seen_at(self, last_seen_at: IdentificationSeenAt):
424 """Sets the last_seen_at of this Visit.
427 :param last_seen_at: The last_seen_at of this Visit. # noqa: E501
428 """
429 if last_seen_at is None:
430 raise ValueError("Invalid value for `last_seen_at`, must not be `None`") # noqa: E501
432 self._last_seen_at = last_seen_at
434 @property
435 def components(self) -> Optional[RawDeviceAttributes]:
436 """Gets the components of this Visit. # noqa: E501
439 :return: The components of this Visit. # noqa: E501
440 """
441 return self._components
443 @components.setter
444 def components(self, components: Optional[RawDeviceAttributes]):
445 """Sets the components of this Visit.
448 :param components: The components of this Visit. # noqa: E501
449 """
451 self._components = components