Coverage for fingerprint_pro_server_api_sdk/models/ip_info_result_v6.py: 62%
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 IpInfoResultV6(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 'address': 'str',
32 'geolocation': 'IPLocation',
33 'asn': 'ASN',
34 'datacenter': 'DataCenter'
35 }
37 attribute_map = {
38 'address': 'address',
39 'geolocation': 'geolocation',
40 'asn': 'asn',
41 'datacenter': 'datacenter'
42 }
44 def __init__(self, address=None, geolocation=None, asn=None, datacenter=None): # noqa: E501
45 """IpInfoResultV6 - a model defined in Swagger""" # noqa: E501
46 self._address = None
47 self._geolocation = None
48 self._asn = None
49 self._datacenter = None
50 self.discriminator = None
51 self.address = address
52 self.geolocation = geolocation
53 if asn is not None:
54 self.asn = asn
55 if datacenter is not None:
56 self.datacenter = datacenter
58 @property
59 def address(self):
60 """Gets the address of this IpInfoResultV6. # noqa: E501
63 :return: The address of this IpInfoResultV6. # noqa: E501
64 :rtype: str
65 """
66 return self._address
68 @address.setter
69 def address(self, address):
70 """Sets the address of this IpInfoResultV6.
73 :param address: The address of this IpInfoResultV6. # noqa: E501
74 :type: str
75 """
76 if address is None:
77 raise ValueError("Invalid value for `address`, must not be `None`") # noqa: E501
79 self._address = address
81 @property
82 def geolocation(self):
83 """Gets the geolocation of this IpInfoResultV6. # noqa: E501
86 :return: The geolocation of this IpInfoResultV6. # noqa: E501
87 :rtype: IPLocation
88 """
89 return self._geolocation
91 @geolocation.setter
92 def geolocation(self, geolocation):
93 """Sets the geolocation of this IpInfoResultV6.
96 :param geolocation: The geolocation of this IpInfoResultV6. # noqa: E501
97 :type: IPLocation
98 """
99 if geolocation is None:
100 raise ValueError("Invalid value for `geolocation`, must not be `None`") # noqa: E501
102 self._geolocation = geolocation
104 @property
105 def asn(self):
106 """Gets the asn of this IpInfoResultV6. # noqa: E501
109 :return: The asn of this IpInfoResultV6. # noqa: E501
110 :rtype: ASN
111 """
112 return self._asn
114 @asn.setter
115 def asn(self, asn):
116 """Sets the asn of this IpInfoResultV6.
119 :param asn: The asn of this IpInfoResultV6. # noqa: E501
120 :type: ASN
121 """
123 self._asn = asn
125 @property
126 def datacenter(self):
127 """Gets the datacenter of this IpInfoResultV6. # noqa: E501
130 :return: The datacenter of this IpInfoResultV6. # noqa: E501
131 :rtype: DataCenter
132 """
133 return self._datacenter
135 @datacenter.setter
136 def datacenter(self, datacenter):
137 """Sets the datacenter of this IpInfoResultV6.
140 :param datacenter: The datacenter of this IpInfoResultV6. # noqa: E501
141 :type: DataCenter
142 """
144 self._datacenter = datacenter
146 def to_dict(self):
147 """Returns the model properties as a dict"""
148 result = {}
150 for attr, _ in six.iteritems(self.swagger_types):
151 value = getattr(self, attr)
152 if isinstance(value, list):
153 result[attr] = list(map(
154 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
155 value
156 ))
157 elif hasattr(value, "to_dict"):
158 result[attr] = value.to_dict()
159 elif isinstance(value, dict):
160 result[attr] = dict(map(
161 lambda item: (item[0], item[1].to_dict())
162 if hasattr(item[1], "to_dict") else item,
163 value.items()
164 ))
165 else:
166 result[attr] = value
167 if issubclass(IpInfoResultV6, dict):
168 for key, value in self.items():
169 result[key] = value
171 return result
173 def to_str(self):
174 """Returns the string representation of the model"""
175 return pprint.pformat(self.to_dict())
177 def __repr__(self):
178 """For `print` and `pprint`"""
179 return self.to_str()
181 def __eq__(self, other):
182 """Returns true if both objects are equal"""
183 if not isinstance(other, IpInfoResultV6):
184 return False
186 return self.to_dict() == other.to_dict()
188 def __ne__(self, other):
189 """Returns true if both objects are not equal"""
190 if not isinstance(other, IpInfoResultV6):
191 return True
193 return self.to_dict() != other.to_dict()