Coverage for fingerprint_pro_server_api_sdk/models/browser_details.py: 68%
115 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 BrowserDetails(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 'browser_name': 'str',
32 'browser_major_version': 'str',
33 'browser_full_version': 'str',
34 'os': 'str',
35 'os_version': 'str',
36 'device': 'str',
37 'user_agent': 'str',
38 'bot_probability': 'int'
39 }
41 attribute_map = {
42 'browser_name': 'browserName',
43 'browser_major_version': 'browserMajorVersion',
44 'browser_full_version': 'browserFullVersion',
45 'os': 'os',
46 'os_version': 'osVersion',
47 'device': 'device',
48 'user_agent': 'userAgent',
49 'bot_probability': 'botProbability'
50 }
52 def __init__(self, browser_name=None, browser_major_version=None, browser_full_version=None, os=None, os_version=None, device=None, user_agent=None, bot_probability=None): # noqa: E501
53 """BrowserDetails - a model defined in Swagger""" # noqa: E501
54 self._browser_name = None
55 self._browser_major_version = None
56 self._browser_full_version = None
57 self._os = None
58 self._os_version = None
59 self._device = None
60 self._user_agent = None
61 self._bot_probability = None
62 self.discriminator = None
63 self.browser_name = browser_name
64 self.browser_major_version = browser_major_version
65 self.browser_full_version = browser_full_version
66 self.os = os
67 self.os_version = os_version
68 self.device = device
69 self.user_agent = user_agent
70 if bot_probability is not None:
71 self.bot_probability = bot_probability
73 @property
74 def browser_name(self):
75 """Gets the browser_name of this BrowserDetails. # noqa: E501
78 :return: The browser_name of this BrowserDetails. # noqa: E501
79 :rtype: str
80 """
81 return self._browser_name
83 @browser_name.setter
84 def browser_name(self, browser_name):
85 """Sets the browser_name of this BrowserDetails.
88 :param browser_name: The browser_name of this BrowserDetails. # noqa: E501
89 :type: str
90 """
91 if browser_name is None:
92 raise ValueError("Invalid value for `browser_name`, must not be `None`") # noqa: E501
94 self._browser_name = browser_name
96 @property
97 def browser_major_version(self):
98 """Gets the browser_major_version of this BrowserDetails. # noqa: E501
101 :return: The browser_major_version of this BrowserDetails. # noqa: E501
102 :rtype: str
103 """
104 return self._browser_major_version
106 @browser_major_version.setter
107 def browser_major_version(self, browser_major_version):
108 """Sets the browser_major_version of this BrowserDetails.
111 :param browser_major_version: The browser_major_version of this BrowserDetails. # noqa: E501
112 :type: str
113 """
114 if browser_major_version is None:
115 raise ValueError("Invalid value for `browser_major_version`, must not be `None`") # noqa: E501
117 self._browser_major_version = browser_major_version
119 @property
120 def browser_full_version(self):
121 """Gets the browser_full_version of this BrowserDetails. # noqa: E501
124 :return: The browser_full_version of this BrowserDetails. # noqa: E501
125 :rtype: str
126 """
127 return self._browser_full_version
129 @browser_full_version.setter
130 def browser_full_version(self, browser_full_version):
131 """Sets the browser_full_version of this BrowserDetails.
134 :param browser_full_version: The browser_full_version of this BrowserDetails. # noqa: E501
135 :type: str
136 """
137 if browser_full_version is None:
138 raise ValueError("Invalid value for `browser_full_version`, must not be `None`") # noqa: E501
140 self._browser_full_version = browser_full_version
142 @property
143 def os(self):
144 """Gets the os of this BrowserDetails. # noqa: E501
147 :return: The os of this BrowserDetails. # noqa: E501
148 :rtype: str
149 """
150 return self._os
152 @os.setter
153 def os(self, os):
154 """Sets the os of this BrowserDetails.
157 :param os: The os of this BrowserDetails. # noqa: E501
158 :type: str
159 """
160 if os is None:
161 raise ValueError("Invalid value for `os`, must not be `None`") # noqa: E501
163 self._os = os
165 @property
166 def os_version(self):
167 """Gets the os_version of this BrowserDetails. # noqa: E501
170 :return: The os_version of this BrowserDetails. # noqa: E501
171 :rtype: str
172 """
173 return self._os_version
175 @os_version.setter
176 def os_version(self, os_version):
177 """Sets the os_version of this BrowserDetails.
180 :param os_version: The os_version of this BrowserDetails. # noqa: E501
181 :type: str
182 """
183 if os_version is None:
184 raise ValueError("Invalid value for `os_version`, must not be `None`") # noqa: E501
186 self._os_version = os_version
188 @property
189 def device(self):
190 """Gets the device of this BrowserDetails. # noqa: E501
193 :return: The device of this BrowserDetails. # noqa: E501
194 :rtype: str
195 """
196 return self._device
198 @device.setter
199 def device(self, device):
200 """Sets the device of this BrowserDetails.
203 :param device: The device of this BrowserDetails. # noqa: E501
204 :type: str
205 """
206 if device is None:
207 raise ValueError("Invalid value for `device`, must not be `None`") # noqa: E501
209 self._device = device
211 @property
212 def user_agent(self):
213 """Gets the user_agent of this BrowserDetails. # noqa: E501
216 :return: The user_agent of this BrowserDetails. # noqa: E501
217 :rtype: str
218 """
219 return self._user_agent
221 @user_agent.setter
222 def user_agent(self, user_agent):
223 """Sets the user_agent of this BrowserDetails.
226 :param user_agent: The user_agent of this BrowserDetails. # noqa: E501
227 :type: str
228 """
229 if user_agent is None:
230 raise ValueError("Invalid value for `user_agent`, must not be `None`") # noqa: E501
232 self._user_agent = user_agent
234 @property
235 def bot_probability(self):
236 """Gets the bot_probability of this BrowserDetails. # noqa: E501
239 :return: The bot_probability of this BrowserDetails. # noqa: E501
240 :rtype: int
241 """
242 return self._bot_probability
244 @bot_probability.setter
245 def bot_probability(self, bot_probability):
246 """Sets the bot_probability of this BrowserDetails.
249 :param bot_probability: The bot_probability of this BrowserDetails. # noqa: E501
250 :type: int
251 """
253 self._bot_probability = bot_probability
255 def to_dict(self):
256 """Returns the model properties as a dict"""
257 result = {}
259 for attr, _ in six.iteritems(self.swagger_types):
260 value = getattr(self, attr)
261 if isinstance(value, list):
262 result[attr] = list(map(
263 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
264 value
265 ))
266 elif hasattr(value, "to_dict"):
267 result[attr] = value.to_dict()
268 elif isinstance(value, dict):
269 result[attr] = dict(map(
270 lambda item: (item[0], item[1].to_dict())
271 if hasattr(item[1], "to_dict") else item,
272 value.items()
273 ))
274 else:
275 result[attr] = value
276 if issubclass(BrowserDetails, dict):
277 for key, value in self.items():
278 result[key] = value
280 return result
282 def to_str(self):
283 """Returns the string representation of the model"""
284 return pprint.pformat(self.to_dict())
286 def __repr__(self):
287 """For `print` and `pprint`"""
288 return self.to_str()
290 def __eq__(self, other):
291 """Returns true if both objects are equal"""
292 if not isinstance(other, BrowserDetails):
293 return False
295 return self.to_dict() == other.to_dict()
297 def __ne__(self, other):
298 """Returns true if both objects are not equal"""
299 if not isinstance(other, BrowserDetails):
300 return True
302 return self.to_dict() != other.to_dict()