Skip to content

Commit

Permalink
fix: update OpenAPI Schema with asn and dataCenter signals
Browse files Browse the repository at this point in the history
  • Loading branch information
ilfa committed Sep 7, 2023
1 parent 44bc5c3 commit 4684316
Show file tree
Hide file tree
Showing 17 changed files with 687 additions and 37 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,12 @@ Class | Method | HTTP request | Description

## Documentation For Models

- [ASN](docs/ASN.md)
- [BotdDetectionResult](docs/BotdDetectionResult.md)
- [BotdResult](docs/BotdResult.md)
- [BrowserDetails](docs/BrowserDetails.md)
- [Confidence](docs/Confidence.md)
- [DataCenter](docs/DataCenter.md)
- [ErrorEvent403Response](docs/ErrorEvent403Response.md)
- [ErrorEvent403ResponseError](docs/ErrorEvent403ResponseError.md)
- [ErrorEvent404Response](docs/ErrorEvent404Response.md)
Expand Down
11 changes: 11 additions & 0 deletions docs/ASN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# ASN

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**asn** | **str** | |
**network** | **str** | |
**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)

10 changes: 10 additions & 0 deletions docs/DataCenter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# DataCenter

## 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)

2 changes: 2 additions & 0 deletions docs/IpInfoResultV4.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**address** | **str** | | [optional]
**geolocation** | [**IPLocation**](IPLocation.md) | | [optional]
**asn** | [**ASN**](ASN.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)

2 changes: 2 additions & 0 deletions docs/IpInfoResultV6.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**address** | **str** | | [optional]
**geolocation** | [**IPLocation**](IPLocation.md) | | [optional]
**asn** | [**ASN**](ASN.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)

2 changes: 1 addition & 1 deletion docs/ProductsResponse.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ProductsResponse
Contains all the information from each activated product - Fingerprint Pro or Bot Detection
Contains all information about the request identified by `requestId`, depending on the pricing plan (Pro, Pro Plus, Enterprise)


## Properties
Expand Down
2 changes: 1 addition & 1 deletion docs/ProductsResponseIdentificationData.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Name | Type | Description | Notes
**visitor_found** | **bool** | Attribute represents if a visitor had been identified before. |
**first_seen_at** | [**SeenAt**](SeenAt.md) | |
**last_seen_at** | [**SeenAt**](SeenAt.md) | |
**visitor_id** | **str** | |
**visitor_id** | **str** | String of 20 characters that uniquely identifies the visitor's browser. **Pro Plus:** If a bot is detected (`products.botd.bot.result != \"notDetected\"`), the `visitorId` value contains a placeholder string `BotDetected000000000`. |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

2 changes: 2 additions & 0 deletions fingerprint_pro_server_api_sdk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@
from fingerprint_pro_server_api_sdk.api_client import ApiClient
from fingerprint_pro_server_api_sdk.configuration import Configuration
# import models into sdk package
from fingerprint_pro_server_api_sdk.models.asn import ASN
from fingerprint_pro_server_api_sdk.models.botd_detection_result import BotdDetectionResult
from fingerprint_pro_server_api_sdk.models.botd_result import BotdResult
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.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
Expand Down
2 changes: 2 additions & 0 deletions fingerprint_pro_server_api_sdk/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@
from __future__ import absolute_import

# import models into model package
from fingerprint_pro_server_api_sdk.models.asn import ASN
from fingerprint_pro_server_api_sdk.models.botd_detection_result import BotdDetectionResult
from fingerprint_pro_server_api_sdk.models.botd_result import BotdResult
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.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
Expand Down
167 changes: 167 additions & 0 deletions fingerprint_pro_server_api_sdk/models/asn.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
# 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: [email protected]
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re # noqa: F401

import six

class ASN(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 = {
'asn': 'str',
'network': 'str',
'name': 'str'
}

attribute_map = {
'asn': 'asn',
'network': 'network',
'name': 'name'
}

def __init__(self, asn=None, network=None, name=None): # noqa: E501
"""ASN - a model defined in Swagger""" # noqa: E501
self._asn = None
self._network = None
self._name = None
self.discriminator = None
self.asn = asn
self.network = network
if name is not None:
self.name = name

@property
def asn(self):
"""Gets the asn of this ASN. # noqa: E501
:return: The asn of this ASN. # noqa: E501
:rtype: str
"""
return self._asn

@asn.setter
def asn(self, asn):
"""Sets the asn of this ASN.
:param asn: The asn of this ASN. # noqa: E501
:type: str
"""
if asn is None:
raise ValueError("Invalid value for `asn`, must not be `None`") # noqa: E501

self._asn = asn

@property
def network(self):
"""Gets the network of this ASN. # noqa: E501
:return: The network of this ASN. # noqa: E501
:rtype: str
"""
return self._network

@network.setter
def network(self, network):
"""Sets the network of this ASN.
:param network: The network of this ASN. # noqa: E501
:type: str
"""
if network is None:
raise ValueError("Invalid value for `network`, must not be `None`") # noqa: E501

self._network = network

@property
def name(self):
"""Gets the name of this ASN. # noqa: E501
:return: The name of this ASN. # noqa: E501
:rtype: str
"""
return self._name

@name.setter
def name(self, name):
"""Sets the name of this ASN.
:param name: The name of this ASN. # 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(ASN, 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, ASN):
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, ASN):
return True

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

0 comments on commit 4684316

Please sign in to comment.