From b39189b8a2cee94ab277729033f82460c72c8b38 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 27 Nov 2023 11:59:40 +0000 Subject: [PATCH 1/3] feat: deprecate `IPLocation` --- README.md | 1 + docs/DataCenter.md | 2 + docs/DataCenterInfo.md | 10 ++ docs/IPLocation.md | 2 + docs/IpInfoResultV4.md | 1 + docs/IpInfoResultV6.md | 1 + fingerprint_pro_server_api_sdk/__init__.py | 1 + .../models/__init__.py | 1 + .../models/data_center_info.py | 140 ++++++++++++++++++ .../models/ip_info_result_v4.py | 28 +++- .../models/ip_info_result_v6.py | 28 +++- res/fingerprint-server-api.yaml | 28 +++- test/mocks/get_event.json | 4 +- test/mocks/webhook.json | 4 +- 14 files changed, 243 insertions(+), 8 deletions(-) create mode 100644 docs/DataCenterInfo.md create mode 100644 fingerprint_pro_server_api_sdk/models/data_center_info.py diff --git a/README.md b/README.md index 2edf3ed4..e6f3d7f4 100644 --- a/README.md +++ b/README.md @@ -158,6 +158,7 @@ Class | Method | HTTP request | Description - [BrowserDetails](docs/BrowserDetails.md) - [Confidence](docs/Confidence.md) - [DataCenter](docs/DataCenter.md) + - [DataCenterInfo](docs/DataCenterInfo.md) - [ErrorEvent403Response](docs/ErrorEvent403Response.md) - [ErrorEvent403ResponseError](docs/ErrorEvent403ResponseError.md) - [ErrorEvent404Response](docs/ErrorEvent404Response.md) diff --git a/docs/DataCenter.md b/docs/DataCenter.md index 675a1d91..f1c93f0e 100644 --- a/docs/DataCenter.md +++ b/docs/DataCenter.md @@ -1,4 +1,6 @@ # DataCenter +`dataCenter` is deprecated in favor of `datacenter` + ## Properties Name | Type | Description | Notes diff --git a/docs/DataCenterInfo.md b/docs/DataCenterInfo.md new file mode 100644 index 00000000..66c19419 --- /dev/null +++ b/docs/DataCenterInfo.md @@ -0,0 +1,10 @@ +# DataCenterInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**result** | **bool** | | +**name** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/IPLocation.md b/docs/IPLocation.md index 5fc4bd38..73e6458c 100644 --- a/docs/IPLocation.md +++ b/docs/IPLocation.md @@ -1,4 +1,6 @@ # IPLocation +This field is **deprecated** and will not return a result for **accounts created after December 18th, 2023**. Please use the [`ipInfo` Smart signal](https://dev.fingerprint.com/docs/smart-signals-overview#ip-geolocation) for geolocation information. + ## Properties Name | Type | Description | Notes diff --git a/docs/IpInfoResultV4.md b/docs/IpInfoResultV4.md index c08f44eb..50794969 100644 --- a/docs/IpInfoResultV4.md +++ b/docs/IpInfoResultV4.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes **address** | **str** | | [optional] **geolocation** | [**IPLocation**](IPLocation.md) | | [optional] **asn** | [**ASN**](ASN.md) | | [optional] +**datacenter** | [**DataCenterInfo**](DataCenterInfo.md) | | [optional] **data_center** | [**DataCenter**](DataCenter.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/IpInfoResultV6.md b/docs/IpInfoResultV6.md index 76721965..6f16fedf 100644 --- a/docs/IpInfoResultV6.md +++ b/docs/IpInfoResultV6.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes **address** | **str** | | [optional] **geolocation** | [**IPLocation**](IPLocation.md) | | [optional] **asn** | [**ASN**](ASN.md) | | [optional] +**datacenter** | [**DataCenterInfo**](DataCenterInfo.md) | | [optional] **data_center** | [**DataCenter**](DataCenter.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/fingerprint_pro_server_api_sdk/__init__.py b/fingerprint_pro_server_api_sdk/__init__.py index 56345ddd..ccd4c6a8 100644 --- a/fingerprint_pro_server_api_sdk/__init__.py +++ b/fingerprint_pro_server_api_sdk/__init__.py @@ -26,6 +26,7 @@ from fingerprint_pro_server_api_sdk.models.browser_details import BrowserDetails from fingerprint_pro_server_api_sdk.models.confidence import Confidence from fingerprint_pro_server_api_sdk.models.data_center import DataCenter +from fingerprint_pro_server_api_sdk.models.data_center_info import DataCenterInfo from fingerprint_pro_server_api_sdk.models.error_event403_response import ErrorEvent403Response from fingerprint_pro_server_api_sdk.models.error_event403_response_error import ErrorEvent403ResponseError from fingerprint_pro_server_api_sdk.models.error_event404_response import ErrorEvent404Response diff --git a/fingerprint_pro_server_api_sdk/models/__init__.py b/fingerprint_pro_server_api_sdk/models/__init__.py index 091c0c72..675c93b6 100644 --- a/fingerprint_pro_server_api_sdk/models/__init__.py +++ b/fingerprint_pro_server_api_sdk/models/__init__.py @@ -20,6 +20,7 @@ from fingerprint_pro_server_api_sdk.models.browser_details import BrowserDetails from fingerprint_pro_server_api_sdk.models.confidence import Confidence from fingerprint_pro_server_api_sdk.models.data_center import DataCenter +from fingerprint_pro_server_api_sdk.models.data_center_info import DataCenterInfo from fingerprint_pro_server_api_sdk.models.error_event403_response import ErrorEvent403Response from fingerprint_pro_server_api_sdk.models.error_event403_response_error import ErrorEvent403ResponseError from fingerprint_pro_server_api_sdk.models.error_event404_response import ErrorEvent404Response diff --git a/fingerprint_pro_server_api_sdk/models/data_center_info.py b/fingerprint_pro_server_api_sdk/models/data_center_info.py new file mode 100644 index 00000000..ddb8c5b6 --- /dev/null +++ b/fingerprint_pro_server_api_sdk/models/data_center_info.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + Fingerprint Pro Server API + + 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 + + OpenAPI spec version: 3 + Contact: support@fingerprint.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class DataCenterInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'result': 'bool', + 'name': 'str' + } + + attribute_map = { + 'result': 'result', + 'name': 'name' + } + + def __init__(self, result=None, name=None): # noqa: E501 + """DataCenterInfo - a model defined in Swagger""" # noqa: E501 + self._result = None + self._name = None + self.discriminator = None + self.result = result + if name is not None: + self.name = name + + @property + def result(self): + """Gets the result of this DataCenterInfo. # noqa: E501 + + + :return: The result of this DataCenterInfo. # noqa: E501 + :rtype: bool + """ + return self._result + + @result.setter + def result(self, result): + """Sets the result of this DataCenterInfo. + + + :param result: The result of this DataCenterInfo. # noqa: E501 + :type: bool + """ + if result is None: + raise ValueError("Invalid value for `result`, must not be `None`") # noqa: E501 + + self._result = result + + @property + def name(self): + """Gets the name of this DataCenterInfo. # noqa: E501 + + + :return: The name of this DataCenterInfo. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this DataCenterInfo. + + + :param name: The name of this DataCenterInfo. # noqa: E501 + :type: str + """ + + self._name = name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + 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(DataCenterInfo, 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, DataCenterInfo): + 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, DataCenterInfo): + return True + + return self.to_dict() != other.to_dict() diff --git a/fingerprint_pro_server_api_sdk/models/ip_info_result_v4.py b/fingerprint_pro_server_api_sdk/models/ip_info_result_v4.py index c8827340..8046e39c 100644 --- a/fingerprint_pro_server_api_sdk/models/ip_info_result_v4.py +++ b/fingerprint_pro_server_api_sdk/models/ip_info_result_v4.py @@ -31,6 +31,7 @@ class IpInfoResultV4(object): 'address': 'str', 'geolocation': 'IPLocation', 'asn': 'ASN', + 'datacenter': 'DataCenterInfo', 'data_center': 'DataCenter' } @@ -38,14 +39,16 @@ class IpInfoResultV4(object): 'address': 'address', 'geolocation': 'geolocation', 'asn': 'asn', + 'datacenter': 'datacenter', 'data_center': 'dataCenter' } - def __init__(self, address=None, geolocation=None, asn=None, data_center=None): # noqa: E501 + def __init__(self, address=None, geolocation=None, asn=None, datacenter=None, data_center=None): # noqa: E501 """IpInfoResultV4 - a model defined in Swagger""" # noqa: E501 self._address = None self._geolocation = None self._asn = None + self._datacenter = None self._data_center = None self.discriminator = None if address is not None: @@ -54,6 +57,8 @@ def __init__(self, address=None, geolocation=None, asn=None, data_center=None): self.geolocation = geolocation if asn is not None: self.asn = asn + if datacenter is not None: + self.datacenter = datacenter if data_center is not None: self.data_center = data_center @@ -120,6 +125,27 @@ def asn(self, asn): self._asn = asn + @property + def datacenter(self): + """Gets the datacenter of this IpInfoResultV4. # noqa: E501 + + + :return: The datacenter of this IpInfoResultV4. # noqa: E501 + :rtype: DataCenterInfo + """ + return self._datacenter + + @datacenter.setter + def datacenter(self, datacenter): + """Sets the datacenter of this IpInfoResultV4. + + + :param datacenter: The datacenter of this IpInfoResultV4. # noqa: E501 + :type: DataCenterInfo + """ + + self._datacenter = datacenter + @property def data_center(self): """Gets the data_center of this IpInfoResultV4. # noqa: E501 diff --git a/fingerprint_pro_server_api_sdk/models/ip_info_result_v6.py b/fingerprint_pro_server_api_sdk/models/ip_info_result_v6.py index f384a2d5..3e10c1eb 100644 --- a/fingerprint_pro_server_api_sdk/models/ip_info_result_v6.py +++ b/fingerprint_pro_server_api_sdk/models/ip_info_result_v6.py @@ -31,6 +31,7 @@ class IpInfoResultV6(object): 'address': 'str', 'geolocation': 'IPLocation', 'asn': 'ASN', + 'datacenter': 'DataCenterInfo', 'data_center': 'DataCenter' } @@ -38,14 +39,16 @@ class IpInfoResultV6(object): 'address': 'address', 'geolocation': 'geolocation', 'asn': 'asn', + 'datacenter': 'datacenter', 'data_center': 'dataCenter' } - def __init__(self, address=None, geolocation=None, asn=None, data_center=None): # noqa: E501 + def __init__(self, address=None, geolocation=None, asn=None, datacenter=None, data_center=None): # noqa: E501 """IpInfoResultV6 - a model defined in Swagger""" # noqa: E501 self._address = None self._geolocation = None self._asn = None + self._datacenter = None self._data_center = None self.discriminator = None if address is not None: @@ -54,6 +57,8 @@ def __init__(self, address=None, geolocation=None, asn=None, data_center=None): self.geolocation = geolocation if asn is not None: self.asn = asn + if datacenter is not None: + self.datacenter = datacenter if data_center is not None: self.data_center = data_center @@ -120,6 +125,27 @@ def asn(self, asn): self._asn = asn + @property + def datacenter(self): + """Gets the datacenter of this IpInfoResultV6. # noqa: E501 + + + :return: The datacenter of this IpInfoResultV6. # noqa: E501 + :rtype: DataCenterInfo + """ + return self._datacenter + + @datacenter.setter + def datacenter(self, datacenter): + """Sets the datacenter of this IpInfoResultV6. + + + :param datacenter: The datacenter of this IpInfoResultV6. # noqa: E501 + :type: DataCenterInfo + """ + + self._datacenter = datacenter + @property def data_center(self): """Gets the data_center of this IpInfoResultV6. # noqa: E501 diff --git a/res/fingerprint-server-api.yaml b/res/fingerprint-server-api.yaml index d5a61a28..4329383a 100644 --- a/res/fingerprint-server-api.yaml +++ b/res/fingerprint-server-api.yaml @@ -158,7 +158,7 @@ paths: asn: '7922' name: COMCAST-7922 network: 73.136.0.0/13 - dataCenter: + datacenter: result: true name: DediPath incognito: @@ -3701,7 +3701,7 @@ paths: asn: '7922' name: COMCAST-7922 network: 73.136.0.0/13 - dataCenter: + datacenter: result: true name: DediPath rootApps: @@ -4320,8 +4320,22 @@ components: - asn - network title: ASN + DataCenterInfo: + type: object + additionalProperties: false + properties: + result: + type: boolean + name: + type: string + example: DediPath + required: + - result + title: DataCenterInfo DataCenter: type: object + deprecated: true + description: '`dataCenter` is deprecated in favor of `datacenter`' additionalProperties: false properties: result: @@ -4335,6 +4349,12 @@ components: IPLocation: type: object additionalProperties: false + deprecated: true + description: >- + This field is **deprecated** and will not return a result for **accounts + created after December 18th, 2023**. Please use the [`ipInfo` Smart + signal](https://dev.fingerprint.com/docs/smart-signals-overview#ip-geolocation) + for geolocation information. properties: accuracyRadius: description: >- @@ -4857,6 +4877,8 @@ components: $ref: '#/components/schemas/IPLocation' asn: $ref: '#/components/schemas/ASN' + datacenter: + $ref: '#/components/schemas/DataCenterInfo' dataCenter: $ref: '#/components/schemas/DataCenter' v6: @@ -4871,6 +4893,8 @@ components: $ref: '#/components/schemas/IPLocation' asn: $ref: '#/components/schemas/ASN' + datacenter: + $ref: '#/components/schemas/DataCenterInfo' dataCenter: $ref: '#/components/schemas/DataCenter' IpBlockListResult: diff --git a/test/mocks/get_event.json b/test/mocks/get_event.json index 0a89f7d4..808f12f4 100644 --- a/test/mocks/get_event.json +++ b/test/mocks/get_event.json @@ -100,7 +100,7 @@ "name": "COMCAST-7922", "network": "73.136.0.0/13" }, - "dataCenter": { + "datacenter": { "result": true, "name": "DediPath" } @@ -229,4 +229,4 @@ } } } -} \ No newline at end of file +} diff --git a/test/mocks/webhook.json b/test/mocks/webhook.json index 9ae35fa0..9ba70238 100644 --- a/test/mocks/webhook.json +++ b/test/mocks/webhook.json @@ -94,7 +94,7 @@ "name": "COMCAST-7922", "network": "73.136.0.0/13" }, - "dataCenter": { + "datacenter": { "result": true, "name": "DediPath" } @@ -184,4 +184,4 @@ "locationSpoofing": { "result": true } -} \ No newline at end of file +} From 665a68b81740c5dc372a3287bb14460d7b631862 Mon Sep 17 00:00:00 2001 From: Ilya Taratukhin Date: Wed, 3 Jan 2024 12:47:23 +0100 Subject: [PATCH 2/3] docs: add description to models --- .../models/botd_detection_result.py | 5 ++++- fingerprint_pro_server_api_sdk/models/botd_result.py | 5 ++++- fingerprint_pro_server_api_sdk/models/data_center.py | 5 ++++- fingerprint_pro_server_api_sdk/models/event_response.py | 5 ++++- fingerprint_pro_server_api_sdk/models/ip_info_result.py | 5 ++++- fingerprint_pro_server_api_sdk/models/ip_location.py | 5 ++++- fingerprint_pro_server_api_sdk/models/products_response.py | 5 ++++- .../models/raw_device_attributes_result.py | 5 ++++- fingerprint_pro_server_api_sdk/models/response.py | 5 ++++- template/model.mustache | 5 ++++- 10 files changed, 40 insertions(+), 10 deletions(-) diff --git a/fingerprint_pro_server_api_sdk/models/botd_detection_result.py b/fingerprint_pro_server_api_sdk/models/botd_detection_result.py index 77a7c0cf..da06dc89 100644 --- a/fingerprint_pro_server_api_sdk/models/botd_detection_result.py +++ b/fingerprint_pro_server_api_sdk/models/botd_detection_result.py @@ -16,7 +16,10 @@ import six class BotdDetectionResult(object): - """NOTE: This class is auto generated by the swagger code generator program. + """ + Stores bot detection result + + NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/fingerprint_pro_server_api_sdk/models/botd_result.py b/fingerprint_pro_server_api_sdk/models/botd_result.py index 5d9550ee..3e78c750 100644 --- a/fingerprint_pro_server_api_sdk/models/botd_result.py +++ b/fingerprint_pro_server_api_sdk/models/botd_result.py @@ -16,7 +16,10 @@ import six class BotdResult(object): - """NOTE: This class is auto generated by the swagger code generator program. + """ + Contains all the information from Bot Detection product + + NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/fingerprint_pro_server_api_sdk/models/data_center.py b/fingerprint_pro_server_api_sdk/models/data_center.py index 804cdb80..4d8eedd5 100644 --- a/fingerprint_pro_server_api_sdk/models/data_center.py +++ b/fingerprint_pro_server_api_sdk/models/data_center.py @@ -16,7 +16,10 @@ import six class DataCenter(object): - """NOTE: This class is auto generated by the swagger code generator program. + """ + `dataCenter` is deprecated in favor of `datacenter` + + NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/fingerprint_pro_server_api_sdk/models/event_response.py b/fingerprint_pro_server_api_sdk/models/event_response.py index 38cfbd70..1df65b80 100644 --- a/fingerprint_pro_server_api_sdk/models/event_response.py +++ b/fingerprint_pro_server_api_sdk/models/event_response.py @@ -16,7 +16,10 @@ import six class EventResponse(object): - """NOTE: This class is auto generated by the swagger code generator program. + """ + Contains results from all activated products - Fingerprint Pro, Bot Detection, and others. + + NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/fingerprint_pro_server_api_sdk/models/ip_info_result.py b/fingerprint_pro_server_api_sdk/models/ip_info_result.py index fad894eb..0fa494e9 100644 --- a/fingerprint_pro_server_api_sdk/models/ip_info_result.py +++ b/fingerprint_pro_server_api_sdk/models/ip_info_result.py @@ -16,7 +16,10 @@ import six class IpInfoResult(object): - """NOTE: This class is auto generated by the swagger code generator program. + """ + Details about the request IP address. Has separate fields for v4 and v6 IP address versions. + + NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/fingerprint_pro_server_api_sdk/models/ip_location.py b/fingerprint_pro_server_api_sdk/models/ip_location.py index fc5710f4..4a0d2a95 100644 --- a/fingerprint_pro_server_api_sdk/models/ip_location.py +++ b/fingerprint_pro_server_api_sdk/models/ip_location.py @@ -16,7 +16,10 @@ import six class IPLocation(object): - """NOTE: This class is auto generated by the swagger code generator program. + """ + This field is **deprecated** and will not return a result for **accounts created after December 18th, 2023**. Please use the [`ipInfo` Smart signal](https://dev.fingerprint.com/docs/smart-signals-overview#ip-geolocation) for geolocation information. + + NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/fingerprint_pro_server_api_sdk/models/products_response.py b/fingerprint_pro_server_api_sdk/models/products_response.py index 1440a34a..ab325ee6 100644 --- a/fingerprint_pro_server_api_sdk/models/products_response.py +++ b/fingerprint_pro_server_api_sdk/models/products_response.py @@ -16,7 +16,10 @@ import six class ProductsResponse(object): - """NOTE: This class is auto generated by the swagger code generator program. + """ + Contains all information about the request identified by `requestId`, depending on the pricing plan (Pro, Pro Plus, Enterprise) + + NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/fingerprint_pro_server_api_sdk/models/raw_device_attributes_result.py b/fingerprint_pro_server_api_sdk/models/raw_device_attributes_result.py index 9b6f5551..09f72765 100644 --- a/fingerprint_pro_server_api_sdk/models/raw_device_attributes_result.py +++ b/fingerprint_pro_server_api_sdk/models/raw_device_attributes_result.py @@ -16,7 +16,10 @@ import six class RawDeviceAttributesResult(object): - """NOTE: This class is auto generated by the swagger code generator program. + """ + It includes 35+ raw browser identification attributes to provide Fingerprint users with even more information than our standard visitor ID provides. This enables Fingerprint users to not have to run our open-source product in conjunction with Fingerprint Pro Plus and Enterprise to get those additional attributes. Warning: The raw signals data can change at any moment as we improve the product. We cannot guarantee the internal shape of raw device attributes to be stable, so typical semantic versioning rules do not apply here. Use this data with caution without assuming a specific structure beyond the generic type provided here. + + NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/fingerprint_pro_server_api_sdk/models/response.py b/fingerprint_pro_server_api_sdk/models/response.py index 3d426791..5d01f962 100644 --- a/fingerprint_pro_server_api_sdk/models/response.py +++ b/fingerprint_pro_server_api_sdk/models/response.py @@ -16,7 +16,10 @@ import six class Response(object): - """NOTE: This class is auto generated by the swagger code generator program. + """ + Fields `lastTimestamp` and `paginationKey` added when `limit` or `before` parameter provided and there is more data to show + + NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/template/model.mustache b/template/model.mustache index fd52e6c7..0be26d6a 100644 --- a/template/model.mustache +++ b/template/model.mustache @@ -10,7 +10,10 @@ import six {{#models}} {{#model}} class {{classname}}(object): - """NOTE: This class is auto generated by the swagger code generator program. + """{{#description}} + {{{.}}} + + {{/description}}NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """{{#allowableValues}} From 53bcda26729b7e7a793c61f7292fa474536ef652 Mon Sep 17 00:00:00 2001 From: Ilya Taratukhin Date: Wed, 10 Jan 2024 13:36:42 +0100 Subject: [PATCH 3/3] feat: use `datacenter` field instead of the wrong `dataCenter` BREAKING CHANGE: `IpInfo` field `data_center` renamed to `datacenter` --- README.md | 1 - docs/DataCenter.md | 2 - docs/DataCenterInfo.md | 10 -- docs/IpInfoResultV4.md | 3 +- docs/IpInfoResultV6.md | 3 +- fingerprint_pro_server_api_sdk/__init__.py | 1 - .../models/__init__.py | 1 - .../models/data_center.py | 5 +- .../models/data_center_info.py | 140 ------------------ .../models/ip_info_result_v4.py | 36 +---- .../models/ip_info_result_v6.py | 36 +---- res/fingerprint-server-api.yaml | 18 --- 12 files changed, 13 insertions(+), 243 deletions(-) delete mode 100644 docs/DataCenterInfo.md delete mode 100644 fingerprint_pro_server_api_sdk/models/data_center_info.py diff --git a/README.md b/README.md index e6f3d7f4..2edf3ed4 100644 --- a/README.md +++ b/README.md @@ -158,7 +158,6 @@ Class | Method | HTTP request | Description - [BrowserDetails](docs/BrowserDetails.md) - [Confidence](docs/Confidence.md) - [DataCenter](docs/DataCenter.md) - - [DataCenterInfo](docs/DataCenterInfo.md) - [ErrorEvent403Response](docs/ErrorEvent403Response.md) - [ErrorEvent403ResponseError](docs/ErrorEvent403ResponseError.md) - [ErrorEvent404Response](docs/ErrorEvent404Response.md) diff --git a/docs/DataCenter.md b/docs/DataCenter.md index f1c93f0e..675a1d91 100644 --- a/docs/DataCenter.md +++ b/docs/DataCenter.md @@ -1,6 +1,4 @@ # DataCenter -`dataCenter` is deprecated in favor of `datacenter` - ## Properties Name | Type | Description | Notes diff --git a/docs/DataCenterInfo.md b/docs/DataCenterInfo.md deleted file mode 100644 index 66c19419..00000000 --- a/docs/DataCenterInfo.md +++ /dev/null @@ -1,10 +0,0 @@ -# DataCenterInfo - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**result** | **bool** | | -**name** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/IpInfoResultV4.md b/docs/IpInfoResultV4.md index 50794969..0ff48b16 100644 --- a/docs/IpInfoResultV4.md +++ b/docs/IpInfoResultV4.md @@ -6,8 +6,7 @@ Name | Type | Description | Notes **address** | **str** | | [optional] **geolocation** | [**IPLocation**](IPLocation.md) | | [optional] **asn** | [**ASN**](ASN.md) | | [optional] -**datacenter** | [**DataCenterInfo**](DataCenterInfo.md) | | [optional] -**data_center** | [**DataCenter**](DataCenter.md) | | [optional] +**datacenter** | [**DataCenter**](DataCenter.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/IpInfoResultV6.md b/docs/IpInfoResultV6.md index 6f16fedf..8bed1402 100644 --- a/docs/IpInfoResultV6.md +++ b/docs/IpInfoResultV6.md @@ -6,8 +6,7 @@ Name | Type | Description | Notes **address** | **str** | | [optional] **geolocation** | [**IPLocation**](IPLocation.md) | | [optional] **asn** | [**ASN**](ASN.md) | | [optional] -**datacenter** | [**DataCenterInfo**](DataCenterInfo.md) | | [optional] -**data_center** | [**DataCenter**](DataCenter.md) | | [optional] +**datacenter** | [**DataCenter**](DataCenter.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/fingerprint_pro_server_api_sdk/__init__.py b/fingerprint_pro_server_api_sdk/__init__.py index ccd4c6a8..56345ddd 100644 --- a/fingerprint_pro_server_api_sdk/__init__.py +++ b/fingerprint_pro_server_api_sdk/__init__.py @@ -26,7 +26,6 @@ from fingerprint_pro_server_api_sdk.models.browser_details import BrowserDetails from fingerprint_pro_server_api_sdk.models.confidence import Confidence from fingerprint_pro_server_api_sdk.models.data_center import DataCenter -from fingerprint_pro_server_api_sdk.models.data_center_info import DataCenterInfo from fingerprint_pro_server_api_sdk.models.error_event403_response import ErrorEvent403Response from fingerprint_pro_server_api_sdk.models.error_event403_response_error import ErrorEvent403ResponseError from fingerprint_pro_server_api_sdk.models.error_event404_response import ErrorEvent404Response diff --git a/fingerprint_pro_server_api_sdk/models/__init__.py b/fingerprint_pro_server_api_sdk/models/__init__.py index 675c93b6..091c0c72 100644 --- a/fingerprint_pro_server_api_sdk/models/__init__.py +++ b/fingerprint_pro_server_api_sdk/models/__init__.py @@ -20,7 +20,6 @@ from fingerprint_pro_server_api_sdk.models.browser_details import BrowserDetails from fingerprint_pro_server_api_sdk.models.confidence import Confidence from fingerprint_pro_server_api_sdk.models.data_center import DataCenter -from fingerprint_pro_server_api_sdk.models.data_center_info import DataCenterInfo from fingerprint_pro_server_api_sdk.models.error_event403_response import ErrorEvent403Response from fingerprint_pro_server_api_sdk.models.error_event403_response_error import ErrorEvent403ResponseError from fingerprint_pro_server_api_sdk.models.error_event404_response import ErrorEvent404Response diff --git a/fingerprint_pro_server_api_sdk/models/data_center.py b/fingerprint_pro_server_api_sdk/models/data_center.py index 4d8eedd5..804cdb80 100644 --- a/fingerprint_pro_server_api_sdk/models/data_center.py +++ b/fingerprint_pro_server_api_sdk/models/data_center.py @@ -16,10 +16,7 @@ import six class DataCenter(object): - """ - `dataCenter` is deprecated in favor of `datacenter` - - NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/fingerprint_pro_server_api_sdk/models/data_center_info.py b/fingerprint_pro_server_api_sdk/models/data_center_info.py deleted file mode 100644 index ddb8c5b6..00000000 --- a/fingerprint_pro_server_api_sdk/models/data_center_info.py +++ /dev/null @@ -1,140 +0,0 @@ -# coding: utf-8 - -""" - Fingerprint Pro Server API - - 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 - - OpenAPI spec version: 3 - Contact: support@fingerprint.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class DataCenterInfo(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'result': 'bool', - 'name': 'str' - } - - attribute_map = { - 'result': 'result', - 'name': 'name' - } - - def __init__(self, result=None, name=None): # noqa: E501 - """DataCenterInfo - a model defined in Swagger""" # noqa: E501 - self._result = None - self._name = None - self.discriminator = None - self.result = result - if name is not None: - self.name = name - - @property - def result(self): - """Gets the result of this DataCenterInfo. # noqa: E501 - - - :return: The result of this DataCenterInfo. # noqa: E501 - :rtype: bool - """ - return self._result - - @result.setter - def result(self, result): - """Sets the result of this DataCenterInfo. - - - :param result: The result of this DataCenterInfo. # noqa: E501 - :type: bool - """ - if result is None: - raise ValueError("Invalid value for `result`, must not be `None`") # noqa: E501 - - self._result = result - - @property - def name(self): - """Gets the name of this DataCenterInfo. # noqa: E501 - - - :return: The name of this DataCenterInfo. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this DataCenterInfo. - - - :param name: The name of this DataCenterInfo. # noqa: E501 - :type: str - """ - - self._name = name - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - 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(DataCenterInfo, 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, DataCenterInfo): - 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, DataCenterInfo): - return True - - return self.to_dict() != other.to_dict() diff --git a/fingerprint_pro_server_api_sdk/models/ip_info_result_v4.py b/fingerprint_pro_server_api_sdk/models/ip_info_result_v4.py index 8046e39c..bbee6ae3 100644 --- a/fingerprint_pro_server_api_sdk/models/ip_info_result_v4.py +++ b/fingerprint_pro_server_api_sdk/models/ip_info_result_v4.py @@ -31,25 +31,22 @@ class IpInfoResultV4(object): 'address': 'str', 'geolocation': 'IPLocation', 'asn': 'ASN', - 'datacenter': 'DataCenterInfo', - 'data_center': 'DataCenter' + 'datacenter': 'DataCenter' } attribute_map = { 'address': 'address', 'geolocation': 'geolocation', 'asn': 'asn', - 'datacenter': 'datacenter', - 'data_center': 'dataCenter' + 'datacenter': 'datacenter' } - def __init__(self, address=None, geolocation=None, asn=None, datacenter=None, data_center=None): # noqa: E501 + def __init__(self, address=None, geolocation=None, asn=None, datacenter=None): # noqa: E501 """IpInfoResultV4 - a model defined in Swagger""" # noqa: E501 self._address = None self._geolocation = None self._asn = None self._datacenter = None - self._data_center = None self.discriminator = None if address is not None: self.address = address @@ -59,8 +56,6 @@ def __init__(self, address=None, geolocation=None, asn=None, datacenter=None, da self.asn = asn if datacenter is not None: self.datacenter = datacenter - if data_center is not None: - self.data_center = data_center @property def address(self): @@ -131,7 +126,7 @@ def datacenter(self): :return: The datacenter of this IpInfoResultV4. # noqa: E501 - :rtype: DataCenterInfo + :rtype: DataCenter """ return self._datacenter @@ -141,31 +136,10 @@ def datacenter(self, datacenter): :param datacenter: The datacenter of this IpInfoResultV4. # noqa: E501 - :type: DataCenterInfo - """ - - self._datacenter = datacenter - - @property - def data_center(self): - """Gets the data_center of this IpInfoResultV4. # noqa: E501 - - - :return: The data_center of this IpInfoResultV4. # noqa: E501 - :rtype: DataCenter - """ - return self._data_center - - @data_center.setter - def data_center(self, data_center): - """Sets the data_center of this IpInfoResultV4. - - - :param data_center: The data_center of this IpInfoResultV4. # noqa: E501 :type: DataCenter """ - self._data_center = data_center + self._datacenter = datacenter def to_dict(self): """Returns the model properties as a dict""" diff --git a/fingerprint_pro_server_api_sdk/models/ip_info_result_v6.py b/fingerprint_pro_server_api_sdk/models/ip_info_result_v6.py index 3e10c1eb..a039f9f0 100644 --- a/fingerprint_pro_server_api_sdk/models/ip_info_result_v6.py +++ b/fingerprint_pro_server_api_sdk/models/ip_info_result_v6.py @@ -31,25 +31,22 @@ class IpInfoResultV6(object): 'address': 'str', 'geolocation': 'IPLocation', 'asn': 'ASN', - 'datacenter': 'DataCenterInfo', - 'data_center': 'DataCenter' + 'datacenter': 'DataCenter' } attribute_map = { 'address': 'address', 'geolocation': 'geolocation', 'asn': 'asn', - 'datacenter': 'datacenter', - 'data_center': 'dataCenter' + 'datacenter': 'datacenter' } - def __init__(self, address=None, geolocation=None, asn=None, datacenter=None, data_center=None): # noqa: E501 + def __init__(self, address=None, geolocation=None, asn=None, datacenter=None): # noqa: E501 """IpInfoResultV6 - a model defined in Swagger""" # noqa: E501 self._address = None self._geolocation = None self._asn = None self._datacenter = None - self._data_center = None self.discriminator = None if address is not None: self.address = address @@ -59,8 +56,6 @@ def __init__(self, address=None, geolocation=None, asn=None, datacenter=None, da self.asn = asn if datacenter is not None: self.datacenter = datacenter - if data_center is not None: - self.data_center = data_center @property def address(self): @@ -131,7 +126,7 @@ def datacenter(self): :return: The datacenter of this IpInfoResultV6. # noqa: E501 - :rtype: DataCenterInfo + :rtype: DataCenter """ return self._datacenter @@ -141,31 +136,10 @@ def datacenter(self, datacenter): :param datacenter: The datacenter of this IpInfoResultV6. # noqa: E501 - :type: DataCenterInfo - """ - - self._datacenter = datacenter - - @property - def data_center(self): - """Gets the data_center of this IpInfoResultV6. # noqa: E501 - - - :return: The data_center of this IpInfoResultV6. # noqa: E501 - :rtype: DataCenter - """ - return self._data_center - - @data_center.setter - def data_center(self, data_center): - """Sets the data_center of this IpInfoResultV6. - - - :param data_center: The data_center of this IpInfoResultV6. # noqa: E501 :type: DataCenter """ - self._data_center = data_center + self._datacenter = datacenter def to_dict(self): """Returns the model properties as a dict""" diff --git a/res/fingerprint-server-api.yaml b/res/fingerprint-server-api.yaml index 4329383a..da9215cd 100644 --- a/res/fingerprint-server-api.yaml +++ b/res/fingerprint-server-api.yaml @@ -4320,22 +4320,8 @@ components: - asn - network title: ASN - DataCenterInfo: - type: object - additionalProperties: false - properties: - result: - type: boolean - name: - type: string - example: DediPath - required: - - result - title: DataCenterInfo DataCenter: type: object - deprecated: true - description: '`dataCenter` is deprecated in favor of `datacenter`' additionalProperties: false properties: result: @@ -4878,8 +4864,6 @@ components: asn: $ref: '#/components/schemas/ASN' datacenter: - $ref: '#/components/schemas/DataCenterInfo' - dataCenter: $ref: '#/components/schemas/DataCenter' v6: type: object @@ -4894,8 +4878,6 @@ components: asn: $ref: '#/components/schemas/ASN' datacenter: - $ref: '#/components/schemas/DataCenterInfo' - dataCenter: $ref: '#/components/schemas/DataCenter' IpBlockListResult: type: object