From 9cf24073f1f8a2bc5253ddb1a786665cab128bc4 Mon Sep 17 00:00:00 2001 From: Juraj Uhlar Date: Mon, 31 Aug 2026 14:54:03 +0100 Subject: [PATCH 1/3] chore: SPIKE Event oneOf discriminated union INTER-2457. Regenerated Event as an interface to show the compile break. Do not merge. --- README.md | 5 + docs/EdgeRequest.md | 20 + docs/EdgeRequestHeadersInner.md | 14 + docs/Event.md | 75 +- docs/EventDevice.md | 82 + docs/EventEdge.md | 31 + docs/FingerprintApi.md | 120 +- res/fingerprint-server-api.yaml | 511 +++- .../fingerprint/v4/api/FingerprintApi.java | 116 +- .../com/fingerprint/v4/model/EdgeRequest.java | 285 +++ .../v4/model/EdgeRequestHeadersInner.java | 126 + .../java/com/fingerprint/v4/model/Event.java | 2067 ++--------------- .../com/fingerprint/v4/model/EventDevice.java | 2016 ++++++++++++++++ .../com/fingerprint/v4/model/EventEdge.java | 484 ++++ .../v4/api/FingerprintApiTest.java | 5 + 15 files changed, 3839 insertions(+), 2118 deletions(-) create mode 100644 docs/EdgeRequest.md create mode 100644 docs/EdgeRequestHeadersInner.md create mode 100644 docs/EventDevice.md create mode 100644 docs/EventEdge.md create mode 100644 sdk/src/main/java/com/fingerprint/v4/model/EdgeRequest.java create mode 100644 sdk/src/main/java/com/fingerprint/v4/model/EdgeRequestHeadersInner.java create mode 100644 sdk/src/main/java/com/fingerprint/v4/model/EventDevice.java create mode 100644 sdk/src/main/java/com/fingerprint/v4/model/EventEdge.java diff --git a/README.md b/README.md index d694a5d..a61198d 100644 --- a/README.md +++ b/README.md @@ -321,6 +321,7 @@ All URIs are relative to *https://api.fpjs.io/v4* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- +*FingerprintApi* | [**analyzeRequestForAutomationIntelligence**](docs/FingerprintApi.md#analyzeRequestForAutomationIntelligence) | **POST** /edge | Collect Automation Intelligence. *FingerprintApi* | [**deleteVisitorData**](docs/FingerprintApi.md#deleteVisitorData) | **DELETE** /visitors/{visitor_id} | Delete a visitor ID *FingerprintApi* | [**getEvent**](docs/FingerprintApi.md#getEvent) | **GET** /events/{event_id} | Get an event by event ID *FingerprintApi* | [**searchEvents**](docs/FingerprintApi.md#searchEvents) | **GET** /events | Search events @@ -336,11 +337,15 @@ Class | Method | HTTP request | Description - [BotResult](docs/BotResult.md) - [BrowserDetails](docs/BrowserDetails.md) - [Canvas](docs/Canvas.md) + - [EdgeRequest](docs/EdgeRequest.md) + - [EdgeRequestHeadersInner](docs/EdgeRequestHeadersInner.md) - [Emoji](docs/Emoji.md) - [Error](docs/Error.md) - [ErrorCode](docs/ErrorCode.md) - [ErrorResponse](docs/ErrorResponse.md) - [Event](docs/Event.md) + - [EventDevice](docs/EventDevice.md) + - [EventEdge](docs/EventEdge.md) - [EventRuleAction](docs/EventRuleAction.md) - [EventRuleActionAllow](docs/EventRuleActionAllow.md) - [EventRuleActionBlock](docs/EventRuleActionBlock.md) diff --git a/docs/EdgeRequest.md b/docs/EdgeRequest.md new file mode 100644 index 0000000..cb8980a --- /dev/null +++ b/docs/EdgeRequest.md @@ -0,0 +1,20 @@ + + +# EdgeRequest + +HTTP request metadata (including the HTTP method, headers and IP address) sent by you (your server) to the Fingerprint API for IP and bot analysis. To improve accuracy, retain as much of the original semantics of the HTTP request as possible. For example, preserve the order of the request headers and their capitalization. At least one of `ipv4_address` or `ipv6_address` must be provided; a request with neither is rejected with a `400` error. If both IPv4 and IPv6 are provided, IP intelligence will be provided for each address. If an IPv4-mapped IPv6 address is provided in the `ipv6_address` request property, the IP intelligence will be provided in the `ipv4_address` property of the response. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**headers** | [**List<EdgeRequestHeadersInner>**](EdgeRequestHeadersInner.md) | Ordered header entries from the request made to your server. Each entry represents one header line. If one header name appears as multiple lines, send each as a separate item in the array. Headers that contain authentication or session data must still be included, but with with their value set to an empty string. This includes headers like `Authorization` and `Cookie`, but may contain more depending on your specific project, for instance `Proxy-Authenticate` or `X-Api-Key`. Omitting the headers entirely changes the shape of the request and can affect detection. Never forward the real secret values. Whenever possible, we recommend preserving header order and capitalization to provide the best accuracy, however it’s not a strict requirement if your runtime does not maintain http header order or canonicalizes header names. | | +|**method** | **String** | The original HTTP method of the request. If supported in your runtime, preserve the original casing. | | +|**url** | **URI** | Absolute URL of the request, without a \\#fragment suffix. Only HTTP and HTTPS schemes are supported. | | +|**ipv4Address** | **String** | Client IPv4 address observed by your server. | [optional] | +|**ipv6Address** | **String** | Client IPv6 address observed by your server. | [optional] | +|**linkedId** | **String** | A customer-provided id that was sent with the request. | [optional] | +|**tags** | **Map<String, Object>** | A customer-provided value or an object that was sent with the identification request or updated later. | [optional] | + + + diff --git a/docs/EdgeRequestHeadersInner.md b/docs/EdgeRequestHeadersInner.md new file mode 100644 index 0000000..2e6c1db --- /dev/null +++ b/docs/EdgeRequestHeadersInner.md @@ -0,0 +1,14 @@ + + +# EdgeRequestHeadersInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Header name as forwarded by your server. Headers must be valid according to RFC 7230 and will be canonicalized according to RFC 9112. | | +|**value** | **String** | Value of a single forwarded header entry. Be careful to preserve the original encoding and escaping. For example, do not double escape quotes. | | + + + diff --git a/docs/Event.md b/docs/Event.md index e041621..42df89f 100644 --- a/docs/Event.md +++ b/docs/Event.md @@ -2,77 +2,10 @@ # Event -Contains results from Fingerprint Identification and all active Smart Signals. Some Smart Signals are only supported for certain device types, these fields will be omitted for events not generated from the supported devices. Consult the [Smart Signals reference](https://docs.fingerprint.com/docs/smart-signals-reference) for more details. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**eventId** | **String** | Unique identifier of the user's request. The first portion of the event_id is a unix epoch milliseconds timestamp. | | -|**timestamp** | **Long** | Timestamp of the event with millisecond precision in Unix time. | | -|**source** | [**EventSource**](EventSource.md) | | [optional] | -|**incrementalIdentificationStatus** | [**IncrementalIdentificationStatus**](IncrementalIdentificationStatus.md) | | [optional] | -|**linkedId** | **String** | A customer-provided id that was sent with the request. | [optional] | -|**environmentId** | **String** | Environment Id of the event. | [optional] | -|**suspect** | **Boolean** | Field is `true` if you have previously set the `suspect` flag for this event using the [Server API Update event endpoint](https://docs.fingerprint.com/reference/server-api-v4-update-event). | [optional] | -|**sdk** | [**SDK**](SDK.md) | | [optional] | -|**replayed** | **Boolean** | `true` if we determined that this payload was replayed, `false` otherwise. | [optional] | -|**identification** | [**Identification**](Identification.md) | | [optional] | -|**supplementaryIdHighRecall** | [**SupplementaryIDHighRecall**](SupplementaryIDHighRecall.md) | | [optional] | -|**tags** | **Map<String, Object>** | A customer-provided value or an object that was sent with the identification request or updated later. | [optional] | -|**url** | **String** | Page URL from which the request was sent. | [optional] | -|**bundleId** | **String** | Bundle Id of the iOS application integrated with the Fingerprint SDK for the event. | [optional] | -|**packageName** | **String** | Package name of the Android application integrated with the Fingerprint SDK for the event. | [optional] | -|**ipAddress** | **String** | IP address of the requesting browser or bot. | [optional] | -|**userAgent** | **String** | User Agent of the client. | [optional] | -|**device** | **String** | Device model or family extracted from the user agent string. On web, this field is also present inside `browser_details`. | [optional] | -|**os** | **String** | Operating system family extracted from the user agent string. On web, this field is also present inside `browser_details`. | [optional] | -|**osVersion** | **String** | Operating system version string extracted from the user agent string. On web, this field is also present inside `browser_details`. | [optional] | -|**clientReferrer** | **String** | Client Referrer field corresponds to the `document.referrer` field gathered during an identification request. The value is an empty string if the user navigated to the page directly (not through a link, but, for example, by using a bookmark). | [optional] | -|**browserDetails** | [**BrowserDetails**](BrowserDetails.md) | | [optional] | -|**proximity** | [**Proximity**](Proximity.md) | | [optional] | -|**activeCall** | **Boolean** | Indicates whether the mobile device had an active call (cellular or VoIP) at the time of the request. Available from SDK 2.16.0+ on iOS and Android. | [optional] | -|**bot** | [**BotResult**](BotResult.md) | | [optional] | -|**botType** | **String** | Additional classification of the bot type if detected. | [optional] | -|**botInfo** | [**BotInfo**](BotInfo.md) | | [optional] | -|**clonedApp** | **Boolean** | Android specific cloned application detection. There are 2 values: * `true` - Presence of app cloners work detected (e.g. fully cloned application found or launch of it inside of a not main working profile detected). * `false` - No signs of cloned application detected or the client is not Android. | [optional] | -|**developerTools** | **Boolean** | `true` if the browser has DevTools open (Chrome, Firefox) or the Android/iOS device has Developer Tools enabled, `false` otherwise. | [optional] | -|**emulator** | **Boolean** | Android specific emulator detection. There are 2 values: * `true` - Emulated environment detected (e.g. launch inside of AVD). * `false` - No signs of emulated environment detected or the client is not Android. | [optional] | -|**factoryResetTimestamp** | **Long** | The time of the most recent factory reset that happened on the **mobile device** is expressed as Unix epoch time. When a factory reset cannot be detected on the mobile device or when the request is initiated from a browser, this field will correspond to the *epoch* time (i.e 1 Jan 1970 UTC) as a value of 0. See [Factory Reset Detection](https://docs.fingerprint.com/docs/smart-signals-reference#factory-reset-detection) to learn more about this Smart Signal. | [optional] | -|**frida** | **Boolean** | [Frida](https://frida.re/docs/) detection for Android and iOS devices. There are 2 values: * `true` - Frida detected * `false` - No signs of Frida or the client is not a mobile device. | [optional] | -|**ipBlocklist** | [**IPBlockList**](IPBlockList.md) | | [optional] | -|**ipInfo** | [**IPInfo**](IPInfo.md) | | [optional] | -|**proxy** | **Boolean** | IP address was used by a public proxy provider or belonged to a known recent residential proxy | [optional] | -|**proxyConfidence** | [**ProxyConfidence**](ProxyConfidence.md) | | [optional] | -|**proxyDetails** | [**ProxyDetails**](ProxyDetails.md) | | [optional] | -|**proxyMlScore** | **Double** | Machine learning–based proxy score, represented as a floating-point value between 0 and 1 (inclusive), with up to three decimal places of precision. A higher score means a higher confidence in the positive `proxy` detection result. This Smart Signal is currently in beta and only available to select customers. If you are interested, please [contact our support team](https://fingerprint.com/support/). | [optional] | -|**incognito** | **Boolean** | `true` if we detected incognito mode used in the browser, `false` otherwise. | [optional] | -|**jailbroken** | **Boolean** | iOS specific jailbreak detection. There are 2 values: * `true` - Jailbreak detected. * `false` - No signs of jailbreak or the client is not iOS. | [optional] | -|**locationSpoofing** | **Boolean** | Flag indicating whether the request came from a mobile device with location spoofing enabled. | [optional] | -|**mitmAttack** | **Boolean** | * `true` - When requests made from your users' mobile devices to Fingerprint servers have been intercepted and potentially modified. * `false` - Otherwise or when the request originated from a browser. See [MitM Attack Detection](https://docs.fingerprint.com/docs/smart-signals-reference#mitm-attack-detection) to learn more about this Smart Signal. | [optional] | -|**privacySettings** | **Boolean** | `true` if the request is from a privacy aware browser (e.g. Tor) or from a browser in which fingerprinting is blocked. Otherwise `false`. | [optional] | -|**rootApps** | **Boolean** | Android specific root management apps detection. There are 2 values: * `true` - Root Management Apps detected (e.g. Magisk). * `false` - No Root Management Apps detected or the client isn't Android. | [optional] | -|**ruleAction** | [**EventRuleAction**](EventRuleAction.md) | | [optional] | -|**simulator** | **Boolean** | iOS specific simulator detection. There are 2 values: * `true` - Simulator environment detected. * `false` - No signs of simulator or the client is not iOS. | [optional] | -|**suspectScore** | **Integer** | Suspect Score is an easy way to integrate Smart Signals into your fraud protection work flow. It is a weighted representation of all Smart Signals present in the payload that helps identify suspicious activity. The value range is [0; S] where S is sum of all Smart Signals weights. See more details here: https://docs.fingerprint.com/docs/suspect-score | [optional] | -|**tampering** | **Boolean** | The field can be used as a standalone flag for tampering detection. Alternatively, the more granular fields documented below can be used for workflows that require more context. * `true` if tampering is detected through an anomalous browser signature, anti-detect browser detection, or other tampering-related methods * `false` if none of the tampering checks return a positive result | [optional] | -|**tamperingConfidence** | [**TamperingConfidence**](TamperingConfidence.md) | | [optional] | -|**tamperingMlScore** | **Double** | The output of this model is captured as tampering_ml_score, a number indicating how likely an event is coming from an anti detect browser. Values close to 1 signify higher confidence and we consider anything above the threshold of 0.8 to be actionable (the result and anti_detect_browser fields conveniently captures that fact) | [optional] | -|**tamperingDetails** | [**TamperingDetails**](TamperingDetails.md) | | [optional] | -|**velocity** | [**Velocity**](Velocity.md) | | [optional] | -|**virtualMachine** | **Boolean** | `true` if the request came from a browser running inside a virtual machine (e.g. VMWare), `false` otherwise. | [optional] | -|**virtualMachineMlScore** | **Double** | Machine learning–based virtual machine score, represented as a floating-point value between 0 and 1 (inclusive), with up to three decimal places of precision. A higher score means a higher confidence in the positive `virtual_machine` detection result. This Smart Signal is currently in beta and only available to select customers. If you are interested, please [contact our support team](https://fingerprint.com/support/). | [optional] | -|**vpn** | **Boolean** | VPN or other anonymizing service has been used when sending the request. | [optional] | -|**vpnConfidence** | [**VpnConfidence**](VpnConfidence.md) | | [optional] | -|**vpnMlScore** | **Double** | Machine learning–based VPN score, represented as a floating-point value between 0 and 1 (inclusive), with up to three decimal places of precision. A higher score means a higher confidence in the positive `vpn` detection result. This Smart Signal is currently in beta and only available to select customers. If you are interested, please [contact our support team](https://fingerprint.com/support/). | [optional] | -|**vpnOriginTimezone** | **String** | Local timezone which is used in timezone_mismatch method. | [optional] | -|**vpnOriginCountry** | **String** | Country of the request (Android SDK version >= 2.4.0, iOS SDK version >= 2.9.0, JS agent >= 3.12.9 / 4.0.2), ISO 3166 format or unknown. | [optional] | -|**vpnMethods** | [**VpnMethods**](VpnMethods.md) | | [optional] | -|**highActivityDevice** | **Boolean** | Flag indicating if the request came from a high-activity visitor. | [optional] | -|**rareDevice** | **Boolean** | `true` if the device is considered rare based on its combination of hardware and software attributes. A device is classified as rare if it falls within the top 99.9 percentile (lowest-frequency segment) of observed traffic, or if its configuration has not been previously seen (`not_seen`). > This Smart Signal is currently in beta and only available to select customers. If you are interested, please [contact our support team](https://fingerprint.com/support/). | [optional] | -|**rareDevicePercentileBucket** | [**RareDevicePercentileBucket**](RareDevicePercentileBucket.md) | | [optional] | -|**rawDeviceAttributes** | [**RawDeviceAttributes**](RawDeviceAttributes.md) | | [optional] | -|**labels** | [**List<LabelsInner>**](LabelsInner.md) | Each label returns a prediction (true or false) for a specific use case (label field) based on a machine learning score. The machine learning score is determined by a model trained on customer data for that use case. This field is in the beta phase and only available to select customers. If you are interested, please [contact our support team](https://fingerprint.com/support/). | [optional] | +An identification event (`source: device`) or an Automation Intelligence event (`source: edge`). Use `source` to tell them apart. Device events include Identification and device-derived Smart Signals. Edge events do not. Consult the [Smart Signals reference](https://docs.fingerprint.com/docs/smart-signals-reference) for more details. +## oneOf schemas +* [EventDevice](EventDevice.md) +* [EventEdge](EventEdge.md) diff --git a/docs/EventDevice.md b/docs/EventDevice.md new file mode 100644 index 0000000..9cd1e3e --- /dev/null +++ b/docs/EventDevice.md @@ -0,0 +1,82 @@ + + +# EventDevice + +Contains results from Fingerprint Identification and Smart Signals derived from client-side device telemetry. Consult the [Smart Signals reference](https://docs.fingerprint.com/docs/smart-signals-reference) for more details. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**eventId** | **String** | Unique identifier of the user's request. The first portion of the event_id is a unix epoch milliseconds timestamp. | | +|**timestamp** | **Long** | Timestamp of the event with millisecond precision in Unix time. | | +|**linkedId** | **String** | A customer-provided id that was sent with the request. | [optional] | +|**tags** | **Map<String, Object>** | A customer-provided value or an object that was sent with the identification request or updated later. | [optional] | +|**url** | **String** | Page URL from which the request was sent. | [optional] | +|**botInfo** | [**BotInfo**](BotInfo.md) | | [optional] | +|**ipInfo** | [**IPInfo**](IPInfo.md) | | [optional] | +|**proxy** | **Boolean** | IP address was used by a public proxy provider or belonged to a known recent residential proxy | [optional] | +|**proxyConfidence** | [**ProxyConfidence**](ProxyConfidence.md) | | [optional] | +|**proxyDetails** | [**ProxyDetails**](ProxyDetails.md) | | [optional] | +|**vpn** | **Boolean** | VPN or other anonymizing service has been used when sending the request. | [optional] | +|**vpnConfidence** | [**VpnConfidence**](VpnConfidence.md) | | [optional] | +|**vpnMethods** | [**VpnMethods**](VpnMethods.md) | | [optional] | +|**source** | [**EventSource**](EventSource.md) | | | +|**incrementalIdentificationStatus** | [**IncrementalIdentificationStatus**](IncrementalIdentificationStatus.md) | | [optional] | +|**environmentId** | **String** | Environment Id of the event. | [optional] | +|**suspect** | **Boolean** | Field is `true` if you have previously set the `suspect` flag for this event using the [Server API Update event endpoint](https://docs.fingerprint.com/reference/server-api-update-event). | [optional] | +|**sdk** | [**SDK**](SDK.md) | | [optional] | +|**replayed** | **Boolean** | `true` if we determined that this payload was replayed, `false` otherwise. | [optional] | +|**identification** | [**Identification**](Identification.md) | | [optional] | +|**supplementaryIdHighRecall** | [**SupplementaryIDHighRecall**](SupplementaryIDHighRecall.md) | | [optional] | +|**bundleId** | **String** | Bundle Id of the iOS application integrated with the Fingerprint SDK for the event. | [optional] | +|**packageName** | **String** | Package name of the Android application integrated with the Fingerprint SDK for the event. | [optional] | +|**ipAddress** | **String** | IP address of the requesting browser or bot. | [optional] | +|**userAgent** | **String** | User Agent of the client. | [optional] | +|**device** | **String** | Device model or family extracted from the user agent string. On web, this field is also present inside `browser_details`. | [optional] | +|**os** | **String** | Operating system family extracted from the user agent string. On web, this field is also present inside `browser_details`. | [optional] | +|**osVersion** | **String** | Operating system version string extracted from the user agent string. On web, this field is also present inside `browser_details`. | [optional] | +|**clientReferrer** | **String** | Client Referrer field corresponds to the `document.referrer` field gathered during an identification request. The value is an empty string if the user navigated to the page directly (not through a link, but, for example, by using a bookmark). | [optional] | +|**browserDetails** | [**BrowserDetails**](BrowserDetails.md) | | [optional] | +|**proximity** | [**Proximity**](Proximity.md) | | [optional] | +|**activeCall** | **Boolean** | Indicates whether the mobile device had an active call (cellular or VoIP) at the time of the request. Available from SDK 2.16.0+ on iOS and Android. | [optional] | +|**bot** | [**BotResult**](BotResult.md) | | [optional] | +|**botType** | **String** | Additional classification of the bot type if detected. | [optional] | +|**clonedApp** | **Boolean** | Android specific cloned application detection. There are 2 values: * `true` - Presence of app cloners work detected (e.g. fully cloned application found or launch of it inside of a not main working profile detected). * `false` - No signs of cloned application detected or the client is not Android. | [optional] | +|**developerTools** | **Boolean** | `true` if the browser has DevTools open (Chrome, Firefox) or the Android/iOS device has Developer Tools enabled, `false` otherwise. | [optional] | +|**emulator** | **Boolean** | Android specific emulator detection. There are 2 values: * `true` - Emulated environment detected (e.g. launch inside of AVD). * `false` - No signs of emulated environment detected or the client is not Android. | [optional] | +|**factoryResetTimestamp** | **Long** | The time of the most recent factory reset that happened on the **mobile device** is expressed as Unix epoch time. When a factory reset cannot be detected on the mobile device or when the request is initiated from a browser, this field will correspond to the *epoch* time (i.e 1 Jan 1970 UTC) as a value of 0. See [Factory Reset Detection](https://docs.fingerprint.com/docs/smart-signals-reference#factory-reset-detection) to learn more about this Smart Signal. | [optional] | +|**frida** | **Boolean** | [Frida](https://frida.re/docs/) detection for Android and iOS devices. There are 2 values: * `true` - Frida detected * `false` - No signs of Frida or the client is not a mobile device. | [optional] | +|**ipBlocklist** | [**IPBlockList**](IPBlockList.md) | | [optional] | +|**proxyMlScore** | **Double** | Machine learning–based proxy score, represented as a floating-point value between 0 and 1 (inclusive), with up to three decimal places of precision. A higher score means a higher confidence in the positive `proxy` detection result. This Smart Signal is currently in beta and only available to select customers. If you are interested, please [contact our support team](https://fingerprint.com/support/). | [optional] | +|**incognito** | **Boolean** | `true` if we detected incognito mode used in the browser, `false` otherwise. | [optional] | +|**jailbroken** | **Boolean** | iOS specific jailbreak detection. There are 2 values: * `true` - Jailbreak detected. * `false` - No signs of jailbreak or the client is not iOS. | [optional] | +|**locationSpoofing** | **Boolean** | Flag indicating whether the request came from a mobile device with location spoofing enabled. | [optional] | +|**mitmAttack** | **Boolean** | * `true` - When requests made from your users' mobile devices to Fingerprint servers have been intercepted and potentially modified. * `false` - Otherwise or when the request originated from a browser. See [MitM Attack Detection](https://docs.fingerprint.com/docs/smart-signals-reference#mitm-attack-detection) to learn more about this Smart Signal. | [optional] | +|**privacySettings** | **Boolean** | `true` if the request is from a privacy aware browser (e.g. Tor) or from a browser in which fingerprinting is blocked. Otherwise `false`. | [optional] | +|**rootApps** | **Boolean** | Android specific root management apps detection. There are 2 values: * `true` - Root Management Apps detected (e.g. Magisk). * `false` - No Root Management Apps detected or the client isn't Android. | [optional] | +|**ruleAction** | [**EventRuleAction**](EventRuleAction.md) | | [optional] | +|**simulator** | **Boolean** | iOS specific simulator detection. There are 2 values: * `true` - Simulator environment detected. * `false` - No signs of simulator or the client is not iOS. | [optional] | +|**suspectScore** | **Integer** | Suspect Score is an easy way to integrate Smart Signals into your fraud protection work flow. It is a weighted representation of all Smart Signals present in the payload that helps identify suspicious activity. The value range is [0; S] where S is sum of all Smart Signals weights. See more details here: https://docs.fingerprint.com/docs/suspect-score | [optional] | +|**tampering** | **Boolean** | The field can be used as a standalone flag for tampering detection. Alternatively, the more granular fields documented below can be used for workflows that require more context. * `true` if tampering is detected through an anomalous browser signature, anti-detect browser detection, or other tampering-related methods * `false` if none of the tampering checks return a positive result | [optional] | +|**tamperingConfidence** | [**TamperingConfidence**](TamperingConfidence.md) | | [optional] | +|**tamperingMlScore** | **Double** | The output of this model is captured as tampering_ml_score, a number indicating how likely an event is coming from an anti detect browser. Values close to 1 signify higher confidence and we consider anything above the threshold of 0.8 to be actionable (the result and anti_detect_browser fields conveniently captures that fact) | [optional] | +|**tamperingDetails** | [**TamperingDetails**](TamperingDetails.md) | | [optional] | +|**velocity** | [**Velocity**](Velocity.md) | | [optional] | +|**virtualMachine** | **Boolean** | `true` if the request came from a browser running inside a virtual machine (e.g. VMWare), `false` otherwise. | [optional] | +|**virtualMachineMlScore** | **Double** | Machine learning–based virtual machine score, represented as a floating-point value between 0 and 1 (inclusive), with up to three decimal places of precision. A higher score means a higher confidence in the positive `virtual_machine` detection result. This Smart Signal is currently in beta and only available to select customers. If you are interested, please [contact our support team](https://fingerprint.com/support/). | [optional] | +|**vpnMlScore** | **Double** | Machine learning–based VPN score, represented as a floating-point value between 0 and 1 (inclusive), with up to three decimal places of precision. A higher score means a higher confidence in the positive `vpn` detection result. This Smart Signal is currently in beta and only available to select customers. If you are interested, please [contact our support team](https://fingerprint.com/support/). | [optional] | +|**vpnOriginTimezone** | **String** | Local timezone which is used in timezone_mismatch method. | [optional] | +|**vpnOriginCountry** | **String** | Country of the request (Android SDK version >= 2.4.0, iOS SDK version >= 2.9.0, JS agent >= 3.12.9 / 4.0.2), ISO 3166 format or unknown. | [optional] | +|**highActivityDevice** | **Boolean** | Flag indicating if the request came from a high-activity visitor. | [optional] | +|**rareDevice** | **Boolean** | `true` if the device is considered rare based on its combination of hardware and software attributes. A device is classified as rare if it falls within the top 99.9 percentile (lowest-frequency segment) of observed traffic, or if its configuration has not been previously seen (`not_seen`). > This Smart Signal is currently in beta and only available to select customers. If you are interested, please [contact our support team](https://fingerprint.com/support/). | [optional] | +|**rareDevicePercentileBucket** | [**RareDevicePercentileBucket**](RareDevicePercentileBucket.md) | | [optional] | +|**rawDeviceAttributes** | [**RawDeviceAttributes**](RawDeviceAttributes.md) | | [optional] | +|**labels** | [**List<LabelsInner>**](LabelsInner.md) | Each label returns a prediction (true or false) for a specific use case (label field) based on a machine learning score. The machine learning score is determined by a model trained on customer data for that use case. This field is in the beta phase and only available to select customers. If you are interested, please [contact our support team](https://fingerprint.com/support/). | [optional] | + + +## Implemented Interfaces + +* Event + + diff --git a/docs/EventEdge.md b/docs/EventEdge.md new file mode 100644 index 0000000..c15c2ab --- /dev/null +++ b/docs/EventEdge.md @@ -0,0 +1,31 @@ + + +# EventEdge + +IP and bot analysis for an event generated by the Automation Intelligence API (`/edge` endpoint). No client-side collection agent is involved, so Identification (`visitor_id`) and device-telemetry-derived Smart Signals are not available. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**eventId** | **String** | Unique identifier of the user's request. The first portion of the event_id is a unix epoch milliseconds timestamp. | | +|**timestamp** | **Long** | Timestamp of the event with millisecond precision in Unix time. | | +|**linkedId** | **String** | A customer-provided id that was sent with the request. | [optional] | +|**tags** | **Map<String, Object>** | A customer-provided value or an object that was sent with the identification request or updated later. | [optional] | +|**url** | **String** | Page URL from which the request was sent. | [optional] | +|**botInfo** | [**BotInfo**](BotInfo.md) | | [optional] | +|**ipInfo** | [**IPInfo**](IPInfo.md) | | | +|**proxy** | **Boolean** | IP address was used by a public proxy provider or belonged to a known recent residential proxy | [optional] | +|**proxyConfidence** | [**ProxyConfidence**](ProxyConfidence.md) | | [optional] | +|**proxyDetails** | [**ProxyDetails**](ProxyDetails.md) | | [optional] | +|**vpn** | **Boolean** | VPN or other anonymizing service has been used when sending the request. | [optional] | +|**vpnConfidence** | [**VpnConfidence**](VpnConfidence.md) | | [optional] | +|**vpnMethods** | [**VpnMethods**](VpnMethods.md) | | [optional] | +|**source** | [**EventSource**](EventSource.md) | | | + + +## Implemented Interfaces + +* Event + + diff --git a/docs/FingerprintApi.md b/docs/FingerprintApi.md index 74968f9..4861e51 100644 --- a/docs/FingerprintApi.md +++ b/docs/FingerprintApi.md @@ -4,6 +4,7 @@ All URIs are relative to *https://api.fpjs.io/v4* | Method | HTTP request | Description | |------------- | ------------- | -------------| +| [**analyzeRequestForAutomationIntelligence**](FingerprintApi.md#analyzeRequestForAutomationIntelligence) | **POST** /edge | Collect Automation Intelligence. | | [**deleteVisitorData**](FingerprintApi.md#deleteVisitorData) | **DELETE** /visitors/{visitor_id} | Delete a visitor ID | | [**getEvent**](FingerprintApi.md#getEvent) | **GET** /events/{event_id} | Get an event by event ID | | [**searchEvents**](FingerprintApi.md#searchEvents) | **GET** /events | Search events | @@ -11,6 +12,101 @@ All URIs are relative to *https://api.fpjs.io/v4* +## analyzeRequestForAutomationIntelligence + +> EventEdge analyzeRequestForAutomationIntelligence(edgeRequest) + +Collect Automation Intelligence. + +The Automation Intelligence API gives you the tools to determine whether traffic is legitimate and should be accepted by your application. + +This feature is currently in a Public Preview testing phase. All feedback is welcome! If you encounter any issues, please [contact our support team](https://fingerprint.com/support/). + +The API detects automation tools like AI Agents, AI Assistants, AI Browsers, and other bots. Additionally, it provides IP intelligence like geolocation, residential proxy, VPN and data center detection. + +Automation Intelligence is derived from HTTP request metadata that reaches your server. It does not require the use of a JavaScript client-side agent or mobile SDKs to collect device context. + +The API is fast, with average response times of less than 30ms, making it a great fit for edge, pre-origin or middleware contexts. The API is platform-agnostic and can be used with different CDN providers, cloud platforms, or any server backend. + +Because this API doesn’t require the use of a client-side device collection agent, it doesn’t support device identification via `visitor_id` and a few Smart Signals derived from deep device telemetry. + +### Event Retrieval + +Events created by the Automation Intelligence API can be fetched via the [`/v4/events/{event_id}`](https://docs.fingerprint.com/reference/server-api-get-event) API using the `event_id` present in the API response. + +Fetch all Automation Intelligence API events via the [`/v4/events?source=edge`](https://docs.fingerprint.com/reference/server-api-search-events#parameter-source) API. + + +### Example + +```java +package main; + +import java.util.*; + +import com.fingerprint.v4.api.FingerprintApi; +import com.fingerprint.v4.model.*; +import com.fingerprint.v4.sdk.ApiClient; +import com.fingerprint.v4.sdk.ApiException; +import com.fingerprint.v4.sdk.Region; + +public class FingerprintApiExample { + // Fingerprint Secret API Key + private static final String FPJS_API_SECRET = "Fingerprint Secret API Key"; + public static void main(String... args) { + // Create a new api client instance from Configuration with your Fingerprint Server API Key and your Fingerprint Server API Region. + /* + You can specify a region on getDefaultApiClient function's second parameter + If you leave the second parameter empty, then Region.GLOBAL will be used as a default region + Options for regions are: + Region.GLOBAL + Region.EUROPE + Region.ASIA + */ + FingerprintApi api = new FingerprintApi(FPJS_API_SECRET, Region.EUROPE); + EdgeRequest edgeRequest = new EdgeRequest(); // EdgeRequest | + try { + EventEdge result = api.analyzeRequestForAutomationIntelligence(edgeRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FingerprintApi.analyzeRequestForAutomationIntelligence:" + e.getMessage()); + } + } +} +``` + + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **edgeRequest** | [**EdgeRequest**](EdgeRequest.md)| | | + +### Return type + +[**EventEdge**](EventEdge.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK. | - | +| **400** | Bad request. The request payload is not valid. | - | +| **403** | Forbidden. Access to this API is denied. | - | +| **413** | Bad request. The request payload is too large. | - | +| **429** | Too Many Requests. The request is throttled. | - | +| **500** | Workspace error. | - | + + ## deleteVisitorData > deleteVisitorData(visitorId) @@ -73,7 +169,7 @@ public class FingerprintApiExample { Region.ASIA */ FingerprintApi api = new FingerprintApi(FPJS_API_SECRET, Region.EUROPE); - String visitorId = "Ibk1527CUFmcnjLwIs4A9"; // String | The [visitor ID](https://docs.fingerprint.com/reference/js-agent-v4-get-function#visitor_id) you want to delete. + String visitorId = "Ibk1527CUFmcnjLwIs4A9"; // String | The [visitor ID](https://docs.fingerprint.com/reference/js-agent-get-function#visitor_id) you want to delete. try { api.deleteVisitorData(visitorId); } catch (ApiException e) { @@ -89,7 +185,7 @@ public class FingerprintApiExample { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **visitorId** | **String**| The [visitor ID](https://docs.fingerprint.com/reference/js-agent-v4-get-function#visitor_id) you want to delete. | | +| **visitorId** | **String**| The [visitor ID](https://docs.fingerprint.com/reference/js-agent-get-function#visitor_id) you want to delete. | | ### Return type @@ -120,10 +216,12 @@ null (empty response body) Get an event by event ID -Get a detailed analysis of an individual identification event, including Smart Signals. +Get a detailed analysis of an individual event, including Smart Signals. Use `event_id` as the URL path parameter. This API method is scoped to a request, i.e. all returned information is by `event_id`. +Returns `EventDevice` when `source` is `device`, and `EventEdge` when `source` is `edge`. + ### Example @@ -152,7 +250,7 @@ public class FingerprintApiExample { Region.ASIA */ FingerprintApi api = new FingerprintApi(FPJS_API_SECRET, Region.EUROPE); - String eventId = "1708102555327.NLOjmg"; // String | The unique [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id) of each identification request (`requestId` can be used in its place). + String eventId = "1708102555327.NLOjmg"; // String | The unique [identifier](https://docs.fingerprint.com/reference/js-agent-get-function#event_id) of each identification request (`requestId` can be used in its place). String rulesetId = "D6N9Kbk9HRWrIWGz"; // String | The ID of the ruleset to evaluate against the event, producing the action to take for this event. The resulting action is returned in the `rule_action` attribute of the response. try { Event result = api.getEvent(eventId, new FingerprintApi.GetEventOptionalParams() @@ -171,7 +269,7 @@ public class FingerprintApiExample { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **eventId** | **String**| The unique [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id) of each identification request (`requestId` can be used in its place). | | +| **eventId** | **String**| The unique [identifier](https://docs.fingerprint.com/reference/js-agent-get-function#event_id) of each identification request (`requestId` can be used in its place). | | | **getEventOptionalParams** | [**FingerprintApi.GetEventOptionalParams**](#fingerprintapigeteventoptionalparams) | | [optional] | #### FingerprintApi.GetEventOptionalParams @@ -270,7 +368,7 @@ public class FingerprintApiExample { FingerprintApi api = new FingerprintApi(FPJS_API_SECRET, Region.EUROPE); Integer limit = 10; // Integer | Maximum number of events to return. Defaults to 10 when omitted. Results are selected from the time range (`start`, `end`), ordered by `reverse`, then truncated to provided `limit` size. So `reverse=true` returns the oldest N=`limit` events, otherwise the newest N=`limit` events. String paginationKey = "S9rgMMUb4z3X5t5pr_tSgoSZlmyF0O8X7kCV2m981-iY1LmRTjraa1rTk3L-hQExnDWCi0RA-zAIjaVSTNO2AN2eqQWgzT0RjbieMxRfSdkM-HmOhdOgdQvYfPG3vqU1DJKh4Q"; // String | Use `pagination_key` to get the next page of results. When more results are available (e.g., you requested up to 100 results for your query using `limit`, but there are more than 100 events total matching your request), the `pagination_key` field is added to the response. The pagination key is an arbitrary string that should not be interpreted in any way and should be passed as-is. In the following request, use that value in the `pagination_key` parameter to get the next page of results: 1. First request, returning most recent 100 events: `GET api-base-url/events?limit=100` 2. Use `response.pagination_key` to get the next page of results: `GET api-base-url/events?limit=100&pagination_key=S9rgMMUb4z3X5t5pr_tSgoSZlmyF0O8X7kCV2m981-iY1LmRTjraa1rTk3L-hQExnDWCi0RA-zAIjaVSTNO2AN2eqQWgzT0RjbieMxRfSdkM-HmOhdOgdQvYfPG3vqU1DJKh4Q` - String visitorId = "Ibk1527CUFmcnjLwIs4A9"; // String | Unique [visitor identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#visitor_id) issued by Fingerprint Identification and all active Smart Signals. Filter events by matching Visitor ID (`identification.visitor_id` property). + String visitorId = "Ibk1527CUFmcnjLwIs4A9"; // String | Unique [visitor identifier](https://docs.fingerprint.com/reference/js-agent-get-function#visitor_id) issued by Fingerprint Identification and all active Smart Signals. Filter events by matching Visitor ID (`identification.visitor_id` property). String highRecallId = "Ibk1527CUFmcnjLwIs4A9"; // String | The High Recall ID is a supplementary browser identifier designed for use cases that require wider coverage over precision. Compared to the standard visitor ID, the High Recall ID strives to match incoming browsers more generously (rather than precisely) with existing browsers and thus identifies fewer browsers as new. The High Recall ID is best suited for use cases that are sensitive to browsers being identified as new and where mismatched browsers are not detrimental. Filter events by matching High Recall ID (`supplementary_id_high_recall.visitor_id` property). SearchEventsBot bot = SearchEventsBot.fromValue("all"); // SearchEventsBot | Filter events by the Bot Detection result, specifically: `all` - events where any kind of bot was detected. `good` - events where a good bot was detected. `bad` - events where a bad bot was detected. `none` - events where no bot was detected. > Note: When using this parameter, only events with the `bot` property set to a valid value are returned. Events without a `bot` Smart Signal result are left out of the response. SearchEventsBotInfo botInfo = SearchEventsBotInfo.fromValue("all"); // SearchEventsBotInfo | Filter events by their Bot Info result, specifically: - `all` - events where any kind of bot was detected. - `none` - events where no bot was detected, and no `bot_info` was present. @@ -281,7 +379,7 @@ public class FingerprintApiExample { List botInfoName = Arrays.asList(); // List | Filter events by their Bot Info Name. The name must match exactly, partial or wildcard matching is not supported. Multiple Names can be provided using the repeated keys syntax. For example, `bot_info_name=ChatGPT%20Agent&bot_info_name=Bedrock%20AgentCore`, will match events with a Bot Info Name of `ChatGPT Agent` or `Bedrock AgentCore`. Other notations like comma-separated or bracket notation are not supported. String ipAddress = "61.127.217.15"; // String | Filter events by IP address or IP range (if CIDR notation is used). If CIDR notation is not used, a /32 for IPv4 or /128 for IPv6 is assumed. Examples of range based queries: 10.0.0.0/24, 192.168.0.1/32 String asn = "12876"; // String | Filter events by the ASN associated with the event's IP address. This corresponds to the `ip_info.(v4|v6).asn` property in the response. - String linkedId = "somelinkedId"; // String | Filter events by your custom identifier. You can use [linked Ids](https://docs.fingerprint.com/reference/js-agent-v4-get-function#linkedid) to associate identification requests with your own identifier, for example, session Id, purchase Id, or transaction Id. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. + String linkedId = "somelinkedId"; // String | Filter events by your custom identifier. You can use [linked Ids](https://docs.fingerprint.com/reference/js-agent-get-function#linkedid) to associate identification requests with your own identifier, for example, session Id, purchase Id, or transaction Id. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. String url = "https://example.com/login"; // String | Filter events by the URL (`url` property) associated with the event. String bundleId = "com.example.app"; // String | Filter events by the Bundle ID (iOS) associated with the event. String packageName = "com.example.app"; // String | Filter events by the Package Name (Android) associated with the event. @@ -402,7 +500,7 @@ Object containing optional parameters for API method. Supports a fluent interfac |------------- | ------------- | ------------- | -------------| | **limit** | **Integer**| Maximum number of events to return. Defaults to 10 when omitted. Results are selected from the time range (`start`, `end`), ordered by `reverse`, then truncated to provided `limit` size. So `reverse=true` returns the oldest N=`limit` events, otherwise the newest N=`limit` events. | [optional] | | **paginationKey** | **String**| Use `pagination_key` to get the next page of results. When more results are available (e.g., you requested up to 100 results for your query using `limit`, but there are more than 100 events total matching your request), the `pagination_key` field is added to the response. The pagination key is an arbitrary string that should not be interpreted in any way and should be passed as-is. In the following request, use that value in the `pagination_key` parameter to get the next page of results: 1. First request, returning most recent 100 events: `GET api-base-url/events?limit=100` 2. Use `response.pagination_key` to get the next page of results: `GET api-base-url/events?limit=100&pagination_key=S9rgMMUb4z3X5t5pr_tSgoSZlmyF0O8X7kCV2m981-iY1LmRTjraa1rTk3L-hQExnDWCi0RA-zAIjaVSTNO2AN2eqQWgzT0RjbieMxRfSdkM-HmOhdOgdQvYfPG3vqU1DJKh4Q` | [optional] | -| **visitorId** | **String**| Unique [visitor identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#visitor_id) issued by Fingerprint Identification and all active Smart Signals. Filter events by matching Visitor ID (`identification.visitor_id` property). | [optional] | +| **visitorId** | **String**| Unique [visitor identifier](https://docs.fingerprint.com/reference/js-agent-get-function#visitor_id) issued by Fingerprint Identification and all active Smart Signals. Filter events by matching Visitor ID (`identification.visitor_id` property). | [optional] | | **highRecallId** | **String**| The High Recall ID is a supplementary browser identifier designed for use cases that require wider coverage over precision. Compared to the standard visitor ID, the High Recall ID strives to match incoming browsers more generously (rather than precisely) with existing browsers and thus identifies fewer browsers as new. The High Recall ID is best suited for use cases that are sensitive to browsers being identified as new and where mismatched browsers are not detrimental. Filter events by matching High Recall ID (`supplementary_id_high_recall.visitor_id` property). | [optional] | | **bot** | **SearchEventsBot**| Filter events by the Bot Detection result, specifically: `all` - events where any kind of bot was detected. `good` - events where a good bot was detected. `bad` - events where a bad bot was detected. `none` - events where no bot was detected. > Note: When using this parameter, only events with the `bot` property set to a valid value are returned. Events without a `bot` Smart Signal result are left out of the response. | [optional] [enum: all, good, bad, none] | | **botInfo** | **SearchEventsBotInfo**| Filter events by their Bot Info result, specifically: - `all` - events where any kind of bot was detected. - `none` - events where no bot was detected, and no `bot_info` was present. | [optional] [enum: all, none] | @@ -413,7 +511,7 @@ Object containing optional parameters for API method. Supports a fluent interfac | **botInfoName** | **List<String>**| Filter events by their Bot Info Name. The name must match exactly, partial or wildcard matching is not supported. Multiple Names can be provided using the repeated keys syntax. For example, `bot_info_name=ChatGPT%20Agent&bot_info_name=Bedrock%20AgentCore`, will match events with a Bot Info Name of `ChatGPT Agent` or `Bedrock AgentCore`. Other notations like comma-separated or bracket notation are not supported. | [optional] | | **ipAddress** | **String**| Filter events by IP address or IP range (if CIDR notation is used). If CIDR notation is not used, a /32 for IPv4 or /128 for IPv6 is assumed. Examples of range based queries: 10.0.0.0/24, 192.168.0.1/32 | [optional] | | **asn** | **String**| Filter events by the ASN associated with the event's IP address. This corresponds to the `ip_info.(v4|v6).asn` property in the response. | [optional] | -| **linkedId** | **String**| Filter events by your custom identifier. You can use [linked Ids](https://docs.fingerprint.com/reference/js-agent-v4-get-function#linkedid) to associate identification requests with your own identifier, for example, session Id, purchase Id, or transaction Id. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. | [optional] | +| **linkedId** | **String**| Filter events by your custom identifier. You can use [linked Ids](https://docs.fingerprint.com/reference/js-agent-get-function#linkedid) to associate identification requests with your own identifier, for example, session Id, purchase Id, or transaction Id. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. | [optional] | | **url** | **String**| Filter events by the URL (`url` property) associated with the event. | [optional] | | **bundleId** | **String**| Filter events by the Bundle ID (iOS) associated with the event. | [optional] | | **packageName** | **String**| Filter events by the Package Name (Android) associated with the event. | [optional] | @@ -524,7 +622,7 @@ public class FingerprintApiExample { Region.ASIA */ FingerprintApi api = new FingerprintApi(FPJS_API_SECRET, Region.EUROPE); - String eventId = "1708102555327.NLOjmg"; // String | The unique event [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id). + String eventId = "1708102555327.NLOjmg"; // String | The unique event [identifier](https://docs.fingerprint.com/reference/js-agent-get-function#event_id). EventUpdate eventUpdate = new EventUpdate(); // EventUpdate | try { api.updateEvent(eventId, eventUpdate); @@ -541,7 +639,7 @@ public class FingerprintApiExample { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **eventId** | **String**| The unique event [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id). | | +| **eventId** | **String**| The unique event [identifier](https://docs.fingerprint.com/reference/js-agent-get-function#event_id). | | | **eventUpdate** | [**EventUpdate**](EventUpdate.md)| | | ### Return type diff --git a/res/fingerprint-server-api.yaml b/res/fingerprint-server-api.yaml index 842bfbb..2a479d0 100644 --- a/res/fingerprint-server-api.yaml +++ b/res/fingerprint-server-api.yaml @@ -37,6 +37,97 @@ servers: security: - bearerAuth: [] paths: + /edge: + post: + tags: + - Fingerprint + operationId: analyzeRequestForAutomationIntelligence + summary: Collect Automation Intelligence. + description: > + The Automation Intelligence API gives you the tools to determine whether + traffic is legitimate and should be accepted by your application. + + + This feature is currently in a Public Preview testing phase. All + feedback is welcome! If you encounter any issues, please [contact our + support team](https://fingerprint.com/support/). + + + The API detects automation tools like AI Agents, AI Assistants, AI + Browsers, and other bots. Additionally, it provides IP intelligence like + geolocation, residential proxy, VPN and data center detection. + + + Automation Intelligence is derived from HTTP request metadata that + reaches your server. It does not require the use of a JavaScript + client-side agent or mobile SDKs to collect device context. + + + The API is fast, with average response times of less than 30ms, making + it a great fit for edge, pre-origin or middleware contexts. The API is + platform-agnostic and can be used with different CDN providers, cloud + platforms, or any server backend. + + + Because this API doesn’t require the use of a client-side device + collection agent, it doesn’t support device identification via + `visitor_id` and a few Smart Signals derived from deep device telemetry. + + + ### Event Retrieval + + + Events created by the Automation Intelligence API can be fetched via the + [`/v4/events/{event_id}`](https://docs.fingerprint.com/reference/server-api-get-event) + API using the `event_id` present in the API response. + + + Fetch all Automation Intelligence API events via the + [`/v4/events?source=edge`](https://docs.fingerprint.com/reference/server-api-search-events#parameter-source) + API. + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/EdgeRequest' + responses: + '200': + description: OK. + content: + application/json: + schema: + $ref: '#/components/schemas/EventEdge' + '400': + description: Bad request. The request payload is not valid. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: Forbidden. Access to this API is denied. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '413': + description: Bad request. The request payload is too large. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '429': + description: Too Many Requests. The request is throttled. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: Workspace error. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' /events/{event_id}: get: tags: @@ -44,12 +135,15 @@ paths: operationId: getEvent summary: Get an event by event ID description: > - Get a detailed analysis of an individual identification event, including - Smart Signals. + Get a detailed analysis of an individual event, including Smart Signals. Use `event_id` as the URL path parameter. This API method is scoped to a request, i.e. all returned information is by `event_id`. + + + Returns `EventDevice` when `source` is `device`, and `EventEdge` when + `source` is `edge`. parameters: - name: event_id in: path @@ -61,7 +155,7 @@ paths: example: 1708102555327.NLOjmg description: >- The unique - [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id) + [identifier](https://docs.fingerprint.com/reference/js-agent-get-function#event_id) of each identification request (`requestId` can be used in its place). - name: ruleset_id @@ -165,7 +259,7 @@ paths: example: 1708102555327.NLOjmg description: >- The unique event - [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id). + [identifier](https://docs.fingerprint.com/reference/js-agent-get-function#event_id). requestBody: required: true content: @@ -317,7 +411,7 @@ paths: example: Ibk1527CUFmcnjLwIs4A9 description: > Unique [visitor - identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#visitor_id) + identifier](https://docs.fingerprint.com/reference/js-agent-get-function#visitor_id) issued by Fingerprint Identification and all active Smart Signals. @@ -492,7 +586,7 @@ paths: You can use [linked - Ids](https://docs.fingerprint.com/reference/js-agent-v4-get-function#linkedid) + Ids](https://docs.fingerprint.com/reference/js-agent-get-function#linkedid) to associate identification requests with your own identifier, for example, session Id, purchase Id, or transaction Id. You can then use this `linked_id` parameter to retrieve all events associated @@ -1124,7 +1218,7 @@ paths: example: Ibk1527CUFmcnjLwIs4A9 description: >- The [visitor - ID](https://docs.fingerprint.com/reference/js-agent-v4-get-function#visitor_id) + ID](https://docs.fingerprint.com/reference/js-agent-get-function#visitor_id) you want to delete. responses: '200': @@ -1177,6 +1271,127 @@ components: identification request or updated later. additionalProperties: true required: [] + EdgeRequest: + type: object + description: >- + HTTP request metadata (including the HTTP method, headers and IP + address) sent by you (your server) to the Fingerprint API for IP and bot + analysis. To improve accuracy, retain as much of the original semantics + of the HTTP request as possible. For example, preserve the order of the + request headers and their capitalization. + + At least one of `ipv4_address` or `ipv6_address` must be provided; a + request with neither is rejected with a `400` error. If both IPv4 and + IPv6 are provided, IP intelligence will be provided for each address. If + an IPv4-mapped IPv6 address is provided in the `ipv6_address` request + property, the IP intelligence will be provided in the `ipv4_address` + property of the response. + required: + - headers + - method + - url + properties: + headers: + type: array + description: > + Ordered header entries from the request made to your server. Each + entry represents one header line. If one header name appears as + multiple lines, send each as a separate item in the array. + + + Headers that contain authentication or session data must still be + included, but with with their value set to an empty string. This + includes headers like `Authorization` and `Cookie`, but may contain + more depending on your specific project, for instance + `Proxy-Authenticate` or `X-Api-Key`. Omitting the headers entirely + changes the shape of the request and can affect detection. Never + forward the real secret values. + + + Whenever possible, we recommend preserving header order and + capitalization to provide the best accuracy, however it’s not a + strict requirement if your runtime does not maintain http header + order or canonicalizes header names. + minItems: 1 + items: + type: object + required: + - name + - value + properties: + name: + type: string + examples: + - User-Agent + description: >- + Header name as forwarded by your server. Headers must be valid + according to RFC 7230 and will be canonicalized according to + RFC 9112. + value: + type: string + examples: + - Mozilla/5.0 + description: >- + Value of a single forwarded header entry. Be careful to + preserve the original encoding and escaping. For example, do + not double escape quotes. + examples: + - - name: Host + value: example.com + - name: User-Agent + value: Mozilla/5.0 + - name: Accept-Language + value: en-US,en;q=0.9 + - - name: Host + value: example.com + - name: User-Agent + value: Mozilla/5.0 + - name: Accept-Encoding + value: gzip + - name: Accept-Encoding + value: deflate + method: + type: string + description: >- + The original HTTP method of the request. If supported in your + runtime, preserve the original casing. + examples: + - GET + - POST + - PUT + - PATCH + - DELETE + url: + type: string + description: >- + Absolute URL of the request, without a \#fragment suffix. Only HTTP + and HTTPS schemes are supported. + format: uri + examples: + - http://example.com + - https://example.com/checkout?method=card + ipv4_address: + type: string + description: Client IPv4 address observed by your server. + format: ipv4 + examples: + - 34.162.244.71 + - 3.208.0.3 + - 173.56.0.4 + ipv6_address: + type: string + description: Client IPv6 address observed by your server. + format: ipv6 + examples: + - 2001:4860:4801:10::1 + - 2600:1f42:abcd:5678:9876:fedc:1357:2468 + - 2001:4868:85f:1a2b:3c4d:5e6f:7890:abcd + - ::ffff:22a2:f447 + - ::ffff:34.162.244.71 + linked_id: + $ref: '#/components/schemas/LinkedId' + tags: + $ref: '#/components/schemas/Tags' EventId: type: string examples: @@ -1190,19 +1405,6 @@ components: format: int64 examples: - 1708102555327 - EventSource: - type: string - description: > - Identifies how the event was generated. - - - `device` - the event was generated by the JS agent or a mobile SDK - running on an end-user device. - - - `edge` - the event was generated by the Automation Intelligence API - (`/edge` endpoint), analyzing a request intercepted at the edge. - enum: - - device - - edge Url: type: string examples: @@ -1610,6 +1812,109 @@ components: description: > `true` if the request came from a device running a VPN, `false` otherwise. + EventSource: + type: string + description: > + Identifies how the event was generated. + + - `device` - the event was generated by the JS agent or a mobile SDK + running on an end-user device. + + - `edge` - the event was generated by the Automation Intelligence API + (`/edge` endpoint), analyzing a request intercepted at the edge. + enum: + - device + - edge + EventEdge: + type: object + description: > + IP and bot analysis for an event generated by the Automation + Intelligence API (`/edge` endpoint). No client-side collection agent is + involved, so Identification (`visitor_id`) and device-telemetry-derived + Smart Signals are not available. + properties: + event_id: + $ref: '#/components/schemas/EventId' + x-platforms: + - android + - ios + - browser + timestamp: + $ref: '#/components/schemas/Timestamp' + x-platforms: + - android + - ios + - browser + linked_id: + $ref: '#/components/schemas/LinkedId' + x-platforms: + - android + - ios + - browser + tags: + $ref: '#/components/schemas/Tags' + x-platforms: + - android + - ios + - browser + url: + $ref: '#/components/schemas/Url' + x-platforms: + - browser + bot_info: + $ref: '#/components/schemas/BotInfo' + x-platforms: + - browser + ip_info: + $ref: '#/components/schemas/IPInfo' + x-platforms: + - android + - ios + - browser + proxy: + $ref: '#/components/schemas/Proxy' + x-platforms: + - android + - ios + - browser + proxy_confidence: + $ref: '#/components/schemas/ProxyConfidence' + x-platforms: + - android + - ios + - browser + proxy_details: + $ref: '#/components/schemas/ProxyDetails' + x-platforms: + - android + - ios + - browser + vpn: + $ref: '#/components/schemas/Vpn' + x-platforms: + - android + - ios + - browser + vpn_confidence: + $ref: '#/components/schemas/VpnConfidence' + x-platforms: + - android + - ios + - browser + vpn_methods: + $ref: '#/components/schemas/VpnMethods' + x-platforms: + - android + - ios + - browser + source: + $ref: '#/components/schemas/EventSource' + const: edge + required: + - event_id + - timestamp + - source + - ip_info ErrorCode: type: string enum: @@ -1729,7 +2034,7 @@ components: description: >- Field is `true` if you have previously set the `suspect` flag for this event using the [Server API Update event - endpoint](https://docs.fingerprint.com/reference/server-api-v4-update-event). + endpoint](https://docs.fingerprint.com/reference/server-api-update-event). Integration: type: object required: [] @@ -3096,18 +3401,13 @@ components: case. This field is in the beta phase and only available to select customers. If you are interested, please [contact our support team](https://fingerprint.com/support/). - Event: + EventDevice: type: object - description: >- - Contains results from Fingerprint Identification and all active Smart - Signals. Some Smart Signals are only supported for certain device types, - these fields will be omitted for events not generated from the supported - devices. Consult the [Smart Signals + description: > + Contains results from Fingerprint Identification and Smart Signals + derived from client-side device telemetry. Consult the [Smart Signals reference](https://docs.fingerprint.com/docs/smart-signals-reference) for more details. - required: - - event_id - - timestamp properties: event_id: $ref: '#/components/schemas/EventId' @@ -3121,22 +3421,79 @@ components: - android - ios - browser - source: - $ref: '#/components/schemas/EventSource' + linked_id: + $ref: '#/components/schemas/LinkedId' x-platforms: - android - ios - browser - incremental_identification_status: - $ref: '#/components/schemas/IncrementalIdentificationStatus' + tags: + $ref: '#/components/schemas/Tags' x-platforms: + - android + - ios - browser - linked_id: - $ref: '#/components/schemas/LinkedId' + url: + $ref: '#/components/schemas/Url' + x-platforms: + - browser + bot_info: + $ref: '#/components/schemas/BotInfo' + x-platforms: + - browser + ip_info: + $ref: '#/components/schemas/IPInfo' + x-platforms: + - android + - ios + - browser + proxy: + $ref: '#/components/schemas/Proxy' + x-platforms: + - android + - ios + - browser + proxy_confidence: + $ref: '#/components/schemas/ProxyConfidence' + x-platforms: + - android + - ios + - browser + proxy_details: + $ref: '#/components/schemas/ProxyDetails' + x-platforms: + - android + - ios + - browser + vpn: + $ref: '#/components/schemas/Vpn' + x-platforms: + - android + - ios + - browser + vpn_confidence: + $ref: '#/components/schemas/VpnConfidence' x-platforms: - android - ios - browser + vpn_methods: + $ref: '#/components/schemas/VpnMethods' + x-platforms: + - android + - ios + - browser + source: + $ref: '#/components/schemas/EventSource' + const: device + x-platforms: + - android + - ios + - browser + incremental_identification_status: + $ref: '#/components/schemas/IncrementalIdentificationStatus' + x-platforms: + - browser environment_id: $ref: '#/components/schemas/EnvironmentId' x-platforms: @@ -3173,16 +3530,6 @@ components: - android - ios - browser - tags: - $ref: '#/components/schemas/Tags' - x-platforms: - - android - - ios - - browser - url: - $ref: '#/components/schemas/Url' - x-platforms: - - browser bundle_id: $ref: '#/components/schemas/BundleId' x-platforms: @@ -3248,10 +3595,6 @@ components: $ref: '#/components/schemas/BotType' x-platforms: - browser - bot_info: - $ref: '#/components/schemas/BotInfo' - x-platforms: - - browser cloned_app: $ref: '#/components/schemas/ClonedApp' x-platforms: @@ -3282,30 +3625,6 @@ components: - android - ios - browser - ip_info: - $ref: '#/components/schemas/IPInfo' - x-platforms: - - android - - ios - - browser - proxy: - $ref: '#/components/schemas/Proxy' - x-platforms: - - android - - ios - - browser - proxy_confidence: - $ref: '#/components/schemas/ProxyConfidence' - x-platforms: - - android - - ios - - browser - proxy_details: - $ref: '#/components/schemas/ProxyDetails' - x-platforms: - - android - - ios - - browser proxy_ml_score: $ref: '#/components/schemas/ProxyMLScore' x-platforms: @@ -3386,18 +3705,6 @@ components: $ref: '#/components/schemas/VirtualMachineMLScore' x-platforms: - browser - vpn: - $ref: '#/components/schemas/Vpn' - x-platforms: - - android - - ios - - browser - vpn_confidence: - $ref: '#/components/schemas/VpnConfidence' - x-platforms: - - android - - ios - - browser vpn_ml_score: $ref: '#/components/schemas/VpnMLScore' x-platforms: @@ -3413,12 +3720,6 @@ components: x-platforms: - android - ios - vpn_methods: - $ref: '#/components/schemas/VpnMethods' - x-platforms: - - android - - ios - - browser high_activity_device: $ref: '#/components/schemas/HighActivity' x-platforms: @@ -3445,6 +3746,32 @@ components: - browser - ios - android + required: + - event_id + - timestamp + - source + Event: + type: object + description: > + An identification event (`source: device`) or an Automation Intelligence + event (`source: edge`). + + + Use `source` to tell them apart. Device events include Identification + and device-derived Smart Signals. Edge events do not. + + + Consult the [Smart Signals + reference](https://docs.fingerprint.com/docs/smart-signals-reference) + for more details. + oneOf: + - $ref: '#/components/schemas/EventDevice' + - $ref: '#/components/schemas/EventEdge' + discriminator: + propertyName: source + mapping: + device: '#/components/schemas/EventDevice' + edge: '#/components/schemas/EventEdge' EventUpdate: type: object required: [] diff --git a/sdk/src/main/java/com/fingerprint/v4/api/FingerprintApi.java b/sdk/src/main/java/com/fingerprint/v4/api/FingerprintApi.java index e335038..151d1ef 100644 --- a/sdk/src/main/java/com/fingerprint/v4/api/FingerprintApi.java +++ b/sdk/src/main/java/com/fingerprint/v4/api/FingerprintApi.java @@ -3,7 +3,9 @@ import com.fingerprint.v4.model.BotInfoCategory; import com.fingerprint.v4.model.BotInfoConfidence; import com.fingerprint.v4.model.BotInfoIdentity; +import com.fingerprint.v4.model.EdgeRequest; import com.fingerprint.v4.model.Event; +import com.fingerprint.v4.model.EventEdge; import com.fingerprint.v4.model.EventSearch; import com.fingerprint.v4.model.EventUpdate; import com.fingerprint.v4.model.SearchEventsBot; @@ -67,10 +69,93 @@ public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } + /** + * Collect Automation Intelligence. + * The Automation Intelligence API gives you the tools to determine whether traffic is legitimate and should be accepted by your application. This feature is currently in a Public Preview testing phase. All feedback is welcome! If you encounter any issues, please [contact our support team](https://fingerprint.com/support/). The API detects automation tools like AI Agents, AI Assistants, AI Browsers, and other bots. Additionally, it provides IP intelligence like geolocation, residential proxy, VPN and data center detection. Automation Intelligence is derived from HTTP request metadata that reaches your server. It does not require the use of a JavaScript client-side agent or mobile SDKs to collect device context. The API is fast, with average response times of less than 30ms, making it a great fit for edge, pre-origin or middleware contexts. The API is platform-agnostic and can be used with different CDN providers, cloud platforms, or any server backend. Because this API doesn’t require the use of a client-side device collection agent, it doesn’t support device identification via `visitor_id` and a few Smart Signals derived from deep device telemetry. ### Event Retrieval Events created by the Automation Intelligence API can be fetched via the [`/v4/events/{event_id}`](https://docs.fingerprint.com/reference/server-api-get-event) API using the `event_id` present in the API response. Fetch all Automation Intelligence API events via the [`/v4/events?source=edge`](https://docs.fingerprint.com/reference/server-api-search-events#parameter-source) API. + * @param edgeRequest (required) + * @return EventEdge + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Status Code Description Response Headers
200 OK. -
400 Bad request. The request payload is not valid. -
403 Forbidden. Access to this API is denied. -
413 Bad request. The request payload is too large. -
429 Too Many Requests. The request is throttled. -
500 Workspace error. -
+ */ + public EventEdge analyzeRequestForAutomationIntelligence(EdgeRequest edgeRequest) + throws ApiException { + return analyzeRequestForAutomationIntelligenceWithHttpInfo(edgeRequest).getData(); + } + + /** + * Collect Automation Intelligence. + * The Automation Intelligence API gives you the tools to determine whether traffic is legitimate and should be accepted by your application. This feature is currently in a Public Preview testing phase. All feedback is welcome! If you encounter any issues, please [contact our support team](https://fingerprint.com/support/). The API detects automation tools like AI Agents, AI Assistants, AI Browsers, and other bots. Additionally, it provides IP intelligence like geolocation, residential proxy, VPN and data center detection. Automation Intelligence is derived from HTTP request metadata that reaches your server. It does not require the use of a JavaScript client-side agent or mobile SDKs to collect device context. The API is fast, with average response times of less than 30ms, making it a great fit for edge, pre-origin or middleware contexts. The API is platform-agnostic and can be used with different CDN providers, cloud platforms, or any server backend. Because this API doesn’t require the use of a client-side device collection agent, it doesn’t support device identification via `visitor_id` and a few Smart Signals derived from deep device telemetry. ### Event Retrieval Events created by the Automation Intelligence API can be fetched via the [`/v4/events/{event_id}`](https://docs.fingerprint.com/reference/server-api-get-event) API using the `event_id` present in the API response. Fetch all Automation Intelligence API events via the [`/v4/events?source=edge`](https://docs.fingerprint.com/reference/server-api-search-events#parameter-source) API. + * @param edgeRequest (required) + * @return ApiResponse + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Status Code Description Response Headers
200 OK. -
400 Bad request. The request payload is not valid. -
403 Forbidden. Access to this API is denied. -
413 Bad request. The request payload is too large. -
429 Too Many Requests. The request is throttled. -
500 Workspace error. -
+ */ + public ApiResponse analyzeRequestForAutomationIntelligenceWithHttpInfo( + EdgeRequest edgeRequest) throws ApiException { + Object localVarPostBody = edgeRequest; + + // verify the required parameter 'edgeRequest' is set + if (edgeRequest == null) { + throw new ApiException( + 400, + "Missing the required parameter 'edgeRequest' when calling analyzeRequestForAutomationIntelligence"); + } + + // create path and map variables + String localVarPath = "/edge"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + localVarQueryParams.add(new Pair("ii", INTEGRATION_INFO)); + + final String localVarAccept = apiClient.selectHeaderAccept("application/json"); + final String localVarContentType = apiClient.selectHeaderContentType("application/json"); + String[] localVarAuthNames = new String[] {"bearerAuth"}; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI( + "FingerprintApi.analyzeRequestForAutomationIntelligence", + localVarPath, + "POST", + localVarQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + localVarReturnType, + false); + } + /** * Delete a visitor ID * Use this API to request the deletion of all data associated with a specific visitor ID. Upon a request to delete data for a visitor ID, - The data collected from the corresponding browser (or device) will be deleted asynchronously, typically within a few minutes. This data will no longer be available to identify this browser (or device). When the same browser (or device) revisits, it will receive a new visitor ID. - The identification events made from this browser (or device) in the past 10 days are typically deleted within 24 hrs. - The identification events made from this browser (or device) outside of the 10 days will be purged as per your [data retention period](https://docs.fingerprint.com/docs/regions#data-retention). The following timeline illustrates which events are deleted and which remain after a DELETE API request: ``` Day 1: First visit from browser A. (Assigned visitor ID: VID1000) Day 2: Browser A revisits. (Assigned the same visitor ID: VID1000) Day 13: Browser A revisits. (Assigned the same visitor ID: VID1000) Day 14: Delete VID1000 Day 15: Browser A re-visits. (Assigned a different visitor ID: VID9999) Day 15: GET /events/day-13 (Returns 404. The event is within the 10 days of deleting VID1000 and will have been deleted) Day 16: GET /events/day-2 (Returns 200. The event is outside of the 10 days of deleting VID1000 and is still available) ``` ### Availability This API is available only for Enterprise plans **upon request**. If you are interested, please [contact our support team](https://fingerprint.com/support/). ### Rate limits and daily quota The rate limits and daily quota for this API **differ** from those for our other API. The maximum number of DELETE requests that can be made in an hour cannot exceed 30 RPH, and the maximum number that can be made in a day cannot exceed 500 RPD. You can request an increase to these limits by contacting [our support team](https://fingerprint.com/support/). - * @param visitorId The [visitor ID](https://docs.fingerprint.com/reference/js-agent-v4-get-function#visitor_id) you want to delete. (required) + * @param visitorId The [visitor ID](https://docs.fingerprint.com/reference/js-agent-get-function#visitor_id) you want to delete. (required) * @throws ApiException if fails to make API call * @http.response.details * @@ -89,7 +174,7 @@ public void deleteVisitorData(String visitorId) throws ApiException { /** * Delete a visitor ID * Use this API to request the deletion of all data associated with a specific visitor ID. Upon a request to delete data for a visitor ID, - The data collected from the corresponding browser (or device) will be deleted asynchronously, typically within a few minutes. This data will no longer be available to identify this browser (or device). When the same browser (or device) revisits, it will receive a new visitor ID. - The identification events made from this browser (or device) in the past 10 days are typically deleted within 24 hrs. - The identification events made from this browser (or device) outside of the 10 days will be purged as per your [data retention period](https://docs.fingerprint.com/docs/regions#data-retention). The following timeline illustrates which events are deleted and which remain after a DELETE API request: ``` Day 1: First visit from browser A. (Assigned visitor ID: VID1000) Day 2: Browser A revisits. (Assigned the same visitor ID: VID1000) Day 13: Browser A revisits. (Assigned the same visitor ID: VID1000) Day 14: Delete VID1000 Day 15: Browser A re-visits. (Assigned a different visitor ID: VID9999) Day 15: GET /events/day-13 (Returns 404. The event is within the 10 days of deleting VID1000 and will have been deleted) Day 16: GET /events/day-2 (Returns 200. The event is outside of the 10 days of deleting VID1000 and is still available) ``` ### Availability This API is available only for Enterprise plans **upon request**. If you are interested, please [contact our support team](https://fingerprint.com/support/). ### Rate limits and daily quota The rate limits and daily quota for this API **differ** from those for our other API. The maximum number of DELETE requests that can be made in an hour cannot exceed 30 RPH, and the maximum number that can be made in a day cannot exceed 500 RPD. You can request an increase to these limits by contacting [our support team](https://fingerprint.com/support/). - * @param visitorId The [visitor ID](https://docs.fingerprint.com/reference/js-agent-v4-get-function#visitor_id) you want to delete. (required) + * @param visitorId The [visitor ID](https://docs.fingerprint.com/reference/js-agent-get-function#visitor_id) you want to delete. (required) * @return ApiResponse * @throws ApiException if fails to make API call * @http.response.details @@ -166,8 +251,8 @@ public GetEventOptionalParams setRulesetId(String rulesetId) { /** * Get an event by event ID - * Get a detailed analysis of an individual identification event, including Smart Signals. Use `event_id` as the URL path parameter. This API method is scoped to a request, i.e. all returned information is by `event_id`. - * @param eventId The unique [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id) of each identification request (`requestId` can be used in its place). (required) + * Get a detailed analysis of an individual event, including Smart Signals. Use `event_id` as the URL path parameter. This API method is scoped to a request, i.e. all returned information is by `event_id`. Returns `EventDevice` when `source` is `device`, and `EventEdge` when `source` is `edge`. + * @param eventId The unique [identifier](https://docs.fingerprint.com/reference/js-agent-get-function#event_id) of each identification request (`requestId` can be used in its place). (required) * @return Event * @throws ApiException if fails to make API call * @http.response.details @@ -182,14 +267,17 @@ public GetEventOptionalParams setRulesetId(String rulesetId) { * *
504 Gateway Timeout. Search execution exceeded the allowed timeout window. -
*/ + // SPIKE INTER-2457 — BREAKING CHANGE. DO NOT SHIP. + // Return type is now the Event interface (EventDevice | EventEdge). + // response.getIdentification() no longer compiles. Identification is on EventDevice. public Event getEvent(String eventId) throws ApiException { return getEventWithHttpInfo(eventId, null).getData(); } /** * Get an event by event ID - * Get a detailed analysis of an individual identification event, including Smart Signals. Use `event_id` as the URL path parameter. This API method is scoped to a request, i.e. all returned information is by `event_id`. - * @param eventId The unique [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id) of each identification request (`requestId` can be used in its place). (required) + * Get a detailed analysis of an individual event, including Smart Signals. Use `event_id` as the URL path parameter. This API method is scoped to a request, i.e. all returned information is by `event_id`. Returns `EventDevice` when `source` is `device`, and `EventEdge` when `source` is `edge`. + * @param eventId The unique [identifier](https://docs.fingerprint.com/reference/js-agent-get-function#event_id) of each identification request (`requestId` can be used in its place). (required) * @param getEventOptionalParams Object containing optional parameters for API method. (optional) * @return Event * @throws ApiException if fails to make API call @@ -212,8 +300,8 @@ public Event getEvent(String eventId, GetEventOptionalParams getEventOptionalPar /** * Get an event by event ID - * Get a detailed analysis of an individual identification event, including Smart Signals. Use `event_id` as the URL path parameter. This API method is scoped to a request, i.e. all returned information is by `event_id`. - * @param eventId The unique [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id) of each identification request (`requestId` can be used in its place). (required) + * Get a detailed analysis of an individual event, including Smart Signals. Use `event_id` as the URL path parameter. This API method is scoped to a request, i.e. all returned information is by `event_id`. Returns `EventDevice` when `source` is `device`, and `EventEdge` when `source` is `edge`. + * @param eventId The unique [identifier](https://docs.fingerprint.com/reference/js-agent-get-function#event_id) of each identification request (`requestId` can be used in its place). (required) * @param getEventOptionalParams Object containing optional parameters for API method. (optional) * @return ApiResponse * @throws ApiException if fails to make API call @@ -364,14 +452,14 @@ public SearchEventsOptionalParams setPaginationKey(String paginationKey) { } /** - * getter for visitorId - Unique [visitor identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#visitor_id) issued by Fingerprint Identification and all active Smart Signals. Filter events by matching Visitor ID (`identification.visitor_id` property). + * getter for visitorId - Unique [visitor identifier](https://docs.fingerprint.com/reference/js-agent-get-function#visitor_id) issued by Fingerprint Identification and all active Smart Signals. Filter events by matching Visitor ID (`identification.visitor_id` property). */ public String getVisitorId() { return visitorId; } /** - * setter for visitorId - Unique [visitor identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#visitor_id) issued by Fingerprint Identification and all active Smart Signals. Filter events by matching Visitor ID (`identification.visitor_id` property). + * setter for visitorId - Unique [visitor identifier](https://docs.fingerprint.com/reference/js-agent-get-function#visitor_id) issued by Fingerprint Identification and all active Smart Signals. Filter events by matching Visitor ID (`identification.visitor_id` property). */ public SearchEventsOptionalParams setVisitorId(String visitorId) { this.visitorId = visitorId; @@ -530,14 +618,14 @@ public SearchEventsOptionalParams setAsn(String asn) { } /** - * getter for linkedId - Filter events by your custom identifier. You can use [linked Ids](https://docs.fingerprint.com/reference/js-agent-v4-get-function#linkedid) to associate identification requests with your own identifier, for example, session Id, purchase Id, or transaction Id. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. + * getter for linkedId - Filter events by your custom identifier. You can use [linked Ids](https://docs.fingerprint.com/reference/js-agent-get-function#linkedid) to associate identification requests with your own identifier, for example, session Id, purchase Id, or transaction Id. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. */ public String getLinkedId() { return linkedId; } /** - * setter for linkedId - Filter events by your custom identifier. You can use [linked Ids](https://docs.fingerprint.com/reference/js-agent-v4-get-function#linkedid) to associate identification requests with your own identifier, for example, session Id, purchase Id, or transaction Id. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. + * setter for linkedId - Filter events by your custom identifier. You can use [linked Ids](https://docs.fingerprint.com/reference/js-agent-get-function#linkedid) to associate identification requests with your own identifier, for example, session Id, purchase Id, or transaction Id. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. */ public SearchEventsOptionalParams setLinkedId(String linkedId) { this.linkedId = linkedId; @@ -1395,7 +1483,7 @@ public ApiResponse searchEventsWithHttpInfo( /** * Update an event * Change information in existing events specified by `event_id` or *flag suspicious events*. When an event is created, it can be assigned `linked_id` and `tags` submitted through the JS agent parameters. This information might not have been available on the client initially, so the Server API permits updating these attributes after the fact. **Warning** It's not possible to update events older than one month. **Warning** Trying to update an event immediately after creation may temporarily result in an error (HTTP 409 Conflict. The event is not mutable yet.) as the event is fully propagated across our systems. In such a case, simply retry the request. - * @param eventId The unique event [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id). (required) + * @param eventId The unique event [identifier](https://docs.fingerprint.com/reference/js-agent-get-function#event_id). (required) * @param eventUpdate (required) * @throws ApiException if fails to make API call * @http.response.details @@ -1415,7 +1503,7 @@ public void updateEvent(String eventId, EventUpdate eventUpdate) throws ApiExcep /** * Update an event * Change information in existing events specified by `event_id` or *flag suspicious events*. When an event is created, it can be assigned `linked_id` and `tags` submitted through the JS agent parameters. This information might not have been available on the client initially, so the Server API permits updating these attributes after the fact. **Warning** It's not possible to update events older than one month. **Warning** Trying to update an event immediately after creation may temporarily result in an error (HTTP 409 Conflict. The event is not mutable yet.) as the event is fully propagated across our systems. In such a case, simply retry the request. - * @param eventId The unique event [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id). (required) + * @param eventId The unique event [identifier](https://docs.fingerprint.com/reference/js-agent-get-function#event_id). (required) * @param eventUpdate (required) * @return ApiResponse * @throws ApiException if fails to make API call diff --git a/sdk/src/main/java/com/fingerprint/v4/model/EdgeRequest.java b/sdk/src/main/java/com/fingerprint/v4/model/EdgeRequest.java new file mode 100644 index 0000000..50bd5a8 --- /dev/null +++ b/sdk/src/main/java/com/fingerprint/v4/model/EdgeRequest.java @@ -0,0 +1,285 @@ +/* + * Server API + * Fingerprint Server API allows you to get, search, and update 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. The API also supports collection of Automation Intelligence for requests to your server in edge, pre-origin, or middleware contexts. + * + * The version of the OpenAPI document: 4 + * Contact: support@fingerprint.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fingerprint.v4.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URI; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * HTTP request metadata (including the HTTP method, headers and IP address) sent by you (your server) to the Fingerprint API for IP and bot analysis. To improve accuracy, retain as much of the original semantics of the HTTP request as possible. For example, preserve the order of the request headers and their capitalization. At least one of `ipv4_address` or `ipv6_address` must be provided; a request with neither is rejected with a `400` error. If both IPv4 and IPv6 are provided, IP intelligence will be provided for each address. If an IPv4-mapped IPv6 address is provided in the `ipv6_address` request property, the IP intelligence will be provided in the `ipv4_address` property of the response. + */ +@JsonPropertyOrder({ + EdgeRequest.JSON_PROPERTY_HEADERS, + EdgeRequest.JSON_PROPERTY_METHOD, + EdgeRequest.JSON_PROPERTY_URL, + EdgeRequest.JSON_PROPERTY_IPV4_ADDRESS, + EdgeRequest.JSON_PROPERTY_IPV6_ADDRESS, + EdgeRequest.JSON_PROPERTY_LINKED_ID, + EdgeRequest.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.24.0") +public class EdgeRequest { + public static final String JSON_PROPERTY_HEADERS = "headers"; + @jakarta.annotation.Nonnull private List headers = new ArrayList<>(); + + public static final String JSON_PROPERTY_METHOD = "method"; + @jakarta.annotation.Nonnull private String method; + + public static final String JSON_PROPERTY_URL = "url"; + @jakarta.annotation.Nonnull private URI url; + + public static final String JSON_PROPERTY_IPV4_ADDRESS = "ipv4_address"; + @jakarta.annotation.Nullable private String ipv4Address; + + public static final String JSON_PROPERTY_IPV6_ADDRESS = "ipv6_address"; + @jakarta.annotation.Nullable private String ipv6Address; + + public static final String JSON_PROPERTY_LINKED_ID = "linked_id"; + @jakarta.annotation.Nullable private String linkedId; + + public static final String JSON_PROPERTY_TAGS = "tags"; + @jakarta.annotation.Nullable private Map tags = new HashMap<>(); + + public EdgeRequest() {} + + public EdgeRequest headers(@jakarta.annotation.Nonnull List headers) { + this.headers = headers; + return this; + } + + public EdgeRequest addHeadersItem(EdgeRequestHeadersInner headersItem) { + if (this.headers == null) { + this.headers = new ArrayList<>(); + } + this.headers.add(headersItem); + return this; + } + + /** + * Ordered header entries from the request made to your server. Each entry represents one header line. If one header name appears as multiple lines, send each as a separate item in the array. Headers that contain authentication or session data must still be included, but with with their value set to an empty string. This includes headers like `Authorization` and `Cookie`, but may contain more depending on your specific project, for instance `Proxy-Authenticate` or `X-Api-Key`. Omitting the headers entirely changes the shape of the request and can affect detection. Never forward the real secret values. Whenever possible, we recommend preserving header order and capitalization to provide the best accuracy, however it’s not a strict requirement if your runtime does not maintain http header order or canonicalizes header names. + * @return headers + */ + @jakarta.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_HEADERS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getHeaders() { + return headers; + } + + @JsonProperty(value = JSON_PROPERTY_HEADERS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setHeaders(@jakarta.annotation.Nonnull List headers) { + this.headers = headers; + } + + public EdgeRequest method(@jakarta.annotation.Nonnull String method) { + this.method = method; + return this; + } + + /** + * The original HTTP method of the request. If supported in your runtime, preserve the original casing. + * @return method + */ + @jakarta.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_METHOD, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMethod() { + return method; + } + + @JsonProperty(value = JSON_PROPERTY_METHOD, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMethod(@jakarta.annotation.Nonnull String method) { + this.method = method; + } + + public EdgeRequest url(@jakarta.annotation.Nonnull URI url) { + this.url = url; + return this; + } + + /** + * Absolute URL of the request, without a \\#fragment suffix. Only HTTP and HTTPS schemes are supported. + * @return url + */ + @jakarta.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_URL, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public URI getUrl() { + return url; + } + + @JsonProperty(value = JSON_PROPERTY_URL, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUrl(@jakarta.annotation.Nonnull URI url) { + this.url = url; + } + + public EdgeRequest ipv4Address(@jakarta.annotation.Nullable String ipv4Address) { + this.ipv4Address = ipv4Address; + return this; + } + + /** + * Client IPv4 address observed by your server. + * @return ipv4Address + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_IPV4_ADDRESS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getIpv4Address() { + return ipv4Address; + } + + @JsonProperty(value = JSON_PROPERTY_IPV4_ADDRESS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIpv4Address(@jakarta.annotation.Nullable String ipv4Address) { + this.ipv4Address = ipv4Address; + } + + public EdgeRequest ipv6Address(@jakarta.annotation.Nullable String ipv6Address) { + this.ipv6Address = ipv6Address; + return this; + } + + /** + * Client IPv6 address observed by your server. + * @return ipv6Address + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_IPV6_ADDRESS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getIpv6Address() { + return ipv6Address; + } + + @JsonProperty(value = JSON_PROPERTY_IPV6_ADDRESS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIpv6Address(@jakarta.annotation.Nullable String ipv6Address) { + this.ipv6Address = ipv6Address; + } + + public EdgeRequest linkedId(@jakarta.annotation.Nullable String linkedId) { + this.linkedId = linkedId; + return this; + } + + /** + * A customer-provided id that was sent with the request. + * @return linkedId + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_LINKED_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLinkedId() { + return linkedId; + } + + @JsonProperty(value = JSON_PROPERTY_LINKED_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLinkedId(@jakarta.annotation.Nullable String linkedId) { + this.linkedId = linkedId; + } + + public EdgeRequest tags(@jakarta.annotation.Nullable Map tags) { + this.tags = tags; + return this; + } + + public EdgeRequest putTagsItem(String key, Object tagsItem) { + if (this.tags == null) { + this.tags = new HashMap<>(); + } + this.tags.put(key, tagsItem); + return this; + } + + /** + * A customer-provided value or an object that was sent with the identification request or updated later. + * @return tags + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_TAGS, required = false) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getTags() { + return tags; + } + + @JsonProperty(value = JSON_PROPERTY_TAGS, required = false) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(@jakarta.annotation.Nullable Map tags) { + this.tags = tags; + } + + /** + * Return true if this EdgeRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EdgeRequest edgeRequest = (EdgeRequest) o; + return Objects.equals(this.headers, edgeRequest.headers) + && Objects.equals(this.method, edgeRequest.method) + && Objects.equals(this.url, edgeRequest.url) + && Objects.equals(this.ipv4Address, edgeRequest.ipv4Address) + && Objects.equals(this.ipv6Address, edgeRequest.ipv6Address) + && Objects.equals(this.linkedId, edgeRequest.linkedId) + && Objects.equals(this.tags, edgeRequest.tags); + } + + @Override + public int hashCode() { + return Objects.hash(headers, method, url, ipv4Address, ipv6Address, linkedId, tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EdgeRequest {\n"); + sb.append(" headers: ").append(toIndentedString(headers)).append("\n"); + sb.append(" method: ").append(toIndentedString(method)).append("\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" ipv4Address: ").append(toIndentedString(ipv4Address)).append("\n"); + sb.append(" ipv6Address: ").append(toIndentedString(ipv6Address)).append("\n"); + sb.append(" linkedId: ").append(toIndentedString(linkedId)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/sdk/src/main/java/com/fingerprint/v4/model/EdgeRequestHeadersInner.java b/sdk/src/main/java/com/fingerprint/v4/model/EdgeRequestHeadersInner.java new file mode 100644 index 0000000..f605b7a --- /dev/null +++ b/sdk/src/main/java/com/fingerprint/v4/model/EdgeRequestHeadersInner.java @@ -0,0 +1,126 @@ +/* + * Server API + * Fingerprint Server API allows you to get, search, and update 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. The API also supports collection of Automation Intelligence for requests to your server in edge, pre-origin, or middleware contexts. + * + * The version of the OpenAPI document: 4 + * Contact: support@fingerprint.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fingerprint.v4.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.Objects; + +/** + * EdgeRequestHeadersInner + */ +@JsonPropertyOrder({ + EdgeRequestHeadersInner.JSON_PROPERTY_NAME, + EdgeRequestHeadersInner.JSON_PROPERTY_VALUE +}) +@JsonTypeName("EdgeRequest_headers_inner") +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.24.0") +public class EdgeRequestHeadersInner { + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull private String name; + + public static final String JSON_PROPERTY_VALUE = "value"; + @jakarta.annotation.Nonnull private String value; + + public EdgeRequestHeadersInner() {} + + public EdgeRequestHeadersInner name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Header name as forwarded by your server. Headers must be valid according to RFC 7230 and will be canonicalized according to RFC 9112. + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_NAME, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + @JsonProperty(value = JSON_PROPERTY_NAME, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@jakarta.annotation.Nonnull String name) { + this.name = name; + } + + public EdgeRequestHeadersInner value(@jakarta.annotation.Nonnull String value) { + this.value = value; + return this; + } + + /** + * Value of a single forwarded header entry. Be careful to preserve the original encoding and escaping. For example, do not double escape quotes. + * @return value + */ + @jakarta.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_VALUE, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getValue() { + return value; + } + + @JsonProperty(value = JSON_PROPERTY_VALUE, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setValue(@jakarta.annotation.Nonnull String value) { + this.value = value; + } + + /** + * Return true if this EdgeRequest_headers_inner object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EdgeRequestHeadersInner edgeRequestHeadersInner = (EdgeRequestHeadersInner) o; + return Objects.equals(this.name, edgeRequestHeadersInner.name) + && Objects.equals(this.value, edgeRequestHeadersInner.value); + } + + @Override + public int hashCode() { + return Objects.hash(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EdgeRequestHeadersInner {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/sdk/src/main/java/com/fingerprint/v4/model/Event.java b/sdk/src/main/java/com/fingerprint/v4/model/Event.java index 923ef8b..b9d6725 100644 --- a/sdk/src/main/java/com/fingerprint/v4/model/Event.java +++ b/sdk/src/main/java/com/fingerprint/v4/model/Event.java @@ -14,315 +14,53 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; -/** - * Contains results from Fingerprint Identification and all active Smart Signals. Some Smart Signals are only supported for certain device types, these fields will be omitted for events not generated from the supported devices. Consult the [Smart Signals reference](https://docs.fingerprint.com/docs/smart-signals-reference) for more details. - */ -@JsonPropertyOrder({ - Event.JSON_PROPERTY_EVENT_ID, - Event.JSON_PROPERTY_TIMESTAMP, - Event.JSON_PROPERTY_SOURCE, - Event.JSON_PROPERTY_INCREMENTAL_IDENTIFICATION_STATUS, - Event.JSON_PROPERTY_LINKED_ID, - Event.JSON_PROPERTY_ENVIRONMENT_ID, - Event.JSON_PROPERTY_SUSPECT, - Event.JSON_PROPERTY_SDK, - Event.JSON_PROPERTY_REPLAYED, - Event.JSON_PROPERTY_IDENTIFICATION, - Event.JSON_PROPERTY_SUPPLEMENTARY_ID_HIGH_RECALL, - Event.JSON_PROPERTY_TAGS, - Event.JSON_PROPERTY_URL, - Event.JSON_PROPERTY_BUNDLE_ID, - Event.JSON_PROPERTY_PACKAGE_NAME, - Event.JSON_PROPERTY_IP_ADDRESS, - Event.JSON_PROPERTY_USER_AGENT, - Event.JSON_PROPERTY_DEVICE, - Event.JSON_PROPERTY_OS, - Event.JSON_PROPERTY_OS_VERSION, - Event.JSON_PROPERTY_CLIENT_REFERRER, - Event.JSON_PROPERTY_BROWSER_DETAILS, - Event.JSON_PROPERTY_PROXIMITY, - Event.JSON_PROPERTY_ACTIVE_CALL, - Event.JSON_PROPERTY_BOT, - Event.JSON_PROPERTY_BOT_TYPE, - Event.JSON_PROPERTY_BOT_INFO, - Event.JSON_PROPERTY_CLONED_APP, - Event.JSON_PROPERTY_DEVELOPER_TOOLS, - Event.JSON_PROPERTY_EMULATOR, - Event.JSON_PROPERTY_FACTORY_RESET_TIMESTAMP, - Event.JSON_PROPERTY_FRIDA, - Event.JSON_PROPERTY_IP_BLOCKLIST, - Event.JSON_PROPERTY_IP_INFO, - Event.JSON_PROPERTY_PROXY, - Event.JSON_PROPERTY_PROXY_CONFIDENCE, - Event.JSON_PROPERTY_PROXY_DETAILS, - Event.JSON_PROPERTY_PROXY_ML_SCORE, - Event.JSON_PROPERTY_INCOGNITO, - Event.JSON_PROPERTY_JAILBROKEN, - Event.JSON_PROPERTY_LOCATION_SPOOFING, - Event.JSON_PROPERTY_MITM_ATTACK, - Event.JSON_PROPERTY_PRIVACY_SETTINGS, - Event.JSON_PROPERTY_ROOT_APPS, - Event.JSON_PROPERTY_RULE_ACTION, - Event.JSON_PROPERTY_SIMULATOR, - Event.JSON_PROPERTY_SUSPECT_SCORE, - Event.JSON_PROPERTY_TAMPERING, - Event.JSON_PROPERTY_TAMPERING_CONFIDENCE, - Event.JSON_PROPERTY_TAMPERING_ML_SCORE, - Event.JSON_PROPERTY_TAMPERING_DETAILS, - Event.JSON_PROPERTY_VELOCITY, - Event.JSON_PROPERTY_VIRTUAL_MACHINE, - Event.JSON_PROPERTY_VIRTUAL_MACHINE_ML_SCORE, - Event.JSON_PROPERTY_VPN, - Event.JSON_PROPERTY_VPN_CONFIDENCE, - Event.JSON_PROPERTY_VPN_ML_SCORE, - Event.JSON_PROPERTY_VPN_ORIGIN_TIMEZONE, - Event.JSON_PROPERTY_VPN_ORIGIN_COUNTRY, - Event.JSON_PROPERTY_VPN_METHODS, - Event.JSON_PROPERTY_HIGH_ACTIVITY_DEVICE, - Event.JSON_PROPERTY_RARE_DEVICE, - Event.JSON_PROPERTY_RARE_DEVICE_PERCENTILE_BUCKET, - Event.JSON_PROPERTY_RAW_DEVICE_ATTRIBUTES, - Event.JSON_PROPERTY_LABELS -}) @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") -public class Event { - public static final String JSON_PROPERTY_EVENT_ID = "event_id"; - @jakarta.annotation.Nonnull private String eventId; - - public static final String JSON_PROPERTY_TIMESTAMP = "timestamp"; - @jakarta.annotation.Nonnull private Long timestamp; - - public static final String JSON_PROPERTY_SOURCE = "source"; - @jakarta.annotation.Nullable private EventSource source; - - public static final String JSON_PROPERTY_INCREMENTAL_IDENTIFICATION_STATUS = - "incremental_identification_status"; - - @jakarta.annotation.Nullable - private IncrementalIdentificationStatus incrementalIdentificationStatus; - - public static final String JSON_PROPERTY_LINKED_ID = "linked_id"; - @jakarta.annotation.Nullable private String linkedId; - - public static final String JSON_PROPERTY_ENVIRONMENT_ID = "environment_id"; - @jakarta.annotation.Nullable private String environmentId; - - public static final String JSON_PROPERTY_SUSPECT = "suspect"; - @jakarta.annotation.Nullable private Boolean suspect; - - public static final String JSON_PROPERTY_SDK = "sdk"; - @jakarta.annotation.Nullable private SDK sdk; - - public static final String JSON_PROPERTY_REPLAYED = "replayed"; - @jakarta.annotation.Nullable private Boolean replayed; - - public static final String JSON_PROPERTY_IDENTIFICATION = "identification"; - @jakarta.annotation.Nullable private Identification identification; - - public static final String JSON_PROPERTY_SUPPLEMENTARY_ID_HIGH_RECALL = - "supplementary_id_high_recall"; - @jakarta.annotation.Nullable private SupplementaryIDHighRecall supplementaryIdHighRecall; - - public static final String JSON_PROPERTY_TAGS = "tags"; - @jakarta.annotation.Nullable private Map tags = new HashMap<>(); - - public static final String JSON_PROPERTY_URL = "url"; - @jakarta.annotation.Nullable private String url; - - public static final String JSON_PROPERTY_BUNDLE_ID = "bundle_id"; - @jakarta.annotation.Nullable private String bundleId; - - public static final String JSON_PROPERTY_PACKAGE_NAME = "package_name"; - @jakarta.annotation.Nullable private String packageName; - - public static final String JSON_PROPERTY_IP_ADDRESS = "ip_address"; - @jakarta.annotation.Nullable private String ipAddress; - - public static final String JSON_PROPERTY_USER_AGENT = "user_agent"; - @jakarta.annotation.Nullable private String userAgent; - - public static final String JSON_PROPERTY_DEVICE = "device"; - @jakarta.annotation.Nullable private String device; - - public static final String JSON_PROPERTY_OS = "os"; - @jakarta.annotation.Nullable private String os; - - public static final String JSON_PROPERTY_OS_VERSION = "os_version"; - @jakarta.annotation.Nullable private String osVersion; - - public static final String JSON_PROPERTY_CLIENT_REFERRER = "client_referrer"; - @jakarta.annotation.Nullable private String clientReferrer; - - public static final String JSON_PROPERTY_BROWSER_DETAILS = "browser_details"; - @jakarta.annotation.Nullable private BrowserDetails browserDetails; - - public static final String JSON_PROPERTY_PROXIMITY = "proximity"; - @jakarta.annotation.Nullable private Proximity proximity; - - public static final String JSON_PROPERTY_ACTIVE_CALL = "active_call"; - @jakarta.annotation.Nullable private Boolean activeCall; - - public static final String JSON_PROPERTY_BOT = "bot"; - @jakarta.annotation.Nullable private BotResult bot; - - public static final String JSON_PROPERTY_BOT_TYPE = "bot_type"; - @jakarta.annotation.Nullable private String botType; - - public static final String JSON_PROPERTY_BOT_INFO = "bot_info"; - @jakarta.annotation.Nullable private BotInfo botInfo; - - public static final String JSON_PROPERTY_CLONED_APP = "cloned_app"; - @jakarta.annotation.Nullable private Boolean clonedApp; - - public static final String JSON_PROPERTY_DEVELOPER_TOOLS = "developer_tools"; - @jakarta.annotation.Nullable private Boolean developerTools; - - public static final String JSON_PROPERTY_EMULATOR = "emulator"; - @jakarta.annotation.Nullable private Boolean emulator; - - public static final String JSON_PROPERTY_FACTORY_RESET_TIMESTAMP = "factory_reset_timestamp"; - @jakarta.annotation.Nullable private Long factoryResetTimestamp; - - public static final String JSON_PROPERTY_FRIDA = "frida"; - @jakarta.annotation.Nullable private Boolean frida; - - public static final String JSON_PROPERTY_IP_BLOCKLIST = "ip_blocklist"; - @jakarta.annotation.Nullable private IPBlockList ipBlocklist; - - public static final String JSON_PROPERTY_IP_INFO = "ip_info"; - @jakarta.annotation.Nullable private IPInfo ipInfo; - - public static final String JSON_PROPERTY_PROXY = "proxy"; - @jakarta.annotation.Nullable private Boolean proxy; - - public static final String JSON_PROPERTY_PROXY_CONFIDENCE = "proxy_confidence"; - @jakarta.annotation.Nullable private ProxyConfidence proxyConfidence; - - public static final String JSON_PROPERTY_PROXY_DETAILS = "proxy_details"; - @jakarta.annotation.Nullable private ProxyDetails proxyDetails; - - public static final String JSON_PROPERTY_PROXY_ML_SCORE = "proxy_ml_score"; - @jakarta.annotation.Nullable private Double proxyMlScore; - - public static final String JSON_PROPERTY_INCOGNITO = "incognito"; - @jakarta.annotation.Nullable private Boolean incognito; - - public static final String JSON_PROPERTY_JAILBROKEN = "jailbroken"; - @jakarta.annotation.Nullable private Boolean jailbroken; - - public static final String JSON_PROPERTY_LOCATION_SPOOFING = "location_spoofing"; - @jakarta.annotation.Nullable private Boolean locationSpoofing; - - public static final String JSON_PROPERTY_MITM_ATTACK = "mitm_attack"; - @jakarta.annotation.Nullable private Boolean mitmAttack; - - public static final String JSON_PROPERTY_PRIVACY_SETTINGS = "privacy_settings"; - @jakarta.annotation.Nullable private Boolean privacySettings; - - public static final String JSON_PROPERTY_ROOT_APPS = "root_apps"; - @jakarta.annotation.Nullable private Boolean rootApps; - - public static final String JSON_PROPERTY_RULE_ACTION = "rule_action"; - @jakarta.annotation.Nullable private EventRuleAction ruleAction; - - public static final String JSON_PROPERTY_SIMULATOR = "simulator"; - @jakarta.annotation.Nullable private Boolean simulator; - - public static final String JSON_PROPERTY_SUSPECT_SCORE = "suspect_score"; - @jakarta.annotation.Nullable private Integer suspectScore; - - public static final String JSON_PROPERTY_TAMPERING = "tampering"; - @jakarta.annotation.Nullable private Boolean tampering; - - public static final String JSON_PROPERTY_TAMPERING_CONFIDENCE = "tampering_confidence"; - @jakarta.annotation.Nullable private TamperingConfidence tamperingConfidence; - - public static final String JSON_PROPERTY_TAMPERING_ML_SCORE = "tampering_ml_score"; - @jakarta.annotation.Nullable private Double tamperingMlScore; - - public static final String JSON_PROPERTY_TAMPERING_DETAILS = "tampering_details"; - @jakarta.annotation.Nullable private TamperingDetails tamperingDetails; - - public static final String JSON_PROPERTY_VELOCITY = "velocity"; - @jakarta.annotation.Nullable private Velocity velocity; - - public static final String JSON_PROPERTY_VIRTUAL_MACHINE = "virtual_machine"; - @jakarta.annotation.Nullable private Boolean virtualMachine; - - public static final String JSON_PROPERTY_VIRTUAL_MACHINE_ML_SCORE = "virtual_machine_ml_score"; - @jakarta.annotation.Nullable private Double virtualMachineMlScore; - - public static final String JSON_PROPERTY_VPN = "vpn"; - @jakarta.annotation.Nullable private Boolean vpn; - - public static final String JSON_PROPERTY_VPN_CONFIDENCE = "vpn_confidence"; - @jakarta.annotation.Nullable private VpnConfidence vpnConfidence; - - public static final String JSON_PROPERTY_VPN_ML_SCORE = "vpn_ml_score"; - @jakarta.annotation.Nullable private Double vpnMlScore; - - public static final String JSON_PROPERTY_VPN_ORIGIN_TIMEZONE = "vpn_origin_timezone"; - @jakarta.annotation.Nullable private String vpnOriginTimezone; - - public static final String JSON_PROPERTY_VPN_ORIGIN_COUNTRY = "vpn_origin_country"; - @jakarta.annotation.Nullable private String vpnOriginCountry; - - public static final String JSON_PROPERTY_VPN_METHODS = "vpn_methods"; - @jakarta.annotation.Nullable private VpnMethods vpnMethods; - - public static final String JSON_PROPERTY_HIGH_ACTIVITY_DEVICE = "high_activity_device"; - @jakarta.annotation.Nullable private Boolean highActivityDevice; - - public static final String JSON_PROPERTY_RARE_DEVICE = "rare_device"; - @jakarta.annotation.Nullable private Boolean rareDevice; - - public static final String JSON_PROPERTY_RARE_DEVICE_PERCENTILE_BUCKET = - "rare_device_percentile_bucket"; - @jakarta.annotation.Nullable private RareDevicePercentileBucket rareDevicePercentileBucket; +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "source", + defaultImpl = Event.UnknownEvent.class, + visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = EventDevice.class, name = "device"), + @JsonSubTypes.Type(value = EventEdge.class, name = "edge") +}) +/** + * SPIKE INTER-2457 — BREAKING CHANGE. DO NOT SHIP. + * Event used to be a class with getIdentification(). It is now an interface + * (useOneOfInterfaces: true) with no getIdentification(). Existing callers + * of api.getEvent(id).getIdentification() fail to compile. Cast to EventDevice + * after checking getSource(), or this is a binary-incompatible major version. + */ +public interface Event { - public static final String JSON_PROPERTY_RAW_DEVICE_ATTRIBUTES = "raw_device_attributes"; - @jakarta.annotation.Nullable private RawDeviceAttributes rawDeviceAttributes; + static final String JSON_PROPERTY_EVENT_ID = "event_id"; - public static final String JSON_PROPERTY_LABELS = "labels"; - @jakarta.annotation.Nullable private List labels = new ArrayList<>(); + static final String JSON_PROPERTY_TIMESTAMP = "timestamp"; - public Event() {} + static final String JSON_PROPERTY_IP_INFO = "ip_info"; - public Event eventId(@jakarta.annotation.Nonnull String eventId) { - this.eventId = eventId; - return this; - } + static final String JSON_PROPERTY_SOURCE = "source"; /** - * Unique identifier of the user's request. The first portion of the event_id is a unix epoch milliseconds timestamp. + * Unique identifier of the user's request. The first portion of the event_id is a unix epoch milliseconds timestamp. * @return eventId */ @jakarta.annotation.Nonnull @JsonProperty(value = JSON_PROPERTY_EVENT_ID, required = true) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getEventId() { - return eventId; - } + String getEventId(); @JsonProperty(value = JSON_PROPERTY_EVENT_ID, required = true) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEventId(@jakarta.annotation.Nonnull String eventId) { - this.eventId = eventId; - } + void setEventId(@jakarta.annotation.Nonnull String eventId); - public Event timestamp(@jakarta.annotation.Nonnull Long timestamp) { - this.timestamp = timestamp; - return this; - } + Event eventId(@jakarta.annotation.Nonnull String eventId); /** * Timestamp of the event with millisecond precision in Unix time. @@ -331,1683 +69,152 @@ public Event timestamp(@jakarta.annotation.Nonnull Long timestamp) { @jakarta.annotation.Nonnull @JsonProperty(value = JSON_PROPERTY_TIMESTAMP, required = true) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Long getTimestamp() { - return timestamp; - } + Long getTimestamp(); @JsonProperty(value = JSON_PROPERTY_TIMESTAMP, required = true) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTimestamp(@jakarta.annotation.Nonnull Long timestamp) { - this.timestamp = timestamp; - } - - public Event source(@jakarta.annotation.Nullable EventSource source) { - this.source = source; - return this; - } - - /** - * Get source - * @return source - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_SOURCE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EventSource getSource() { - return source; - } - - @JsonProperty(value = JSON_PROPERTY_SOURCE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSource(@jakarta.annotation.Nullable EventSource source) { - this.source = source; - } - - public Event incrementalIdentificationStatus( - @jakarta.annotation.Nullable - IncrementalIdentificationStatus incrementalIdentificationStatus) { - this.incrementalIdentificationStatus = incrementalIdentificationStatus; - return this; - } - - /** - * Get incrementalIdentificationStatus - * @return incrementalIdentificationStatus - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_INCREMENTAL_IDENTIFICATION_STATUS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IncrementalIdentificationStatus getIncrementalIdentificationStatus() { - return incrementalIdentificationStatus; - } - - @JsonProperty(value = JSON_PROPERTY_INCREMENTAL_IDENTIFICATION_STATUS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIncrementalIdentificationStatus( - @jakarta.annotation.Nullable - IncrementalIdentificationStatus incrementalIdentificationStatus) { - this.incrementalIdentificationStatus = incrementalIdentificationStatus; - } - - public Event linkedId(@jakarta.annotation.Nullable String linkedId) { - this.linkedId = linkedId; - return this; - } - - /** - * A customer-provided id that was sent with the request. - * @return linkedId - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_LINKED_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getLinkedId() { - return linkedId; - } - - @JsonProperty(value = JSON_PROPERTY_LINKED_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLinkedId(@jakarta.annotation.Nullable String linkedId) { - this.linkedId = linkedId; - } - - public Event environmentId(@jakarta.annotation.Nullable String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Environment Id of the event. - * @return environmentId - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ENVIRONMENT_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getEnvironmentId() { - return environmentId; - } - - @JsonProperty(value = JSON_PROPERTY_ENVIRONMENT_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEnvironmentId(@jakarta.annotation.Nullable String environmentId) { - this.environmentId = environmentId; - } + void setTimestamp(@jakarta.annotation.Nonnull Long timestamp); - public Event suspect(@jakarta.annotation.Nullable Boolean suspect) { - this.suspect = suspect; - return this; - } + Event timestamp(@jakarta.annotation.Nonnull Long timestamp); /** - * Field is `true` if you have previously set the `suspect` flag for this event using the [Server API Update event endpoint](https://docs.fingerprint.com/reference/server-api-v4-update-event). - * @return suspect + * Get ipInfo + * @return ipInfo */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_SUSPECT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getSuspect() { - return suspect; - } + @jakarta.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_IP_INFO, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + IPInfo getIpInfo(); - @JsonProperty(value = JSON_PROPERTY_SUSPECT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSuspect(@jakarta.annotation.Nullable Boolean suspect) { - this.suspect = suspect; - } + @JsonProperty(value = JSON_PROPERTY_IP_INFO, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + void setIpInfo(@jakarta.annotation.Nonnull IPInfo ipInfo); - public Event sdk(@jakarta.annotation.Nullable SDK sdk) { - this.sdk = sdk; - return this; - } + Event ipInfo(@jakarta.annotation.Nonnull IPInfo ipInfo); /** - * Get sdk - * @return sdk + * Get source + * @return source */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_SDK, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SDK getSdk() { - return sdk; - } - - @JsonProperty(value = JSON_PROPERTY_SDK, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSdk(@jakarta.annotation.Nullable SDK sdk) { - this.sdk = sdk; - } - - public Event replayed(@jakarta.annotation.Nullable Boolean replayed) { - this.replayed = replayed; - return this; - } + @jakarta.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_SOURCE, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + EventSource getSource(); - /** - * `true` if we determined that this payload was replayed, `false` otherwise. - * @return replayed - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_REPLAYED, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getReplayed() { - return replayed; - } + @JsonProperty(value = JSON_PROPERTY_SOURCE, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + void setSource(@jakarta.annotation.Nonnull EventSource source); - @JsonProperty(value = JSON_PROPERTY_REPLAYED, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReplayed(@jakarta.annotation.Nullable Boolean replayed) { - this.replayed = replayed; - } + Event source(@jakarta.annotation.Nonnull EventSource source); - public Event identification(@jakarta.annotation.Nullable Identification identification) { - this.identification = identification; - return this; - } + public static final class UnknownEvent implements Event { - /** - * Get identification - * @return identification - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_IDENTIFICATION, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Identification getIdentification() { - return identification; - } + public static final String JSON_PROPERTY_EVENT_ID = "event_id"; + @jakarta.annotation.Nonnull private String eventId; - @JsonProperty(value = JSON_PROPERTY_IDENTIFICATION, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIdentification(@jakarta.annotation.Nullable Identification identification) { - this.identification = identification; - } + public static final String JSON_PROPERTY_TIMESTAMP = "timestamp"; + @jakarta.annotation.Nonnull private Long timestamp; - public Event supplementaryIdHighRecall( - @jakarta.annotation.Nullable SupplementaryIDHighRecall supplementaryIdHighRecall) { - this.supplementaryIdHighRecall = supplementaryIdHighRecall; - return this; - } + public static final String JSON_PROPERTY_IP_INFO = "ip_info"; + @jakarta.annotation.Nonnull private IPInfo ipInfo; - /** - * Get supplementaryIdHighRecall - * @return supplementaryIdHighRecall - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_SUPPLEMENTARY_ID_HIGH_RECALL, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SupplementaryIDHighRecall getSupplementaryIdHighRecall() { - return supplementaryIdHighRecall; - } + public static final String JSON_PROPERTY_SOURCE = "source"; + // The discriminator does not have Nullability-annotation since it is added during serialization + // by the @JsonTypeName annotation + private EventSource source; - @JsonProperty(value = JSON_PROPERTY_SUPPLEMENTARY_ID_HIGH_RECALL, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSupplementaryIdHighRecall( - @jakarta.annotation.Nullable SupplementaryIDHighRecall supplementaryIdHighRecall) { - this.supplementaryIdHighRecall = supplementaryIdHighRecall; - } + public UnknownEvent() {} - public Event tags(@jakarta.annotation.Nullable Map tags) { - this.tags = tags; - return this; - } + public Event eventId(@jakarta.annotation.Nonnull String eventId) { - public Event putTagsItem(String key, Object tagsItem) { - if (this.tags == null) { - this.tags = new HashMap<>(); + this.eventId = eventId; + return this; } - this.tags.put(key, tagsItem); - return this; - } - - /** - * A customer-provided value or an object that was sent with the identification request or updated later. - * @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_TAGS, required = false) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public Map getTags() { - return tags; - } - - @JsonProperty(value = JSON_PROPERTY_TAGS, required = false) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setTags(@jakarta.annotation.Nullable Map tags) { - this.tags = tags; - } - - public Event url(@jakarta.annotation.Nullable String url) { - this.url = url; - return this; - } - - /** - * Page URL from which the request was sent. - * @return url - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_URL, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getUrl() { - return url; - } - - @JsonProperty(value = JSON_PROPERTY_URL, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUrl(@jakarta.annotation.Nullable String url) { - this.url = url; - } - - public Event bundleId(@jakarta.annotation.Nullable String bundleId) { - this.bundleId = bundleId; - return this; - } - - /** - * Bundle Id of the iOS application integrated with the Fingerprint SDK for the event. - * @return bundleId - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_BUNDLE_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getBundleId() { - return bundleId; - } - - @JsonProperty(value = JSON_PROPERTY_BUNDLE_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBundleId(@jakarta.annotation.Nullable String bundleId) { - this.bundleId = bundleId; - } - - public Event packageName(@jakarta.annotation.Nullable String packageName) { - this.packageName = packageName; - return this; - } - - /** - * Package name of the Android application integrated with the Fingerprint SDK for the event. - * @return packageName - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_PACKAGE_NAME, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPackageName() { - return packageName; - } - - @JsonProperty(value = JSON_PROPERTY_PACKAGE_NAME, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPackageName(@jakarta.annotation.Nullable String packageName) { - this.packageName = packageName; - } - - public Event ipAddress(@jakarta.annotation.Nullable String ipAddress) { - this.ipAddress = ipAddress; - return this; - } - - /** - * IP address of the requesting browser or bot. - * @return ipAddress - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_IP_ADDRESS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getIpAddress() { - return ipAddress; - } - - @JsonProperty(value = JSON_PROPERTY_IP_ADDRESS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIpAddress(@jakarta.annotation.Nullable String ipAddress) { - this.ipAddress = ipAddress; - } - - public Event userAgent(@jakarta.annotation.Nullable String userAgent) { - this.userAgent = userAgent; - return this; - } - - /** - * User Agent of the client. - * @return userAgent - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_USER_AGENT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getUserAgent() { - return userAgent; - } - - @JsonProperty(value = JSON_PROPERTY_USER_AGENT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUserAgent(@jakarta.annotation.Nullable String userAgent) { - this.userAgent = userAgent; - } - - public Event device(@jakarta.annotation.Nullable String device) { - this.device = device; - return this; - } - /** - * Device model or family extracted from the user agent string. On web, this field is also present inside `browser_details`. - * @return device - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_DEVICE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDevice() { - return device; - } - - @JsonProperty(value = JSON_PROPERTY_DEVICE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDevice(@jakarta.annotation.Nullable String device) { - this.device = device; - } - - public Event os(@jakarta.annotation.Nullable String os) { - this.os = os; - return this; - } - - /** - * Operating system family extracted from the user agent string. On web, this field is also present inside `browser_details`. - * @return os - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_OS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOs() { - return os; - } - - @JsonProperty(value = JSON_PROPERTY_OS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOs(@jakarta.annotation.Nullable String os) { - this.os = os; - } - - public Event osVersion(@jakarta.annotation.Nullable String osVersion) { - this.osVersion = osVersion; - return this; - } - - /** - * Operating system version string extracted from the user agent string. On web, this field is also present inside `browser_details`. - * @return osVersion - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_OS_VERSION, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOsVersion() { - return osVersion; - } - - @JsonProperty(value = JSON_PROPERTY_OS_VERSION, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOsVersion(@jakarta.annotation.Nullable String osVersion) { - this.osVersion = osVersion; - } - - public Event clientReferrer(@jakarta.annotation.Nullable String clientReferrer) { - this.clientReferrer = clientReferrer; - return this; - } - - /** - * Client Referrer field corresponds to the `document.referrer` field gathered during an identification request. The value is an empty string if the user navigated to the page directly (not through a link, but, for example, by using a bookmark). - * @return clientReferrer - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_CLIENT_REFERRER, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getClientReferrer() { - return clientReferrer; - } - - @JsonProperty(value = JSON_PROPERTY_CLIENT_REFERRER, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientReferrer(@jakarta.annotation.Nullable String clientReferrer) { - this.clientReferrer = clientReferrer; - } - - public Event browserDetails(@jakarta.annotation.Nullable BrowserDetails browserDetails) { - this.browserDetails = browserDetails; - return this; - } + /** + * Unique identifier of the user's request. The first portion of the event_id is a unix epoch milliseconds timestamp. + * @return eventId + */ + @jakarta.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_EVENT_ID, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getEventId() { + return eventId; + } - /** - * Get browserDetails - * @return browserDetails - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_BROWSER_DETAILS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public BrowserDetails getBrowserDetails() { - return browserDetails; - } + @JsonProperty(value = JSON_PROPERTY_EVENT_ID, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEventId(@jakarta.annotation.Nonnull String eventId) { + this.eventId = eventId; + } - @JsonProperty(value = JSON_PROPERTY_BROWSER_DETAILS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBrowserDetails(@jakarta.annotation.Nullable BrowserDetails browserDetails) { - this.browserDetails = browserDetails; - } + public Event timestamp(@jakarta.annotation.Nonnull Long timestamp) { - public Event proximity(@jakarta.annotation.Nullable Proximity proximity) { - this.proximity = proximity; - return this; - } + this.timestamp = timestamp; + return this; + } - /** - * Get proximity - * @return proximity - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_PROXIMITY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Proximity getProximity() { - return proximity; - } + /** + * Timestamp of the event with millisecond precision in Unix time. + * @return timestamp + */ + @jakarta.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TIMESTAMP, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getTimestamp() { + return timestamp; + } - @JsonProperty(value = JSON_PROPERTY_PROXIMITY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setProximity(@jakarta.annotation.Nullable Proximity proximity) { - this.proximity = proximity; - } + @JsonProperty(value = JSON_PROPERTY_TIMESTAMP, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTimestamp(@jakarta.annotation.Nonnull Long timestamp) { + this.timestamp = timestamp; + } - public Event activeCall(@jakarta.annotation.Nullable Boolean activeCall) { - this.activeCall = activeCall; - return this; - } + public Event ipInfo(@jakarta.annotation.Nonnull IPInfo ipInfo) { - /** - * Indicates whether the mobile device had an active call (cellular or VoIP) at the time of the request. Available from SDK 2.16.0+ on iOS and Android. - * @return activeCall - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ACTIVE_CALL, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getActiveCall() { - return activeCall; - } + this.ipInfo = ipInfo; + return this; + } - @JsonProperty(value = JSON_PROPERTY_ACTIVE_CALL, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setActiveCall(@jakarta.annotation.Nullable Boolean activeCall) { - this.activeCall = activeCall; - } + /** + * Get ipInfo + * @return ipInfo + */ + @jakarta.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_IP_INFO, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IPInfo getIpInfo() { + return ipInfo; + } - public Event bot(@jakarta.annotation.Nullable BotResult bot) { - this.bot = bot; - return this; - } + @JsonProperty(value = JSON_PROPERTY_IP_INFO, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIpInfo(@jakarta.annotation.Nonnull IPInfo ipInfo) { + this.ipInfo = ipInfo; + } - /** - * Get bot - * @return bot - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_BOT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public BotResult getBot() { - return bot; - } + public Event source(@jakarta.annotation.Nonnull EventSource source) { - @JsonProperty(value = JSON_PROPERTY_BOT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBot(@jakarta.annotation.Nullable BotResult bot) { - this.bot = bot; - } + this.source = source; + return this; + } - public Event botType(@jakarta.annotation.Nullable String botType) { - this.botType = botType; - return this; - } + /** + * Get source + * @return source + */ + @jakarta.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_SOURCE, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EventSource getSource() { + return source; + } - /** - * Additional classification of the bot type if detected. - * @return botType - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_BOT_TYPE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getBotType() { - return botType; - } - - @JsonProperty(value = JSON_PROPERTY_BOT_TYPE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBotType(@jakarta.annotation.Nullable String botType) { - this.botType = botType; - } - - public Event botInfo(@jakarta.annotation.Nullable BotInfo botInfo) { - this.botInfo = botInfo; - return this; - } - - /** - * Get botInfo - * @return botInfo - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_BOT_INFO, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public BotInfo getBotInfo() { - return botInfo; - } - - @JsonProperty(value = JSON_PROPERTY_BOT_INFO, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBotInfo(@jakarta.annotation.Nullable BotInfo botInfo) { - this.botInfo = botInfo; - } - - public Event clonedApp(@jakarta.annotation.Nullable Boolean clonedApp) { - this.clonedApp = clonedApp; - return this; - } - - /** - * Android specific cloned application detection. There are 2 values: * `true` - Presence of app cloners work detected (e.g. fully cloned application found or launch of it inside of a not main working profile detected). * `false` - No signs of cloned application detected or the client is not Android. - * @return clonedApp - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_CLONED_APP, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getClonedApp() { - return clonedApp; - } - - @JsonProperty(value = JSON_PROPERTY_CLONED_APP, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClonedApp(@jakarta.annotation.Nullable Boolean clonedApp) { - this.clonedApp = clonedApp; - } - - public Event developerTools(@jakarta.annotation.Nullable Boolean developerTools) { - this.developerTools = developerTools; - return this; - } - - /** - * `true` if the browser has DevTools open (Chrome, Firefox) or the Android/iOS device has Developer Tools enabled, `false` otherwise. - * @return developerTools - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_DEVELOPER_TOOLS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getDeveloperTools() { - return developerTools; - } - - @JsonProperty(value = JSON_PROPERTY_DEVELOPER_TOOLS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDeveloperTools(@jakarta.annotation.Nullable Boolean developerTools) { - this.developerTools = developerTools; - } - - public Event emulator(@jakarta.annotation.Nullable Boolean emulator) { - this.emulator = emulator; - return this; - } - - /** - * Android specific emulator detection. There are 2 values: * `true` - Emulated environment detected (e.g. launch inside of AVD). * `false` - No signs of emulated environment detected or the client is not Android. - * @return emulator - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_EMULATOR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getEmulator() { - return emulator; - } - - @JsonProperty(value = JSON_PROPERTY_EMULATOR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmulator(@jakarta.annotation.Nullable Boolean emulator) { - this.emulator = emulator; - } - - public Event factoryResetTimestamp(@jakarta.annotation.Nullable Long factoryResetTimestamp) { - this.factoryResetTimestamp = factoryResetTimestamp; - return this; - } - - /** - * The time of the most recent factory reset that happened on the **mobile device** is expressed as Unix epoch time. When a factory reset cannot be detected on the mobile device or when the request is initiated from a browser, this field will correspond to the *epoch* time (i.e 1 Jan 1970 UTC) as a value of 0. See [Factory Reset Detection](https://docs.fingerprint.com/docs/smart-signals-reference#factory-reset-detection) to learn more about this Smart Signal. - * @return factoryResetTimestamp - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_FACTORY_RESET_TIMESTAMP, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getFactoryResetTimestamp() { - return factoryResetTimestamp; - } - - @JsonProperty(value = JSON_PROPERTY_FACTORY_RESET_TIMESTAMP, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFactoryResetTimestamp(@jakarta.annotation.Nullable Long factoryResetTimestamp) { - this.factoryResetTimestamp = factoryResetTimestamp; - } - - public Event frida(@jakarta.annotation.Nullable Boolean frida) { - this.frida = frida; - return this; - } - - /** - * [Frida](https://frida.re/docs/) detection for Android and iOS devices. There are 2 values: * `true` - Frida detected * `false` - No signs of Frida or the client is not a mobile device. - * @return frida - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_FRIDA, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getFrida() { - return frida; - } - - @JsonProperty(value = JSON_PROPERTY_FRIDA, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFrida(@jakarta.annotation.Nullable Boolean frida) { - this.frida = frida; - } - - public Event ipBlocklist(@jakarta.annotation.Nullable IPBlockList ipBlocklist) { - this.ipBlocklist = ipBlocklist; - return this; - } - - /** - * Get ipBlocklist - * @return ipBlocklist - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_IP_BLOCKLIST, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IPBlockList getIpBlocklist() { - return ipBlocklist; - } - - @JsonProperty(value = JSON_PROPERTY_IP_BLOCKLIST, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIpBlocklist(@jakarta.annotation.Nullable IPBlockList ipBlocklist) { - this.ipBlocklist = ipBlocklist; - } - - public Event ipInfo(@jakarta.annotation.Nullable IPInfo ipInfo) { - this.ipInfo = ipInfo; - return this; - } - - /** - * Get ipInfo - * @return ipInfo - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_IP_INFO, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IPInfo getIpInfo() { - return ipInfo; - } - - @JsonProperty(value = JSON_PROPERTY_IP_INFO, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIpInfo(@jakarta.annotation.Nullable IPInfo ipInfo) { - this.ipInfo = ipInfo; - } - - public Event proxy(@jakarta.annotation.Nullable Boolean proxy) { - this.proxy = proxy; - return this; - } - - /** - * IP address was used by a public proxy provider or belonged to a known recent residential proxy - * @return proxy - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_PROXY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getProxy() { - return proxy; - } - - @JsonProperty(value = JSON_PROPERTY_PROXY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setProxy(@jakarta.annotation.Nullable Boolean proxy) { - this.proxy = proxy; - } - - public Event proxyConfidence(@jakarta.annotation.Nullable ProxyConfidence proxyConfidence) { - this.proxyConfidence = proxyConfidence; - return this; - } - - /** - * Get proxyConfidence - * @return proxyConfidence - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_PROXY_CONFIDENCE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ProxyConfidence getProxyConfidence() { - return proxyConfidence; - } - - @JsonProperty(value = JSON_PROPERTY_PROXY_CONFIDENCE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setProxyConfidence(@jakarta.annotation.Nullable ProxyConfidence proxyConfidence) { - this.proxyConfidence = proxyConfidence; - } - - public Event proxyDetails(@jakarta.annotation.Nullable ProxyDetails proxyDetails) { - this.proxyDetails = proxyDetails; - return this; - } - - /** - * Get proxyDetails - * @return proxyDetails - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_PROXY_DETAILS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ProxyDetails getProxyDetails() { - return proxyDetails; - } - - @JsonProperty(value = JSON_PROPERTY_PROXY_DETAILS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setProxyDetails(@jakarta.annotation.Nullable ProxyDetails proxyDetails) { - this.proxyDetails = proxyDetails; - } - - public Event proxyMlScore(@jakarta.annotation.Nullable Double proxyMlScore) { - this.proxyMlScore = proxyMlScore; - return this; - } - - /** - * Machine learning–based proxy score, represented as a floating-point value between 0 and 1 (inclusive), with up to three decimal places of precision. A higher score means a higher confidence in the positive `proxy` detection result. This Smart Signal is currently in beta and only available to select customers. If you are interested, please [contact our support team](https://fingerprint.com/support/). - * minimum: 0 - * maximum: 1 - * @return proxyMlScore - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_PROXY_ML_SCORE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getProxyMlScore() { - return proxyMlScore; - } - - @JsonProperty(value = JSON_PROPERTY_PROXY_ML_SCORE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setProxyMlScore(@jakarta.annotation.Nullable Double proxyMlScore) { - this.proxyMlScore = proxyMlScore; - } - - public Event incognito(@jakarta.annotation.Nullable Boolean incognito) { - this.incognito = incognito; - return this; - } - - /** - * `true` if we detected incognito mode used in the browser, `false` otherwise. - * @return incognito - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_INCOGNITO, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIncognito() { - return incognito; - } - - @JsonProperty(value = JSON_PROPERTY_INCOGNITO, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIncognito(@jakarta.annotation.Nullable Boolean incognito) { - this.incognito = incognito; - } - - public Event jailbroken(@jakarta.annotation.Nullable Boolean jailbroken) { - this.jailbroken = jailbroken; - return this; - } - - /** - * iOS specific jailbreak detection. There are 2 values: * `true` - Jailbreak detected. * `false` - No signs of jailbreak or the client is not iOS. - * @return jailbroken - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_JAILBROKEN, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getJailbroken() { - return jailbroken; - } - - @JsonProperty(value = JSON_PROPERTY_JAILBROKEN, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setJailbroken(@jakarta.annotation.Nullable Boolean jailbroken) { - this.jailbroken = jailbroken; - } - - public Event locationSpoofing(@jakarta.annotation.Nullable Boolean locationSpoofing) { - this.locationSpoofing = locationSpoofing; - return this; - } - - /** - * Flag indicating whether the request came from a mobile device with location spoofing enabled. - * @return locationSpoofing - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_LOCATION_SPOOFING, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getLocationSpoofing() { - return locationSpoofing; - } - - @JsonProperty(value = JSON_PROPERTY_LOCATION_SPOOFING, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLocationSpoofing(@jakarta.annotation.Nullable Boolean locationSpoofing) { - this.locationSpoofing = locationSpoofing; - } - - public Event mitmAttack(@jakarta.annotation.Nullable Boolean mitmAttack) { - this.mitmAttack = mitmAttack; - return this; - } - - /** - * * `true` - When requests made from your users' mobile devices to Fingerprint servers have been intercepted and potentially modified. * `false` - Otherwise or when the request originated from a browser. See [MitM Attack Detection](https://docs.fingerprint.com/docs/smart-signals-reference#mitm-attack-detection) to learn more about this Smart Signal. - * @return mitmAttack - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_MITM_ATTACK, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getMitmAttack() { - return mitmAttack; - } - - @JsonProperty(value = JSON_PROPERTY_MITM_ATTACK, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMitmAttack(@jakarta.annotation.Nullable Boolean mitmAttack) { - this.mitmAttack = mitmAttack; - } - - public Event privacySettings(@jakarta.annotation.Nullable Boolean privacySettings) { - this.privacySettings = privacySettings; - return this; - } - - /** - * `true` if the request is from a privacy aware browser (e.g. Tor) or from a browser in which fingerprinting is blocked. Otherwise `false`. - * @return privacySettings - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_PRIVACY_SETTINGS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getPrivacySettings() { - return privacySettings; - } - - @JsonProperty(value = JSON_PROPERTY_PRIVACY_SETTINGS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrivacySettings(@jakarta.annotation.Nullable Boolean privacySettings) { - this.privacySettings = privacySettings; - } - - public Event rootApps(@jakarta.annotation.Nullable Boolean rootApps) { - this.rootApps = rootApps; - return this; - } - - /** - * Android specific root management apps detection. There are 2 values: * `true` - Root Management Apps detected (e.g. Magisk). * `false` - No Root Management Apps detected or the client isn't Android. - * @return rootApps - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_ROOT_APPS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getRootApps() { - return rootApps; - } - - @JsonProperty(value = JSON_PROPERTY_ROOT_APPS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRootApps(@jakarta.annotation.Nullable Boolean rootApps) { - this.rootApps = rootApps; - } - - public Event ruleAction(@jakarta.annotation.Nullable EventRuleAction ruleAction) { - this.ruleAction = ruleAction; - return this; - } - - /** - * Get ruleAction - * @return ruleAction - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_RULE_ACTION, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EventRuleAction getRuleAction() { - return ruleAction; - } - - @JsonProperty(value = JSON_PROPERTY_RULE_ACTION, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRuleAction(@jakarta.annotation.Nullable EventRuleAction ruleAction) { - this.ruleAction = ruleAction; - } - - public Event simulator(@jakarta.annotation.Nullable Boolean simulator) { - this.simulator = simulator; - return this; - } - - /** - * iOS specific simulator detection. There are 2 values: * `true` - Simulator environment detected. * `false` - No signs of simulator or the client is not iOS. - * @return simulator - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_SIMULATOR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getSimulator() { - return simulator; - } - - @JsonProperty(value = JSON_PROPERTY_SIMULATOR, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSimulator(@jakarta.annotation.Nullable Boolean simulator) { - this.simulator = simulator; - } - - public Event suspectScore(@jakarta.annotation.Nullable Integer suspectScore) { - this.suspectScore = suspectScore; - return this; - } - - /** - * Suspect Score is an easy way to integrate Smart Signals into your fraud protection work flow. It is a weighted representation of all Smart Signals present in the payload that helps identify suspicious activity. The value range is [0; S] where S is sum of all Smart Signals weights. See more details here: https://docs.fingerprint.com/docs/suspect-score - * @return suspectScore - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_SUSPECT_SCORE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getSuspectScore() { - return suspectScore; - } - - @JsonProperty(value = JSON_PROPERTY_SUSPECT_SCORE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSuspectScore(@jakarta.annotation.Nullable Integer suspectScore) { - this.suspectScore = suspectScore; - } - - public Event tampering(@jakarta.annotation.Nullable Boolean tampering) { - this.tampering = tampering; - return this; - } - - /** - * The field can be used as a standalone flag for tampering detection. Alternatively, the more granular fields documented below can be used for workflows that require more context. * `true` if tampering is detected through an anomalous browser signature, anti-detect browser detection, or other tampering-related methods * `false` if none of the tampering checks return a positive result - * @return tampering - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_TAMPERING, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getTampering() { - return tampering; - } - - @JsonProperty(value = JSON_PROPERTY_TAMPERING, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTampering(@jakarta.annotation.Nullable Boolean tampering) { - this.tampering = tampering; - } - - public Event tamperingConfidence( - @jakarta.annotation.Nullable TamperingConfidence tamperingConfidence) { - this.tamperingConfidence = tamperingConfidence; - return this; - } - - /** - * Get tamperingConfidence - * @return tamperingConfidence - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_TAMPERING_CONFIDENCE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public TamperingConfidence getTamperingConfidence() { - return tamperingConfidence; - } - - @JsonProperty(value = JSON_PROPERTY_TAMPERING_CONFIDENCE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTamperingConfidence( - @jakarta.annotation.Nullable TamperingConfidence tamperingConfidence) { - this.tamperingConfidence = tamperingConfidence; - } - - public Event tamperingMlScore(@jakarta.annotation.Nullable Double tamperingMlScore) { - this.tamperingMlScore = tamperingMlScore; - return this; - } - - /** - * The output of this model is captured as tampering_ml_score, a number indicating how likely an event is coming from an anti detect browser. Values close to 1 signify higher confidence and we consider anything above the threshold of 0.8 to be actionable (the result and anti_detect_browser fields conveniently captures that fact) - * minimum: 0 - * maximum: 1 - * @return tamperingMlScore - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_TAMPERING_ML_SCORE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getTamperingMlScore() { - return tamperingMlScore; - } - - @JsonProperty(value = JSON_PROPERTY_TAMPERING_ML_SCORE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTamperingMlScore(@jakarta.annotation.Nullable Double tamperingMlScore) { - this.tamperingMlScore = tamperingMlScore; - } - - public Event tamperingDetails(@jakarta.annotation.Nullable TamperingDetails tamperingDetails) { - this.tamperingDetails = tamperingDetails; - return this; - } - - /** - * Get tamperingDetails - * @return tamperingDetails - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_TAMPERING_DETAILS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public TamperingDetails getTamperingDetails() { - return tamperingDetails; - } - - @JsonProperty(value = JSON_PROPERTY_TAMPERING_DETAILS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTamperingDetails(@jakarta.annotation.Nullable TamperingDetails tamperingDetails) { - this.tamperingDetails = tamperingDetails; - } - - public Event velocity(@jakarta.annotation.Nullable Velocity velocity) { - this.velocity = velocity; - return this; - } - - /** - * Get velocity - * @return velocity - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_VELOCITY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Velocity getVelocity() { - return velocity; - } - - @JsonProperty(value = JSON_PROPERTY_VELOCITY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setVelocity(@jakarta.annotation.Nullable Velocity velocity) { - this.velocity = velocity; - } - - public Event virtualMachine(@jakarta.annotation.Nullable Boolean virtualMachine) { - this.virtualMachine = virtualMachine; - return this; - } - - /** - * `true` if the request came from a browser running inside a virtual machine (e.g. VMWare), `false` otherwise. - * @return virtualMachine - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_VIRTUAL_MACHINE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getVirtualMachine() { - return virtualMachine; - } - - @JsonProperty(value = JSON_PROPERTY_VIRTUAL_MACHINE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setVirtualMachine(@jakarta.annotation.Nullable Boolean virtualMachine) { - this.virtualMachine = virtualMachine; - } - - public Event virtualMachineMlScore(@jakarta.annotation.Nullable Double virtualMachineMlScore) { - this.virtualMachineMlScore = virtualMachineMlScore; - return this; - } - - /** - * Machine learning–based virtual machine score, represented as a floating-point value between 0 and 1 (inclusive), with up to three decimal places of precision. A higher score means a higher confidence in the positive `virtual_machine` detection result. This Smart Signal is currently in beta and only available to select customers. If you are interested, please [contact our support team](https://fingerprint.com/support/). - * minimum: 0 - * maximum: 1 - * @return virtualMachineMlScore - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_VIRTUAL_MACHINE_ML_SCORE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getVirtualMachineMlScore() { - return virtualMachineMlScore; - } - - @JsonProperty(value = JSON_PROPERTY_VIRTUAL_MACHINE_ML_SCORE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setVirtualMachineMlScore(@jakarta.annotation.Nullable Double virtualMachineMlScore) { - this.virtualMachineMlScore = virtualMachineMlScore; - } - - public Event vpn(@jakarta.annotation.Nullable Boolean vpn) { - this.vpn = vpn; - return this; - } - - /** - * VPN or other anonymizing service has been used when sending the request. - * @return vpn - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_VPN, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getVpn() { - return vpn; - } - - @JsonProperty(value = JSON_PROPERTY_VPN, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setVpn(@jakarta.annotation.Nullable Boolean vpn) { - this.vpn = vpn; - } - - public Event vpnConfidence(@jakarta.annotation.Nullable VpnConfidence vpnConfidence) { - this.vpnConfidence = vpnConfidence; - return this; - } - - /** - * Get vpnConfidence - * @return vpnConfidence - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_VPN_CONFIDENCE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public VpnConfidence getVpnConfidence() { - return vpnConfidence; - } - - @JsonProperty(value = JSON_PROPERTY_VPN_CONFIDENCE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setVpnConfidence(@jakarta.annotation.Nullable VpnConfidence vpnConfidence) { - this.vpnConfidence = vpnConfidence; - } - - public Event vpnMlScore(@jakarta.annotation.Nullable Double vpnMlScore) { - this.vpnMlScore = vpnMlScore; - return this; - } - - /** - * Machine learning–based VPN score, represented as a floating-point value between 0 and 1 (inclusive), with up to three decimal places of precision. A higher score means a higher confidence in the positive `vpn` detection result. This Smart Signal is currently in beta and only available to select customers. If you are interested, please [contact our support team](https://fingerprint.com/support/). - * minimum: 0 - * maximum: 1 - * @return vpnMlScore - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_VPN_ML_SCORE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Double getVpnMlScore() { - return vpnMlScore; - } - - @JsonProperty(value = JSON_PROPERTY_VPN_ML_SCORE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setVpnMlScore(@jakarta.annotation.Nullable Double vpnMlScore) { - this.vpnMlScore = vpnMlScore; - } - - public Event vpnOriginTimezone(@jakarta.annotation.Nullable String vpnOriginTimezone) { - this.vpnOriginTimezone = vpnOriginTimezone; - return this; - } - - /** - * Local timezone which is used in timezone_mismatch method. - * @return vpnOriginTimezone - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_VPN_ORIGIN_TIMEZONE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getVpnOriginTimezone() { - return vpnOriginTimezone; - } - - @JsonProperty(value = JSON_PROPERTY_VPN_ORIGIN_TIMEZONE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setVpnOriginTimezone(@jakarta.annotation.Nullable String vpnOriginTimezone) { - this.vpnOriginTimezone = vpnOriginTimezone; - } - - public Event vpnOriginCountry(@jakarta.annotation.Nullable String vpnOriginCountry) { - this.vpnOriginCountry = vpnOriginCountry; - return this; - } - - /** - * Country of the request (Android SDK version >= 2.4.0, iOS SDK version >= 2.9.0, JS agent >= 3.12.9 / 4.0.2), ISO 3166 format or unknown. - * @return vpnOriginCountry - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_VPN_ORIGIN_COUNTRY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getVpnOriginCountry() { - return vpnOriginCountry; - } - - @JsonProperty(value = JSON_PROPERTY_VPN_ORIGIN_COUNTRY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setVpnOriginCountry(@jakarta.annotation.Nullable String vpnOriginCountry) { - this.vpnOriginCountry = vpnOriginCountry; - } - - public Event vpnMethods(@jakarta.annotation.Nullable VpnMethods vpnMethods) { - this.vpnMethods = vpnMethods; - return this; - } - - /** - * Get vpnMethods - * @return vpnMethods - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_VPN_METHODS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public VpnMethods getVpnMethods() { - return vpnMethods; - } - - @JsonProperty(value = JSON_PROPERTY_VPN_METHODS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setVpnMethods(@jakarta.annotation.Nullable VpnMethods vpnMethods) { - this.vpnMethods = vpnMethods; - } - - public Event highActivityDevice(@jakarta.annotation.Nullable Boolean highActivityDevice) { - this.highActivityDevice = highActivityDevice; - return this; - } - - /** - * Flag indicating if the request came from a high-activity visitor. - * @return highActivityDevice - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_HIGH_ACTIVITY_DEVICE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getHighActivityDevice() { - return highActivityDevice; - } - - @JsonProperty(value = JSON_PROPERTY_HIGH_ACTIVITY_DEVICE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHighActivityDevice(@jakarta.annotation.Nullable Boolean highActivityDevice) { - this.highActivityDevice = highActivityDevice; - } - - public Event rareDevice(@jakarta.annotation.Nullable Boolean rareDevice) { - this.rareDevice = rareDevice; - return this; - } - - /** - * `true` if the device is considered rare based on its combination of hardware and software attributes. A device is classified as rare if it falls within the top 99.9 percentile (lowest-frequency segment) of observed traffic, or if its configuration has not been previously seen (`not_seen`). > This Smart Signal is currently in beta and only available to select customers. If you are interested, please [contact our support team](https://fingerprint.com/support/). - * @return rareDevice - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_RARE_DEVICE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getRareDevice() { - return rareDevice; - } - - @JsonProperty(value = JSON_PROPERTY_RARE_DEVICE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRareDevice(@jakarta.annotation.Nullable Boolean rareDevice) { - this.rareDevice = rareDevice; - } - - public Event rareDevicePercentileBucket( - @jakarta.annotation.Nullable RareDevicePercentileBucket rareDevicePercentileBucket) { - this.rareDevicePercentileBucket = rareDevicePercentileBucket; - return this; - } - - /** - * Get rareDevicePercentileBucket - * @return rareDevicePercentileBucket - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_RARE_DEVICE_PERCENTILE_BUCKET, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RareDevicePercentileBucket getRareDevicePercentileBucket() { - return rareDevicePercentileBucket; - } - - @JsonProperty(value = JSON_PROPERTY_RARE_DEVICE_PERCENTILE_BUCKET, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRareDevicePercentileBucket( - @jakarta.annotation.Nullable RareDevicePercentileBucket rareDevicePercentileBucket) { - this.rareDevicePercentileBucket = rareDevicePercentileBucket; - } - - public Event rawDeviceAttributes( - @jakarta.annotation.Nullable RawDeviceAttributes rawDeviceAttributes) { - this.rawDeviceAttributes = rawDeviceAttributes; - return this; - } - - /** - * Get rawDeviceAttributes - * @return rawDeviceAttributes - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_RAW_DEVICE_ATTRIBUTES, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RawDeviceAttributes getRawDeviceAttributes() { - return rawDeviceAttributes; - } - - @JsonProperty(value = JSON_PROPERTY_RAW_DEVICE_ATTRIBUTES, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRawDeviceAttributes( - @jakarta.annotation.Nullable RawDeviceAttributes rawDeviceAttributes) { - this.rawDeviceAttributes = rawDeviceAttributes; - } - - public Event labels(@jakarta.annotation.Nullable List labels) { - this.labels = labels; - return this; - } - - public Event addLabelsItem(LabelsInner labelsItem) { - if (this.labels == null) { - this.labels = new ArrayList<>(); - } - this.labels.add(labelsItem); - return this; - } - - /** - * Each label returns a prediction (true or false) for a specific use case (label field) based on a machine learning score. The machine learning score is determined by a model trained on customer data for that use case. This field is in the beta phase and only available to select customers. If you are interested, please [contact our support team](https://fingerprint.com/support/). - * @return labels - */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_LABELS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getLabels() { - return labels; - } - - @JsonProperty(value = JSON_PROPERTY_LABELS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLabels(@jakarta.annotation.Nullable List labels) { - this.labels = labels; - } - - /** - * Return true if this Event object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Event event = (Event) o; - return Objects.equals(this.eventId, event.eventId) - && Objects.equals(this.timestamp, event.timestamp) - && Objects.equals(this.source, event.source) - && Objects.equals( - this.incrementalIdentificationStatus, event.incrementalIdentificationStatus) - && Objects.equals(this.linkedId, event.linkedId) - && Objects.equals(this.environmentId, event.environmentId) - && Objects.equals(this.suspect, event.suspect) - && Objects.equals(this.sdk, event.sdk) - && Objects.equals(this.replayed, event.replayed) - && Objects.equals(this.identification, event.identification) - && Objects.equals(this.supplementaryIdHighRecall, event.supplementaryIdHighRecall) - && Objects.equals(this.tags, event.tags) - && Objects.equals(this.url, event.url) - && Objects.equals(this.bundleId, event.bundleId) - && Objects.equals(this.packageName, event.packageName) - && Objects.equals(this.ipAddress, event.ipAddress) - && Objects.equals(this.userAgent, event.userAgent) - && Objects.equals(this.device, event.device) - && Objects.equals(this.os, event.os) - && Objects.equals(this.osVersion, event.osVersion) - && Objects.equals(this.clientReferrer, event.clientReferrer) - && Objects.equals(this.browserDetails, event.browserDetails) - && Objects.equals(this.proximity, event.proximity) - && Objects.equals(this.activeCall, event.activeCall) - && Objects.equals(this.bot, event.bot) - && Objects.equals(this.botType, event.botType) - && Objects.equals(this.botInfo, event.botInfo) - && Objects.equals(this.clonedApp, event.clonedApp) - && Objects.equals(this.developerTools, event.developerTools) - && Objects.equals(this.emulator, event.emulator) - && Objects.equals(this.factoryResetTimestamp, event.factoryResetTimestamp) - && Objects.equals(this.frida, event.frida) - && Objects.equals(this.ipBlocklist, event.ipBlocklist) - && Objects.equals(this.ipInfo, event.ipInfo) - && Objects.equals(this.proxy, event.proxy) - && Objects.equals(this.proxyConfidence, event.proxyConfidence) - && Objects.equals(this.proxyDetails, event.proxyDetails) - && Objects.equals(this.proxyMlScore, event.proxyMlScore) - && Objects.equals(this.incognito, event.incognito) - && Objects.equals(this.jailbroken, event.jailbroken) - && Objects.equals(this.locationSpoofing, event.locationSpoofing) - && Objects.equals(this.mitmAttack, event.mitmAttack) - && Objects.equals(this.privacySettings, event.privacySettings) - && Objects.equals(this.rootApps, event.rootApps) - && Objects.equals(this.ruleAction, event.ruleAction) - && Objects.equals(this.simulator, event.simulator) - && Objects.equals(this.suspectScore, event.suspectScore) - && Objects.equals(this.tampering, event.tampering) - && Objects.equals(this.tamperingConfidence, event.tamperingConfidence) - && Objects.equals(this.tamperingMlScore, event.tamperingMlScore) - && Objects.equals(this.tamperingDetails, event.tamperingDetails) - && Objects.equals(this.velocity, event.velocity) - && Objects.equals(this.virtualMachine, event.virtualMachine) - && Objects.equals(this.virtualMachineMlScore, event.virtualMachineMlScore) - && Objects.equals(this.vpn, event.vpn) - && Objects.equals(this.vpnConfidence, event.vpnConfidence) - && Objects.equals(this.vpnMlScore, event.vpnMlScore) - && Objects.equals(this.vpnOriginTimezone, event.vpnOriginTimezone) - && Objects.equals(this.vpnOriginCountry, event.vpnOriginCountry) - && Objects.equals(this.vpnMethods, event.vpnMethods) - && Objects.equals(this.highActivityDevice, event.highActivityDevice) - && Objects.equals(this.rareDevice, event.rareDevice) - && Objects.equals(this.rareDevicePercentileBucket, event.rareDevicePercentileBucket) - && Objects.equals(this.rawDeviceAttributes, event.rawDeviceAttributes) - && Objects.equals(this.labels, event.labels); - } - - @Override - public int hashCode() { - return Objects.hash( - eventId, - timestamp, - source, - incrementalIdentificationStatus, - linkedId, - environmentId, - suspect, - sdk, - replayed, - identification, - supplementaryIdHighRecall, - tags, - url, - bundleId, - packageName, - ipAddress, - userAgent, - device, - os, - osVersion, - clientReferrer, - browserDetails, - proximity, - activeCall, - bot, - botType, - botInfo, - clonedApp, - developerTools, - emulator, - factoryResetTimestamp, - frida, - ipBlocklist, - ipInfo, - proxy, - proxyConfidence, - proxyDetails, - proxyMlScore, - incognito, - jailbroken, - locationSpoofing, - mitmAttack, - privacySettings, - rootApps, - ruleAction, - simulator, - suspectScore, - tampering, - tamperingConfidence, - tamperingMlScore, - tamperingDetails, - velocity, - virtualMachine, - virtualMachineMlScore, - vpn, - vpnConfidence, - vpnMlScore, - vpnOriginTimezone, - vpnOriginCountry, - vpnMethods, - highActivityDevice, - rareDevice, - rareDevicePercentileBucket, - rawDeviceAttributes, - labels); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Event {\n"); - sb.append(" eventId: ").append(toIndentedString(eventId)).append("\n"); - sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n"); - sb.append(" source: ").append(toIndentedString(source)).append("\n"); - sb.append(" incrementalIdentificationStatus: ") - .append(toIndentedString(incrementalIdentificationStatus)) - .append("\n"); - sb.append(" linkedId: ").append(toIndentedString(linkedId)).append("\n"); - sb.append(" environmentId: ").append(toIndentedString(environmentId)).append("\n"); - sb.append(" suspect: ").append(toIndentedString(suspect)).append("\n"); - sb.append(" sdk: ").append(toIndentedString(sdk)).append("\n"); - sb.append(" replayed: ").append(toIndentedString(replayed)).append("\n"); - sb.append(" identification: ").append(toIndentedString(identification)).append("\n"); - sb.append(" supplementaryIdHighRecall: ") - .append(toIndentedString(supplementaryIdHighRecall)) - .append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" url: ").append(toIndentedString(url)).append("\n"); - sb.append(" bundleId: ").append(toIndentedString(bundleId)).append("\n"); - sb.append(" packageName: ").append(toIndentedString(packageName)).append("\n"); - sb.append(" ipAddress: ").append(toIndentedString(ipAddress)).append("\n"); - sb.append(" userAgent: ").append(toIndentedString(userAgent)).append("\n"); - sb.append(" device: ").append(toIndentedString(device)).append("\n"); - sb.append(" os: ").append(toIndentedString(os)).append("\n"); - sb.append(" osVersion: ").append(toIndentedString(osVersion)).append("\n"); - sb.append(" clientReferrer: ").append(toIndentedString(clientReferrer)).append("\n"); - sb.append(" browserDetails: ").append(toIndentedString(browserDetails)).append("\n"); - sb.append(" proximity: ").append(toIndentedString(proximity)).append("\n"); - sb.append(" activeCall: ").append(toIndentedString(activeCall)).append("\n"); - sb.append(" bot: ").append(toIndentedString(bot)).append("\n"); - sb.append(" botType: ").append(toIndentedString(botType)).append("\n"); - sb.append(" botInfo: ").append(toIndentedString(botInfo)).append("\n"); - sb.append(" clonedApp: ").append(toIndentedString(clonedApp)).append("\n"); - sb.append(" developerTools: ").append(toIndentedString(developerTools)).append("\n"); - sb.append(" emulator: ").append(toIndentedString(emulator)).append("\n"); - sb.append(" factoryResetTimestamp: ") - .append(toIndentedString(factoryResetTimestamp)) - .append("\n"); - sb.append(" frida: ").append(toIndentedString(frida)).append("\n"); - sb.append(" ipBlocklist: ").append(toIndentedString(ipBlocklist)).append("\n"); - sb.append(" ipInfo: ").append(toIndentedString(ipInfo)).append("\n"); - sb.append(" proxy: ").append(toIndentedString(proxy)).append("\n"); - sb.append(" proxyConfidence: ").append(toIndentedString(proxyConfidence)).append("\n"); - sb.append(" proxyDetails: ").append(toIndentedString(proxyDetails)).append("\n"); - sb.append(" proxyMlScore: ").append(toIndentedString(proxyMlScore)).append("\n"); - sb.append(" incognito: ").append(toIndentedString(incognito)).append("\n"); - sb.append(" jailbroken: ").append(toIndentedString(jailbroken)).append("\n"); - sb.append(" locationSpoofing: ").append(toIndentedString(locationSpoofing)).append("\n"); - sb.append(" mitmAttack: ").append(toIndentedString(mitmAttack)).append("\n"); - sb.append(" privacySettings: ").append(toIndentedString(privacySettings)).append("\n"); - sb.append(" rootApps: ").append(toIndentedString(rootApps)).append("\n"); - sb.append(" ruleAction: ").append(toIndentedString(ruleAction)).append("\n"); - sb.append(" simulator: ").append(toIndentedString(simulator)).append("\n"); - sb.append(" suspectScore: ").append(toIndentedString(suspectScore)).append("\n"); - sb.append(" tampering: ").append(toIndentedString(tampering)).append("\n"); - sb.append(" tamperingConfidence: ") - .append(toIndentedString(tamperingConfidence)) - .append("\n"); - sb.append(" tamperingMlScore: ").append(toIndentedString(tamperingMlScore)).append("\n"); - sb.append(" tamperingDetails: ").append(toIndentedString(tamperingDetails)).append("\n"); - sb.append(" velocity: ").append(toIndentedString(velocity)).append("\n"); - sb.append(" virtualMachine: ").append(toIndentedString(virtualMachine)).append("\n"); - sb.append(" virtualMachineMlScore: ") - .append(toIndentedString(virtualMachineMlScore)) - .append("\n"); - sb.append(" vpn: ").append(toIndentedString(vpn)).append("\n"); - sb.append(" vpnConfidence: ").append(toIndentedString(vpnConfidence)).append("\n"); - sb.append(" vpnMlScore: ").append(toIndentedString(vpnMlScore)).append("\n"); - sb.append(" vpnOriginTimezone: ").append(toIndentedString(vpnOriginTimezone)).append("\n"); - sb.append(" vpnOriginCountry: ").append(toIndentedString(vpnOriginCountry)).append("\n"); - sb.append(" vpnMethods: ").append(toIndentedString(vpnMethods)).append("\n"); - sb.append(" highActivityDevice: ").append(toIndentedString(highActivityDevice)).append("\n"); - sb.append(" rareDevice: ").append(toIndentedString(rareDevice)).append("\n"); - sb.append(" rareDevicePercentileBucket: ") - .append(toIndentedString(rareDevicePercentileBucket)) - .append("\n"); - sb.append(" rawDeviceAttributes: ") - .append(toIndentedString(rawDeviceAttributes)) - .append("\n"); - sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + @JsonProperty(value = JSON_PROPERTY_SOURCE, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSource(@jakarta.annotation.Nonnull EventSource source) { + this.source = source; } - return o.toString().replace("\n", "\n "); } } diff --git a/sdk/src/main/java/com/fingerprint/v4/model/EventDevice.java b/sdk/src/main/java/com/fingerprint/v4/model/EventDevice.java new file mode 100644 index 0000000..1a9b22a --- /dev/null +++ b/sdk/src/main/java/com/fingerprint/v4/model/EventDevice.java @@ -0,0 +1,2016 @@ +/* + * Server API + * Fingerprint Server API allows you to get, search, and update 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. The API also supports collection of Automation Intelligence for requests to your server in edge, pre-origin, or middleware contexts. + * + * The version of the OpenAPI document: 4 + * Contact: support@fingerprint.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fingerprint.v4.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * Contains results from Fingerprint Identification and Smart Signals derived from client-side device telemetry. Consult the [Smart Signals reference](https://docs.fingerprint.com/docs/smart-signals-reference) for more details. + */ +@JsonPropertyOrder({ + EventDevice.JSON_PROPERTY_EVENT_ID, + EventDevice.JSON_PROPERTY_TIMESTAMP, + EventDevice.JSON_PROPERTY_LINKED_ID, + EventDevice.JSON_PROPERTY_TAGS, + EventDevice.JSON_PROPERTY_URL, + EventDevice.JSON_PROPERTY_BOT_INFO, + EventDevice.JSON_PROPERTY_IP_INFO, + EventDevice.JSON_PROPERTY_PROXY, + EventDevice.JSON_PROPERTY_PROXY_CONFIDENCE, + EventDevice.JSON_PROPERTY_PROXY_DETAILS, + EventDevice.JSON_PROPERTY_VPN, + EventDevice.JSON_PROPERTY_VPN_CONFIDENCE, + EventDevice.JSON_PROPERTY_VPN_METHODS, + EventDevice.JSON_PROPERTY_SOURCE, + EventDevice.JSON_PROPERTY_INCREMENTAL_IDENTIFICATION_STATUS, + EventDevice.JSON_PROPERTY_ENVIRONMENT_ID, + EventDevice.JSON_PROPERTY_SUSPECT, + EventDevice.JSON_PROPERTY_SDK, + EventDevice.JSON_PROPERTY_REPLAYED, + EventDevice.JSON_PROPERTY_IDENTIFICATION, + EventDevice.JSON_PROPERTY_SUPPLEMENTARY_ID_HIGH_RECALL, + EventDevice.JSON_PROPERTY_BUNDLE_ID, + EventDevice.JSON_PROPERTY_PACKAGE_NAME, + EventDevice.JSON_PROPERTY_IP_ADDRESS, + EventDevice.JSON_PROPERTY_USER_AGENT, + EventDevice.JSON_PROPERTY_DEVICE, + EventDevice.JSON_PROPERTY_OS, + EventDevice.JSON_PROPERTY_OS_VERSION, + EventDevice.JSON_PROPERTY_CLIENT_REFERRER, + EventDevice.JSON_PROPERTY_BROWSER_DETAILS, + EventDevice.JSON_PROPERTY_PROXIMITY, + EventDevice.JSON_PROPERTY_ACTIVE_CALL, + EventDevice.JSON_PROPERTY_BOT, + EventDevice.JSON_PROPERTY_BOT_TYPE, + EventDevice.JSON_PROPERTY_CLONED_APP, + EventDevice.JSON_PROPERTY_DEVELOPER_TOOLS, + EventDevice.JSON_PROPERTY_EMULATOR, + EventDevice.JSON_PROPERTY_FACTORY_RESET_TIMESTAMP, + EventDevice.JSON_PROPERTY_FRIDA, + EventDevice.JSON_PROPERTY_IP_BLOCKLIST, + EventDevice.JSON_PROPERTY_PROXY_ML_SCORE, + EventDevice.JSON_PROPERTY_INCOGNITO, + EventDevice.JSON_PROPERTY_JAILBROKEN, + EventDevice.JSON_PROPERTY_LOCATION_SPOOFING, + EventDevice.JSON_PROPERTY_MITM_ATTACK, + EventDevice.JSON_PROPERTY_PRIVACY_SETTINGS, + EventDevice.JSON_PROPERTY_ROOT_APPS, + EventDevice.JSON_PROPERTY_RULE_ACTION, + EventDevice.JSON_PROPERTY_SIMULATOR, + EventDevice.JSON_PROPERTY_SUSPECT_SCORE, + EventDevice.JSON_PROPERTY_TAMPERING, + EventDevice.JSON_PROPERTY_TAMPERING_CONFIDENCE, + EventDevice.JSON_PROPERTY_TAMPERING_ML_SCORE, + EventDevice.JSON_PROPERTY_TAMPERING_DETAILS, + EventDevice.JSON_PROPERTY_VELOCITY, + EventDevice.JSON_PROPERTY_VIRTUAL_MACHINE, + EventDevice.JSON_PROPERTY_VIRTUAL_MACHINE_ML_SCORE, + EventDevice.JSON_PROPERTY_VPN_ML_SCORE, + EventDevice.JSON_PROPERTY_VPN_ORIGIN_TIMEZONE, + EventDevice.JSON_PROPERTY_VPN_ORIGIN_COUNTRY, + EventDevice.JSON_PROPERTY_HIGH_ACTIVITY_DEVICE, + EventDevice.JSON_PROPERTY_RARE_DEVICE, + EventDevice.JSON_PROPERTY_RARE_DEVICE_PERCENTILE_BUCKET, + EventDevice.JSON_PROPERTY_RAW_DEVICE_ATTRIBUTES, + EventDevice.JSON_PROPERTY_LABELS +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.24.0") +public class EventDevice implements Event { + public static final String JSON_PROPERTY_EVENT_ID = "event_id"; + @jakarta.annotation.Nonnull private String eventId; + + public static final String JSON_PROPERTY_TIMESTAMP = "timestamp"; + @jakarta.annotation.Nonnull private Long timestamp; + + public static final String JSON_PROPERTY_LINKED_ID = "linked_id"; + @jakarta.annotation.Nullable private String linkedId; + + public static final String JSON_PROPERTY_TAGS = "tags"; + @jakarta.annotation.Nullable private Map tags = new HashMap<>(); + + public static final String JSON_PROPERTY_URL = "url"; + @jakarta.annotation.Nullable private String url; + + public static final String JSON_PROPERTY_BOT_INFO = "bot_info"; + @jakarta.annotation.Nullable private BotInfo botInfo; + + public static final String JSON_PROPERTY_IP_INFO = "ip_info"; + @jakarta.annotation.Nullable private IPInfo ipInfo; + + public static final String JSON_PROPERTY_PROXY = "proxy"; + @jakarta.annotation.Nullable private Boolean proxy; + + public static final String JSON_PROPERTY_PROXY_CONFIDENCE = "proxy_confidence"; + @jakarta.annotation.Nullable private ProxyConfidence proxyConfidence; + + public static final String JSON_PROPERTY_PROXY_DETAILS = "proxy_details"; + @jakarta.annotation.Nullable private ProxyDetails proxyDetails; + + public static final String JSON_PROPERTY_VPN = "vpn"; + @jakarta.annotation.Nullable private Boolean vpn; + + public static final String JSON_PROPERTY_VPN_CONFIDENCE = "vpn_confidence"; + @jakarta.annotation.Nullable private VpnConfidence vpnConfidence; + + public static final String JSON_PROPERTY_VPN_METHODS = "vpn_methods"; + @jakarta.annotation.Nullable private VpnMethods vpnMethods; + + public static final String JSON_PROPERTY_SOURCE = "source"; + @jakarta.annotation.Nonnull private EventSource source; + + public static final String JSON_PROPERTY_INCREMENTAL_IDENTIFICATION_STATUS = + "incremental_identification_status"; + + @jakarta.annotation.Nullable + private IncrementalIdentificationStatus incrementalIdentificationStatus; + + public static final String JSON_PROPERTY_ENVIRONMENT_ID = "environment_id"; + @jakarta.annotation.Nullable private String environmentId; + + public static final String JSON_PROPERTY_SUSPECT = "suspect"; + @jakarta.annotation.Nullable private Boolean suspect; + + public static final String JSON_PROPERTY_SDK = "sdk"; + @jakarta.annotation.Nullable private SDK sdk; + + public static final String JSON_PROPERTY_REPLAYED = "replayed"; + @jakarta.annotation.Nullable private Boolean replayed; + + public static final String JSON_PROPERTY_IDENTIFICATION = "identification"; + @jakarta.annotation.Nullable private Identification identification; + + public static final String JSON_PROPERTY_SUPPLEMENTARY_ID_HIGH_RECALL = + "supplementary_id_high_recall"; + @jakarta.annotation.Nullable private SupplementaryIDHighRecall supplementaryIdHighRecall; + + public static final String JSON_PROPERTY_BUNDLE_ID = "bundle_id"; + @jakarta.annotation.Nullable private String bundleId; + + public static final String JSON_PROPERTY_PACKAGE_NAME = "package_name"; + @jakarta.annotation.Nullable private String packageName; + + public static final String JSON_PROPERTY_IP_ADDRESS = "ip_address"; + @jakarta.annotation.Nullable private String ipAddress; + + public static final String JSON_PROPERTY_USER_AGENT = "user_agent"; + @jakarta.annotation.Nullable private String userAgent; + + public static final String JSON_PROPERTY_DEVICE = "device"; + @jakarta.annotation.Nullable private String device; + + public static final String JSON_PROPERTY_OS = "os"; + @jakarta.annotation.Nullable private String os; + + public static final String JSON_PROPERTY_OS_VERSION = "os_version"; + @jakarta.annotation.Nullable private String osVersion; + + public static final String JSON_PROPERTY_CLIENT_REFERRER = "client_referrer"; + @jakarta.annotation.Nullable private String clientReferrer; + + public static final String JSON_PROPERTY_BROWSER_DETAILS = "browser_details"; + @jakarta.annotation.Nullable private BrowserDetails browserDetails; + + public static final String JSON_PROPERTY_PROXIMITY = "proximity"; + @jakarta.annotation.Nullable private Proximity proximity; + + public static final String JSON_PROPERTY_ACTIVE_CALL = "active_call"; + @jakarta.annotation.Nullable private Boolean activeCall; + + public static final String JSON_PROPERTY_BOT = "bot"; + @jakarta.annotation.Nullable private BotResult bot; + + public static final String JSON_PROPERTY_BOT_TYPE = "bot_type"; + @jakarta.annotation.Nullable private String botType; + + public static final String JSON_PROPERTY_CLONED_APP = "cloned_app"; + @jakarta.annotation.Nullable private Boolean clonedApp; + + public static final String JSON_PROPERTY_DEVELOPER_TOOLS = "developer_tools"; + @jakarta.annotation.Nullable private Boolean developerTools; + + public static final String JSON_PROPERTY_EMULATOR = "emulator"; + @jakarta.annotation.Nullable private Boolean emulator; + + public static final String JSON_PROPERTY_FACTORY_RESET_TIMESTAMP = "factory_reset_timestamp"; + @jakarta.annotation.Nullable private Long factoryResetTimestamp; + + public static final String JSON_PROPERTY_FRIDA = "frida"; + @jakarta.annotation.Nullable private Boolean frida; + + public static final String JSON_PROPERTY_IP_BLOCKLIST = "ip_blocklist"; + @jakarta.annotation.Nullable private IPBlockList ipBlocklist; + + public static final String JSON_PROPERTY_PROXY_ML_SCORE = "proxy_ml_score"; + @jakarta.annotation.Nullable private Double proxyMlScore; + + public static final String JSON_PROPERTY_INCOGNITO = "incognito"; + @jakarta.annotation.Nullable private Boolean incognito; + + public static final String JSON_PROPERTY_JAILBROKEN = "jailbroken"; + @jakarta.annotation.Nullable private Boolean jailbroken; + + public static final String JSON_PROPERTY_LOCATION_SPOOFING = "location_spoofing"; + @jakarta.annotation.Nullable private Boolean locationSpoofing; + + public static final String JSON_PROPERTY_MITM_ATTACK = "mitm_attack"; + @jakarta.annotation.Nullable private Boolean mitmAttack; + + public static final String JSON_PROPERTY_PRIVACY_SETTINGS = "privacy_settings"; + @jakarta.annotation.Nullable private Boolean privacySettings; + + public static final String JSON_PROPERTY_ROOT_APPS = "root_apps"; + @jakarta.annotation.Nullable private Boolean rootApps; + + public static final String JSON_PROPERTY_RULE_ACTION = "rule_action"; + @jakarta.annotation.Nullable private EventRuleAction ruleAction; + + public static final String JSON_PROPERTY_SIMULATOR = "simulator"; + @jakarta.annotation.Nullable private Boolean simulator; + + public static final String JSON_PROPERTY_SUSPECT_SCORE = "suspect_score"; + @jakarta.annotation.Nullable private Integer suspectScore; + + public static final String JSON_PROPERTY_TAMPERING = "tampering"; + @jakarta.annotation.Nullable private Boolean tampering; + + public static final String JSON_PROPERTY_TAMPERING_CONFIDENCE = "tampering_confidence"; + @jakarta.annotation.Nullable private TamperingConfidence tamperingConfidence; + + public static final String JSON_PROPERTY_TAMPERING_ML_SCORE = "tampering_ml_score"; + @jakarta.annotation.Nullable private Double tamperingMlScore; + + public static final String JSON_PROPERTY_TAMPERING_DETAILS = "tampering_details"; + @jakarta.annotation.Nullable private TamperingDetails tamperingDetails; + + public static final String JSON_PROPERTY_VELOCITY = "velocity"; + @jakarta.annotation.Nullable private Velocity velocity; + + public static final String JSON_PROPERTY_VIRTUAL_MACHINE = "virtual_machine"; + @jakarta.annotation.Nullable private Boolean virtualMachine; + + public static final String JSON_PROPERTY_VIRTUAL_MACHINE_ML_SCORE = "virtual_machine_ml_score"; + @jakarta.annotation.Nullable private Double virtualMachineMlScore; + + public static final String JSON_PROPERTY_VPN_ML_SCORE = "vpn_ml_score"; + @jakarta.annotation.Nullable private Double vpnMlScore; + + public static final String JSON_PROPERTY_VPN_ORIGIN_TIMEZONE = "vpn_origin_timezone"; + @jakarta.annotation.Nullable private String vpnOriginTimezone; + + public static final String JSON_PROPERTY_VPN_ORIGIN_COUNTRY = "vpn_origin_country"; + @jakarta.annotation.Nullable private String vpnOriginCountry; + + public static final String JSON_PROPERTY_HIGH_ACTIVITY_DEVICE = "high_activity_device"; + @jakarta.annotation.Nullable private Boolean highActivityDevice; + + public static final String JSON_PROPERTY_RARE_DEVICE = "rare_device"; + @jakarta.annotation.Nullable private Boolean rareDevice; + + public static final String JSON_PROPERTY_RARE_DEVICE_PERCENTILE_BUCKET = + "rare_device_percentile_bucket"; + @jakarta.annotation.Nullable private RareDevicePercentileBucket rareDevicePercentileBucket; + + public static final String JSON_PROPERTY_RAW_DEVICE_ATTRIBUTES = "raw_device_attributes"; + @jakarta.annotation.Nullable private RawDeviceAttributes rawDeviceAttributes; + + public static final String JSON_PROPERTY_LABELS = "labels"; + @jakarta.annotation.Nullable private List labels = new ArrayList<>(); + + public EventDevice() {} + + public EventDevice eventId(@jakarta.annotation.Nonnull String eventId) { + this.eventId = eventId; + return this; + } + + /** + * Unique identifier of the user's request. The first portion of the event_id is a unix epoch milliseconds timestamp. + * @return eventId + */ + @jakarta.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_EVENT_ID, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getEventId() { + return eventId; + } + + @JsonProperty(value = JSON_PROPERTY_EVENT_ID, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEventId(@jakarta.annotation.Nonnull String eventId) { + this.eventId = eventId; + } + + public EventDevice timestamp(@jakarta.annotation.Nonnull Long timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * Timestamp of the event with millisecond precision in Unix time. + * @return timestamp + */ + @jakarta.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TIMESTAMP, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getTimestamp() { + return timestamp; + } + + @JsonProperty(value = JSON_PROPERTY_TIMESTAMP, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTimestamp(@jakarta.annotation.Nonnull Long timestamp) { + this.timestamp = timestamp; + } + + public EventDevice linkedId(@jakarta.annotation.Nullable String linkedId) { + this.linkedId = linkedId; + return this; + } + + /** + * A customer-provided id that was sent with the request. + * @return linkedId + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_LINKED_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLinkedId() { + return linkedId; + } + + @JsonProperty(value = JSON_PROPERTY_LINKED_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLinkedId(@jakarta.annotation.Nullable String linkedId) { + this.linkedId = linkedId; + } + + public EventDevice tags(@jakarta.annotation.Nullable Map tags) { + this.tags = tags; + return this; + } + + public EventDevice putTagsItem(String key, Object tagsItem) { + if (this.tags == null) { + this.tags = new HashMap<>(); + } + this.tags.put(key, tagsItem); + return this; + } + + /** + * A customer-provided value or an object that was sent with the identification request or updated later. + * @return tags + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_TAGS, required = false) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getTags() { + return tags; + } + + @JsonProperty(value = JSON_PROPERTY_TAGS, required = false) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(@jakarta.annotation.Nullable Map tags) { + this.tags = tags; + } + + public EventDevice url(@jakarta.annotation.Nullable String url) { + this.url = url; + return this; + } + + /** + * Page URL from which the request was sent. + * @return url + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_URL, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getUrl() { + return url; + } + + @JsonProperty(value = JSON_PROPERTY_URL, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUrl(@jakarta.annotation.Nullable String url) { + this.url = url; + } + + public EventDevice botInfo(@jakarta.annotation.Nullable BotInfo botInfo) { + this.botInfo = botInfo; + return this; + } + + /** + * Get botInfo + * @return botInfo + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_BOT_INFO, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BotInfo getBotInfo() { + return botInfo; + } + + @JsonProperty(value = JSON_PROPERTY_BOT_INFO, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBotInfo(@jakarta.annotation.Nullable BotInfo botInfo) { + this.botInfo = botInfo; + } + + public EventDevice ipInfo(@jakarta.annotation.Nullable IPInfo ipInfo) { + this.ipInfo = ipInfo; + return this; + } + + /** + * Get ipInfo + * @return ipInfo + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_IP_INFO, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IPInfo getIpInfo() { + return ipInfo; + } + + @JsonProperty(value = JSON_PROPERTY_IP_INFO, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIpInfo(@jakarta.annotation.Nullable IPInfo ipInfo) { + this.ipInfo = ipInfo; + } + + public EventDevice proxy(@jakarta.annotation.Nullable Boolean proxy) { + this.proxy = proxy; + return this; + } + + /** + * IP address was used by a public proxy provider or belonged to a known recent residential proxy + * @return proxy + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_PROXY, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getProxy() { + return proxy; + } + + @JsonProperty(value = JSON_PROPERTY_PROXY, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setProxy(@jakarta.annotation.Nullable Boolean proxy) { + this.proxy = proxy; + } + + public EventDevice proxyConfidence(@jakarta.annotation.Nullable ProxyConfidence proxyConfidence) { + this.proxyConfidence = proxyConfidence; + return this; + } + + /** + * Get proxyConfidence + * @return proxyConfidence + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_PROXY_CONFIDENCE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ProxyConfidence getProxyConfidence() { + return proxyConfidence; + } + + @JsonProperty(value = JSON_PROPERTY_PROXY_CONFIDENCE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setProxyConfidence(@jakarta.annotation.Nullable ProxyConfidence proxyConfidence) { + this.proxyConfidence = proxyConfidence; + } + + public EventDevice proxyDetails(@jakarta.annotation.Nullable ProxyDetails proxyDetails) { + this.proxyDetails = proxyDetails; + return this; + } + + /** + * Get proxyDetails + * @return proxyDetails + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_PROXY_DETAILS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ProxyDetails getProxyDetails() { + return proxyDetails; + } + + @JsonProperty(value = JSON_PROPERTY_PROXY_DETAILS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setProxyDetails(@jakarta.annotation.Nullable ProxyDetails proxyDetails) { + this.proxyDetails = proxyDetails; + } + + public EventDevice vpn(@jakarta.annotation.Nullable Boolean vpn) { + this.vpn = vpn; + return this; + } + + /** + * VPN or other anonymizing service has been used when sending the request. + * @return vpn + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_VPN, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getVpn() { + return vpn; + } + + @JsonProperty(value = JSON_PROPERTY_VPN, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVpn(@jakarta.annotation.Nullable Boolean vpn) { + this.vpn = vpn; + } + + public EventDevice vpnConfidence(@jakarta.annotation.Nullable VpnConfidence vpnConfidence) { + this.vpnConfidence = vpnConfidence; + return this; + } + + /** + * Get vpnConfidence + * @return vpnConfidence + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_VPN_CONFIDENCE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public VpnConfidence getVpnConfidence() { + return vpnConfidence; + } + + @JsonProperty(value = JSON_PROPERTY_VPN_CONFIDENCE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVpnConfidence(@jakarta.annotation.Nullable VpnConfidence vpnConfidence) { + this.vpnConfidence = vpnConfidence; + } + + public EventDevice vpnMethods(@jakarta.annotation.Nullable VpnMethods vpnMethods) { + this.vpnMethods = vpnMethods; + return this; + } + + /** + * Get vpnMethods + * @return vpnMethods + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_VPN_METHODS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public VpnMethods getVpnMethods() { + return vpnMethods; + } + + @JsonProperty(value = JSON_PROPERTY_VPN_METHODS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVpnMethods(@jakarta.annotation.Nullable VpnMethods vpnMethods) { + this.vpnMethods = vpnMethods; + } + + public EventDevice source(@jakarta.annotation.Nonnull EventSource source) { + this.source = source; + return this; + } + + /** + * Get source + * @return source + */ + @jakarta.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_SOURCE, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EventSource getSource() { + return source; + } + + @JsonProperty(value = JSON_PROPERTY_SOURCE, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSource(@jakarta.annotation.Nonnull EventSource source) { + this.source = source; + } + + public EventDevice incrementalIdentificationStatus( + @jakarta.annotation.Nullable + IncrementalIdentificationStatus incrementalIdentificationStatus) { + this.incrementalIdentificationStatus = incrementalIdentificationStatus; + return this; + } + + /** + * Get incrementalIdentificationStatus + * @return incrementalIdentificationStatus + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_INCREMENTAL_IDENTIFICATION_STATUS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IncrementalIdentificationStatus getIncrementalIdentificationStatus() { + return incrementalIdentificationStatus; + } + + @JsonProperty(value = JSON_PROPERTY_INCREMENTAL_IDENTIFICATION_STATUS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIncrementalIdentificationStatus( + @jakarta.annotation.Nullable + IncrementalIdentificationStatus incrementalIdentificationStatus) { + this.incrementalIdentificationStatus = incrementalIdentificationStatus; + } + + public EventDevice environmentId(@jakarta.annotation.Nullable String environmentId) { + this.environmentId = environmentId; + return this; + } + + /** + * Environment Id of the event. + * @return environmentId + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_ENVIRONMENT_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEnvironmentId() { + return environmentId; + } + + @JsonProperty(value = JSON_PROPERTY_ENVIRONMENT_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEnvironmentId(@jakarta.annotation.Nullable String environmentId) { + this.environmentId = environmentId; + } + + public EventDevice suspect(@jakarta.annotation.Nullable Boolean suspect) { + this.suspect = suspect; + return this; + } + + /** + * Field is `true` if you have previously set the `suspect` flag for this event using the [Server API Update event endpoint](https://docs.fingerprint.com/reference/server-api-update-event). + * @return suspect + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_SUSPECT, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getSuspect() { + return suspect; + } + + @JsonProperty(value = JSON_PROPERTY_SUSPECT, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSuspect(@jakarta.annotation.Nullable Boolean suspect) { + this.suspect = suspect; + } + + public EventDevice sdk(@jakarta.annotation.Nullable SDK sdk) { + this.sdk = sdk; + return this; + } + + /** + * Get sdk + * @return sdk + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_SDK, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SDK getSdk() { + return sdk; + } + + @JsonProperty(value = JSON_PROPERTY_SDK, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSdk(@jakarta.annotation.Nullable SDK sdk) { + this.sdk = sdk; + } + + public EventDevice replayed(@jakarta.annotation.Nullable Boolean replayed) { + this.replayed = replayed; + return this; + } + + /** + * `true` if we determined that this payload was replayed, `false` otherwise. + * @return replayed + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_REPLAYED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getReplayed() { + return replayed; + } + + @JsonProperty(value = JSON_PROPERTY_REPLAYED, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReplayed(@jakarta.annotation.Nullable Boolean replayed) { + this.replayed = replayed; + } + + public EventDevice identification(@jakarta.annotation.Nullable Identification identification) { + this.identification = identification; + return this; + } + + /** + * Get identification + * @return identification + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_IDENTIFICATION, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Identification getIdentification() { + return identification; + } + + @JsonProperty(value = JSON_PROPERTY_IDENTIFICATION, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIdentification(@jakarta.annotation.Nullable Identification identification) { + this.identification = identification; + } + + public EventDevice supplementaryIdHighRecall( + @jakarta.annotation.Nullable SupplementaryIDHighRecall supplementaryIdHighRecall) { + this.supplementaryIdHighRecall = supplementaryIdHighRecall; + return this; + } + + /** + * Get supplementaryIdHighRecall + * @return supplementaryIdHighRecall + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_SUPPLEMENTARY_ID_HIGH_RECALL, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SupplementaryIDHighRecall getSupplementaryIdHighRecall() { + return supplementaryIdHighRecall; + } + + @JsonProperty(value = JSON_PROPERTY_SUPPLEMENTARY_ID_HIGH_RECALL, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSupplementaryIdHighRecall( + @jakarta.annotation.Nullable SupplementaryIDHighRecall supplementaryIdHighRecall) { + this.supplementaryIdHighRecall = supplementaryIdHighRecall; + } + + public EventDevice bundleId(@jakarta.annotation.Nullable String bundleId) { + this.bundleId = bundleId; + return this; + } + + /** + * Bundle Id of the iOS application integrated with the Fingerprint SDK for the event. + * @return bundleId + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_BUNDLE_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBundleId() { + return bundleId; + } + + @JsonProperty(value = JSON_PROPERTY_BUNDLE_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBundleId(@jakarta.annotation.Nullable String bundleId) { + this.bundleId = bundleId; + } + + public EventDevice packageName(@jakarta.annotation.Nullable String packageName) { + this.packageName = packageName; + return this; + } + + /** + * Package name of the Android application integrated with the Fingerprint SDK for the event. + * @return packageName + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_PACKAGE_NAME, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPackageName() { + return packageName; + } + + @JsonProperty(value = JSON_PROPERTY_PACKAGE_NAME, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPackageName(@jakarta.annotation.Nullable String packageName) { + this.packageName = packageName; + } + + public EventDevice ipAddress(@jakarta.annotation.Nullable String ipAddress) { + this.ipAddress = ipAddress; + return this; + } + + /** + * IP address of the requesting browser or bot. + * @return ipAddress + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_IP_ADDRESS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getIpAddress() { + return ipAddress; + } + + @JsonProperty(value = JSON_PROPERTY_IP_ADDRESS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIpAddress(@jakarta.annotation.Nullable String ipAddress) { + this.ipAddress = ipAddress; + } + + public EventDevice userAgent(@jakarta.annotation.Nullable String userAgent) { + this.userAgent = userAgent; + return this; + } + + /** + * User Agent of the client. + * @return userAgent + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_USER_AGENT, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getUserAgent() { + return userAgent; + } + + @JsonProperty(value = JSON_PROPERTY_USER_AGENT, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUserAgent(@jakarta.annotation.Nullable String userAgent) { + this.userAgent = userAgent; + } + + public EventDevice device(@jakarta.annotation.Nullable String device) { + this.device = device; + return this; + } + + /** + * Device model or family extracted from the user agent string. On web, this field is also present inside `browser_details`. + * @return device + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_DEVICE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDevice() { + return device; + } + + @JsonProperty(value = JSON_PROPERTY_DEVICE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDevice(@jakarta.annotation.Nullable String device) { + this.device = device; + } + + public EventDevice os(@jakarta.annotation.Nullable String os) { + this.os = os; + return this; + } + + /** + * Operating system family extracted from the user agent string. On web, this field is also present inside `browser_details`. + * @return os + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_OS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getOs() { + return os; + } + + @JsonProperty(value = JSON_PROPERTY_OS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOs(@jakarta.annotation.Nullable String os) { + this.os = os; + } + + public EventDevice osVersion(@jakarta.annotation.Nullable String osVersion) { + this.osVersion = osVersion; + return this; + } + + /** + * Operating system version string extracted from the user agent string. On web, this field is also present inside `browser_details`. + * @return osVersion + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_OS_VERSION, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getOsVersion() { + return osVersion; + } + + @JsonProperty(value = JSON_PROPERTY_OS_VERSION, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOsVersion(@jakarta.annotation.Nullable String osVersion) { + this.osVersion = osVersion; + } + + public EventDevice clientReferrer(@jakarta.annotation.Nullable String clientReferrer) { + this.clientReferrer = clientReferrer; + return this; + } + + /** + * Client Referrer field corresponds to the `document.referrer` field gathered during an identification request. The value is an empty string if the user navigated to the page directly (not through a link, but, for example, by using a bookmark). + * @return clientReferrer + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_CLIENT_REFERRER, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getClientReferrer() { + return clientReferrer; + } + + @JsonProperty(value = JSON_PROPERTY_CLIENT_REFERRER, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setClientReferrer(@jakarta.annotation.Nullable String clientReferrer) { + this.clientReferrer = clientReferrer; + } + + public EventDevice browserDetails(@jakarta.annotation.Nullable BrowserDetails browserDetails) { + this.browserDetails = browserDetails; + return this; + } + + /** + * Get browserDetails + * @return browserDetails + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_BROWSER_DETAILS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BrowserDetails getBrowserDetails() { + return browserDetails; + } + + @JsonProperty(value = JSON_PROPERTY_BROWSER_DETAILS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBrowserDetails(@jakarta.annotation.Nullable BrowserDetails browserDetails) { + this.browserDetails = browserDetails; + } + + public EventDevice proximity(@jakarta.annotation.Nullable Proximity proximity) { + this.proximity = proximity; + return this; + } + + /** + * Get proximity + * @return proximity + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_PROXIMITY, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Proximity getProximity() { + return proximity; + } + + @JsonProperty(value = JSON_PROPERTY_PROXIMITY, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setProximity(@jakarta.annotation.Nullable Proximity proximity) { + this.proximity = proximity; + } + + public EventDevice activeCall(@jakarta.annotation.Nullable Boolean activeCall) { + this.activeCall = activeCall; + return this; + } + + /** + * Indicates whether the mobile device had an active call (cellular or VoIP) at the time of the request. Available from SDK 2.16.0+ on iOS and Android. + * @return activeCall + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_ACTIVE_CALL, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getActiveCall() { + return activeCall; + } + + @JsonProperty(value = JSON_PROPERTY_ACTIVE_CALL, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setActiveCall(@jakarta.annotation.Nullable Boolean activeCall) { + this.activeCall = activeCall; + } + + public EventDevice bot(@jakarta.annotation.Nullable BotResult bot) { + this.bot = bot; + return this; + } + + /** + * Get bot + * @return bot + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_BOT, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BotResult getBot() { + return bot; + } + + @JsonProperty(value = JSON_PROPERTY_BOT, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBot(@jakarta.annotation.Nullable BotResult bot) { + this.bot = bot; + } + + public EventDevice botType(@jakarta.annotation.Nullable String botType) { + this.botType = botType; + return this; + } + + /** + * Additional classification of the bot type if detected. + * @return botType + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_BOT_TYPE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBotType() { + return botType; + } + + @JsonProperty(value = JSON_PROPERTY_BOT_TYPE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBotType(@jakarta.annotation.Nullable String botType) { + this.botType = botType; + } + + public EventDevice clonedApp(@jakarta.annotation.Nullable Boolean clonedApp) { + this.clonedApp = clonedApp; + return this; + } + + /** + * Android specific cloned application detection. There are 2 values: * `true` - Presence of app cloners work detected (e.g. fully cloned application found or launch of it inside of a not main working profile detected). * `false` - No signs of cloned application detected or the client is not Android. + * @return clonedApp + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_CLONED_APP, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getClonedApp() { + return clonedApp; + } + + @JsonProperty(value = JSON_PROPERTY_CLONED_APP, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setClonedApp(@jakarta.annotation.Nullable Boolean clonedApp) { + this.clonedApp = clonedApp; + } + + public EventDevice developerTools(@jakarta.annotation.Nullable Boolean developerTools) { + this.developerTools = developerTools; + return this; + } + + /** + * `true` if the browser has DevTools open (Chrome, Firefox) or the Android/iOS device has Developer Tools enabled, `false` otherwise. + * @return developerTools + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_DEVELOPER_TOOLS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getDeveloperTools() { + return developerTools; + } + + @JsonProperty(value = JSON_PROPERTY_DEVELOPER_TOOLS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDeveloperTools(@jakarta.annotation.Nullable Boolean developerTools) { + this.developerTools = developerTools; + } + + public EventDevice emulator(@jakarta.annotation.Nullable Boolean emulator) { + this.emulator = emulator; + return this; + } + + /** + * Android specific emulator detection. There are 2 values: * `true` - Emulated environment detected (e.g. launch inside of AVD). * `false` - No signs of emulated environment detected or the client is not Android. + * @return emulator + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_EMULATOR, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEmulator() { + return emulator; + } + + @JsonProperty(value = JSON_PROPERTY_EMULATOR, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEmulator(@jakarta.annotation.Nullable Boolean emulator) { + this.emulator = emulator; + } + + public EventDevice factoryResetTimestamp( + @jakarta.annotation.Nullable Long factoryResetTimestamp) { + this.factoryResetTimestamp = factoryResetTimestamp; + return this; + } + + /** + * The time of the most recent factory reset that happened on the **mobile device** is expressed as Unix epoch time. When a factory reset cannot be detected on the mobile device or when the request is initiated from a browser, this field will correspond to the *epoch* time (i.e 1 Jan 1970 UTC) as a value of 0. See [Factory Reset Detection](https://docs.fingerprint.com/docs/smart-signals-reference#factory-reset-detection) to learn more about this Smart Signal. + * @return factoryResetTimestamp + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_FACTORY_RESET_TIMESTAMP, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getFactoryResetTimestamp() { + return factoryResetTimestamp; + } + + @JsonProperty(value = JSON_PROPERTY_FACTORY_RESET_TIMESTAMP, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFactoryResetTimestamp(@jakarta.annotation.Nullable Long factoryResetTimestamp) { + this.factoryResetTimestamp = factoryResetTimestamp; + } + + public EventDevice frida(@jakarta.annotation.Nullable Boolean frida) { + this.frida = frida; + return this; + } + + /** + * [Frida](https://frida.re/docs/) detection for Android and iOS devices. There are 2 values: * `true` - Frida detected * `false` - No signs of Frida or the client is not a mobile device. + * @return frida + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_FRIDA, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getFrida() { + return frida; + } + + @JsonProperty(value = JSON_PROPERTY_FRIDA, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFrida(@jakarta.annotation.Nullable Boolean frida) { + this.frida = frida; + } + + public EventDevice ipBlocklist(@jakarta.annotation.Nullable IPBlockList ipBlocklist) { + this.ipBlocklist = ipBlocklist; + return this; + } + + /** + * Get ipBlocklist + * @return ipBlocklist + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_IP_BLOCKLIST, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IPBlockList getIpBlocklist() { + return ipBlocklist; + } + + @JsonProperty(value = JSON_PROPERTY_IP_BLOCKLIST, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIpBlocklist(@jakarta.annotation.Nullable IPBlockList ipBlocklist) { + this.ipBlocklist = ipBlocklist; + } + + public EventDevice proxyMlScore(@jakarta.annotation.Nullable Double proxyMlScore) { + this.proxyMlScore = proxyMlScore; + return this; + } + + /** + * Machine learning–based proxy score, represented as a floating-point value between 0 and 1 (inclusive), with up to three decimal places of precision. A higher score means a higher confidence in the positive `proxy` detection result. This Smart Signal is currently in beta and only available to select customers. If you are interested, please [contact our support team](https://fingerprint.com/support/). + * minimum: 0 + * maximum: 1 + * @return proxyMlScore + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_PROXY_ML_SCORE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Double getProxyMlScore() { + return proxyMlScore; + } + + @JsonProperty(value = JSON_PROPERTY_PROXY_ML_SCORE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setProxyMlScore(@jakarta.annotation.Nullable Double proxyMlScore) { + this.proxyMlScore = proxyMlScore; + } + + public EventDevice incognito(@jakarta.annotation.Nullable Boolean incognito) { + this.incognito = incognito; + return this; + } + + /** + * `true` if we detected incognito mode used in the browser, `false` otherwise. + * @return incognito + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_INCOGNITO, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIncognito() { + return incognito; + } + + @JsonProperty(value = JSON_PROPERTY_INCOGNITO, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIncognito(@jakarta.annotation.Nullable Boolean incognito) { + this.incognito = incognito; + } + + public EventDevice jailbroken(@jakarta.annotation.Nullable Boolean jailbroken) { + this.jailbroken = jailbroken; + return this; + } + + /** + * iOS specific jailbreak detection. There are 2 values: * `true` - Jailbreak detected. * `false` - No signs of jailbreak or the client is not iOS. + * @return jailbroken + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_JAILBROKEN, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getJailbroken() { + return jailbroken; + } + + @JsonProperty(value = JSON_PROPERTY_JAILBROKEN, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setJailbroken(@jakarta.annotation.Nullable Boolean jailbroken) { + this.jailbroken = jailbroken; + } + + public EventDevice locationSpoofing(@jakarta.annotation.Nullable Boolean locationSpoofing) { + this.locationSpoofing = locationSpoofing; + return this; + } + + /** + * Flag indicating whether the request came from a mobile device with location spoofing enabled. + * @return locationSpoofing + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_LOCATION_SPOOFING, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getLocationSpoofing() { + return locationSpoofing; + } + + @JsonProperty(value = JSON_PROPERTY_LOCATION_SPOOFING, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLocationSpoofing(@jakarta.annotation.Nullable Boolean locationSpoofing) { + this.locationSpoofing = locationSpoofing; + } + + public EventDevice mitmAttack(@jakarta.annotation.Nullable Boolean mitmAttack) { + this.mitmAttack = mitmAttack; + return this; + } + + /** + * * `true` - When requests made from your users' mobile devices to Fingerprint servers have been intercepted and potentially modified. * `false` - Otherwise or when the request originated from a browser. See [MitM Attack Detection](https://docs.fingerprint.com/docs/smart-signals-reference#mitm-attack-detection) to learn more about this Smart Signal. + * @return mitmAttack + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_MITM_ATTACK, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getMitmAttack() { + return mitmAttack; + } + + @JsonProperty(value = JSON_PROPERTY_MITM_ATTACK, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMitmAttack(@jakarta.annotation.Nullable Boolean mitmAttack) { + this.mitmAttack = mitmAttack; + } + + public EventDevice privacySettings(@jakarta.annotation.Nullable Boolean privacySettings) { + this.privacySettings = privacySettings; + return this; + } + + /** + * `true` if the request is from a privacy aware browser (e.g. Tor) or from a browser in which fingerprinting is blocked. Otherwise `false`. + * @return privacySettings + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_PRIVACY_SETTINGS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getPrivacySettings() { + return privacySettings; + } + + @JsonProperty(value = JSON_PROPERTY_PRIVACY_SETTINGS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPrivacySettings(@jakarta.annotation.Nullable Boolean privacySettings) { + this.privacySettings = privacySettings; + } + + public EventDevice rootApps(@jakarta.annotation.Nullable Boolean rootApps) { + this.rootApps = rootApps; + return this; + } + + /** + * Android specific root management apps detection. There are 2 values: * `true` - Root Management Apps detected (e.g. Magisk). * `false` - No Root Management Apps detected or the client isn't Android. + * @return rootApps + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_ROOT_APPS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getRootApps() { + return rootApps; + } + + @JsonProperty(value = JSON_PROPERTY_ROOT_APPS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRootApps(@jakarta.annotation.Nullable Boolean rootApps) { + this.rootApps = rootApps; + } + + public EventDevice ruleAction(@jakarta.annotation.Nullable EventRuleAction ruleAction) { + this.ruleAction = ruleAction; + return this; + } + + /** + * Get ruleAction + * @return ruleAction + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_RULE_ACTION, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public EventRuleAction getRuleAction() { + return ruleAction; + } + + @JsonProperty(value = JSON_PROPERTY_RULE_ACTION, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRuleAction(@jakarta.annotation.Nullable EventRuleAction ruleAction) { + this.ruleAction = ruleAction; + } + + public EventDevice simulator(@jakarta.annotation.Nullable Boolean simulator) { + this.simulator = simulator; + return this; + } + + /** + * iOS specific simulator detection. There are 2 values: * `true` - Simulator environment detected. * `false` - No signs of simulator or the client is not iOS. + * @return simulator + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_SIMULATOR, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getSimulator() { + return simulator; + } + + @JsonProperty(value = JSON_PROPERTY_SIMULATOR, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSimulator(@jakarta.annotation.Nullable Boolean simulator) { + this.simulator = simulator; + } + + public EventDevice suspectScore(@jakarta.annotation.Nullable Integer suspectScore) { + this.suspectScore = suspectScore; + return this; + } + + /** + * Suspect Score is an easy way to integrate Smart Signals into your fraud protection work flow. It is a weighted representation of all Smart Signals present in the payload that helps identify suspicious activity. The value range is [0; S] where S is sum of all Smart Signals weights. See more details here: https://docs.fingerprint.com/docs/suspect-score + * @return suspectScore + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_SUSPECT_SCORE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getSuspectScore() { + return suspectScore; + } + + @JsonProperty(value = JSON_PROPERTY_SUSPECT_SCORE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSuspectScore(@jakarta.annotation.Nullable Integer suspectScore) { + this.suspectScore = suspectScore; + } + + public EventDevice tampering(@jakarta.annotation.Nullable Boolean tampering) { + this.tampering = tampering; + return this; + } + + /** + * The field can be used as a standalone flag for tampering detection. Alternatively, the more granular fields documented below can be used for workflows that require more context. * `true` if tampering is detected through an anomalous browser signature, anti-detect browser detection, or other tampering-related methods * `false` if none of the tampering checks return a positive result + * @return tampering + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_TAMPERING, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getTampering() { + return tampering; + } + + @JsonProperty(value = JSON_PROPERTY_TAMPERING, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTampering(@jakarta.annotation.Nullable Boolean tampering) { + this.tampering = tampering; + } + + public EventDevice tamperingConfidence( + @jakarta.annotation.Nullable TamperingConfidence tamperingConfidence) { + this.tamperingConfidence = tamperingConfidence; + return this; + } + + /** + * Get tamperingConfidence + * @return tamperingConfidence + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_TAMPERING_CONFIDENCE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TamperingConfidence getTamperingConfidence() { + return tamperingConfidence; + } + + @JsonProperty(value = JSON_PROPERTY_TAMPERING_CONFIDENCE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTamperingConfidence( + @jakarta.annotation.Nullable TamperingConfidence tamperingConfidence) { + this.tamperingConfidence = tamperingConfidence; + } + + public EventDevice tamperingMlScore(@jakarta.annotation.Nullable Double tamperingMlScore) { + this.tamperingMlScore = tamperingMlScore; + return this; + } + + /** + * The output of this model is captured as tampering_ml_score, a number indicating how likely an event is coming from an anti detect browser. Values close to 1 signify higher confidence and we consider anything above the threshold of 0.8 to be actionable (the result and anti_detect_browser fields conveniently captures that fact) + * minimum: 0 + * maximum: 1 + * @return tamperingMlScore + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_TAMPERING_ML_SCORE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Double getTamperingMlScore() { + return tamperingMlScore; + } + + @JsonProperty(value = JSON_PROPERTY_TAMPERING_ML_SCORE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTamperingMlScore(@jakarta.annotation.Nullable Double tamperingMlScore) { + this.tamperingMlScore = tamperingMlScore; + } + + public EventDevice tamperingDetails( + @jakarta.annotation.Nullable TamperingDetails tamperingDetails) { + this.tamperingDetails = tamperingDetails; + return this; + } + + /** + * Get tamperingDetails + * @return tamperingDetails + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_TAMPERING_DETAILS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TamperingDetails getTamperingDetails() { + return tamperingDetails; + } + + @JsonProperty(value = JSON_PROPERTY_TAMPERING_DETAILS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTamperingDetails(@jakarta.annotation.Nullable TamperingDetails tamperingDetails) { + this.tamperingDetails = tamperingDetails; + } + + public EventDevice velocity(@jakarta.annotation.Nullable Velocity velocity) { + this.velocity = velocity; + return this; + } + + /** + * Get velocity + * @return velocity + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_VELOCITY, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Velocity getVelocity() { + return velocity; + } + + @JsonProperty(value = JSON_PROPERTY_VELOCITY, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVelocity(@jakarta.annotation.Nullable Velocity velocity) { + this.velocity = velocity; + } + + public EventDevice virtualMachine(@jakarta.annotation.Nullable Boolean virtualMachine) { + this.virtualMachine = virtualMachine; + return this; + } + + /** + * `true` if the request came from a browser running inside a virtual machine (e.g. VMWare), `false` otherwise. + * @return virtualMachine + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_VIRTUAL_MACHINE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getVirtualMachine() { + return virtualMachine; + } + + @JsonProperty(value = JSON_PROPERTY_VIRTUAL_MACHINE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVirtualMachine(@jakarta.annotation.Nullable Boolean virtualMachine) { + this.virtualMachine = virtualMachine; + } + + public EventDevice virtualMachineMlScore( + @jakarta.annotation.Nullable Double virtualMachineMlScore) { + this.virtualMachineMlScore = virtualMachineMlScore; + return this; + } + + /** + * Machine learning–based virtual machine score, represented as a floating-point value between 0 and 1 (inclusive), with up to three decimal places of precision. A higher score means a higher confidence in the positive `virtual_machine` detection result. This Smart Signal is currently in beta and only available to select customers. If you are interested, please [contact our support team](https://fingerprint.com/support/). + * minimum: 0 + * maximum: 1 + * @return virtualMachineMlScore + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_VIRTUAL_MACHINE_ML_SCORE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Double getVirtualMachineMlScore() { + return virtualMachineMlScore; + } + + @JsonProperty(value = JSON_PROPERTY_VIRTUAL_MACHINE_ML_SCORE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVirtualMachineMlScore(@jakarta.annotation.Nullable Double virtualMachineMlScore) { + this.virtualMachineMlScore = virtualMachineMlScore; + } + + public EventDevice vpnMlScore(@jakarta.annotation.Nullable Double vpnMlScore) { + this.vpnMlScore = vpnMlScore; + return this; + } + + /** + * Machine learning–based VPN score, represented as a floating-point value between 0 and 1 (inclusive), with up to three decimal places of precision. A higher score means a higher confidence in the positive `vpn` detection result. This Smart Signal is currently in beta and only available to select customers. If you are interested, please [contact our support team](https://fingerprint.com/support/). + * minimum: 0 + * maximum: 1 + * @return vpnMlScore + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_VPN_ML_SCORE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Double getVpnMlScore() { + return vpnMlScore; + } + + @JsonProperty(value = JSON_PROPERTY_VPN_ML_SCORE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVpnMlScore(@jakarta.annotation.Nullable Double vpnMlScore) { + this.vpnMlScore = vpnMlScore; + } + + public EventDevice vpnOriginTimezone(@jakarta.annotation.Nullable String vpnOriginTimezone) { + this.vpnOriginTimezone = vpnOriginTimezone; + return this; + } + + /** + * Local timezone which is used in timezone_mismatch method. + * @return vpnOriginTimezone + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_VPN_ORIGIN_TIMEZONE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getVpnOriginTimezone() { + return vpnOriginTimezone; + } + + @JsonProperty(value = JSON_PROPERTY_VPN_ORIGIN_TIMEZONE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVpnOriginTimezone(@jakarta.annotation.Nullable String vpnOriginTimezone) { + this.vpnOriginTimezone = vpnOriginTimezone; + } + + public EventDevice vpnOriginCountry(@jakarta.annotation.Nullable String vpnOriginCountry) { + this.vpnOriginCountry = vpnOriginCountry; + return this; + } + + /** + * Country of the request (Android SDK version >= 2.4.0, iOS SDK version >= 2.9.0, JS agent >= 3.12.9 / 4.0.2), ISO 3166 format or unknown. + * @return vpnOriginCountry + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_VPN_ORIGIN_COUNTRY, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getVpnOriginCountry() { + return vpnOriginCountry; + } + + @JsonProperty(value = JSON_PROPERTY_VPN_ORIGIN_COUNTRY, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVpnOriginCountry(@jakarta.annotation.Nullable String vpnOriginCountry) { + this.vpnOriginCountry = vpnOriginCountry; + } + + public EventDevice highActivityDevice(@jakarta.annotation.Nullable Boolean highActivityDevice) { + this.highActivityDevice = highActivityDevice; + return this; + } + + /** + * Flag indicating if the request came from a high-activity visitor. + * @return highActivityDevice + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_HIGH_ACTIVITY_DEVICE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getHighActivityDevice() { + return highActivityDevice; + } + + @JsonProperty(value = JSON_PROPERTY_HIGH_ACTIVITY_DEVICE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setHighActivityDevice(@jakarta.annotation.Nullable Boolean highActivityDevice) { + this.highActivityDevice = highActivityDevice; + } + + public EventDevice rareDevice(@jakarta.annotation.Nullable Boolean rareDevice) { + this.rareDevice = rareDevice; + return this; + } + + /** + * `true` if the device is considered rare based on its combination of hardware and software attributes. A device is classified as rare if it falls within the top 99.9 percentile (lowest-frequency segment) of observed traffic, or if its configuration has not been previously seen (`not_seen`). > This Smart Signal is currently in beta and only available to select customers. If you are interested, please [contact our support team](https://fingerprint.com/support/). + * @return rareDevice + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_RARE_DEVICE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getRareDevice() { + return rareDevice; + } + + @JsonProperty(value = JSON_PROPERTY_RARE_DEVICE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRareDevice(@jakarta.annotation.Nullable Boolean rareDevice) { + this.rareDevice = rareDevice; + } + + public EventDevice rareDevicePercentileBucket( + @jakarta.annotation.Nullable RareDevicePercentileBucket rareDevicePercentileBucket) { + this.rareDevicePercentileBucket = rareDevicePercentileBucket; + return this; + } + + /** + * Get rareDevicePercentileBucket + * @return rareDevicePercentileBucket + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_RARE_DEVICE_PERCENTILE_BUCKET, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RareDevicePercentileBucket getRareDevicePercentileBucket() { + return rareDevicePercentileBucket; + } + + @JsonProperty(value = JSON_PROPERTY_RARE_DEVICE_PERCENTILE_BUCKET, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRareDevicePercentileBucket( + @jakarta.annotation.Nullable RareDevicePercentileBucket rareDevicePercentileBucket) { + this.rareDevicePercentileBucket = rareDevicePercentileBucket; + } + + public EventDevice rawDeviceAttributes( + @jakarta.annotation.Nullable RawDeviceAttributes rawDeviceAttributes) { + this.rawDeviceAttributes = rawDeviceAttributes; + return this; + } + + /** + * Get rawDeviceAttributes + * @return rawDeviceAttributes + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_RAW_DEVICE_ATTRIBUTES, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RawDeviceAttributes getRawDeviceAttributes() { + return rawDeviceAttributes; + } + + @JsonProperty(value = JSON_PROPERTY_RAW_DEVICE_ATTRIBUTES, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRawDeviceAttributes( + @jakarta.annotation.Nullable RawDeviceAttributes rawDeviceAttributes) { + this.rawDeviceAttributes = rawDeviceAttributes; + } + + public EventDevice labels(@jakarta.annotation.Nullable List labels) { + this.labels = labels; + return this; + } + + public EventDevice addLabelsItem(LabelsInner labelsItem) { + if (this.labels == null) { + this.labels = new ArrayList<>(); + } + this.labels.add(labelsItem); + return this; + } + + /** + * Each label returns a prediction (true or false) for a specific use case (label field) based on a machine learning score. The machine learning score is determined by a model trained on customer data for that use case. This field is in the beta phase and only available to select customers. If you are interested, please [contact our support team](https://fingerprint.com/support/). + * @return labels + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_LABELS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getLabels() { + return labels; + } + + @JsonProperty(value = JSON_PROPERTY_LABELS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLabels(@jakarta.annotation.Nullable List labels) { + this.labels = labels; + } + + /** + * Return true if this EventDevice object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EventDevice eventDevice = (EventDevice) o; + return Objects.equals(this.eventId, eventDevice.eventId) + && Objects.equals(this.timestamp, eventDevice.timestamp) + && Objects.equals(this.linkedId, eventDevice.linkedId) + && Objects.equals(this.tags, eventDevice.tags) + && Objects.equals(this.url, eventDevice.url) + && Objects.equals(this.botInfo, eventDevice.botInfo) + && Objects.equals(this.ipInfo, eventDevice.ipInfo) + && Objects.equals(this.proxy, eventDevice.proxy) + && Objects.equals(this.proxyConfidence, eventDevice.proxyConfidence) + && Objects.equals(this.proxyDetails, eventDevice.proxyDetails) + && Objects.equals(this.vpn, eventDevice.vpn) + && Objects.equals(this.vpnConfidence, eventDevice.vpnConfidence) + && Objects.equals(this.vpnMethods, eventDevice.vpnMethods) + && Objects.equals(this.source, eventDevice.source) + && Objects.equals( + this.incrementalIdentificationStatus, eventDevice.incrementalIdentificationStatus) + && Objects.equals(this.environmentId, eventDevice.environmentId) + && Objects.equals(this.suspect, eventDevice.suspect) + && Objects.equals(this.sdk, eventDevice.sdk) + && Objects.equals(this.replayed, eventDevice.replayed) + && Objects.equals(this.identification, eventDevice.identification) + && Objects.equals(this.supplementaryIdHighRecall, eventDevice.supplementaryIdHighRecall) + && Objects.equals(this.bundleId, eventDevice.bundleId) + && Objects.equals(this.packageName, eventDevice.packageName) + && Objects.equals(this.ipAddress, eventDevice.ipAddress) + && Objects.equals(this.userAgent, eventDevice.userAgent) + && Objects.equals(this.device, eventDevice.device) + && Objects.equals(this.os, eventDevice.os) + && Objects.equals(this.osVersion, eventDevice.osVersion) + && Objects.equals(this.clientReferrer, eventDevice.clientReferrer) + && Objects.equals(this.browserDetails, eventDevice.browserDetails) + && Objects.equals(this.proximity, eventDevice.proximity) + && Objects.equals(this.activeCall, eventDevice.activeCall) + && Objects.equals(this.bot, eventDevice.bot) + && Objects.equals(this.botType, eventDevice.botType) + && Objects.equals(this.clonedApp, eventDevice.clonedApp) + && Objects.equals(this.developerTools, eventDevice.developerTools) + && Objects.equals(this.emulator, eventDevice.emulator) + && Objects.equals(this.factoryResetTimestamp, eventDevice.factoryResetTimestamp) + && Objects.equals(this.frida, eventDevice.frida) + && Objects.equals(this.ipBlocklist, eventDevice.ipBlocklist) + && Objects.equals(this.proxyMlScore, eventDevice.proxyMlScore) + && Objects.equals(this.incognito, eventDevice.incognito) + && Objects.equals(this.jailbroken, eventDevice.jailbroken) + && Objects.equals(this.locationSpoofing, eventDevice.locationSpoofing) + && Objects.equals(this.mitmAttack, eventDevice.mitmAttack) + && Objects.equals(this.privacySettings, eventDevice.privacySettings) + && Objects.equals(this.rootApps, eventDevice.rootApps) + && Objects.equals(this.ruleAction, eventDevice.ruleAction) + && Objects.equals(this.simulator, eventDevice.simulator) + && Objects.equals(this.suspectScore, eventDevice.suspectScore) + && Objects.equals(this.tampering, eventDevice.tampering) + && Objects.equals(this.tamperingConfidence, eventDevice.tamperingConfidence) + && Objects.equals(this.tamperingMlScore, eventDevice.tamperingMlScore) + && Objects.equals(this.tamperingDetails, eventDevice.tamperingDetails) + && Objects.equals(this.velocity, eventDevice.velocity) + && Objects.equals(this.virtualMachine, eventDevice.virtualMachine) + && Objects.equals(this.virtualMachineMlScore, eventDevice.virtualMachineMlScore) + && Objects.equals(this.vpnMlScore, eventDevice.vpnMlScore) + && Objects.equals(this.vpnOriginTimezone, eventDevice.vpnOriginTimezone) + && Objects.equals(this.vpnOriginCountry, eventDevice.vpnOriginCountry) + && Objects.equals(this.highActivityDevice, eventDevice.highActivityDevice) + && Objects.equals(this.rareDevice, eventDevice.rareDevice) + && Objects.equals(this.rareDevicePercentileBucket, eventDevice.rareDevicePercentileBucket) + && Objects.equals(this.rawDeviceAttributes, eventDevice.rawDeviceAttributes) + && Objects.equals(this.labels, eventDevice.labels); + } + + @Override + public int hashCode() { + return Objects.hash( + eventId, + timestamp, + linkedId, + tags, + url, + botInfo, + ipInfo, + proxy, + proxyConfidence, + proxyDetails, + vpn, + vpnConfidence, + vpnMethods, + source, + incrementalIdentificationStatus, + environmentId, + suspect, + sdk, + replayed, + identification, + supplementaryIdHighRecall, + bundleId, + packageName, + ipAddress, + userAgent, + device, + os, + osVersion, + clientReferrer, + browserDetails, + proximity, + activeCall, + bot, + botType, + clonedApp, + developerTools, + emulator, + factoryResetTimestamp, + frida, + ipBlocklist, + proxyMlScore, + incognito, + jailbroken, + locationSpoofing, + mitmAttack, + privacySettings, + rootApps, + ruleAction, + simulator, + suspectScore, + tampering, + tamperingConfidence, + tamperingMlScore, + tamperingDetails, + velocity, + virtualMachine, + virtualMachineMlScore, + vpnMlScore, + vpnOriginTimezone, + vpnOriginCountry, + highActivityDevice, + rareDevice, + rareDevicePercentileBucket, + rawDeviceAttributes, + labels); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EventDevice {\n"); + sb.append(" eventId: ").append(toIndentedString(eventId)).append("\n"); + sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n"); + sb.append(" linkedId: ").append(toIndentedString(linkedId)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" botInfo: ").append(toIndentedString(botInfo)).append("\n"); + sb.append(" ipInfo: ").append(toIndentedString(ipInfo)).append("\n"); + sb.append(" proxy: ").append(toIndentedString(proxy)).append("\n"); + sb.append(" proxyConfidence: ").append(toIndentedString(proxyConfidence)).append("\n"); + sb.append(" proxyDetails: ").append(toIndentedString(proxyDetails)).append("\n"); + sb.append(" vpn: ").append(toIndentedString(vpn)).append("\n"); + sb.append(" vpnConfidence: ").append(toIndentedString(vpnConfidence)).append("\n"); + sb.append(" vpnMethods: ").append(toIndentedString(vpnMethods)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" incrementalIdentificationStatus: ") + .append(toIndentedString(incrementalIdentificationStatus)) + .append("\n"); + sb.append(" environmentId: ").append(toIndentedString(environmentId)).append("\n"); + sb.append(" suspect: ").append(toIndentedString(suspect)).append("\n"); + sb.append(" sdk: ").append(toIndentedString(sdk)).append("\n"); + sb.append(" replayed: ").append(toIndentedString(replayed)).append("\n"); + sb.append(" identification: ").append(toIndentedString(identification)).append("\n"); + sb.append(" supplementaryIdHighRecall: ") + .append(toIndentedString(supplementaryIdHighRecall)) + .append("\n"); + sb.append(" bundleId: ").append(toIndentedString(bundleId)).append("\n"); + sb.append(" packageName: ").append(toIndentedString(packageName)).append("\n"); + sb.append(" ipAddress: ").append(toIndentedString(ipAddress)).append("\n"); + sb.append(" userAgent: ").append(toIndentedString(userAgent)).append("\n"); + sb.append(" device: ").append(toIndentedString(device)).append("\n"); + sb.append(" os: ").append(toIndentedString(os)).append("\n"); + sb.append(" osVersion: ").append(toIndentedString(osVersion)).append("\n"); + sb.append(" clientReferrer: ").append(toIndentedString(clientReferrer)).append("\n"); + sb.append(" browserDetails: ").append(toIndentedString(browserDetails)).append("\n"); + sb.append(" proximity: ").append(toIndentedString(proximity)).append("\n"); + sb.append(" activeCall: ").append(toIndentedString(activeCall)).append("\n"); + sb.append(" bot: ").append(toIndentedString(bot)).append("\n"); + sb.append(" botType: ").append(toIndentedString(botType)).append("\n"); + sb.append(" clonedApp: ").append(toIndentedString(clonedApp)).append("\n"); + sb.append(" developerTools: ").append(toIndentedString(developerTools)).append("\n"); + sb.append(" emulator: ").append(toIndentedString(emulator)).append("\n"); + sb.append(" factoryResetTimestamp: ") + .append(toIndentedString(factoryResetTimestamp)) + .append("\n"); + sb.append(" frida: ").append(toIndentedString(frida)).append("\n"); + sb.append(" ipBlocklist: ").append(toIndentedString(ipBlocklist)).append("\n"); + sb.append(" proxyMlScore: ").append(toIndentedString(proxyMlScore)).append("\n"); + sb.append(" incognito: ").append(toIndentedString(incognito)).append("\n"); + sb.append(" jailbroken: ").append(toIndentedString(jailbroken)).append("\n"); + sb.append(" locationSpoofing: ").append(toIndentedString(locationSpoofing)).append("\n"); + sb.append(" mitmAttack: ").append(toIndentedString(mitmAttack)).append("\n"); + sb.append(" privacySettings: ").append(toIndentedString(privacySettings)).append("\n"); + sb.append(" rootApps: ").append(toIndentedString(rootApps)).append("\n"); + sb.append(" ruleAction: ").append(toIndentedString(ruleAction)).append("\n"); + sb.append(" simulator: ").append(toIndentedString(simulator)).append("\n"); + sb.append(" suspectScore: ").append(toIndentedString(suspectScore)).append("\n"); + sb.append(" tampering: ").append(toIndentedString(tampering)).append("\n"); + sb.append(" tamperingConfidence: ") + .append(toIndentedString(tamperingConfidence)) + .append("\n"); + sb.append(" tamperingMlScore: ").append(toIndentedString(tamperingMlScore)).append("\n"); + sb.append(" tamperingDetails: ").append(toIndentedString(tamperingDetails)).append("\n"); + sb.append(" velocity: ").append(toIndentedString(velocity)).append("\n"); + sb.append(" virtualMachine: ").append(toIndentedString(virtualMachine)).append("\n"); + sb.append(" virtualMachineMlScore: ") + .append(toIndentedString(virtualMachineMlScore)) + .append("\n"); + sb.append(" vpnMlScore: ").append(toIndentedString(vpnMlScore)).append("\n"); + sb.append(" vpnOriginTimezone: ").append(toIndentedString(vpnOriginTimezone)).append("\n"); + sb.append(" vpnOriginCountry: ").append(toIndentedString(vpnOriginCountry)).append("\n"); + sb.append(" highActivityDevice: ").append(toIndentedString(highActivityDevice)).append("\n"); + sb.append(" rareDevice: ").append(toIndentedString(rareDevice)).append("\n"); + sb.append(" rareDevicePercentileBucket: ") + .append(toIndentedString(rareDevicePercentileBucket)) + .append("\n"); + sb.append(" rawDeviceAttributes: ") + .append(toIndentedString(rawDeviceAttributes)) + .append("\n"); + sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/sdk/src/main/java/com/fingerprint/v4/model/EventEdge.java b/sdk/src/main/java/com/fingerprint/v4/model/EventEdge.java new file mode 100644 index 0000000..aa08d99 --- /dev/null +++ b/sdk/src/main/java/com/fingerprint/v4/model/EventEdge.java @@ -0,0 +1,484 @@ +/* + * Server API + * Fingerprint Server API allows you to get, search, and update 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. The API also supports collection of Automation Intelligence for requests to your server in edge, pre-origin, or middleware contexts. + * + * The version of the OpenAPI document: 4 + * Contact: support@fingerprint.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fingerprint.v4.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + * IP and bot analysis for an event generated by the Automation Intelligence API (`/edge` endpoint). No client-side collection agent is involved, so Identification (`visitor_id`) and device-telemetry-derived Smart Signals are not available. + */ +@JsonPropertyOrder({ + EventEdge.JSON_PROPERTY_EVENT_ID, + EventEdge.JSON_PROPERTY_TIMESTAMP, + EventEdge.JSON_PROPERTY_LINKED_ID, + EventEdge.JSON_PROPERTY_TAGS, + EventEdge.JSON_PROPERTY_URL, + EventEdge.JSON_PROPERTY_BOT_INFO, + EventEdge.JSON_PROPERTY_IP_INFO, + EventEdge.JSON_PROPERTY_PROXY, + EventEdge.JSON_PROPERTY_PROXY_CONFIDENCE, + EventEdge.JSON_PROPERTY_PROXY_DETAILS, + EventEdge.JSON_PROPERTY_VPN, + EventEdge.JSON_PROPERTY_VPN_CONFIDENCE, + EventEdge.JSON_PROPERTY_VPN_METHODS, + EventEdge.JSON_PROPERTY_SOURCE +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.24.0") +public class EventEdge implements Event { + public static final String JSON_PROPERTY_EVENT_ID = "event_id"; + @jakarta.annotation.Nonnull private String eventId; + + public static final String JSON_PROPERTY_TIMESTAMP = "timestamp"; + @jakarta.annotation.Nonnull private Long timestamp; + + public static final String JSON_PROPERTY_LINKED_ID = "linked_id"; + @jakarta.annotation.Nullable private String linkedId; + + public static final String JSON_PROPERTY_TAGS = "tags"; + @jakarta.annotation.Nullable private Map tags = new HashMap<>(); + + public static final String JSON_PROPERTY_URL = "url"; + @jakarta.annotation.Nullable private String url; + + public static final String JSON_PROPERTY_BOT_INFO = "bot_info"; + @jakarta.annotation.Nullable private BotInfo botInfo; + + public static final String JSON_PROPERTY_IP_INFO = "ip_info"; + @jakarta.annotation.Nonnull private IPInfo ipInfo; + + public static final String JSON_PROPERTY_PROXY = "proxy"; + @jakarta.annotation.Nullable private Boolean proxy; + + public static final String JSON_PROPERTY_PROXY_CONFIDENCE = "proxy_confidence"; + @jakarta.annotation.Nullable private ProxyConfidence proxyConfidence; + + public static final String JSON_PROPERTY_PROXY_DETAILS = "proxy_details"; + @jakarta.annotation.Nullable private ProxyDetails proxyDetails; + + public static final String JSON_PROPERTY_VPN = "vpn"; + @jakarta.annotation.Nullable private Boolean vpn; + + public static final String JSON_PROPERTY_VPN_CONFIDENCE = "vpn_confidence"; + @jakarta.annotation.Nullable private VpnConfidence vpnConfidence; + + public static final String JSON_PROPERTY_VPN_METHODS = "vpn_methods"; + @jakarta.annotation.Nullable private VpnMethods vpnMethods; + + public static final String JSON_PROPERTY_SOURCE = "source"; + @jakarta.annotation.Nonnull private EventSource source; + + public EventEdge() {} + + public EventEdge eventId(@jakarta.annotation.Nonnull String eventId) { + this.eventId = eventId; + return this; + } + + /** + * Unique identifier of the user's request. The first portion of the event_id is a unix epoch milliseconds timestamp. + * @return eventId + */ + @jakarta.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_EVENT_ID, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getEventId() { + return eventId; + } + + @JsonProperty(value = JSON_PROPERTY_EVENT_ID, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEventId(@jakarta.annotation.Nonnull String eventId) { + this.eventId = eventId; + } + + public EventEdge timestamp(@jakarta.annotation.Nonnull Long timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * Timestamp of the event with millisecond precision in Unix time. + * @return timestamp + */ + @jakarta.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_TIMESTAMP, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getTimestamp() { + return timestamp; + } + + @JsonProperty(value = JSON_PROPERTY_TIMESTAMP, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTimestamp(@jakarta.annotation.Nonnull Long timestamp) { + this.timestamp = timestamp; + } + + public EventEdge linkedId(@jakarta.annotation.Nullable String linkedId) { + this.linkedId = linkedId; + return this; + } + + /** + * A customer-provided id that was sent with the request. + * @return linkedId + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_LINKED_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLinkedId() { + return linkedId; + } + + @JsonProperty(value = JSON_PROPERTY_LINKED_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLinkedId(@jakarta.annotation.Nullable String linkedId) { + this.linkedId = linkedId; + } + + public EventEdge tags(@jakarta.annotation.Nullable Map tags) { + this.tags = tags; + return this; + } + + public EventEdge putTagsItem(String key, Object tagsItem) { + if (this.tags == null) { + this.tags = new HashMap<>(); + } + this.tags.put(key, tagsItem); + return this; + } + + /** + * A customer-provided value or an object that was sent with the identification request or updated later. + * @return tags + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_TAGS, required = false) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getTags() { + return tags; + } + + @JsonProperty(value = JSON_PROPERTY_TAGS, required = false) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(@jakarta.annotation.Nullable Map tags) { + this.tags = tags; + } + + public EventEdge url(@jakarta.annotation.Nullable String url) { + this.url = url; + return this; + } + + /** + * Page URL from which the request was sent. + * @return url + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_URL, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getUrl() { + return url; + } + + @JsonProperty(value = JSON_PROPERTY_URL, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUrl(@jakarta.annotation.Nullable String url) { + this.url = url; + } + + public EventEdge botInfo(@jakarta.annotation.Nullable BotInfo botInfo) { + this.botInfo = botInfo; + return this; + } + + /** + * Get botInfo + * @return botInfo + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_BOT_INFO, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BotInfo getBotInfo() { + return botInfo; + } + + @JsonProperty(value = JSON_PROPERTY_BOT_INFO, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBotInfo(@jakarta.annotation.Nullable BotInfo botInfo) { + this.botInfo = botInfo; + } + + public EventEdge ipInfo(@jakarta.annotation.Nonnull IPInfo ipInfo) { + this.ipInfo = ipInfo; + return this; + } + + /** + * Get ipInfo + * @return ipInfo + */ + @jakarta.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_IP_INFO, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IPInfo getIpInfo() { + return ipInfo; + } + + @JsonProperty(value = JSON_PROPERTY_IP_INFO, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIpInfo(@jakarta.annotation.Nonnull IPInfo ipInfo) { + this.ipInfo = ipInfo; + } + + public EventEdge proxy(@jakarta.annotation.Nullable Boolean proxy) { + this.proxy = proxy; + return this; + } + + /** + * IP address was used by a public proxy provider or belonged to a known recent residential proxy + * @return proxy + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_PROXY, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getProxy() { + return proxy; + } + + @JsonProperty(value = JSON_PROPERTY_PROXY, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setProxy(@jakarta.annotation.Nullable Boolean proxy) { + this.proxy = proxy; + } + + public EventEdge proxyConfidence(@jakarta.annotation.Nullable ProxyConfidence proxyConfidence) { + this.proxyConfidence = proxyConfidence; + return this; + } + + /** + * Get proxyConfidence + * @return proxyConfidence + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_PROXY_CONFIDENCE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ProxyConfidence getProxyConfidence() { + return proxyConfidence; + } + + @JsonProperty(value = JSON_PROPERTY_PROXY_CONFIDENCE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setProxyConfidence(@jakarta.annotation.Nullable ProxyConfidence proxyConfidence) { + this.proxyConfidence = proxyConfidence; + } + + public EventEdge proxyDetails(@jakarta.annotation.Nullable ProxyDetails proxyDetails) { + this.proxyDetails = proxyDetails; + return this; + } + + /** + * Get proxyDetails + * @return proxyDetails + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_PROXY_DETAILS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ProxyDetails getProxyDetails() { + return proxyDetails; + } + + @JsonProperty(value = JSON_PROPERTY_PROXY_DETAILS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setProxyDetails(@jakarta.annotation.Nullable ProxyDetails proxyDetails) { + this.proxyDetails = proxyDetails; + } + + public EventEdge vpn(@jakarta.annotation.Nullable Boolean vpn) { + this.vpn = vpn; + return this; + } + + /** + * VPN or other anonymizing service has been used when sending the request. + * @return vpn + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_VPN, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getVpn() { + return vpn; + } + + @JsonProperty(value = JSON_PROPERTY_VPN, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVpn(@jakarta.annotation.Nullable Boolean vpn) { + this.vpn = vpn; + } + + public EventEdge vpnConfidence(@jakarta.annotation.Nullable VpnConfidence vpnConfidence) { + this.vpnConfidence = vpnConfidence; + return this; + } + + /** + * Get vpnConfidence + * @return vpnConfidence + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_VPN_CONFIDENCE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public VpnConfidence getVpnConfidence() { + return vpnConfidence; + } + + @JsonProperty(value = JSON_PROPERTY_VPN_CONFIDENCE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVpnConfidence(@jakarta.annotation.Nullable VpnConfidence vpnConfidence) { + this.vpnConfidence = vpnConfidence; + } + + public EventEdge vpnMethods(@jakarta.annotation.Nullable VpnMethods vpnMethods) { + this.vpnMethods = vpnMethods; + return this; + } + + /** + * Get vpnMethods + * @return vpnMethods + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_VPN_METHODS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public VpnMethods getVpnMethods() { + return vpnMethods; + } + + @JsonProperty(value = JSON_PROPERTY_VPN_METHODS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVpnMethods(@jakarta.annotation.Nullable VpnMethods vpnMethods) { + this.vpnMethods = vpnMethods; + } + + public EventEdge source(@jakarta.annotation.Nonnull EventSource source) { + this.source = source; + return this; + } + + /** + * Get source + * @return source + */ + @jakarta.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_SOURCE, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EventSource getSource() { + return source; + } + + @JsonProperty(value = JSON_PROPERTY_SOURCE, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSource(@jakarta.annotation.Nonnull EventSource source) { + this.source = source; + } + + /** + * Return true if this EventEdge object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EventEdge eventEdge = (EventEdge) o; + return Objects.equals(this.eventId, eventEdge.eventId) + && Objects.equals(this.timestamp, eventEdge.timestamp) + && Objects.equals(this.linkedId, eventEdge.linkedId) + && Objects.equals(this.tags, eventEdge.tags) + && Objects.equals(this.url, eventEdge.url) + && Objects.equals(this.botInfo, eventEdge.botInfo) + && Objects.equals(this.ipInfo, eventEdge.ipInfo) + && Objects.equals(this.proxy, eventEdge.proxy) + && Objects.equals(this.proxyConfidence, eventEdge.proxyConfidence) + && Objects.equals(this.proxyDetails, eventEdge.proxyDetails) + && Objects.equals(this.vpn, eventEdge.vpn) + && Objects.equals(this.vpnConfidence, eventEdge.vpnConfidence) + && Objects.equals(this.vpnMethods, eventEdge.vpnMethods) + && Objects.equals(this.source, eventEdge.source); + } + + @Override + public int hashCode() { + return Objects.hash( + eventId, + timestamp, + linkedId, + tags, + url, + botInfo, + ipInfo, + proxy, + proxyConfidence, + proxyDetails, + vpn, + vpnConfidence, + vpnMethods, + source); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EventEdge {\n"); + sb.append(" eventId: ").append(toIndentedString(eventId)).append("\n"); + sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n"); + sb.append(" linkedId: ").append(toIndentedString(linkedId)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" botInfo: ").append(toIndentedString(botInfo)).append("\n"); + sb.append(" ipInfo: ").append(toIndentedString(ipInfo)).append("\n"); + sb.append(" proxy: ").append(toIndentedString(proxy)).append("\n"); + sb.append(" proxyConfidence: ").append(toIndentedString(proxyConfidence)).append("\n"); + sb.append(" proxyDetails: ").append(toIndentedString(proxyDetails)).append("\n"); + sb.append(" vpn: ").append(toIndentedString(vpn)).append("\n"); + sb.append(" vpnConfidence: ").append(toIndentedString(vpnConfidence)).append("\n"); + sb.append(" vpnMethods: ").append(toIndentedString(vpnMethods)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/sdk/src/test/java/com/fingerprint/v4/api/FingerprintApiTest.java b/sdk/src/test/java/com/fingerprint/v4/api/FingerprintApiTest.java index 6c4df7e..e49d453 100644 --- a/sdk/src/test/java/com/fingerprint/v4/api/FingerprintApiTest.java +++ b/sdk/src/test/java/com/fingerprint/v4/api/FingerprintApiTest.java @@ -201,6 +201,8 @@ public void getEventTest() throws ApiException { Event response = api.getEvent(MOCK_REQUEST_ID); assertNotNull(response); + // SPIKE INTER-2457 — COMPILE BREAK. Event is an interface with no getIdentification(). + // Identification is on EventDevice. This test does not compile. assertNotNull(response.getIdentification()); assertEquals("Ibk1527CUFmcnjLwIs4A9", response.getIdentification().getVisitorId()); @@ -405,6 +407,8 @@ public void webhookTest() throws Exception { Event event = mapper.readValue(getFileAsIOStream("mocks/webhook/webhook_event.json"), Event.class); + // SPIKE INTER-2457 — COMPILE BREAK (and deserialize). Event has no getIdentification(); + // webhook JSON without `source` also fails Jackson discriminator lookup. assertEquals(MOCK_WEBHOOK_VISITOR_ID, event.getIdentification().getVisitorId()); assertEquals(MOCK_WEBHOOK_EVENT_ID, event.getEventId()); } @@ -432,6 +436,7 @@ public void searchEventsMinimumParamsTest() throws ApiException { Event event = events.get(0); assertNotNull(event); + // SPIKE INTER-2457 — COMPILE BREAK. Event is an interface with no getIdentification(). assertNotNull(event.getIdentification()); assertEquals("Ibk1527CUFmcnjLwIs4A9", event.getIdentification().getVisitorId()); From f87f52edba48feeb92b4f2ec677f0e1f33b53d68 Mon Sep 17 00:00:00 2001 From: Juraj Uhlar Date: Sun, 6 Sep 2026 19:50:56 +0100 Subject: [PATCH 2/3] fix: treat missing Event source as device --- .../java/com/fingerprint/v4/model/Event.java | 3 ++- .../com/fingerprint/v4/SerializationTest.java | 22 ++++++++++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/sdk/src/main/java/com/fingerprint/v4/model/Event.java b/sdk/src/main/java/com/fingerprint/v4/model/Event.java index b9d6725..34ac759 100644 --- a/sdk/src/main/java/com/fingerprint/v4/model/Event.java +++ b/sdk/src/main/java/com/fingerprint/v4/model/Event.java @@ -24,7 +24,8 @@ use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "source", - defaultImpl = Event.UnknownEvent.class, + // SPIKE INTER-2457 option B: missing source hydrates to EventDevice. Never rewrite source:edge. + defaultImpl = EventDevice.class, visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = EventDevice.class, name = "device"), diff --git a/sdk/src/test/java/com/fingerprint/v4/SerializationTest.java b/sdk/src/test/java/com/fingerprint/v4/SerializationTest.java index 8bfe068..eac74ef 100644 --- a/sdk/src/test/java/com/fingerprint/v4/SerializationTest.java +++ b/sdk/src/test/java/com/fingerprint/v4/SerializationTest.java @@ -13,6 +13,8 @@ import com.fingerprint.v4.model.ErrorCode; import com.fingerprint.v4.model.ErrorResponse; import com.fingerprint.v4.model.Event; +import com.fingerprint.v4.model.EventDevice; +import com.fingerprint.v4.model.EventEdge; import com.fingerprint.v4.model.EventRuleAction; import com.fingerprint.v4.sdk.JSON; import java.io.File; @@ -101,7 +103,25 @@ public void deserializeEventWithUnknownRuleActionTypeValue() throws IOException // Convert the modified ObjectNode back to an Event object to test deserialization Event event = sdkObjectMapper.treeToValue(eventNode, Event.class); - assertInstanceOf(EventRuleAction.UnknownEventRuleAction.class, event.getRuleAction()); + assertInstanceOf( + EventRuleAction.UnknownEventRuleAction.class, ((EventDevice) event).getRuleAction()); + } + + @Test + public void missingSourceHydratesToEventDeviceAndSourceEdgeStaysEventEdge() throws IOException { + ObjectMapper sdkObjectMapper = JSON.getDefault().getMapper(); + + ObjectNode deviceNode = + sdkObjectMapper.readValue( + getFileAsIOStream("mocks/events/get_event_200.json"), ObjectNode.class); + deviceNode.remove("source"); + Event omittedSource = sdkObjectMapper.treeToValue(deviceNode, Event.class); + assertInstanceOf(EventDevice.class, omittedSource); + + Event edge = + sdkObjectMapper.readValue( + getFileAsIOStream("mocks/events/get_event_with_edge_200.json"), Event.class); + assertInstanceOf(EventEdge.class, edge); } @TestFactory From 89d183634cd13392b3681994a0b0cfa8a03c84dc Mon Sep 17 00:00:00 2001 From: Juraj Uhlar Date: Sun, 6 Sep 2026 21:16:26 +0100 Subject: [PATCH 3/3] fix: hydrate empty Event source via Jackson deserializer --- .openapi-generator-ignore | 2 + .../java/com/fingerprint/v4/model/Event.java | 3 +- .../fingerprint/v4/sdk/EventDeserializer.java | 55 +++++++++++++++++++ .../com/fingerprint/v4/sdk/EventMixin.java | 6 ++ .../java/com/fingerprint/v4/sdk/JSON.java | 6 ++ .../com/fingerprint/v4/SerializationTest.java | 24 ++++++++ template/libraries/jersey3/JSON.mustache | 6 ++ 7 files changed, 100 insertions(+), 2 deletions(-) create mode 100644 sdk/src/main/java/com/fingerprint/v4/sdk/EventDeserializer.java create mode 100644 sdk/src/main/java/com/fingerprint/v4/sdk/EventMixin.java diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore index 4a55aa8..b2a000f 100644 --- a/.openapi-generator-ignore +++ b/.openapi-generator-ignore @@ -4,6 +4,8 @@ git_push.sh api/* src/test/java/com/fingerprint/v4/model/* src/main/java/com/fingerprint/v4/model/AbstractOpenApiSchema.java +src/main/java/com/fingerprint/v4/sdk/EventDeserializer.java +src/main/java/com/fingerprint/v4/sdk/EventMixin.java src/main/AndroidManifest.xml .github/workflows/maven.yml pom.xml diff --git a/sdk/src/main/java/com/fingerprint/v4/model/Event.java b/sdk/src/main/java/com/fingerprint/v4/model/Event.java index 34ac759..b9d6725 100644 --- a/sdk/src/main/java/com/fingerprint/v4/model/Event.java +++ b/sdk/src/main/java/com/fingerprint/v4/model/Event.java @@ -24,8 +24,7 @@ use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "source", - // SPIKE INTER-2457 option B: missing source hydrates to EventDevice. Never rewrite source:edge. - defaultImpl = EventDevice.class, + defaultImpl = Event.UnknownEvent.class, visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = EventDevice.class, name = "device"), diff --git a/sdk/src/main/java/com/fingerprint/v4/sdk/EventDeserializer.java b/sdk/src/main/java/com/fingerprint/v4/sdk/EventDeserializer.java new file mode 100644 index 0000000..afcf2e6 --- /dev/null +++ b/sdk/src/main/java/com/fingerprint/v4/sdk/EventDeserializer.java @@ -0,0 +1,55 @@ +package com.fingerprint.v4.sdk; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.node.ObjectNode; +import com.fingerprint.v4.model.Event; +import com.fingerprint.v4.model.EventDevice; +import com.fingerprint.v4.model.EventEdge; +import java.io.IOException; + +/** + * Treats a missing, null, or empty Event {@code source} as {@code device}. + * Unknown non-empty values fail. Never rewrites {@code edge}. + */ +public final class EventDeserializer extends JsonDeserializer { + @Override + public Event deserialize(JsonParser parser, DeserializationContext context) throws IOException { + JsonNode node = parser.getCodec().readTree(parser); + if (node == null || !node.isObject()) { + throw JsonMappingException.from(parser, "event JSON must be an object"); + } + + ObjectNode object = (ObjectNode) node; + JsonNode source = object.get("source"); + if (source == null || source.isNull() || (source.isTextual() && source.asText().isEmpty())) { + object.put("source", "device"); + source = object.get("source"); + } + + if (!source.isTextual()) { + throw JsonMappingException.from(parser, "unknown Event source: " + source); + } + + String value = source.asText(); + ObjectMapper implMapper = ((ObjectMapper) parser.getCodec()).copy(); + implMapper.addMixIn(Event.class, StripEventPolymorphism.class); + if ("device".equals(value)) { + return implMapper.treeToValue(object, EventDevice.class); + } + if ("edge".equals(value)) { + return implMapper.treeToValue(object, EventEdge.class); + } + throw JsonMappingException.from(parser, "unknown Event source: " + value); + } + + @JsonTypeInfo(use = JsonTypeInfo.Id.NONE) + @JsonDeserialize(using = JsonDeserializer.None.class) + abstract static class StripEventPolymorphism {} +} diff --git a/sdk/src/main/java/com/fingerprint/v4/sdk/EventMixin.java b/sdk/src/main/java/com/fingerprint/v4/sdk/EventMixin.java new file mode 100644 index 0000000..1c81ed3 --- /dev/null +++ b/sdk/src/main/java/com/fingerprint/v4/sdk/EventMixin.java @@ -0,0 +1,6 @@ +package com.fingerprint.v4.sdk; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + +@JsonDeserialize(using = EventDeserializer.class) +public abstract class EventMixin {} diff --git a/sdk/src/main/java/com/fingerprint/v4/sdk/JSON.java b/sdk/src/main/java/com/fingerprint/v4/sdk/JSON.java index b5b7b22..2925729 100644 --- a/sdk/src/main/java/com/fingerprint/v4/sdk/JSON.java +++ b/sdk/src/main/java/com/fingerprint/v4/sdk/JSON.java @@ -15,7 +15,9 @@ import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.json.JsonMapper; +import com.fasterxml.jackson.databind.module.SimpleModule; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import com.fingerprint.v4.model.Event; import jakarta.ws.rs.core.GenericType; import jakarta.ws.rs.ext.ContextResolver; import java.text.DateFormat; @@ -45,6 +47,10 @@ public JSON() { .defaultDateFormat(new RFC3339DateFormat()) .addModule(new JavaTimeModule()) .addModule(new RFC3339JavaTimeModule()) + .addModule( + new SimpleModule() + .setMixInAnnotation(Event.class, EventMixin.class) + .addDeserializer(Event.class, new EventDeserializer())) .build(); } diff --git a/sdk/src/test/java/com/fingerprint/v4/SerializationTest.java b/sdk/src/test/java/com/fingerprint/v4/SerializationTest.java index eac74ef..5ac8632 100644 --- a/sdk/src/test/java/com/fingerprint/v4/SerializationTest.java +++ b/sdk/src/test/java/com/fingerprint/v4/SerializationTest.java @@ -5,6 +5,7 @@ import static org.junit.jupiter.api.Assertions.assertInstanceOf; import static org.junit.jupiter.api.Assertions.assertNotEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; @@ -124,6 +125,29 @@ public void missingSourceHydratesToEventDeviceAndSourceEdgeStaysEventEdge() thro assertInstanceOf(EventEdge.class, edge); } + @Test + public void emptySourceHydratesToEventDevice() throws IOException { + ObjectMapper sdkObjectMapper = JSON.getDefault().getMapper(); + ObjectNode deviceNode = + sdkObjectMapper.readValue( + getFileAsIOStream("mocks/events/get_event_200.json"), ObjectNode.class); + deviceNode.put("source", ""); + Event event = sdkObjectMapper.treeToValue(deviceNode, Event.class); + assertInstanceOf(EventDevice.class, event); + } + + @Test + public void unknownSourceFails() throws IOException { + ObjectMapper sdkObjectMapper = JSON.getDefault().getMapper(); + ObjectNode deviceNode = + sdkObjectMapper.readValue( + getFileAsIOStream("mocks/events/get_event_200.json"), ObjectNode.class); + deviceNode.put("source", "webhook"); + assertThrows( + com.fasterxml.jackson.databind.JsonMappingException.class, + () -> sdkObjectMapper.treeToValue(deviceNode, Event.class)); + } + @TestFactory public Stream deserializeErrorResponses() { ObjectMapper sdkObjectMapper = JSON.getDefault().getMapper(); diff --git a/template/libraries/jersey3/JSON.mustache b/template/libraries/jersey3/JSON.mustache index 5586d05..4d8f211 100644 --- a/template/libraries/jersey3/JSON.mustache +++ b/template/libraries/jersey3/JSON.mustache @@ -5,6 +5,8 @@ package {{invokerPackage}}; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.json.JsonMapper; +import com.fasterxml.jackson.databind.module.SimpleModule; +import com.fingerprint.v4.model.Event; {{#openApiNullable}} import org.openapitools.jackson.nullable.JsonNullableModule; {{/openApiNullable}} @@ -44,6 +46,10 @@ public class JSON implements ContextResolver { .addModule(new JsonNullableModule()) {{/openApiNullable}} .addModule(new RFC3339JavaTimeModule()) + .addModule( + new SimpleModule() + .setMixInAnnotation(Event.class, EventMixin.class) + .addDeserializer(Event.class, new EventDeserializer())) .build(); }