Coverage for fingerprint_pro_server_api_sdk/models/response.py: 65%
74 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 Response(object):
19 """
20 Fields `lastTimestamp` and `paginationKey` added when `limit` or `before` parameter provided and there is more data to show
22 NOTE: This class is auto generated by the swagger code generator program.
24 Do not edit the class manually.
25 """
26 """
27 Attributes:
28 swagger_types (dict): The key is attribute name
29 and the value is attribute type.
30 attribute_map (dict): The key is attribute name
31 and the value is json key in definition.
32 """
33 swagger_types = {
34 'visitor_id': 'str',
35 'visits': 'list[ResponseVisits]',
36 'last_timestamp': 'int',
37 'pagination_key': 'str'
38 }
40 attribute_map = {
41 'visitor_id': 'visitorId',
42 'visits': 'visits',
43 'last_timestamp': 'lastTimestamp',
44 'pagination_key': 'paginationKey'
45 }
47 def __init__(self, visitor_id=None, visits=None, last_timestamp=None, pagination_key=None): # noqa: E501
48 """Response - a model defined in Swagger""" # noqa: E501
49 self._visitor_id = None
50 self._visits = None
51 self._last_timestamp = None
52 self._pagination_key = None
53 self.discriminator = None
54 self.visitor_id = visitor_id
55 self.visits = visits
56 if last_timestamp is not None:
57 self.last_timestamp = last_timestamp
58 if pagination_key is not None:
59 self.pagination_key = pagination_key
61 @property
62 def visitor_id(self):
63 """Gets the visitor_id of this Response. # noqa: E501
66 :return: The visitor_id of this Response. # noqa: E501
67 :rtype: str
68 """
69 return self._visitor_id
71 @visitor_id.setter
72 def visitor_id(self, visitor_id):
73 """Sets the visitor_id of this Response.
76 :param visitor_id: The visitor_id of this Response. # noqa: E501
77 :type: str
78 """
79 if visitor_id is None:
80 raise ValueError("Invalid value for `visitor_id`, must not be `None`") # noqa: E501
82 self._visitor_id = visitor_id
84 @property
85 def visits(self):
86 """Gets the visits of this Response. # noqa: E501
89 :return: The visits of this Response. # noqa: E501
90 :rtype: list[ResponseVisits]
91 """
92 return self._visits
94 @visits.setter
95 def visits(self, visits):
96 """Sets the visits of this Response.
99 :param visits: The visits of this Response. # noqa: E501
100 :type: list[ResponseVisits]
101 """
102 if visits is None:
103 raise ValueError("Invalid value for `visits`, must not be `None`") # noqa: E501
105 self._visits = visits
107 @property
108 def last_timestamp(self):
109 """Gets the last_timestamp of this Response. # noqa: E501
111 ⚠️ Deprecated paging attribute, please use `paginationKey` instead. Timestamp of the last visit in the current page of results. # noqa: E501
113 :return: The last_timestamp of this Response. # noqa: E501
114 :rtype: int
115 """
116 return self._last_timestamp
118 @last_timestamp.setter
119 def last_timestamp(self, last_timestamp):
120 """Sets the last_timestamp of this Response.
122 ⚠️ Deprecated paging attribute, please use `paginationKey` instead. Timestamp of the last visit in the current page of results. # noqa: E501
124 :param last_timestamp: The last_timestamp of this Response. # noqa: E501
125 :type: int
126 """
128 self._last_timestamp = last_timestamp
130 @property
131 def pagination_key(self):
132 """Gets the pagination_key of this Response. # noqa: E501
134 Request ID of the last visit in the current page of results. Use this value in the following request as the `paginationKey` parameter to get the next page of results. # noqa: E501
136 :return: The pagination_key of this Response. # noqa: E501
137 :rtype: str
138 """
139 return self._pagination_key
141 @pagination_key.setter
142 def pagination_key(self, pagination_key):
143 """Sets the pagination_key of this Response.
145 Request ID of the last visit in the current page of results. Use this value in the following request as the `paginationKey` parameter to get the next page of results. # noqa: E501
147 :param pagination_key: The pagination_key of this Response. # noqa: E501
148 :type: str
149 """
151 self._pagination_key = pagination_key
153 def to_dict(self):
154 """Returns the model properties as a dict"""
155 result = {}
157 for attr, _ in six.iteritems(self.swagger_types):
158 value = getattr(self, attr)
159 if isinstance(value, list):
160 result[attr] = list(map(
161 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
162 value
163 ))
164 elif hasattr(value, "to_dict"):
165 result[attr] = value.to_dict()
166 elif isinstance(value, dict):
167 result[attr] = dict(map(
168 lambda item: (item[0], item[1].to_dict())
169 if hasattr(item[1], "to_dict") else item,
170 value.items()
171 ))
172 else:
173 result[attr] = value
174 if issubclass(Response, dict):
175 for key, value in self.items():
176 result[key] = value
178 return result
180 def to_str(self):
181 """Returns the string representation of the model"""
182 return pprint.pformat(self.to_dict())
184 def __repr__(self):
185 """For `print` and `pprint`"""
186 return self.to_str()
188 def __eq__(self, other):
189 """Returns true if both objects are equal"""
190 if not isinstance(other, Response):
191 return False
193 return self.to_dict() == other.to_dict()
195 def __ne__(self, other):
196 """Returns true if both objects are not equal"""
197 if not isinstance(other, Response):
198 return True
200 return self.to_dict() != other.to_dict()