Coverage for fingerprint_pro_server_api_sdk/models/visit.py: 82%
163 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 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 attribute_map = {
57 'request_id': 'requestId',
58 'browser_details': 'browserDetails',
59 'incognito': 'incognito',
60 'ip': 'ip',
61 'ip_location': 'ipLocation',
62 'linked_id': 'linkedId',
63 'timestamp': 'timestamp',
64 'time': 'time',
65 'url': 'url',
66 'tag': 'tag',
67 'confidence': 'confidence',
68 'visitor_found': 'visitorFound',
69 'first_seen_at': 'firstSeenAt',
70 'last_seen_at': 'lastSeenAt',
71 'components': 'components'
72 }
74 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
75 """Visit - a model defined in Swagger""" # noqa: E501
76 self._request_id = None
77 self._browser_details = None
78 self._incognito = None
79 self._ip = None
80 self._ip_location = None
81 self._linked_id = None
82 self._timestamp = None
83 self._time = None
84 self._url = None
85 self._tag = None
86 self._confidence = None
87 self._visitor_found = None
88 self._first_seen_at = None
89 self._last_seen_at = None
90 self._components = None
91 self.discriminator = None
92 self.request_id = request_id
93 self.browser_details = browser_details
94 self.incognito = incognito
95 self.ip = ip
96 if ip_location is not None:
97 self.ip_location = ip_location
98 if linked_id is not None:
99 self.linked_id = linked_id
100 self.timestamp = timestamp
101 self.time = time
102 self.url = url
103 self.tag = tag
104 if confidence is not None:
105 self.confidence = confidence
106 self.visitor_found = visitor_found
107 self.first_seen_at = first_seen_at
108 self.last_seen_at = last_seen_at
109 if components is not None:
110 self.components = components
112 @property
113 def request_id(self) -> str:
114 """Gets the request_id of this Visit. # noqa: E501
116 Unique identifier of the user's request. # noqa: E501
118 :return: The request_id of this Visit. # noqa: E501
119 """
120 return self._request_id
122 @request_id.setter
123 def request_id(self, request_id: str):
124 """Sets the request_id of this Visit.
126 Unique identifier of the user's request. # noqa: E501
128 :param request_id: The request_id of this Visit. # noqa: E501
129 """
130 if request_id is None:
131 raise ValueError("Invalid value for `request_id`, must not be `None`") # noqa: E501
133 self._request_id = request_id
135 @property
136 def browser_details(self) -> BrowserDetails:
137 """Gets the browser_details of this Visit. # noqa: E501
140 :return: The browser_details of this Visit. # noqa: E501
141 """
142 return self._browser_details
144 @browser_details.setter
145 def browser_details(self, browser_details: BrowserDetails):
146 """Sets the browser_details of this Visit.
149 :param browser_details: The browser_details of this Visit. # noqa: E501
150 """
151 if browser_details is None:
152 raise ValueError("Invalid value for `browser_details`, must not be `None`") # noqa: E501
154 self._browser_details = browser_details
156 @property
157 def incognito(self) -> bool:
158 """Gets the incognito of this Visit. # noqa: E501
160 Flag if user used incognito session. # noqa: E501
162 :return: The incognito of this Visit. # noqa: E501
163 """
164 return self._incognito
166 @incognito.setter
167 def incognito(self, incognito: bool):
168 """Sets the incognito of this Visit.
170 Flag if user used incognito session. # noqa: E501
172 :param incognito: The incognito of this Visit. # noqa: E501
173 """
174 if incognito is None:
175 raise ValueError("Invalid value for `incognito`, must not be `None`") # noqa: E501
177 self._incognito = incognito
179 @property
180 def ip(self) -> str:
181 """Gets the ip of this Visit. # noqa: E501
183 IP address of the requesting browser or bot. # noqa: E501
185 :return: The ip of this Visit. # noqa: E501
186 """
187 return self._ip
189 @ip.setter
190 def ip(self, ip: str):
191 """Sets the ip of this Visit.
193 IP address of the requesting browser or bot. # noqa: E501
195 :param ip: The ip of this Visit. # noqa: E501
196 """
197 if ip is None:
198 raise ValueError("Invalid value for `ip`, must not be `None`") # noqa: E501
200 self._ip = ip
202 @property
203 def ip_location(self) -> Optional[DeprecatedGeolocation]:
204 """Gets the ip_location of this Visit. # noqa: E501
207 :return: The ip_location of this Visit. # noqa: E501
208 """
209 return self._ip_location
211 @ip_location.setter
212 def ip_location(self, ip_location: Optional[DeprecatedGeolocation]):
213 """Sets the ip_location of this Visit.
216 :param ip_location: The ip_location of this Visit. # noqa: E501
217 """
219 self._ip_location = ip_location
221 @property
222 def linked_id(self) -> Optional[str]:
223 """Gets the linked_id of this Visit. # noqa: E501
225 A customer-provided id that was sent with the request. # noqa: E501
227 :return: The linked_id of this Visit. # noqa: E501
228 """
229 return self._linked_id
231 @linked_id.setter
232 def linked_id(self, linked_id: Optional[str]):
233 """Sets the linked_id of this Visit.
235 A customer-provided id that was sent with the request. # noqa: E501
237 :param linked_id: The linked_id of this Visit. # noqa: E501
238 """
240 self._linked_id = linked_id
242 @property
243 def timestamp(self) -> int:
244 """Gets the timestamp of this Visit. # noqa: E501
246 Timestamp of the event with millisecond precision in Unix time. # noqa: E501
248 :return: The timestamp of this Visit. # noqa: E501
249 """
250 return self._timestamp
252 @timestamp.setter
253 def timestamp(self, timestamp: int):
254 """Sets the timestamp of this Visit.
256 Timestamp of the event with millisecond precision in Unix time. # noqa: E501
258 :param timestamp: The timestamp of this Visit. # noqa: E501
259 """
260 if timestamp is None:
261 raise ValueError("Invalid value for `timestamp`, must not be `None`") # noqa: E501
263 self._timestamp = timestamp
265 @property
266 def time(self) -> datetime:
267 """Gets the time of this Visit. # noqa: E501
269 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
271 :return: The time of this Visit. # noqa: E501
272 """
273 return self._time
275 @time.setter
276 def time(self, time: datetime):
277 """Sets the time of this Visit.
279 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
281 :param time: The time of this Visit. # noqa: E501
282 """
283 if time is None:
284 raise ValueError("Invalid value for `time`, must not be `None`") # noqa: E501
286 self._time = time
288 @property
289 def url(self) -> str:
290 """Gets the url of this Visit. # noqa: E501
292 Page URL from which the request was sent. # noqa: E501
294 :return: The url of this Visit. # noqa: E501
295 """
296 return self._url
298 @url.setter
299 def url(self, url: str):
300 """Sets the url of this Visit.
302 Page URL from which the request was sent. # noqa: E501
304 :param url: The url of this Visit. # noqa: E501
305 """
306 if url is None:
307 raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501
309 self._url = url
311 @property
312 def tag(self) -> Tag:
313 """Gets the tag of this Visit. # noqa: E501
316 :return: The tag of this Visit. # noqa: E501
317 """
318 return self._tag
320 @tag.setter
321 def tag(self, tag: Tag):
322 """Sets the tag of this Visit.
325 :param tag: The tag of this Visit. # noqa: E501
326 """
327 if tag is None:
328 raise ValueError("Invalid value for `tag`, must not be `None`") # noqa: E501
330 self._tag = tag
332 @property
333 def confidence(self) -> Optional[IdentificationConfidence]:
334 """Gets the confidence of this Visit. # noqa: E501
337 :return: The confidence of this Visit. # noqa: E501
338 """
339 return self._confidence
341 @confidence.setter
342 def confidence(self, confidence: Optional[IdentificationConfidence]):
343 """Sets the confidence of this Visit.
346 :param confidence: The confidence of this Visit. # noqa: E501
347 """
349 self._confidence = confidence
351 @property
352 def visitor_found(self) -> bool:
353 """Gets the visitor_found of this Visit. # noqa: E501
355 Attribute represents if a visitor had been identified before. # noqa: E501
357 :return: The visitor_found of this Visit. # noqa: E501
358 """
359 return self._visitor_found
361 @visitor_found.setter
362 def visitor_found(self, visitor_found: bool):
363 """Sets the visitor_found of this Visit.
365 Attribute represents if a visitor had been identified before. # noqa: E501
367 :param visitor_found: The visitor_found of this Visit. # noqa: E501
368 """
369 if visitor_found is None:
370 raise ValueError("Invalid value for `visitor_found`, must not be `None`") # noqa: E501
372 self._visitor_found = visitor_found
374 @property
375 def first_seen_at(self) -> IdentificationSeenAt:
376 """Gets the first_seen_at of this Visit. # noqa: E501
379 :return: The first_seen_at of this Visit. # noqa: E501
380 """
381 return self._first_seen_at
383 @first_seen_at.setter
384 def first_seen_at(self, first_seen_at: IdentificationSeenAt):
385 """Sets the first_seen_at of this Visit.
388 :param first_seen_at: The first_seen_at of this Visit. # noqa: E501
389 """
390 if first_seen_at is None:
391 raise ValueError("Invalid value for `first_seen_at`, must not be `None`") # noqa: E501
393 self._first_seen_at = first_seen_at
395 @property
396 def last_seen_at(self) -> IdentificationSeenAt:
397 """Gets the last_seen_at of this Visit. # noqa: E501
400 :return: The last_seen_at of this Visit. # noqa: E501
401 """
402 return self._last_seen_at
404 @last_seen_at.setter
405 def last_seen_at(self, last_seen_at: IdentificationSeenAt):
406 """Sets the last_seen_at of this Visit.
409 :param last_seen_at: The last_seen_at of this Visit. # noqa: E501
410 """
411 if last_seen_at is None:
412 raise ValueError("Invalid value for `last_seen_at`, must not be `None`") # noqa: E501
414 self._last_seen_at = last_seen_at
416 @property
417 def components(self) -> Optional[RawDeviceAttributes]:
418 """Gets the components of this Visit. # noqa: E501
421 :return: The components of this Visit. # noqa: E501
422 """
423 return self._components
425 @components.setter
426 def components(self, components: Optional[RawDeviceAttributes]):
427 """Sets the components of this Visit.
430 :param components: The components of this Visit. # noqa: E501
431 """
433 self._components = components