From 38848322bfe14a9dc23be469c924650fa58d7e1b Mon Sep 17 00:00:00 2001 From: Ilya Taratukhin Date: Wed, 10 Jan 2024 13:04:07 +0100 Subject: [PATCH] feat: use `datacenter` instead of the wrong `dataCenter` BREAKING CHANGE: `IpInfo` field `dataCenter` renamed to `datacenter` --- README.md | 1 - docs/DataCenter.md | 1 - docs/DataCenterInfo.md | 14 -- docs/IpInfoResultV4.md | 3 +- docs/IpInfoResultV6.md | 3 +- res/fingerprint-server-api.yaml | 18 --- .../com/fingerprint/model/DataCenter.java | 5 +- .../com/fingerprint/model/DataCenterInfo.java | 144 ------------------ .../com/fingerprint/model/IpInfoResultV4.java | 49 +----- .../com/fingerprint/model/IpInfoResultV6.java | 49 +----- 10 files changed, 17 insertions(+), 270 deletions(-) delete mode 100644 docs/DataCenterInfo.md delete mode 100644 src/main/java/com/fingerprint/model/DataCenterInfo.java diff --git a/README.md b/README.md index f530929..5f6caee 100644 --- a/README.md +++ b/README.md @@ -222,7 +222,6 @@ Class | Method | HTTP request | Description - [BrowserDetails](docs/BrowserDetails.md) - [Confidence](docs/Confidence.md) - [DataCenter](docs/DataCenter.md) - - [DataCenterInfo](docs/DataCenterInfo.md) - [Error](docs/Error.md) - [ErrorEvent403Response](docs/ErrorEvent403Response.md) - [ErrorEvent403ResponseError](docs/ErrorEvent403ResponseError.md) diff --git a/docs/DataCenter.md b/docs/DataCenter.md index 167ba11..de111a5 100644 --- a/docs/DataCenter.md +++ b/docs/DataCenter.md @@ -2,7 +2,6 @@ # DataCenter -`dataCenter` is deprecated in favor of `datacenter` ## Properties diff --git a/docs/DataCenterInfo.md b/docs/DataCenterInfo.md deleted file mode 100644 index 94ddab3..0000000 --- a/docs/DataCenterInfo.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# DataCenterInfo - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**result** | **Boolean** | | | -|**name** | **String** | | [optional] | - - - diff --git a/docs/IpInfoResultV4.md b/docs/IpInfoResultV4.md index 9db1d13..cc609eb 100644 --- a/docs/IpInfoResultV4.md +++ b/docs/IpInfoResultV4.md @@ -10,8 +10,7 @@ |**address** | **String** | | [optional] | |**geolocation** | [**IPLocation**](IPLocation.md) | | [optional] | |**asn** | [**ASN**](ASN.md) | | [optional] | -|**datacenter** | [**DataCenterInfo**](DataCenterInfo.md) | | [optional] | -|**dataCenter** | [**DataCenter**](DataCenter.md) | | [optional] | +|**datacenter** | [**DataCenter**](DataCenter.md) | | [optional] | diff --git a/docs/IpInfoResultV6.md b/docs/IpInfoResultV6.md index 8b1085a..2749745 100644 --- a/docs/IpInfoResultV6.md +++ b/docs/IpInfoResultV6.md @@ -10,8 +10,7 @@ |**address** | **String** | | [optional] | |**geolocation** | [**IPLocation**](IPLocation.md) | | [optional] | |**asn** | [**ASN**](ASN.md) | | [optional] | -|**datacenter** | [**DataCenterInfo**](DataCenterInfo.md) | | [optional] | -|**dataCenter** | [**DataCenter**](DataCenter.md) | | [optional] | +|**datacenter** | [**DataCenter**](DataCenter.md) | | [optional] | diff --git a/res/fingerprint-server-api.yaml b/res/fingerprint-server-api.yaml index 4329383..da9215c 100644 --- a/res/fingerprint-server-api.yaml +++ b/res/fingerprint-server-api.yaml @@ -4320,22 +4320,8 @@ components: - asn - network title: ASN - DataCenterInfo: - type: object - additionalProperties: false - properties: - result: - type: boolean - name: - type: string - example: DediPath - required: - - result - title: DataCenterInfo DataCenter: type: object - deprecated: true - description: '`dataCenter` is deprecated in favor of `datacenter`' additionalProperties: false properties: result: @@ -4878,8 +4864,6 @@ components: asn: $ref: '#/components/schemas/ASN' datacenter: - $ref: '#/components/schemas/DataCenterInfo' - dataCenter: $ref: '#/components/schemas/DataCenter' v6: type: object @@ -4894,8 +4878,6 @@ components: asn: $ref: '#/components/schemas/ASN' datacenter: - $ref: '#/components/schemas/DataCenterInfo' - dataCenter: $ref: '#/components/schemas/DataCenter' IpBlockListResult: type: object diff --git a/src/main/java/com/fingerprint/model/DataCenter.java b/src/main/java/com/fingerprint/model/DataCenter.java index f8fda31..f8004c9 100644 --- a/src/main/java/com/fingerprint/model/DataCenter.java +++ b/src/main/java/com/fingerprint/model/DataCenter.java @@ -29,11 +29,8 @@ /** - * `dataCenter` is deprecated in favor of `datacenter` - * @deprecated + * DataCenter */ -@Deprecated -@ApiModel(description = "`dataCenter` is deprecated in favor of `datacenter`") @JsonPropertyOrder({ DataCenter.JSON_PROPERTY_RESULT, DataCenter.JSON_PROPERTY_NAME diff --git a/src/main/java/com/fingerprint/model/DataCenterInfo.java b/src/main/java/com/fingerprint/model/DataCenterInfo.java deleted file mode 100644 index 29409e3..0000000 --- a/src/main/java/com/fingerprint/model/DataCenterInfo.java +++ /dev/null @@ -1,144 +0,0 @@ -/* - * 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; - - -/** - * DataCenterInfo - */ -@JsonPropertyOrder({ - DataCenterInfo.JSON_PROPERTY_RESULT, - DataCenterInfo.JSON_PROPERTY_NAME -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DataCenterInfo { - public static final String JSON_PROPERTY_RESULT = "result"; - private Boolean result; - - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public DataCenterInfo() { - } - - public DataCenterInfo 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 DataCenterInfo 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 DataCenterInfo object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DataCenterInfo dataCenterInfo = (DataCenterInfo) o; - return Objects.equals(this.result, dataCenterInfo.result) && - Objects.equals(this.name, dataCenterInfo.name); - } - - @Override - public int hashCode() { - return Objects.hash(result, name); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DataCenterInfo {\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 7107b1b..9c6fe2c 100644 --- a/src/main/java/com/fingerprint/model/IpInfoResultV4.java +++ b/src/main/java/com/fingerprint/model/IpInfoResultV4.java @@ -24,7 +24,6 @@ import com.fasterxml.jackson.annotation.JsonValue; import com.fingerprint.model.ASN; import com.fingerprint.model.DataCenter; -import com.fingerprint.model.DataCenterInfo; import com.fingerprint.model.IPLocation; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -39,8 +38,7 @@ IpInfoResultV4.JSON_PROPERTY_ADDRESS, IpInfoResultV4.JSON_PROPERTY_GEOLOCATION, IpInfoResultV4.JSON_PROPERTY_ASN, - IpInfoResultV4.JSON_PROPERTY_DATACENTER, - IpInfoResultV4.JSON_PROPERTY_DATA_CENTER + IpInfoResultV4.JSON_PROPERTY_DATACENTER }) @JsonTypeName("IpInfoResult_v4") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") @@ -55,10 +53,7 @@ public class IpInfoResultV4 { private ASN asn; public static final String JSON_PROPERTY_DATACENTER = "datacenter"; - private DataCenterInfo datacenter; - - public static final String JSON_PROPERTY_DATA_CENTER = "dataCenter"; - private DataCenter dataCenter; + private DataCenter datacenter; public IpInfoResultV4() { } @@ -143,7 +138,7 @@ public void setAsn(ASN asn) { } - public IpInfoResultV4 datacenter(DataCenterInfo datacenter) { + public IpInfoResultV4 datacenter(DataCenter datacenter) { this.datacenter = datacenter; return this; } @@ -157,46 +152,18 @@ public IpInfoResultV4 datacenter(DataCenterInfo datacenter) { @JsonProperty(JSON_PROPERTY_DATACENTER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public DataCenterInfo getDatacenter() { + public DataCenter getDatacenter() { return datacenter; } @JsonProperty(JSON_PROPERTY_DATACENTER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDatacenter(DataCenterInfo datacenter) { + public void setDatacenter(DataCenter datacenter) { this.datacenter = datacenter; } - public IpInfoResultV4 dataCenter(DataCenter dataCenter) { - this.dataCenter = dataCenter; - return this; - } - - /** - * Get dataCenter - * @return dataCenter - * @deprecated - **/ - @Deprecated - @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. */ @@ -212,13 +179,12 @@ public boolean equals(Object o) { return Objects.equals(this.address, ipInfoResultV4.address) && Objects.equals(this.geolocation, ipInfoResultV4.geolocation) && Objects.equals(this.asn, ipInfoResultV4.asn) && - Objects.equals(this.datacenter, ipInfoResultV4.datacenter) && - Objects.equals(this.dataCenter, ipInfoResultV4.dataCenter); + Objects.equals(this.datacenter, ipInfoResultV4.datacenter); } @Override public int hashCode() { - return Objects.hash(address, geolocation, asn, datacenter, dataCenter); + return Objects.hash(address, geolocation, asn, datacenter); } @Override @@ -229,7 +195,6 @@ public String toString() { 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(" 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 fb06250..adb862c 100644 --- a/src/main/java/com/fingerprint/model/IpInfoResultV6.java +++ b/src/main/java/com/fingerprint/model/IpInfoResultV6.java @@ -24,7 +24,6 @@ import com.fasterxml.jackson.annotation.JsonValue; import com.fingerprint.model.ASN; import com.fingerprint.model.DataCenter; -import com.fingerprint.model.DataCenterInfo; import com.fingerprint.model.IPLocation; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -39,8 +38,7 @@ IpInfoResultV6.JSON_PROPERTY_ADDRESS, IpInfoResultV6.JSON_PROPERTY_GEOLOCATION, IpInfoResultV6.JSON_PROPERTY_ASN, - IpInfoResultV6.JSON_PROPERTY_DATACENTER, - IpInfoResultV6.JSON_PROPERTY_DATA_CENTER + IpInfoResultV6.JSON_PROPERTY_DATACENTER }) @JsonTypeName("IpInfoResult_v6") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") @@ -55,10 +53,7 @@ public class IpInfoResultV6 { private ASN asn; public static final String JSON_PROPERTY_DATACENTER = "datacenter"; - private DataCenterInfo datacenter; - - public static final String JSON_PROPERTY_DATA_CENTER = "dataCenter"; - private DataCenter dataCenter; + private DataCenter datacenter; public IpInfoResultV6() { } @@ -143,7 +138,7 @@ public void setAsn(ASN asn) { } - public IpInfoResultV6 datacenter(DataCenterInfo datacenter) { + public IpInfoResultV6 datacenter(DataCenter datacenter) { this.datacenter = datacenter; return this; } @@ -157,46 +152,18 @@ public IpInfoResultV6 datacenter(DataCenterInfo datacenter) { @JsonProperty(JSON_PROPERTY_DATACENTER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public DataCenterInfo getDatacenter() { + public DataCenter getDatacenter() { return datacenter; } @JsonProperty(JSON_PROPERTY_DATACENTER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDatacenter(DataCenterInfo datacenter) { + public void setDatacenter(DataCenter datacenter) { this.datacenter = datacenter; } - public IpInfoResultV6 dataCenter(DataCenter dataCenter) { - this.dataCenter = dataCenter; - return this; - } - - /** - * Get dataCenter - * @return dataCenter - * @deprecated - **/ - @Deprecated - @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. */ @@ -212,13 +179,12 @@ public boolean equals(Object o) { return Objects.equals(this.address, ipInfoResultV6.address) && Objects.equals(this.geolocation, ipInfoResultV6.geolocation) && Objects.equals(this.asn, ipInfoResultV6.asn) && - Objects.equals(this.datacenter, ipInfoResultV6.datacenter) && - Objects.equals(this.dataCenter, ipInfoResultV6.dataCenter); + Objects.equals(this.datacenter, ipInfoResultV6.datacenter); } @Override public int hashCode() { - return Objects.hash(address, geolocation, asn, datacenter, dataCenter); + return Objects.hash(address, geolocation, asn, datacenter); } @Override @@ -229,7 +195,6 @@ public String toString() { 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(" dataCenter: ").append(toIndentedString(dataCenter)).append("\n"); sb.append("}"); return sb.toString(); }