Coverage for fingerprint_pro_server_api_sdk/models/many_requests_response.py: 55%
53 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. This API can be used for data exports, decision-making, and data analysis scenarios. # 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
19class ManyRequestsResponse(object):
20 """NOTE: This class is auto generated by the swagger code generator program.
22 Do not edit the class manually.
23 """
24 """
25 Attributes:
26 swagger_types (dict): The key is attribute name
27 and the value is attribute type.
28 attribute_map (dict): The key is attribute name
29 and the value is json key in definition.
30 """
31 swagger_types = {
32 'error': 'str',
33 'retry_after': 'int'
34 }
36 attribute_map = {
37 'error': 'error',
38 'retry_after': 'retry_after'
39 }
41 def __init__(self, error=None): # noqa: E501
42 """ManyRequestsResponse - a model defined in Swagger""" # noqa: E501
43 self._error = None
44 self.discriminator = None
45 self.error = error
46 self._retry_after = 0
48 @property
49 def error(self):
50 """Gets the error of this ManyRequestsResponse. # noqa: E501
52 Error text. # noqa: E501
54 :return: The error of this ManyRequestsResponse. # noqa: E501
55 :rtype: str
56 """
57 return self._error
59 @error.setter
60 def error(self, error):
61 """Sets the error of this ManyRequestsResponse.
63 Error text. # noqa: E501
65 :param error: The error of this ManyRequestsResponse. # noqa: E501
66 :type: str
67 """
68 if error is None:
69 raise ValueError("Invalid value for `error`, must not be `None`") # noqa: E501
71 self._error = error
73 @property
74 def retry_after(self):
75 return self._retry_after
77 @retry_after.setter
78 def retry_after(self, retry_after):
79 self._retry_after = retry_after
81 def to_dict(self):
82 """Returns the model properties as a dict"""
83 result = {}
85 for attr, _ in six.iteritems(self.swagger_types):
86 value = getattr(self, attr)
87 if isinstance(value, list):
88 result[attr] = list(map(
89 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
90 value
91 ))
92 elif hasattr(value, "to_dict"):
93 result[attr] = value.to_dict()
94 elif isinstance(value, dict):
95 result[attr] = dict(map(
96 lambda item: (item[0], item[1].to_dict())
97 if hasattr(item[1], "to_dict") else item,
98 value.items()
99 ))
100 else:
101 result[attr] = value
102 if issubclass(ManyRequestsResponse, dict):
103 for key, value in self.items():
104 result[key] = value
106 return result
108 def to_str(self):
109 """Returns the string representation of the model"""
110 return pprint.pformat(self.to_dict())
112 def __repr__(self):
113 """For `print` and `pprint`"""
114 return self.to_str()
116 def __eq__(self, other):
117 """Returns true if both objects are equal"""
118 if not isinstance(other, ManyRequestsResponse):
119 return False
121 return self.to_dict() == other.to_dict()
123 def __ne__(self, other):
124 """Returns true if both objects are not equal"""
125 if not isinstance(other, ManyRequestsResponse):
126 return True
128 return self.to_dict() != other.to_dict()