Skip to content

Commit

Permalink
feat: mark IPLocation as deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
ilfa committed Jan 10, 2024
1 parent 19313e5 commit 51bcc21
Show file tree
Hide file tree
Showing 16 changed files with 219 additions and 16 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ 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)
Expand Down
1 change: 1 addition & 0 deletions docs/DataCenter.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# DataCenter

`dataCenter` is deprecated in favor of `datacenter`

## Properties

Expand Down
14 changes: 14 additions & 0 deletions docs/DataCenterInfo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@


# DataCenterInfo


## Properties

| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**result** | **Boolean** | | |
|**name** | **String** | | [optional] |



1 change: 1 addition & 0 deletions docs/IPLocation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# IPLocation

This field is **deprecated** and will not return a result for **accounts created after December 18th, 2023**. Please use the [`ipInfo` Smart signal](https://dev.fingerprint.com/docs/smart-signals-overview#ip-geolocation) for geolocation information.

## Properties

Expand Down
2 changes: 1 addition & 1 deletion docs/IpInfoResultV4.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
|**address** | **String** | | [optional] |
|**geolocation** | [**IPLocation**](IPLocation.md) | | [optional] |
|**asn** | [**ASN**](ASN.md) | | [optional] |
|**datacenter** | [**DataCenter**](DataCenter.md) | | [optional] |
|**datacenter** | [**DataCenterInfo**](DataCenterInfo.md) | | [optional] |
|**dataCenter** | [**DataCenter**](DataCenter.md) | | [optional] |


Expand Down
2 changes: 1 addition & 1 deletion docs/IpInfoResultV6.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
|**address** | **String** | | [optional] |
|**geolocation** | [**IPLocation**](IPLocation.md) | | [optional] |
|**asn** | [**ASN**](ASN.md) | | [optional] |
|**datacenter** | [**DataCenter**](DataCenter.md) | | [optional] |
|**datacenter** | [**DataCenterInfo**](DataCenterInfo.md) | | [optional] |
|**dataCenter** | [**DataCenter**](DataCenter.md) | | [optional] |


Expand Down
26 changes: 22 additions & 4 deletions res/fingerprint-server-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4320,8 +4320,22 @@ 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:
Expand All @@ -4335,6 +4349,12 @@ components:
IPLocation:
type: object
additionalProperties: false
deprecated: true
description: >-
This field is **deprecated** and will not return a result for **accounts
created after December 18th, 2023**. Please use the [`ipInfo` Smart
signal](https://dev.fingerprint.com/docs/smart-signals-overview#ip-geolocation)
for geolocation information.
properties:
accuracyRadius:
description: >-
Expand Down Expand Up @@ -4858,8 +4878,7 @@ components:
asn:
$ref: '#/components/schemas/ASN'
datacenter:
$ref: '#/components/schemas/DataCenter'
# `dataCenter` is deprecated in favor of `datacenter`
$ref: '#/components/schemas/DataCenterInfo'
dataCenter:
$ref: '#/components/schemas/DataCenter'
v6:
Expand All @@ -4875,8 +4894,7 @@ components:
asn:
$ref: '#/components/schemas/ASN'
datacenter:
$ref: '#/components/schemas/DataCenter'
# `dataCenter` is deprecated in favor of `datacenter`
$ref: '#/components/schemas/DataCenterInfo'
dataCenter:
$ref: '#/components/schemas/DataCenter'
IpBlockListResult:
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/com/fingerprint/model/DataCenter.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@


/**
* DataCenter
* `dataCenter` is deprecated in favor of `datacenter`
* @deprecated
*/
@Deprecated
@ApiModel(description = "`dataCenter` is deprecated in favor of `datacenter`")
@JsonPropertyOrder({
DataCenter.JSON_PROPERTY_RESULT,
DataCenter.JSON_PROPERTY_NAME
Expand Down
144 changes: 144 additions & 0 deletions src/main/java/com/fingerprint/model/DataCenterInfo.java
Original file line number Diff line number Diff line change
@@ -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;


/**
* 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 ");
}

}

5 changes: 4 additions & 1 deletion src/main/java/com/fingerprint/model/IPLocation.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@


/**
* IPLocation
* This field is **deprecated** and will not return a result for **accounts created after December 18th, 2023**. Please use the [`ipInfo` Smart signal](https://dev.fingerprint.com/docs/smart-signals-overview#ip-geolocation) for geolocation information.
* @deprecated
*/
@Deprecated
@ApiModel(description = "This field is **deprecated** and will not return a result for **accounts created after December 18th, 2023**. Please use the [`ipInfo` Smart signal](https://dev.fingerprint.com/docs/smart-signals-overview#ip-geolocation) for geolocation information.")
@JsonPropertyOrder({
IPLocation.JSON_PROPERTY_ACCURACY_RADIUS,
IPLocation.JSON_PROPERTY_LATITUDE,
Expand Down
13 changes: 9 additions & 4 deletions src/main/java/com/fingerprint/model/IpInfoResultV4.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
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;
Expand Down Expand Up @@ -54,7 +55,7 @@ public class IpInfoResultV4 {
private ASN asn;

public static final String JSON_PROPERTY_DATACENTER = "datacenter";
private DataCenter datacenter;
private DataCenterInfo datacenter;

public static final String JSON_PROPERTY_DATA_CENTER = "dataCenter";
private DataCenter dataCenter;
Expand Down Expand Up @@ -96,7 +97,9 @@ public IpInfoResultV4 geolocation(IPLocation geolocation) {
/**
* Get geolocation
* @return geolocation
* @deprecated
**/
@Deprecated
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_GEOLOCATION)
Expand Down Expand Up @@ -140,7 +143,7 @@ public void setAsn(ASN asn) {
}


public IpInfoResultV4 datacenter(DataCenter datacenter) {
public IpInfoResultV4 datacenter(DataCenterInfo datacenter) {
this.datacenter = datacenter;
return this;
}
Expand All @@ -154,14 +157,14 @@ public IpInfoResultV4 datacenter(DataCenter datacenter) {
@JsonProperty(JSON_PROPERTY_DATACENTER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

public DataCenter getDatacenter() {
public DataCenterInfo getDatacenter() {
return datacenter;
}


@JsonProperty(JSON_PROPERTY_DATACENTER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDatacenter(DataCenter datacenter) {
public void setDatacenter(DataCenterInfo datacenter) {
this.datacenter = datacenter;
}

Expand All @@ -174,7 +177,9 @@ public IpInfoResultV4 dataCenter(DataCenter dataCenter) {
/**
* Get dataCenter
* @return dataCenter
* @deprecated
**/
@Deprecated
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_DATA_CENTER)
Expand Down
Loading

0 comments on commit 51bcc21

Please sign in to comment.