Coverage for fingerprint_pro_server_api_sdk/models/ip_block_list_result.py: 54%
56 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 IpBlockListResult(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 'result': 'bool',
32 'details': 'IpBlockListResultDetails'
33 }
35 attribute_map = {
36 'result': 'result',
37 'details': 'details'
38 }
40 def __init__(self, result=None, details=None): # noqa: E501
41 """IpBlockListResult - a model defined in Swagger""" # noqa: E501
42 self._result = None
43 self._details = None
44 self.discriminator = None
45 self.result = result
46 self.details = details
48 @property
49 def result(self):
50 """Gets the result of this IpBlockListResult. # noqa: E501
52 `true` if request IP address is part of any database that we use to search for known malicious actors, `false` otherwise. # noqa: E501
54 :return: The result of this IpBlockListResult. # noqa: E501
55 :rtype: bool
56 """
57 return self._result
59 @result.setter
60 def result(self, result):
61 """Sets the result of this IpBlockListResult.
63 `true` if request IP address is part of any database that we use to search for known malicious actors, `false` otherwise. # noqa: E501
65 :param result: The result of this IpBlockListResult. # noqa: E501
66 :type: bool
67 """
68 if result is None:
69 raise ValueError("Invalid value for `result`, must not be `None`") # noqa: E501
71 self._result = result
73 @property
74 def details(self):
75 """Gets the details of this IpBlockListResult. # noqa: E501
78 :return: The details of this IpBlockListResult. # noqa: E501
79 :rtype: IpBlockListResultDetails
80 """
81 return self._details
83 @details.setter
84 def details(self, details):
85 """Sets the details of this IpBlockListResult.
88 :param details: The details of this IpBlockListResult. # noqa: E501
89 :type: IpBlockListResultDetails
90 """
91 if details is None:
92 raise ValueError("Invalid value for `details`, must not be `None`") # noqa: E501
94 self._details = details
96 def to_dict(self):
97 """Returns the model properties as a dict"""
98 result = {}
100 for attr, _ in six.iteritems(self.swagger_types):
101 value = getattr(self, attr)
102 if isinstance(value, list):
103 result[attr] = list(map(
104 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
105 value
106 ))
107 elif hasattr(value, "to_dict"):
108 result[attr] = value.to_dict()
109 elif isinstance(value, dict):
110 result[attr] = dict(map(
111 lambda item: (item[0], item[1].to_dict())
112 if hasattr(item[1], "to_dict") else item,
113 value.items()
114 ))
115 else:
116 result[attr] = value
117 if issubclass(IpBlockListResult, dict):
118 for key, value in self.items():
119 result[key] = value
121 return result
123 def to_str(self):
124 """Returns the string representation of the model"""
125 return pprint.pformat(self.to_dict())
127 def __repr__(self):
128 """For `print` and `pprint`"""
129 return self.to_str()
131 def __eq__(self, other):
132 """Returns true if both objects are equal"""
133 if not isinstance(other, IpBlockListResult):
134 return False
136 return self.to_dict() == other.to_dict()
138 def __ne__(self, other):
139 """Returns true if both objects are not equal"""
140 if not isinstance(other, IpBlockListResult):
141 return True
143 return self.to_dict() != other.to_dict()