From 9c05f3e9492c3a1374ef5a950b95420be9600af5 Mon Sep 17 00:00:00 2001 From: Ilya Taratukhin Date: Thu, 25 Aug 2022 15:21:21 +0300 Subject: [PATCH] fix: regenerate schema with nullable types support --- .../models/browser_details.py | 7 +++++-- fingerprint_pro_server_api_sdk/models/confidence.py | 7 +++++-- fingerprint_pro_server_api_sdk/models/ip_location.py | 7 +++++-- .../models/ip_location_city.py | 7 +++++-- fingerprint_pro_server_api_sdk/models/location.py | 7 +++++-- .../models/many_requests_response.py | 7 +++++-- fingerprint_pro_server_api_sdk/models/response.py | 7 +++++-- fingerprint_pro_server_api_sdk/models/st_seen_at.py | 11 +++++------ fingerprint_pro_server_api_sdk/models/subdivision.py | 7 +++++-- fingerprint_pro_server_api_sdk/models/visit.py | 7 +++++-- .../models/webhook_visit.py | 7 +++++-- res/fingerprint-server-api.yaml | 3 ++- 12 files changed, 57 insertions(+), 27 deletions(-) diff --git a/fingerprint_pro_server_api_sdk/models/browser_details.py b/fingerprint_pro_server_api_sdk/models/browser_details.py index 8420ff35..acf6ff13 100644 --- a/fingerprint_pro_server_api_sdk/models/browser_details.py +++ b/fingerprint_pro_server_api_sdk/models/browser_details.py @@ -292,8 +292,11 @@ def __eq__(self, other): if not isinstance(other, BrowserDetails): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, BrowserDetails): + return True + + return self.to_dict() != other.to_dict() diff --git a/fingerprint_pro_server_api_sdk/models/confidence.py b/fingerprint_pro_server_api_sdk/models/confidence.py index 1c7a4b13..d525f0b5 100644 --- a/fingerprint_pro_server_api_sdk/models/confidence.py +++ b/fingerprint_pro_server_api_sdk/models/confidence.py @@ -106,8 +106,11 @@ def __eq__(self, other): if not isinstance(other, Confidence): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Confidence): + return True + + return self.to_dict() != other.to_dict() diff --git a/fingerprint_pro_server_api_sdk/models/ip_location.py b/fingerprint_pro_server_api_sdk/models/ip_location.py index ebf8fb80..aae3e99a 100644 --- a/fingerprint_pro_server_api_sdk/models/ip_location.py +++ b/fingerprint_pro_server_api_sdk/models/ip_location.py @@ -317,8 +317,11 @@ def __eq__(self, other): if not isinstance(other, IPLocation): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, IPLocation): + return True + + return self.to_dict() != other.to_dict() diff --git a/fingerprint_pro_server_api_sdk/models/ip_location_city.py b/fingerprint_pro_server_api_sdk/models/ip_location_city.py index 1d1b267e..2f23412b 100644 --- a/fingerprint_pro_server_api_sdk/models/ip_location_city.py +++ b/fingerprint_pro_server_api_sdk/models/ip_location_city.py @@ -103,8 +103,11 @@ def __eq__(self, other): if not isinstance(other, IPLocationCity): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, IPLocationCity): + return True + + return self.to_dict() != other.to_dict() diff --git a/fingerprint_pro_server_api_sdk/models/location.py b/fingerprint_pro_server_api_sdk/models/location.py index 3b465f6f..7da95259 100644 --- a/fingerprint_pro_server_api_sdk/models/location.py +++ b/fingerprint_pro_server_api_sdk/models/location.py @@ -131,8 +131,11 @@ def __eq__(self, other): if not isinstance(other, Location): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Location): + return True + + return self.to_dict() != other.to_dict() diff --git a/fingerprint_pro_server_api_sdk/models/many_requests_response.py b/fingerprint_pro_server_api_sdk/models/many_requests_response.py index 67e18325..e89f1050 100644 --- a/fingerprint_pro_server_api_sdk/models/many_requests_response.py +++ b/fingerprint_pro_server_api_sdk/models/many_requests_response.py @@ -106,8 +106,11 @@ def __eq__(self, other): if not isinstance(other, ManyRequestsResponse): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ManyRequestsResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/fingerprint_pro_server_api_sdk/models/response.py b/fingerprint_pro_server_api_sdk/models/response.py index 1fc14778..99b978b1 100644 --- a/fingerprint_pro_server_api_sdk/models/response.py +++ b/fingerprint_pro_server_api_sdk/models/response.py @@ -187,8 +187,11 @@ def __eq__(self, other): if not isinstance(other, Response): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Response): + return True + + return self.to_dict() != other.to_dict() diff --git a/fingerprint_pro_server_api_sdk/models/st_seen_at.py b/fingerprint_pro_server_api_sdk/models/st_seen_at.py index 64cdf3d2..94161f65 100644 --- a/fingerprint_pro_server_api_sdk/models/st_seen_at.py +++ b/fingerprint_pro_server_api_sdk/models/st_seen_at.py @@ -63,8 +63,6 @@ def _global(self, _global): :param _global: The _global of this StSeenAt. # noqa: E501 :type: datetime """ - if _global is None: - raise ValueError("Invalid value for `_global`, must not be `None`") # noqa: E501 self.__global = _global @@ -86,8 +84,6 @@ def subscription(self, subscription): :param subscription: The subscription of this StSeenAt. # noqa: E501 :type: datetime """ - if subscription is None: - raise ValueError("Invalid value for `subscription`, must not be `None`") # noqa: E501 self._subscription = subscription @@ -131,8 +127,11 @@ def __eq__(self, other): if not isinstance(other, StSeenAt): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, StSeenAt): + return True + + return self.to_dict() != other.to_dict() diff --git a/fingerprint_pro_server_api_sdk/models/subdivision.py b/fingerprint_pro_server_api_sdk/models/subdivision.py index 75667a58..590789bd 100644 --- a/fingerprint_pro_server_api_sdk/models/subdivision.py +++ b/fingerprint_pro_server_api_sdk/models/subdivision.py @@ -129,8 +129,11 @@ def __eq__(self, other): if not isinstance(other, Subdivision): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Subdivision): + return True + + return self.to_dict() != other.to_dict() diff --git a/fingerprint_pro_server_api_sdk/models/visit.py b/fingerprint_pro_server_api_sdk/models/visit.py index 3d4aaf93..5edfce4c 100644 --- a/fingerprint_pro_server_api_sdk/models/visit.py +++ b/fingerprint_pro_server_api_sdk/models/visit.py @@ -470,8 +470,11 @@ def __eq__(self, other): if not isinstance(other, Visit): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Visit): + return True + + return self.to_dict() != other.to_dict() diff --git a/fingerprint_pro_server_api_sdk/models/webhook_visit.py b/fingerprint_pro_server_api_sdk/models/webhook_visit.py index 7907c4ec..4cb10a5e 100644 --- a/fingerprint_pro_server_api_sdk/models/webhook_visit.py +++ b/fingerprint_pro_server_api_sdk/models/webhook_visit.py @@ -470,8 +470,11 @@ def __eq__(self, other): if not isinstance(other, WebhookVisit): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, WebhookVisit): + return True + + return self.to_dict() != other.to_dict() diff --git a/res/fingerprint-server-api.yaml b/res/fingerprint-server-api.yaml index d0355fa4..de56b3c7 100644 --- a/res/fingerprint-server-api.yaml +++ b/res/fingerprint-server-api.yaml @@ -3033,6 +3033,7 @@ components: properties: global: type: string + nullable: true format: date-time subscription: type: string @@ -3113,7 +3114,7 @@ components: required: - code - name - title: Continent + title: Location Subdivision: type: object additionalProperties: false