Coverage for fingerprint_pro_server_api_sdk/models/botd_result.py: 65%
105 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 BotdResult(object):
19 """
20 Contains all the information from Bot Detection product
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 'ip': 'str',
35 'time': 'datetime',
36 'url': 'str',
37 'user_agent': 'str',
38 'request_id': 'str',
39 'linked_id': 'str',
40 'bot': 'BotdDetectionResult'
41 }
43 attribute_map = {
44 'ip': 'ip',
45 'time': 'time',
46 'url': 'url',
47 'user_agent': 'userAgent',
48 'request_id': 'requestId',
49 'linked_id': 'linkedId',
50 'bot': 'bot'
51 }
53 def __init__(self, ip=None, time=None, url=None, user_agent=None, request_id=None, linked_id=None, bot=None): # noqa: E501
54 """BotdResult - a model defined in Swagger""" # noqa: E501
55 self._ip = None
56 self._time = None
57 self._url = None
58 self._user_agent = None
59 self._request_id = None
60 self._linked_id = None
61 self._bot = None
62 self.discriminator = None
63 self.ip = ip
64 self.time = time
65 self.url = url
66 self.user_agent = user_agent
67 self.request_id = request_id
68 if linked_id is not None:
69 self.linked_id = linked_id
70 self.bot = bot
72 @property
73 def ip(self):
74 """Gets the ip of this BotdResult. # noqa: E501
76 IP address of the requesting browser or bot. # noqa: E501
78 :return: The ip of this BotdResult. # noqa: E501
79 :rtype: str
80 """
81 return self._ip
83 @ip.setter
84 def ip(self, ip):
85 """Sets the ip of this BotdResult.
87 IP address of the requesting browser or bot. # noqa: E501
89 :param ip: The ip of this BotdResult. # noqa: E501
90 :type: str
91 """
92 if ip is None:
93 raise ValueError("Invalid value for `ip`, must not be `None`") # noqa: E501
95 self._ip = ip
97 @property
98 def time(self):
99 """Gets the time of this BotdResult. # noqa: E501
101 Time in UTC 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
103 :return: The time of this BotdResult. # noqa: E501
104 :rtype: datetime
105 """
106 return self._time
108 @time.setter
109 def time(self, time):
110 """Sets the time of this BotdResult.
112 Time in UTC 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
114 :param time: The time of this BotdResult. # noqa: E501
115 :type: datetime
116 """
117 if time is None:
118 raise ValueError("Invalid value for `time`, must not be `None`") # noqa: E501
120 self._time = time
122 @property
123 def url(self):
124 """Gets the url of this BotdResult. # noqa: E501
126 Page URL from which identification request was sent. # noqa: E501
128 :return: The url of this BotdResult. # noqa: E501
129 :rtype: str
130 """
131 return self._url
133 @url.setter
134 def url(self, url):
135 """Sets the url of this BotdResult.
137 Page URL from which identification request was sent. # noqa: E501
139 :param url: The url of this BotdResult. # noqa: E501
140 :type: str
141 """
142 if url is None:
143 raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501
145 self._url = url
147 @property
148 def user_agent(self):
149 """Gets the user_agent of this BotdResult. # noqa: E501
152 :return: The user_agent of this BotdResult. # noqa: E501
153 :rtype: str
154 """
155 return self._user_agent
157 @user_agent.setter
158 def user_agent(self, user_agent):
159 """Sets the user_agent of this BotdResult.
162 :param user_agent: The user_agent of this BotdResult. # noqa: E501
163 :type: str
164 """
165 if user_agent is None:
166 raise ValueError("Invalid value for `user_agent`, must not be `None`") # noqa: E501
168 self._user_agent = user_agent
170 @property
171 def request_id(self):
172 """Gets the request_id of this BotdResult. # noqa: E501
175 :return: The request_id of this BotdResult. # noqa: E501
176 :rtype: str
177 """
178 return self._request_id
180 @request_id.setter
181 def request_id(self, request_id):
182 """Sets the request_id of this BotdResult.
185 :param request_id: The request_id of this BotdResult. # noqa: E501
186 :type: str
187 """
188 if request_id is None:
189 raise ValueError("Invalid value for `request_id`, must not be `None`") # noqa: E501
191 self._request_id = request_id
193 @property
194 def linked_id(self):
195 """Gets the linked_id of this BotdResult. # noqa: E501
198 :return: The linked_id of this BotdResult. # noqa: E501
199 :rtype: str
200 """
201 return self._linked_id
203 @linked_id.setter
204 def linked_id(self, linked_id):
205 """Sets the linked_id of this BotdResult.
208 :param linked_id: The linked_id of this BotdResult. # noqa: E501
209 :type: str
210 """
212 self._linked_id = linked_id
214 @property
215 def bot(self):
216 """Gets the bot of this BotdResult. # noqa: E501
219 :return: The bot of this BotdResult. # noqa: E501
220 :rtype: BotdDetectionResult
221 """
222 return self._bot
224 @bot.setter
225 def bot(self, bot):
226 """Sets the bot of this BotdResult.
229 :param bot: The bot of this BotdResult. # noqa: E501
230 :type: BotdDetectionResult
231 """
232 if bot is None:
233 raise ValueError("Invalid value for `bot`, must not be `None`") # noqa: E501
235 self._bot = bot
237 def to_dict(self):
238 """Returns the model properties as a dict"""
239 result = {}
241 for attr, _ in six.iteritems(self.swagger_types):
242 value = getattr(self, attr)
243 if isinstance(value, list):
244 result[attr] = list(map(
245 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
246 value
247 ))
248 elif hasattr(value, "to_dict"):
249 result[attr] = value.to_dict()
250 elif isinstance(value, dict):
251 result[attr] = dict(map(
252 lambda item: (item[0], item[1].to_dict())
253 if hasattr(item[1], "to_dict") else item,
254 value.items()
255 ))
256 else:
257 result[attr] = value
258 if issubclass(BotdResult, dict):
259 for key, value in self.items():
260 result[key] = value
262 return result
264 def to_str(self):
265 """Returns the string representation of the model"""
266 return pprint.pformat(self.to_dict())
268 def __repr__(self):
269 """For `print` and `pprint`"""
270 return self.to_str()
272 def __eq__(self, other):
273 """Returns true if both objects are equal"""
274 if not isinstance(other, BotdResult):
275 return False
277 return self.to_dict() == other.to_dict()
279 def __ne__(self, other):
280 """Returns true if both objects are not equal"""
281 if not isinstance(other, BotdResult):
282 return True
284 return self.to_dict() != other.to_dict()