Coverage for fingerprint_pro_server_api_sdk/models/deprecated_ip_location.py: 74%
117 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 DeprecatedIPLocation(object):
19 """
20 This field is **deprecated** and will not return a result for **applications created after January 23rd, 2024**. Please use the [IP Geolocation Smart signal](https://dev.fingerprint.com/docs/smart-signals-overview#ip-geolocation) for geolocation information.
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 'accuracy_radius': 'int',
35 'latitude': 'float',
36 'longitude': 'float',
37 'postal_code': 'str',
38 'timezone': 'str',
39 'city': 'DeprecatedIPLocationCity',
40 'country': 'Location',
41 'continent': 'Location',
42 'subdivisions': 'list[Subdivision]'
43 }
45 attribute_map = {
46 'accuracy_radius': 'accuracyRadius',
47 'latitude': 'latitude',
48 'longitude': 'longitude',
49 'postal_code': 'postalCode',
50 'timezone': 'timezone',
51 'city': 'city',
52 'country': 'country',
53 'continent': 'continent',
54 'subdivisions': 'subdivisions'
55 }
57 def __init__(self, accuracy_radius=None, latitude=None, longitude=None, postal_code=None, timezone=None, city=None, country=None, continent=None, subdivisions=None): # noqa: E501
58 """DeprecatedIPLocation - a model defined in Swagger""" # noqa: E501
59 self._accuracy_radius = None
60 self._latitude = None
61 self._longitude = None
62 self._postal_code = None
63 self._timezone = None
64 self._city = None
65 self._country = None
66 self._continent = None
67 self._subdivisions = None
68 self.discriminator = None
69 if accuracy_radius is not None:
70 self.accuracy_radius = accuracy_radius
71 if latitude is not None:
72 self.latitude = latitude
73 if longitude is not None:
74 self.longitude = longitude
75 if postal_code is not None:
76 self.postal_code = postal_code
77 if timezone is not None:
78 self.timezone = timezone
79 if city is not None:
80 self.city = city
81 if country is not None:
82 self.country = country
83 if continent is not None:
84 self.continent = continent
85 if subdivisions is not None:
86 self.subdivisions = subdivisions
88 @property
89 def accuracy_radius(self):
90 """Gets the accuracy_radius of this DeprecatedIPLocation. # noqa: E501
92 The IP address is likely to be within this radius (in km) of the specified location. # noqa: E501
94 :return: The accuracy_radius of this DeprecatedIPLocation. # noqa: E501
95 :rtype: int
96 """
97 return self._accuracy_radius
99 @accuracy_radius.setter
100 def accuracy_radius(self, accuracy_radius):
101 """Sets the accuracy_radius of this DeprecatedIPLocation.
103 The IP address is likely to be within this radius (in km) of the specified location. # noqa: E501
105 :param accuracy_radius: The accuracy_radius of this DeprecatedIPLocation. # noqa: E501
106 :type: int
107 """
109 self._accuracy_radius = accuracy_radius
111 @property
112 def latitude(self):
113 """Gets the latitude of this DeprecatedIPLocation. # noqa: E501
116 :return: The latitude of this DeprecatedIPLocation. # noqa: E501
117 :rtype: float
118 """
119 return self._latitude
121 @latitude.setter
122 def latitude(self, latitude):
123 """Sets the latitude of this DeprecatedIPLocation.
126 :param latitude: The latitude of this DeprecatedIPLocation. # noqa: E501
127 :type: float
128 """
130 self._latitude = latitude
132 @property
133 def longitude(self):
134 """Gets the longitude of this DeprecatedIPLocation. # noqa: E501
137 :return: The longitude of this DeprecatedIPLocation. # noqa: E501
138 :rtype: float
139 """
140 return self._longitude
142 @longitude.setter
143 def longitude(self, longitude):
144 """Sets the longitude of this DeprecatedIPLocation.
147 :param longitude: The longitude of this DeprecatedIPLocation. # noqa: E501
148 :type: float
149 """
151 self._longitude = longitude
153 @property
154 def postal_code(self):
155 """Gets the postal_code of this DeprecatedIPLocation. # noqa: E501
158 :return: The postal_code of this DeprecatedIPLocation. # noqa: E501
159 :rtype: str
160 """
161 return self._postal_code
163 @postal_code.setter
164 def postal_code(self, postal_code):
165 """Sets the postal_code of this DeprecatedIPLocation.
168 :param postal_code: The postal_code of this DeprecatedIPLocation. # noqa: E501
169 :type: str
170 """
172 self._postal_code = postal_code
174 @property
175 def timezone(self):
176 """Gets the timezone of this DeprecatedIPLocation. # noqa: E501
179 :return: The timezone of this DeprecatedIPLocation. # noqa: E501
180 :rtype: str
181 """
182 return self._timezone
184 @timezone.setter
185 def timezone(self, timezone):
186 """Sets the timezone of this DeprecatedIPLocation.
189 :param timezone: The timezone of this DeprecatedIPLocation. # noqa: E501
190 :type: str
191 """
193 self._timezone = timezone
195 @property
196 def city(self):
197 """Gets the city of this DeprecatedIPLocation. # noqa: E501
200 :return: The city of this DeprecatedIPLocation. # noqa: E501
201 :rtype: DeprecatedIPLocationCity
202 """
203 return self._city
205 @city.setter
206 def city(self, city):
207 """Sets the city of this DeprecatedIPLocation.
210 :param city: The city of this DeprecatedIPLocation. # noqa: E501
211 :type: DeprecatedIPLocationCity
212 """
214 self._city = city
216 @property
217 def country(self):
218 """Gets the country of this DeprecatedIPLocation. # noqa: E501
221 :return: The country of this DeprecatedIPLocation. # noqa: E501
222 :rtype: Location
223 """
224 return self._country
226 @country.setter
227 def country(self, country):
228 """Sets the country of this DeprecatedIPLocation.
231 :param country: The country of this DeprecatedIPLocation. # noqa: E501
232 :type: Location
233 """
235 self._country = country
237 @property
238 def continent(self):
239 """Gets the continent of this DeprecatedIPLocation. # noqa: E501
242 :return: The continent of this DeprecatedIPLocation. # noqa: E501
243 :rtype: Location
244 """
245 return self._continent
247 @continent.setter
248 def continent(self, continent):
249 """Sets the continent of this DeprecatedIPLocation.
252 :param continent: The continent of this DeprecatedIPLocation. # noqa: E501
253 :type: Location
254 """
256 self._continent = continent
258 @property
259 def subdivisions(self):
260 """Gets the subdivisions of this DeprecatedIPLocation. # noqa: E501
263 :return: The subdivisions of this DeprecatedIPLocation. # noqa: E501
264 :rtype: list[Subdivision]
265 """
266 return self._subdivisions
268 @subdivisions.setter
269 def subdivisions(self, subdivisions):
270 """Sets the subdivisions of this DeprecatedIPLocation.
273 :param subdivisions: The subdivisions of this DeprecatedIPLocation. # noqa: E501
274 :type: list[Subdivision]
275 """
277 self._subdivisions = subdivisions
279 def to_dict(self):
280 """Returns the model properties as a dict"""
281 result = {}
283 for attr, _ in six.iteritems(self.swagger_types):
284 value = getattr(self, attr)
285 if isinstance(value, list):
286 result[attr] = list(map(
287 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
288 value
289 ))
290 elif hasattr(value, "to_dict"):
291 result[attr] = value.to_dict()
292 elif isinstance(value, dict):
293 result[attr] = dict(map(
294 lambda item: (item[0], item[1].to_dict())
295 if hasattr(item[1], "to_dict") else item,
296 value.items()
297 ))
298 else:
299 result[attr] = value
300 if issubclass(DeprecatedIPLocation, dict):
301 for key, value in self.items():
302 result[key] = value
304 return result
306 def to_str(self):
307 """Returns the string representation of the model"""
308 return pprint.pformat(self.to_dict())
310 def __repr__(self):
311 """For `print` and `pprint`"""
312 return self.to_str()
314 def __eq__(self, other):
315 """Returns true if both objects are equal"""
316 if not isinstance(other, DeprecatedIPLocation):
317 return False
319 return self.to_dict() == other.to_dict()
321 def __ne__(self, other):
322 """Returns true if both objects are not equal"""
323 if not isinstance(other, DeprecatedIPLocation):
324 return True
326 return self.to_dict() != other.to_dict()