diff --git a/README.md b/README.md index c2adbf9..4b76693 100644 --- a/README.md +++ b/README.md @@ -207,10 +207,12 @@ Class | Method | HTTP request | Description ## Documentation for Models + - [ASN](docs/ASN.md) - [BotdDetectionResult](docs/BotdDetectionResult.md) - [BotdResult](docs/BotdResult.md) - [BrowserDetails](docs/BrowserDetails.md) - [Confidence](docs/Confidence.md) + - [DataCenter](docs/DataCenter.md) - [Error](docs/Error.md) - [ErrorEvent403Response](docs/ErrorEvent403Response.md) - [ErrorEvent403ResponseError](docs/ErrorEvent403ResponseError.md) diff --git a/docs/ASN.md b/docs/ASN.md new file mode 100644 index 0000000..f0b6057 --- /dev/null +++ b/docs/ASN.md @@ -0,0 +1,15 @@ + + +# ASN + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**asn** | **String** | | | +|**network** | **String** | | | +|**name** | **String** | | [optional] | + + + diff --git a/docs/DataCenter.md b/docs/DataCenter.md new file mode 100644 index 0000000..de111a5 --- /dev/null +++ b/docs/DataCenter.md @@ -0,0 +1,14 @@ + + +# DataCenter + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**result** | **Boolean** | | | +|**name** | **String** | | [optional] | + + + diff --git a/docs/IpInfoResultV4.md b/docs/IpInfoResultV4.md index b7637fd..2ba0da8 100644 --- a/docs/IpInfoResultV4.md +++ b/docs/IpInfoResultV4.md @@ -9,6 +9,8 @@ |------------ | ------------- | ------------- | -------------| |**address** | **String** | | [optional] | |**geolocation** | [**IPLocation**](IPLocation.md) | | [optional] | +|**asn** | [**ASN**](ASN.md) | | [optional] | +|**dataCenter** | [**DataCenter**](DataCenter.md) | | [optional] | diff --git a/docs/IpInfoResultV6.md b/docs/IpInfoResultV6.md index c513cf2..b1889a0 100644 --- a/docs/IpInfoResultV6.md +++ b/docs/IpInfoResultV6.md @@ -9,6 +9,8 @@ |------------ | ------------- | ------------- | -------------| |**address** | **String** | | [optional] | |**geolocation** | [**IPLocation**](IPLocation.md) | | [optional] | +|**asn** | [**ASN**](ASN.md) | | [optional] | +|**dataCenter** | [**DataCenter**](DataCenter.md) | | [optional] | diff --git a/docs/ProductsResponse.md b/docs/ProductsResponse.md index 6951d5f..0c4e09b 100644 --- a/docs/ProductsResponse.md +++ b/docs/ProductsResponse.md @@ -2,7 +2,7 @@ # ProductsResponse -Contains all the information from each activated product - Fingerprint Pro or Bot Detection +Contains all information about the request identified by `requestId`, depending on the pricing plan (Pro, Pro Plus, Enterprise) ## Properties diff --git a/docs/ProductsResponseIdentificationData.md b/docs/ProductsResponseIdentificationData.md index 0c5ad6e..d4f3be5 100644 --- a/docs/ProductsResponseIdentificationData.md +++ b/docs/ProductsResponseIdentificationData.md @@ -21,7 +21,7 @@ |**visitorFound** | **Boolean** | Attribute represents if a visitor had been identified before. | | |**firstSeenAt** | [**SeenAt**](SeenAt.md) | | | |**lastSeenAt** | [**SeenAt**](SeenAt.md) | | | -|**visitorId** | **String** | | | +|**visitorId** | **String** | String of 20 characters that uniquely identifies the visitor's browser. **Pro Plus:** If a bot is detected (`products.botd.bot.result != \"notDetected\"`), the `visitorId` value contains a placeholder string `BotDetected000000000`. | | diff --git a/docs/VpnResult.md b/docs/VpnResult.md index 0d49642..3128dcd 100644 --- a/docs/VpnResult.md +++ b/docs/VpnResult.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**result** | **Boolean** | VPN or other anonymising service has been used when sending the request. | [optional] | +|**result** | **Boolean** | VPN or other anonymizing service has been used when sending the request. | [optional] | |**methods** | [**VpnResultMethods**](VpnResultMethods.md) | | [optional] | diff --git a/docs/VpnResultMethods.md b/docs/VpnResultMethods.md index de28f72..91864a0 100644 --- a/docs/VpnResultMethods.md +++ b/docs/VpnResultMethods.md @@ -9,6 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**timezoneMismatch** | **Boolean** | User's browser timezone doesn't match the timezone from which the request was originally made. | [optional] | |**publicVPN** | **Boolean** | Request IP address is owned and used by a public VPN service provider. | [optional] | +|**auxiliaryMobile** | **Boolean** | This method applies to mobile devices only. Indicates the result of additional methods used to detect a VPN in mobile devices. | [optional] | diff --git a/res/fingerprint-server-api.yaml b/res/fingerprint-server-api.yaml index f696526..bdd5fc4 100644 --- a/res/fingerprint-server-api.yaml +++ b/res/fingerprint-server-api.yaml @@ -129,8 +129,7 @@ paths: botd: data: bot: - result: bad - type: selenium + result: notDetected url: https://www.example.com/login ip: 61.127.217.15 time: '2019-05-21T16:40:13Z' @@ -155,6 +154,13 @@ paths: subdivisions: - isoCode: '10' name: Hlavni mesto Praha + asn: + asn: '7922' + name: COMCAST-7922 + network: 73.136.0.0/13 + dataCenter: + result: true + name: DediPath incognito: data: result: false @@ -179,6 +185,7 @@ paths: methods: timezoneMismatch: false publicVPN: false + auxiliaryMobile: false proxy: data: result: false @@ -224,6 +231,106 @@ paths: value: 0 cookiesEnabled: value: true + proPlusBotDetectedResponse: + summary: Bot detected on Pro Plus plan + value: + products: + identification: + data: + visitorId: BotDetected000000000 + requestId: 0KSh65EnVoB85JBmloQK + incognito: true + linkedId: somelinkedId + time: '2019-05-21T16:40:13Z' + timestamp: 1582299576512 + url: https://www.example.com/login + ip: 61.127.217.15 + ipLocation: {} + browserDetails: + browserName: '' + browserMajorVersion: '' + browserFullVersion: '' + os: '' + osVersion: '' + device: '' + userAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) .... + confidence: + score: 0.5 + comment: The real score is unknown + visitorFound: false + firstSeenAt: + global: null + subscription: null + lastSeenAt: + global: null + subscription: null + botd: + data: + bot: + result: bad + type: selenium + url: https://www.example.com/login + ip: 61.127.217.15 + time: '2019-05-21T16:40:13Z' + ipInfo: + data: + v4: + address: 94.142.239.124 + geolocation: + accuracyRadius: 20 + latitude: 50.05 + longitude: 14.4 + postalCode: 150 00 + timezone: Europe/Prague + city: + name: Prague + country: + code: CZ + name: Czechia + continent: + code: EU + name: Europe + subdivisions: + - isoCode: '10' + name: Hlavni mesto Praha + asn: + asn: '7922' + name: COMCAST-7922 + network: 73.136.0.0/13 + dataCenter: + result: true + name: DediPath + incognito: + data: + result: false + rootApps: + data: + result: false + emulator: + data: + result: false + ipBlocklist: + data: + result: false + details: + emailSpam: false + attackSource: false + tor: + data: + result: false + vpn: + data: + result: false + methods: + timezoneMismatch: false + publicVPN: false + proxy: + data: + result: false + tampering: + data: + result: false + anomalyScore: 0 allErrorsResponse: summary: All failed signals value: @@ -248,6 +355,22 @@ paths: error: code: Failed message: internal server error + clonedApp: + error: + code: Failed + message: internal server error + factoryReset: + error: + code: Failed + message: internal server error + jailbroken: + error: + code: Failed + message: internal server error + frida: + error: + code: Failed + message: internal server error emulator: error: code: Failed @@ -268,10 +391,28 @@ paths: error: code: Failed message: internal server error + privacySettings: + error: + code: Failed + message: internal server error + virtualMachine: + error: + code: Failed + message: internal server error tampering: error: code: Failed message: internal server error + rawDeviceAttributes: + data: + audio: + error: + name: Error + message: internal server error + canvas: + error: + name: Error + message: internal server error withBotdError: summary: BotD error value: @@ -3649,6 +3790,13 @@ paths: subdivisions: - isoCode: '10' name: Hlavni mesto Praha + asn: + asn: '7922' + name: COMCAST-7922 + network: 73.136.0.0/13 + dataCenter: + result: true + name: DediPath rootApps: result: false emulator: @@ -3665,6 +3813,7 @@ paths: methods: timezoneMismatch: false publicVPN: false + auxiliaryMobile: false proxy: result: false tampering: @@ -4238,6 +4387,35 @@ components: example: global: '2022-05-05T18:28:54.535Z' subscription: null + ASN: + type: object + additionalProperties: false + properties: + asn: + type: string + example: '7922' + network: + type: string + example: 73.136.0.0/13 + name: + type: string + example: COMCAST-7922 + required: + - asn + - network + title: ASN + DataCenter: + type: object + additionalProperties: false + properties: + result: + type: boolean + name: + type: string + example: DediPath + required: + - result + title: DataCenter IPLocation: type: object additionalProperties: false @@ -4311,8 +4489,8 @@ components: ProductsResponse: type: object description: >- - Contains all the information from each activated product - Fingerprint - Pro or Bot Detection + Contains all information about the request identified by `requestId`, + depending on the pricing plan (Pro, Pro Plus, Enterprise) additionalProperties: false properties: identification: @@ -4382,6 +4560,19 @@ components: $ref: '#/components/schemas/SeenAt' visitorId: type: string + description: > + String of 20 characters that uniquely identifies the + visitor's browser. + + + **Pro Plus:** + + If a bot is detected (`products.botd.bot.result != + "notDetected"`), the `visitorId` value contains a + placeholder string `BotDetected000000000`. + example: + - Ibk1527CUFmcnjLwIs4A + - BotDetected000000000 additionalProperties: false required: - browserDetails @@ -4737,6 +4928,10 @@ components: example: 94.142.239.124 geolocation: $ref: '#/components/schemas/IPLocation' + asn: + $ref: '#/components/schemas/ASN' + dataCenter: + $ref: '#/components/schemas/DataCenter' v6: type: object additionalProperties: false @@ -4747,6 +4942,10 @@ components: example: 2001:0db8:85a3:0000:0000:8a2e:0370:7334 geolocation: $ref: '#/components/schemas/IPLocation' + asn: + $ref: '#/components/schemas/ASN' + dataCenter: + $ref: '#/components/schemas/DataCenter' IpBlockListResult: type: object properties: @@ -4773,7 +4972,7 @@ components: result: type: boolean description: >- - VPN or other anonymising service has been used when sending the + VPN or other anonymizing service has been used when sending the request. example: false methods: @@ -4791,6 +4990,12 @@ components: Request IP address is owned and used by a public VPN service provider. example: false + auxiliaryMobile: + type: boolean + description: >- + This method applies to mobile devices only. Indicates the result + of additional methods used to detect a VPN in mobile devices. + example: false TamperingResult: type: object properties: diff --git a/src/main/java/com/fingerprint/model/ASN.java b/src/main/java/com/fingerprint/model/ASN.java new file mode 100644 index 0000000..f2b403c --- /dev/null +++ b/src/main/java/com/fingerprint/model/ASN.java @@ -0,0 +1,176 @@ +/* + * Fingerprint Pro Server API + * Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. It can be used for data exports, decision-making, and data analysis scenarios. Server API is intended for server-side usage, it's not intended to be used from the client side, whether it's a browser or a mobile device. + * + * The version of the OpenAPI document: 3 + * 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.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fingerprint.sdk.JSON; + + +/** + * ASN + */ +@JsonPropertyOrder({ + ASN.JSON_PROPERTY_ASN, + ASN.JSON_PROPERTY_NETWORK, + ASN.JSON_PROPERTY_NAME +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ASN { + public static final String JSON_PROPERTY_ASN = "asn"; + private String asn; + + public static final String JSON_PROPERTY_NETWORK = "network"; + private String network; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public ASN() { + } + + public ASN asn(String asn) { + this.asn = asn; + return this; + } + + /** + * Get asn + * @return asn + **/ + @javax.annotation.Nonnull + @ApiModelProperty(example = "7922", required = true, value = "") + @JsonProperty(JSON_PROPERTY_ASN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getAsn() { + return asn; + } + + + @JsonProperty(JSON_PROPERTY_ASN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAsn(String asn) { + this.asn = asn; + } + + + public ASN network(String network) { + this.network = network; + return this; + } + + /** + * Get network + * @return network + **/ + @javax.annotation.Nonnull + @ApiModelProperty(example = "73.136.0.0/13", required = true, value = "") + @JsonProperty(JSON_PROPERTY_NETWORK) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getNetwork() { + return network; + } + + + @JsonProperty(JSON_PROPERTY_NETWORK) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNetwork(String network) { + this.network = network; + } + + + public ASN name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "COMCAST-7922", value = "") + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; + } + + + /** + * Return true if this ASN object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ASN ASN = (ASN) o; + return Objects.equals(this.asn, ASN.asn) && + Objects.equals(this.network, ASN.network) && + Objects.equals(this.name, ASN.name); + } + + @Override + public int hashCode() { + return Objects.hash(asn, network, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ASN {\n"); + sb.append(" asn: ").append(toIndentedString(asn)).append("\n"); + sb.append(" network: ").append(toIndentedString(network)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).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/src/main/java/com/fingerprint/model/DataCenter.java b/src/main/java/com/fingerprint/model/DataCenter.java new file mode 100644 index 0000000..f8004c9 --- /dev/null +++ b/src/main/java/com/fingerprint/model/DataCenter.java @@ -0,0 +1,144 @@ +/* + * Fingerprint Pro Server API + * Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. It can be used for data exports, decision-making, and data analysis scenarios. Server API is intended for server-side usage, it's not intended to be used from the client side, whether it's a browser or a mobile device. + * + * The version of the OpenAPI document: 3 + * 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.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fingerprint.sdk.JSON; + + +/** + * DataCenter + */ +@JsonPropertyOrder({ + DataCenter.JSON_PROPERTY_RESULT, + DataCenter.JSON_PROPERTY_NAME +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DataCenter { + public static final String JSON_PROPERTY_RESULT = "result"; + private Boolean result; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public DataCenter() { + } + + public DataCenter result(Boolean result) { + this.result = result; + return this; + } + + /** + * Get result + * @return result + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getResult() { + return result; + } + + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(Boolean result) { + this.result = result; + } + + + public DataCenter name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "DediPath", value = "") + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; + } + + + /** + * Return true if this DataCenter object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DataCenter dataCenter = (DataCenter) o; + return Objects.equals(this.result, dataCenter.result) && + Objects.equals(this.name, dataCenter.name); + } + + @Override + public int hashCode() { + return Objects.hash(result, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DataCenter {\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).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/src/main/java/com/fingerprint/model/IpInfoResultV4.java b/src/main/java/com/fingerprint/model/IpInfoResultV4.java index 1842c68..3eadf3f 100644 --- a/src/main/java/com/fingerprint/model/IpInfoResultV4.java +++ b/src/main/java/com/fingerprint/model/IpInfoResultV4.java @@ -22,6 +22,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; +import com.fingerprint.model.ASN; +import com.fingerprint.model.DataCenter; import com.fingerprint.model.IPLocation; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -34,7 +36,9 @@ */ @JsonPropertyOrder({ IpInfoResultV4.JSON_PROPERTY_ADDRESS, - IpInfoResultV4.JSON_PROPERTY_GEOLOCATION + IpInfoResultV4.JSON_PROPERTY_GEOLOCATION, + IpInfoResultV4.JSON_PROPERTY_ASN, + IpInfoResultV4.JSON_PROPERTY_DATA_CENTER }) @JsonTypeName("IpInfoResult_v4") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") @@ -45,6 +49,12 @@ public class IpInfoResultV4 { public static final String JSON_PROPERTY_GEOLOCATION = "geolocation"; private IPLocation geolocation; + public static final String JSON_PROPERTY_ASN = "asn"; + private ASN asn; + + public static final String JSON_PROPERTY_DATA_CENTER = "dataCenter"; + private DataCenter dataCenter; + public IpInfoResultV4() { } @@ -100,6 +110,58 @@ public void setGeolocation(IPLocation geolocation) { } + public IpInfoResultV4 asn(ASN asn) { + this.asn = asn; + return this; + } + + /** + * Get asn + * @return asn + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ASN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ASN getAsn() { + return asn; + } + + + @JsonProperty(JSON_PROPERTY_ASN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAsn(ASN asn) { + this.asn = asn; + } + + + public IpInfoResultV4 dataCenter(DataCenter dataCenter) { + this.dataCenter = dataCenter; + return this; + } + + /** + * Get dataCenter + * @return dataCenter + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DATA_CENTER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DataCenter getDataCenter() { + return dataCenter; + } + + + @JsonProperty(JSON_PROPERTY_DATA_CENTER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDataCenter(DataCenter dataCenter) { + this.dataCenter = dataCenter; + } + + /** * Return true if this IpInfoResult_v4 object is equal to o. */ @@ -113,12 +175,14 @@ public boolean equals(Object o) { } IpInfoResultV4 ipInfoResultV4 = (IpInfoResultV4) o; return Objects.equals(this.address, ipInfoResultV4.address) && - Objects.equals(this.geolocation, ipInfoResultV4.geolocation); + Objects.equals(this.geolocation, ipInfoResultV4.geolocation) && + Objects.equals(this.asn, ipInfoResultV4.asn) && + Objects.equals(this.dataCenter, ipInfoResultV4.dataCenter); } @Override public int hashCode() { - return Objects.hash(address, geolocation); + return Objects.hash(address, geolocation, asn, dataCenter); } @Override @@ -127,6 +191,8 @@ public String toString() { sb.append("class IpInfoResultV4 {\n"); sb.append(" address: ").append(toIndentedString(address)).append("\n"); sb.append(" geolocation: ").append(toIndentedString(geolocation)).append("\n"); + sb.append(" asn: ").append(toIndentedString(asn)).append("\n"); + sb.append(" dataCenter: ").append(toIndentedString(dataCenter)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/fingerprint/model/IpInfoResultV6.java b/src/main/java/com/fingerprint/model/IpInfoResultV6.java index b5c1235..3ac1efd 100644 --- a/src/main/java/com/fingerprint/model/IpInfoResultV6.java +++ b/src/main/java/com/fingerprint/model/IpInfoResultV6.java @@ -22,6 +22,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; +import com.fingerprint.model.ASN; +import com.fingerprint.model.DataCenter; import com.fingerprint.model.IPLocation; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -34,7 +36,9 @@ */ @JsonPropertyOrder({ IpInfoResultV6.JSON_PROPERTY_ADDRESS, - IpInfoResultV6.JSON_PROPERTY_GEOLOCATION + IpInfoResultV6.JSON_PROPERTY_GEOLOCATION, + IpInfoResultV6.JSON_PROPERTY_ASN, + IpInfoResultV6.JSON_PROPERTY_DATA_CENTER }) @JsonTypeName("IpInfoResult_v6") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") @@ -45,6 +49,12 @@ public class IpInfoResultV6 { public static final String JSON_PROPERTY_GEOLOCATION = "geolocation"; private IPLocation geolocation; + public static final String JSON_PROPERTY_ASN = "asn"; + private ASN asn; + + public static final String JSON_PROPERTY_DATA_CENTER = "dataCenter"; + private DataCenter dataCenter; + public IpInfoResultV6() { } @@ -100,6 +110,58 @@ public void setGeolocation(IPLocation geolocation) { } + public IpInfoResultV6 asn(ASN asn) { + this.asn = asn; + return this; + } + + /** + * Get asn + * @return asn + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ASN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ASN getAsn() { + return asn; + } + + + @JsonProperty(JSON_PROPERTY_ASN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAsn(ASN asn) { + this.asn = asn; + } + + + public IpInfoResultV6 dataCenter(DataCenter dataCenter) { + this.dataCenter = dataCenter; + return this; + } + + /** + * Get dataCenter + * @return dataCenter + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DATA_CENTER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DataCenter getDataCenter() { + return dataCenter; + } + + + @JsonProperty(JSON_PROPERTY_DATA_CENTER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDataCenter(DataCenter dataCenter) { + this.dataCenter = dataCenter; + } + + /** * Return true if this IpInfoResult_v6 object is equal to o. */ @@ -113,12 +175,14 @@ public boolean equals(Object o) { } IpInfoResultV6 ipInfoResultV6 = (IpInfoResultV6) o; return Objects.equals(this.address, ipInfoResultV6.address) && - Objects.equals(this.geolocation, ipInfoResultV6.geolocation); + Objects.equals(this.geolocation, ipInfoResultV6.geolocation) && + Objects.equals(this.asn, ipInfoResultV6.asn) && + Objects.equals(this.dataCenter, ipInfoResultV6.dataCenter); } @Override public int hashCode() { - return Objects.hash(address, geolocation); + return Objects.hash(address, geolocation, asn, dataCenter); } @Override @@ -127,6 +191,8 @@ public String toString() { sb.append("class IpInfoResultV6 {\n"); sb.append(" address: ").append(toIndentedString(address)).append("\n"); sb.append(" geolocation: ").append(toIndentedString(geolocation)).append("\n"); + sb.append(" asn: ").append(toIndentedString(asn)).append("\n"); + sb.append(" dataCenter: ").append(toIndentedString(dataCenter)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/fingerprint/model/ProductsResponse.java b/src/main/java/com/fingerprint/model/ProductsResponse.java index fa6f100..2476ede 100644 --- a/src/main/java/com/fingerprint/model/ProductsResponse.java +++ b/src/main/java/com/fingerprint/model/ProductsResponse.java @@ -47,9 +47,9 @@ /** - * Contains all the information from each activated product - Fingerprint Pro or Bot Detection + * Contains all information about the request identified by `requestId`, depending on the pricing plan (Pro, Pro Plus, Enterprise) */ -@ApiModel(description = "Contains all the information from each activated product - Fingerprint Pro or Bot Detection") +@ApiModel(description = "Contains all information about the request identified by `requestId`, depending on the pricing plan (Pro, Pro Plus, Enterprise)") @JsonPropertyOrder({ ProductsResponse.JSON_PROPERTY_IDENTIFICATION, ProductsResponse.JSON_PROPERTY_BOTD, diff --git a/src/main/java/com/fingerprint/model/ProductsResponseIdentificationData.java b/src/main/java/com/fingerprint/model/ProductsResponseIdentificationData.java index 147850e..eb6b204 100644 --- a/src/main/java/com/fingerprint/model/ProductsResponseIdentificationData.java +++ b/src/main/java/com/fingerprint/model/ProductsResponseIdentificationData.java @@ -484,11 +484,11 @@ public ProductsResponseIdentificationData visitorId(String visitorId) { } /** - * Get visitorId + * String of 20 characters that uniquely identifies the visitor's browser. **Pro Plus:** If a bot is detected (`products.botd.bot.result != \"notDetected\"`), the `visitorId` value contains a placeholder string `BotDetected000000000`. * @return visitorId **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") + @ApiModelProperty(example = "[\"Ibk1527CUFmcnjLwIs4A\",\"BotDetected000000000\"]", required = true, value = "String of 20 characters that uniquely identifies the visitor's browser. **Pro Plus:** If a bot is detected (`products.botd.bot.result != \"notDetected\"`), the `visitorId` value contains a placeholder string `BotDetected000000000`. ") @JsonProperty(JSON_PROPERTY_VISITOR_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) diff --git a/src/main/java/com/fingerprint/model/VpnResult.java b/src/main/java/com/fingerprint/model/VpnResult.java index d63f61e..fdf85c6 100644 --- a/src/main/java/com/fingerprint/model/VpnResult.java +++ b/src/main/java/com/fingerprint/model/VpnResult.java @@ -53,11 +53,11 @@ public VpnResult result(Boolean result) { } /** - * VPN or other anonymising service has been used when sending the request. + * VPN or other anonymizing service has been used when sending the request. * @return result **/ @javax.annotation.Nullable - @ApiModelProperty(example = "false", value = "VPN or other anonymising service has been used when sending the request.") + @ApiModelProperty(example = "false", value = "VPN or other anonymizing service has been used when sending the request.") @JsonProperty(JSON_PROPERTY_RESULT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/fingerprint/model/VpnResultMethods.java b/src/main/java/com/fingerprint/model/VpnResultMethods.java index 0a5d612..2517d4e 100644 --- a/src/main/java/com/fingerprint/model/VpnResultMethods.java +++ b/src/main/java/com/fingerprint/model/VpnResultMethods.java @@ -33,7 +33,8 @@ */ @JsonPropertyOrder({ VpnResultMethods.JSON_PROPERTY_TIMEZONE_MISMATCH, - VpnResultMethods.JSON_PROPERTY_PUBLIC_V_P_N + VpnResultMethods.JSON_PROPERTY_PUBLIC_V_P_N, + VpnResultMethods.JSON_PROPERTY_AUXILIARY_MOBILE }) @JsonTypeName("VpnResult_methods") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") @@ -44,6 +45,9 @@ public class VpnResultMethods { public static final String JSON_PROPERTY_PUBLIC_V_P_N = "publicVPN"; private Boolean publicVPN; + public static final String JSON_PROPERTY_AUXILIARY_MOBILE = "auxiliaryMobile"; + private Boolean auxiliaryMobile; + public VpnResultMethods() { } @@ -99,6 +103,32 @@ public void setPublicVPN(Boolean publicVPN) { } + public VpnResultMethods auxiliaryMobile(Boolean auxiliaryMobile) { + this.auxiliaryMobile = auxiliaryMobile; + return this; + } + + /** + * This method applies to mobile devices only. Indicates the result of additional methods used to detect a VPN in mobile devices. + * @return auxiliaryMobile + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "false", value = "This method applies to mobile devices only. Indicates the result of additional methods used to detect a VPN in mobile devices.") + @JsonProperty(JSON_PROPERTY_AUXILIARY_MOBILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getAuxiliaryMobile() { + return auxiliaryMobile; + } + + + @JsonProperty(JSON_PROPERTY_AUXILIARY_MOBILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAuxiliaryMobile(Boolean auxiliaryMobile) { + this.auxiliaryMobile = auxiliaryMobile; + } + + /** * Return true if this VpnResult_methods object is equal to o. */ @@ -112,12 +142,13 @@ public boolean equals(Object o) { } VpnResultMethods vpnResultMethods = (VpnResultMethods) o; return Objects.equals(this.timezoneMismatch, vpnResultMethods.timezoneMismatch) && - Objects.equals(this.publicVPN, vpnResultMethods.publicVPN); + Objects.equals(this.publicVPN, vpnResultMethods.publicVPN) && + Objects.equals(this.auxiliaryMobile, vpnResultMethods.auxiliaryMobile); } @Override public int hashCode() { - return Objects.hash(timezoneMismatch, publicVPN); + return Objects.hash(timezoneMismatch, publicVPN, auxiliaryMobile); } @Override @@ -126,6 +157,7 @@ public String toString() { sb.append("class VpnResultMethods {\n"); sb.append(" timezoneMismatch: ").append(toIndentedString(timezoneMismatch)).append("\n"); sb.append(" publicVPN: ").append(toIndentedString(publicVPN)).append("\n"); + sb.append(" auxiliaryMobile: ").append(toIndentedString(auxiliaryMobile)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/test/resources/mocks/get_event.json b/src/test/resources/mocks/get_event.json index dc5cebe..90abb41 100644 --- a/src/test/resources/mocks/get_event.json +++ b/src/test/resources/mocks/get_event.json @@ -60,8 +60,7 @@ "botd": { "data": { "bot": { - "result": "bad", - "type": "selenium" + "result": "notDetected" }, "url": "https://www.example.com/login", "ip": "61.127.217.15", @@ -95,6 +94,15 @@ "name": "Hlavni mesto Praha" } ] + }, + "asn": { + "asn": "7922", + "name": "COMCAST-7922", + "network": "73.136.0.0/13" + }, + "dataCenter": { + "result": true, + "name": "DediPath" } } } @@ -133,7 +141,8 @@ "result": false, "methods": { "timezoneMismatch": false, - "publicVPN": false + "publicVPN": false, + "auxiliaryMobile": false } } },