Coverage for fingerprint_pro_server_api_sdk/models/asn.py: 58%
65 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 ASN(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 'asn': 'str',
32 'network': 'str',
33 'name': 'str'
34 }
36 attribute_map = {
37 'asn': 'asn',
38 'network': 'network',
39 'name': 'name'
40 }
42 def __init__(self, asn=None, network=None, name=None): # noqa: E501
43 """ASN - a model defined in Swagger""" # noqa: E501
44 self._asn = None
45 self._network = None
46 self._name = None
47 self.discriminator = None
48 self.asn = asn
49 self.network = network
50 if name is not None:
51 self.name = name
53 @property
54 def asn(self):
55 """Gets the asn of this ASN. # noqa: E501
58 :return: The asn of this ASN. # noqa: E501
59 :rtype: str
60 """
61 return self._asn
63 @asn.setter
64 def asn(self, asn):
65 """Sets the asn of this ASN.
68 :param asn: The asn of this ASN. # noqa: E501
69 :type: str
70 """
71 if asn is None:
72 raise ValueError("Invalid value for `asn`, must not be `None`") # noqa: E501
74 self._asn = asn
76 @property
77 def network(self):
78 """Gets the network of this ASN. # noqa: E501
81 :return: The network of this ASN. # noqa: E501
82 :rtype: str
83 """
84 return self._network
86 @network.setter
87 def network(self, network):
88 """Sets the network of this ASN.
91 :param network: The network of this ASN. # noqa: E501
92 :type: str
93 """
94 if network is None:
95 raise ValueError("Invalid value for `network`, must not be `None`") # noqa: E501
97 self._network = network
99 @property
100 def name(self):
101 """Gets the name of this ASN. # noqa: E501
104 :return: The name of this ASN. # noqa: E501
105 :rtype: str
106 """
107 return self._name
109 @name.setter
110 def name(self, name):
111 """Sets the name of this ASN.
114 :param name: The name of this ASN. # noqa: E501
115 :type: str
116 """
118 self._name = name
120 def to_dict(self):
121 """Returns the model properties as a dict"""
122 result = {}
124 for attr, _ in six.iteritems(self.swagger_types):
125 value = getattr(self, attr)
126 if isinstance(value, list):
127 result[attr] = list(map(
128 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
129 value
130 ))
131 elif hasattr(value, "to_dict"):
132 result[attr] = value.to_dict()
133 elif isinstance(value, dict):
134 result[attr] = dict(map(
135 lambda item: (item[0], item[1].to_dict())
136 if hasattr(item[1], "to_dict") else item,
137 value.items()
138 ))
139 else:
140 result[attr] = value
141 if issubclass(ASN, dict):
142 for key, value in self.items():
143 result[key] = value
145 return result
147 def to_str(self):
148 """Returns the string representation of the model"""
149 return pprint.pformat(self.to_dict())
151 def __repr__(self):
152 """For `print` and `pprint`"""
153 return self.to_str()
155 def __eq__(self, other):
156 """Returns true if both objects are equal"""
157 if not isinstance(other, ASN):
158 return False
160 return self.to_dict() == other.to_dict()
162 def __ne__(self, other):
163 """Returns true if both objects are not equal"""
164 if not isinstance(other, ASN):
165 return True
167 return self.to_dict() != other.to_dict()