Skip to content

Commit

Permalink
chore: inherit TooManyRequestsResponse model from BaseModel too
Browse files Browse the repository at this point in the history
  • Loading branch information
ilfa committed Jul 29, 2024
1 parent 31bee67 commit 76e562c
Showing 1 changed file with 4 additions and 50 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
import pprint
import re # noqa: F401

class TooManyRequestsResponse(object):
from fingerprint_pro_server_api_sdk import BaseModel


class TooManyRequestsResponse(BaseModel):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
Expand Down Expand Up @@ -74,52 +77,3 @@ def retry_after(self):
@retry_after.setter
def retry_after(self, retry_after):
self._retry_after = retry_after

def to_dict(self):
"""Returns the model properties as a dict"""
result = {}

for attr, _ in self.swagger_types.items():
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
result[attr] = value
if issubclass(TooManyRequestsResponse, dict):
for key, value in self.items():
result[key] = value

return result

def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())

def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()

def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, TooManyRequestsResponse):
return False

return self.to_dict() == other.to_dict()

def __ne__(self, other):
"""Returns true if both objects are not equal"""
if not isinstance(other, TooManyRequestsResponse):
return True

return self.to_dict() != other.to_dict()

0 comments on commit 76e562c

Please sign in to comment.