Coverage for fingerprint_pro_server_api_sdk/models/response_visits.py: 72%
173 statements
« prev ^ index » next coverage.py v7.4.4, created at 2024-03-27 22:39 +0000
« prev ^ index » next coverage.py v7.4.4, created at 2024-03-27 22:39 +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 pprint
14import re # noqa: F401
16import six
18class ResponseVisits(object):
19 """NOTE: This class is auto generated by the swagger code generator program.
21 Do not edit the class manually.
22 """
23 """
24 Attributes:
25 swagger_types (dict): The key is attribute name
26 and the value is attribute type.
27 attribute_map (dict): The key is attribute name
28 and the value is json key in definition.
29 """
30 swagger_types = {
31 'request_id': 'str',
32 'browser_details': 'BrowserDetails',
33 'incognito': 'bool',
34 'ip': 'str',
35 'ip_location': 'DeprecatedIPLocation',
36 'timestamp': 'int',
37 'time': 'datetime',
38 'url': 'str',
39 'tag': 'dict(str, object)',
40 'linked_id': 'str',
41 'confidence': 'Confidence',
42 'visitor_found': 'bool',
43 'first_seen_at': 'SeenAt',
44 'last_seen_at': 'SeenAt'
45 }
47 attribute_map = {
48 'request_id': 'requestId',
49 'browser_details': 'browserDetails',
50 'incognito': 'incognito',
51 'ip': 'ip',
52 'ip_location': 'ipLocation',
53 'timestamp': 'timestamp',
54 'time': 'time',
55 'url': 'url',
56 'tag': 'tag',
57 'linked_id': 'linkedId',
58 'confidence': 'confidence',
59 'visitor_found': 'visitorFound',
60 'first_seen_at': 'firstSeenAt',
61 'last_seen_at': 'lastSeenAt'
62 }
64 def __init__(self, request_id=None, browser_details=None, incognito=None, ip=None, ip_location=None, timestamp=None, time=None, url=None, tag=None, linked_id=None, confidence=None, visitor_found=None, first_seen_at=None, last_seen_at=None): # noqa: E501
65 """ResponseVisits - a model defined in Swagger""" # noqa: E501
66 self._request_id = None
67 self._browser_details = None
68 self._incognito = None
69 self._ip = None
70 self._ip_location = None
71 self._timestamp = None
72 self._time = None
73 self._url = None
74 self._tag = None
75 self._linked_id = None
76 self._confidence = None
77 self._visitor_found = None
78 self._first_seen_at = None
79 self._last_seen_at = None
80 self.discriminator = None
81 self.request_id = request_id
82 self.browser_details = browser_details
83 self.incognito = incognito
84 self.ip = ip
85 if ip_location is not None:
86 self.ip_location = ip_location
87 self.timestamp = timestamp
88 self.time = time
89 self.url = url
90 self.tag = tag
91 if linked_id is not None:
92 self.linked_id = linked_id
93 if confidence is not None:
94 self.confidence = confidence
95 self.visitor_found = visitor_found
96 self.first_seen_at = first_seen_at
97 self.last_seen_at = last_seen_at
99 @property
100 def request_id(self):
101 """Gets the request_id of this ResponseVisits. # noqa: E501
103 Unique identifier of the user's identification request. # noqa: E501
105 :return: The request_id of this ResponseVisits. # noqa: E501
106 :rtype: str
107 """
108 return self._request_id
110 @request_id.setter
111 def request_id(self, request_id):
112 """Sets the request_id of this ResponseVisits.
114 Unique identifier of the user's identification request. # noqa: E501
116 :param request_id: The request_id of this ResponseVisits. # noqa: E501
117 :type: str
118 """
119 if request_id is None:
120 raise ValueError("Invalid value for `request_id`, must not be `None`") # noqa: E501
122 self._request_id = request_id
124 @property
125 def browser_details(self):
126 """Gets the browser_details of this ResponseVisits. # noqa: E501
129 :return: The browser_details of this ResponseVisits. # noqa: E501
130 :rtype: BrowserDetails
131 """
132 return self._browser_details
134 @browser_details.setter
135 def browser_details(self, browser_details):
136 """Sets the browser_details of this ResponseVisits.
139 :param browser_details: The browser_details of this ResponseVisits. # noqa: E501
140 :type: BrowserDetails
141 """
142 if browser_details is None:
143 raise ValueError("Invalid value for `browser_details`, must not be `None`") # noqa: E501
145 self._browser_details = browser_details
147 @property
148 def incognito(self):
149 """Gets the incognito of this ResponseVisits. # noqa: E501
151 Flag if user used incognito session. # noqa: E501
153 :return: The incognito of this ResponseVisits. # noqa: E501
154 :rtype: bool
155 """
156 return self._incognito
158 @incognito.setter
159 def incognito(self, incognito):
160 """Sets the incognito of this ResponseVisits.
162 Flag if user used incognito session. # noqa: E501
164 :param incognito: The incognito of this ResponseVisits. # noqa: E501
165 :type: bool
166 """
167 if incognito is None:
168 raise ValueError("Invalid value for `incognito`, must not be `None`") # noqa: E501
170 self._incognito = incognito
172 @property
173 def ip(self):
174 """Gets the ip of this ResponseVisits. # noqa: E501
177 :return: The ip of this ResponseVisits. # noqa: E501
178 :rtype: str
179 """
180 return self._ip
182 @ip.setter
183 def ip(self, ip):
184 """Sets the ip of this ResponseVisits.
187 :param ip: The ip of this ResponseVisits. # noqa: E501
188 :type: str
189 """
190 if ip is None:
191 raise ValueError("Invalid value for `ip`, must not be `None`") # noqa: E501
193 self._ip = ip
195 @property
196 def ip_location(self):
197 """Gets the ip_location of this ResponseVisits. # noqa: E501
200 :return: The ip_location of this ResponseVisits. # noqa: E501
201 :rtype: DeprecatedIPLocation
202 """
203 return self._ip_location
205 @ip_location.setter
206 def ip_location(self, ip_location):
207 """Sets the ip_location of this ResponseVisits.
210 :param ip_location: The ip_location of this ResponseVisits. # noqa: E501
211 :type: DeprecatedIPLocation
212 """
214 self._ip_location = ip_location
216 @property
217 def timestamp(self):
218 """Gets the timestamp of this ResponseVisits. # noqa: E501
220 Timestamp of the event with millisecond precision in Unix time. # noqa: E501
222 :return: The timestamp of this ResponseVisits. # noqa: E501
223 :rtype: int
224 """
225 return self._timestamp
227 @timestamp.setter
228 def timestamp(self, timestamp):
229 """Sets the timestamp of this ResponseVisits.
231 Timestamp of the event with millisecond precision in Unix time. # noqa: E501
233 :param timestamp: The timestamp of this ResponseVisits. # noqa: E501
234 :type: int
235 """
236 if timestamp is None:
237 raise ValueError("Invalid value for `timestamp`, must not be `None`") # noqa: E501
239 self._timestamp = timestamp
241 @property
242 def time(self):
243 """Gets the time of this ResponseVisits. # noqa: E501
245 Time expressed according to ISO 8601 in UTC format. # noqa: E501
247 :return: The time of this ResponseVisits. # noqa: E501
248 :rtype: datetime
249 """
250 return self._time
252 @time.setter
253 def time(self, time):
254 """Sets the time of this ResponseVisits.
256 Time expressed according to ISO 8601 in UTC format. # noqa: E501
258 :param time: The time of this ResponseVisits. # noqa: E501
259 :type: datetime
260 """
261 if time is None:
262 raise ValueError("Invalid value for `time`, must not be `None`") # noqa: E501
264 self._time = time
266 @property
267 def url(self):
268 """Gets the url of this ResponseVisits. # noqa: E501
270 Page URL from which the identification request was sent. # noqa: E501
272 :return: The url of this ResponseVisits. # noqa: E501
273 :rtype: str
274 """
275 return self._url
277 @url.setter
278 def url(self, url):
279 """Sets the url of this ResponseVisits.
281 Page URL from which the identification request was sent. # noqa: E501
283 :param url: The url of this ResponseVisits. # noqa: E501
284 :type: str
285 """
286 if url is None:
287 raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501
289 self._url = url
291 @property
292 def tag(self):
293 """Gets the tag of this ResponseVisits. # noqa: E501
295 A customer-provided value or an object that was sent with identification request. # noqa: E501
297 :return: The tag of this ResponseVisits. # noqa: E501
298 :rtype: dict(str, object)
299 """
300 return self._tag
302 @tag.setter
303 def tag(self, tag):
304 """Sets the tag of this ResponseVisits.
306 A customer-provided value or an object that was sent with identification request. # noqa: E501
308 :param tag: The tag of this ResponseVisits. # noqa: E501
309 :type: dict(str, object)
310 """
311 if tag is None:
312 raise ValueError("Invalid value for `tag`, must not be `None`") # noqa: E501
314 self._tag = tag
316 @property
317 def linked_id(self):
318 """Gets the linked_id of this ResponseVisits. # noqa: E501
320 A customer-provided id that was sent with identification request. # noqa: E501
322 :return: The linked_id of this ResponseVisits. # noqa: E501
323 :rtype: str
324 """
325 return self._linked_id
327 @linked_id.setter
328 def linked_id(self, linked_id):
329 """Sets the linked_id of this ResponseVisits.
331 A customer-provided id that was sent with identification request. # noqa: E501
333 :param linked_id: The linked_id of this ResponseVisits. # noqa: E501
334 :type: str
335 """
337 self._linked_id = linked_id
339 @property
340 def confidence(self):
341 """Gets the confidence of this ResponseVisits. # noqa: E501
344 :return: The confidence of this ResponseVisits. # noqa: E501
345 :rtype: Confidence
346 """
347 return self._confidence
349 @confidence.setter
350 def confidence(self, confidence):
351 """Sets the confidence of this ResponseVisits.
354 :param confidence: The confidence of this ResponseVisits. # noqa: E501
355 :type: Confidence
356 """
358 self._confidence = confidence
360 @property
361 def visitor_found(self):
362 """Gets the visitor_found of this ResponseVisits. # noqa: E501
364 Attribute represents if a visitor had been identified before. # noqa: E501
366 :return: The visitor_found of this ResponseVisits. # noqa: E501
367 :rtype: bool
368 """
369 return self._visitor_found
371 @visitor_found.setter
372 def visitor_found(self, visitor_found):
373 """Sets the visitor_found of this ResponseVisits.
375 Attribute represents if a visitor had been identified before. # noqa: E501
377 :param visitor_found: The visitor_found of this ResponseVisits. # noqa: E501
378 :type: bool
379 """
380 if visitor_found is None:
381 raise ValueError("Invalid value for `visitor_found`, must not be `None`") # noqa: E501
383 self._visitor_found = visitor_found
385 @property
386 def first_seen_at(self):
387 """Gets the first_seen_at of this ResponseVisits. # noqa: E501
390 :return: The first_seen_at of this ResponseVisits. # noqa: E501
391 :rtype: SeenAt
392 """
393 return self._first_seen_at
395 @first_seen_at.setter
396 def first_seen_at(self, first_seen_at):
397 """Sets the first_seen_at of this ResponseVisits.
400 :param first_seen_at: The first_seen_at of this ResponseVisits. # noqa: E501
401 :type: SeenAt
402 """
403 if first_seen_at is None:
404 raise ValueError("Invalid value for `first_seen_at`, must not be `None`") # noqa: E501
406 self._first_seen_at = first_seen_at
408 @property
409 def last_seen_at(self):
410 """Gets the last_seen_at of this ResponseVisits. # noqa: E501
413 :return: The last_seen_at of this ResponseVisits. # noqa: E501
414 :rtype: SeenAt
415 """
416 return self._last_seen_at
418 @last_seen_at.setter
419 def last_seen_at(self, last_seen_at):
420 """Sets the last_seen_at of this ResponseVisits.
423 :param last_seen_at: The last_seen_at of this ResponseVisits. # noqa: E501
424 :type: SeenAt
425 """
426 if last_seen_at is None:
427 raise ValueError("Invalid value for `last_seen_at`, must not be `None`") # noqa: E501
429 self._last_seen_at = last_seen_at
431 def to_dict(self):
432 """Returns the model properties as a dict"""
433 result = {}
435 for attr, _ in six.iteritems(self.swagger_types):
436 value = getattr(self, attr)
437 if isinstance(value, list):
438 result[attr] = list(map(
439 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
440 value
441 ))
442 elif hasattr(value, "to_dict"):
443 result[attr] = value.to_dict()
444 elif isinstance(value, dict):
445 result[attr] = dict(map(
446 lambda item: (item[0], item[1].to_dict())
447 if hasattr(item[1], "to_dict") else item,
448 value.items()
449 ))
450 else:
451 result[attr] = value
452 if issubclass(ResponseVisits, dict):
453 for key, value in self.items():
454 result[key] = value
456 return result
458 def to_str(self):
459 """Returns the string representation of the model"""
460 return pprint.pformat(self.to_dict())
462 def __repr__(self):
463 """For `print` and `pprint`"""
464 return self.to_str()
466 def __eq__(self, other):
467 """Returns true if both objects are equal"""
468 if not isinstance(other, ResponseVisits):
469 return False
471 return self.to_dict() == other.to_dict()
473 def __ne__(self, other):
474 """Returns true if both objects are not equal"""
475 if not isinstance(other, ResponseVisits):
476 return True
478 return self.to_dict() != other.to_dict()