Coverage for fingerprint_pro_server_api_sdk/models/ip_info_result.py: 56%
54 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 IpInfoResult(object):
19 """
20 Details about the request IP address. Has separate fields for v4 and v6 IP address versions.
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 'v4': 'IpInfoResultV4',
35 'v6': 'IpInfoResultV6'
36 }
38 attribute_map = {
39 'v4': 'v4',
40 'v6': 'v6'
41 }
43 def __init__(self, v4=None, v6=None): # noqa: E501
44 """IpInfoResult - a model defined in Swagger""" # noqa: E501
45 self._v4 = None
46 self._v6 = None
47 self.discriminator = None
48 if v4 is not None:
49 self.v4 = v4
50 if v6 is not None:
51 self.v6 = v6
53 @property
54 def v4(self):
55 """Gets the v4 of this IpInfoResult. # noqa: E501
58 :return: The v4 of this IpInfoResult. # noqa: E501
59 :rtype: IpInfoResultV4
60 """
61 return self._v4
63 @v4.setter
64 def v4(self, v4):
65 """Sets the v4 of this IpInfoResult.
68 :param v4: The v4 of this IpInfoResult. # noqa: E501
69 :type: IpInfoResultV4
70 """
72 self._v4 = v4
74 @property
75 def v6(self):
76 """Gets the v6 of this IpInfoResult. # noqa: E501
79 :return: The v6 of this IpInfoResult. # noqa: E501
80 :rtype: IpInfoResultV6
81 """
82 return self._v6
84 @v6.setter
85 def v6(self, v6):
86 """Sets the v6 of this IpInfoResult.
89 :param v6: The v6 of this IpInfoResult. # noqa: E501
90 :type: IpInfoResultV6
91 """
93 self._v6 = v6
95 def to_dict(self):
96 """Returns the model properties as a dict"""
97 result = {}
99 for attr, _ in six.iteritems(self.swagger_types):
100 value = getattr(self, attr)
101 if isinstance(value, list):
102 result[attr] = list(map(
103 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
104 value
105 ))
106 elif hasattr(value, "to_dict"):
107 result[attr] = value.to_dict()
108 elif isinstance(value, dict):
109 result[attr] = dict(map(
110 lambda item: (item[0], item[1].to_dict())
111 if hasattr(item[1], "to_dict") else item,
112 value.items()
113 ))
114 else:
115 result[attr] = value
116 if issubclass(IpInfoResult, dict):
117 for key, value in self.items():
118 result[key] = value
120 return result
122 def to_str(self):
123 """Returns the string representation of the model"""
124 return pprint.pformat(self.to_dict())
126 def __repr__(self):
127 """For `print` and `pprint`"""
128 return self.to_str()
130 def __eq__(self, other):
131 """Returns true if both objects are equal"""
132 if not isinstance(other, IpInfoResult):
133 return False
135 return self.to_dict() == other.to_dict()
137 def __ne__(self, other):
138 """Returns true if both objects are not equal"""
139 if not isinstance(other, IpInfoResult):
140 return True
142 return self.to_dict() != other.to_dict()