Skip to content

Commit

Permalink
fix: make fields required according to real API response
Browse files Browse the repository at this point in the history
  • Loading branch information
ilfa committed Mar 15, 2024
1 parent 27f7c58 commit 8beb757
Show file tree
Hide file tree
Showing 21 changed files with 127 additions and 57 deletions.
3 changes: 2 additions & 1 deletion docs/EventResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ Contains results from all activated products - Fingerprint Pro, Bot Detection, a
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**products** | [**ProductsResponse**](ProductsResponse.md) | | [optional]
**products** | [**ProductsResponse**](ProductsResponse.md) | |
**error** | [**ProductError**](ProductError.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/FingerprintApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Method | HTTP request | Description
Get event by requestId

This endpoint allows you to get a detailed analysis of an individual request. **Only for Enterprise customers:** Please note that the response includes mobile signals (e.g. `rootApps`) even if the request orignated from a non-mobile platform. It is highly recommended that you **ignore** the mobile signals for such requests. Use `requestId` as the URL path parameter. This API method is scoped to a request, i.e. all returned information is by `requestId`.
This endpoint allows you to get a detailed analysis of an individual request. **Only for Enterprise customers:** Please note that the response includes mobile signals (e.g. `rootApps`) even if the request originated from a non-mobile platform. It is highly recommended that you **ignore** the mobile signals for such requests. Use `requestId` as the URL path parameter. This API method is scoped to a request, i.e. all returned information is by `requestId`.

### Example
```python
Expand Down
2 changes: 1 addition & 1 deletion docs/HighActivityResult.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**result** | **bool** | Flag indicating whether the request came from a high activity visitor. | [optional]
**result** | **bool** | Flag indicating whether the request came from a high activity visitor. |
**daily_requests** | **float** | Number of requests from the same visitor in the previous day. | [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)
Expand Down
4 changes: 2 additions & 2 deletions docs/IpBlockListResult.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**result** | **bool** | `true` if request IP address is part of any database that we use to search for known malicious actors, `false` otherwise. | [optional]
**details** | [**IpBlockListResultDetails**](IpBlockListResultDetails.md) | | [optional]
**result** | **bool** | `true` if request IP address is part of any database that we use to search for known malicious actors, `false` otherwise. |
**details** | [**IpBlockListResultDetails**](IpBlockListResultDetails.md) | |

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

4 changes: 2 additions & 2 deletions docs/IpBlockListResultDetails.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**email_spam** | **bool** | IP address was part of a known email spam attack (SMTP). | [optional]
**attack_source** | **bool** | IP address was part of a known network attack (SSH/HTTPS). | [optional]
**email_spam** | **bool** | IP address was part of a known email spam attack (SMTP). |
**attack_source** | **bool** | IP address was part of a known network attack (SSH/HTTPS). |

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

4 changes: 2 additions & 2 deletions docs/IpInfoResultV4.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**address** | **str** | | [optional]
**geolocation** | [**IPLocation**](IPLocation.md) | | [optional]
**address** | **str** | |
**geolocation** | [**IPLocation**](IPLocation.md) | |
**asn** | [**ASN**](ASN.md) | | [optional]
**datacenter** | [**DataCenter**](DataCenter.md) | | [optional]

Expand Down
4 changes: 2 additions & 2 deletions docs/IpInfoResultV6.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**address** | **str** | | [optional]
**geolocation** | [**IPLocation**](IPLocation.md) | | [optional]
**address** | **str** | |
**geolocation** | [**IPLocation**](IPLocation.md) | |
**asn** | [**ASN**](ASN.md) | | [optional]
**datacenter** | [**DataCenter**](DataCenter.md) | | [optional]

Expand Down
2 changes: 1 addition & 1 deletion docs/LocationSpoofingResult.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**result** | **bool** | Flag indicating whether the request came from a device with location spoofing enabled. | [optional]
**result** | **bool** | Flag indicating whether the request came from a mobile device with location spoofing enabled. |

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

1 change: 1 addition & 0 deletions docs/SignalResponseRawDeviceAttributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**data** | [**RawDeviceAttributesResult**](RawDeviceAttributesResult.md) | | [optional]
**error** | [**ProductError**](ProductError.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)

4 changes: 2 additions & 2 deletions docs/TamperingResult.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**result** | **bool** | Flag indicating whether browser tampering was detected according to our internal thresholds. | [optional]
**anomaly_score** | **float** | Confidence score (`0.0 - 1.0`) for the tampering detection. Values above `0.5` suggest that we're reasonably sure there was a tampering attempt. Values below `0.5` are genuine browsers. | [optional]
**result** | **bool** | Flag indicating whether browser tampering was detected according to our internal thresholds. |
**anomaly_score** | **float** | Confidence score (`0.0 - 1.0`) for the tampering detection. Values above `0.5` suggest that we're reasonably sure there was a tampering attempt. Values below `0.5` are genuine browsers. |

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

6 changes: 3 additions & 3 deletions docs/VpnResultMethods.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**timezone_mismatch** | **bool** | User's browser timezone doesn't match the timezone from which the request was originally made. | [optional]
**public_vpn** | **bool** | Request IP address is owned and used by a public VPN service provider. | [optional]
**auxiliary_mobile** | **bool** | This method applies to mobile devices only. Indicates the result of additional methods used to detect a VPN in mobile devices. | [optional]
**timezone_mismatch** | **bool** | User's browser timezone doesn't match the timezone from which the request was originally made. |
**public_vpn** | **bool** | Request IP address is owned and used by a public VPN service provider. |
**auxiliary_mobile** | **bool** | This method applies to mobile devices only. Indicates the result of additional methods used to detect a VPN in mobile devices. |

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

37 changes: 32 additions & 5 deletions fingerprint_pro_server_api_sdk/models/event_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,23 @@ class EventResponse(object):
and the value is json key in definition.
"""
swagger_types = {
'products': 'ProductsResponse'
'products': 'ProductsResponse',
'error': 'ProductError'
}

attribute_map = {
'products': 'products'
'products': 'products',
'error': 'error'
}

def __init__(self, products=None): # noqa: E501
def __init__(self, products=None, error=None): # noqa: E501
"""EventResponse - a model defined in Swagger""" # noqa: E501
self._products = None
self._error = None
self.discriminator = None
if products is not None:
self.products = products
self.products = products
if error is not None:
self.error = error

@property
def products(self):
Expand All @@ -63,9 +67,32 @@ def products(self, products):
:param products: The products of this EventResponse. # noqa: E501
:type: ProductsResponse
"""
if products is None:
raise ValueError("Invalid value for `products`, must not be `None`") # noqa: E501

self._products = products

@property
def error(self):
"""Gets the error of this EventResponse. # noqa: E501
:return: The error of this EventResponse. # noqa: E501
:rtype: ProductError
"""
return self._error

@error.setter
def error(self, error):
"""Sets the error of this EventResponse.
:param error: The error of this EventResponse. # noqa: E501
:type: ProductError
"""

self._error = error

def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
Expand Down
5 changes: 3 additions & 2 deletions fingerprint_pro_server_api_sdk/models/high_activity_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ def __init__(self, result=None, daily_requests=None): # noqa: E501
self._result = None
self._daily_requests = None
self.discriminator = None
if result is not None:
self.result = result
self.result = result
if daily_requests is not None:
self.daily_requests = daily_requests

Expand All @@ -67,6 +66,8 @@ def result(self, result):
:param result: The result of this HighActivityResult. # noqa: E501
:type: bool
"""
if result is None:
raise ValueError("Invalid value for `result`, must not be `None`") # noqa: E501

self._result = result

Expand Down
10 changes: 6 additions & 4 deletions fingerprint_pro_server_api_sdk/models/ip_block_list_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,8 @@ def __init__(self, result=None, details=None): # noqa: E501
self._result = None
self._details = None
self.discriminator = None
if result is not None:
self.result = result
if details is not None:
self.details = details
self.result = result
self.details = details

@property
def result(self):
Expand All @@ -67,6 +65,8 @@ def result(self, result):
:param result: The result of this IpBlockListResult. # noqa: E501
:type: bool
"""
if result is None:
raise ValueError("Invalid value for `result`, must not be `None`") # noqa: E501

self._result = result

Expand All @@ -88,6 +88,8 @@ def details(self, details):
:param details: The details of this IpBlockListResult. # noqa: E501
:type: IpBlockListResultDetails
"""
if details is None:
raise ValueError("Invalid value for `details`, must not be `None`") # noqa: E501

self._details = details

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,8 @@ def __init__(self, email_spam=None, attack_source=None): # noqa: E501
self._email_spam = None
self._attack_source = None
self.discriminator = None
if email_spam is not None:
self.email_spam = email_spam
if attack_source is not None:
self.attack_source = attack_source
self.email_spam = email_spam
self.attack_source = attack_source

@property
def email_spam(self):
Expand All @@ -67,6 +65,8 @@ def email_spam(self, email_spam):
:param email_spam: The email_spam of this IpBlockListResultDetails. # noqa: E501
:type: bool
"""
if email_spam is None:
raise ValueError("Invalid value for `email_spam`, must not be `None`") # noqa: E501

self._email_spam = email_spam

Expand All @@ -90,6 +90,8 @@ def attack_source(self, attack_source):
:param attack_source: The attack_source of this IpBlockListResultDetails. # noqa: E501
:type: bool
"""
if attack_source is None:
raise ValueError("Invalid value for `attack_source`, must not be `None`") # noqa: E501

self._attack_source = attack_source

Expand Down
10 changes: 6 additions & 4 deletions fingerprint_pro_server_api_sdk/models/ip_info_result_v4.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,8 @@ def __init__(self, address=None, geolocation=None, asn=None, datacenter=None):
self._asn = None
self._datacenter = None
self.discriminator = None
if address is not None:
self.address = address
if geolocation is not None:
self.geolocation = geolocation
self.address = address
self.geolocation = geolocation
if asn is not None:
self.asn = asn
if datacenter is not None:
Expand All @@ -75,6 +73,8 @@ def address(self, address):
:param address: The address of this IpInfoResultV4. # noqa: E501
:type: str
"""
if address is None:
raise ValueError("Invalid value for `address`, must not be `None`") # noqa: E501

self._address = address

Expand All @@ -96,6 +96,8 @@ def geolocation(self, geolocation):
:param geolocation: The geolocation of this IpInfoResultV4. # noqa: E501
:type: IPLocation
"""
if geolocation is None:
raise ValueError("Invalid value for `geolocation`, must not be `None`") # noqa: E501

self._geolocation = geolocation

Expand Down
10 changes: 6 additions & 4 deletions fingerprint_pro_server_api_sdk/models/ip_info_result_v6.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,8 @@ def __init__(self, address=None, geolocation=None, asn=None, datacenter=None):
self._asn = None
self._datacenter = None
self.discriminator = None
if address is not None:
self.address = address
if geolocation is not None:
self.geolocation = geolocation
self.address = address
self.geolocation = geolocation
if asn is not None:
self.asn = asn
if datacenter is not None:
Expand All @@ -75,6 +73,8 @@ def address(self, address):
:param address: The address of this IpInfoResultV6. # noqa: E501
:type: str
"""
if address is None:
raise ValueError("Invalid value for `address`, must not be `None`") # noqa: E501

self._address = address

Expand All @@ -96,6 +96,8 @@ def geolocation(self, geolocation):
:param geolocation: The geolocation of this IpInfoResultV6. # noqa: E501
:type: IPLocation
"""
if geolocation is None:
raise ValueError("Invalid value for `geolocation`, must not be `None`") # noqa: E501

self._geolocation = geolocation

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,13 @@ def __init__(self, result=None): # noqa: E501
"""LocationSpoofingResult - a model defined in Swagger""" # noqa: E501
self._result = None
self.discriminator = None
if result is not None:
self.result = result
self.result = result

@property
def result(self):
"""Gets the result of this LocationSpoofingResult. # noqa: E501
Flag indicating whether the request came from a device with location spoofing enabled. # noqa: E501
Flag indicating whether the request came from a mobile device with location spoofing enabled. # noqa: E501
:return: The result of this LocationSpoofingResult. # noqa: E501
:rtype: bool
Expand All @@ -57,11 +56,13 @@ def result(self):
def result(self, result):
"""Sets the result of this LocationSpoofingResult.
Flag indicating whether the request came from a device with location spoofing enabled. # noqa: E501
Flag indicating whether the request came from a mobile device with location spoofing enabled. # noqa: E501
:param result: The result of this LocationSpoofingResult. # noqa: E501
:type: bool
"""
if result is None:
raise ValueError("Invalid value for `result`, must not be `None`") # noqa: E501

self._result = result

Expand Down
Loading

0 comments on commit 8beb757

Please sign in to comment.