Record Class IpRiskResponse
java.lang.Object
java.lang.Record
com.maxmind.geoip2.model.IpRiskResponse
- Record Components:
ipAddress- The IP address that the data in the model is for.isAnonymous- Whether the IP address belongs to any sort of anonymous network.isAnonymousVpn- Whether the IP address is registered to an anonymous VPN provider. If a VPN provider does not register subnets under names associated with them, we will likely only flag their IP ranges using isHostingProvider.isHostingProvider- Whether the IP address belongs to a hosting or VPN provider (see description of isAnonymousVpn).isPublicProxy- Whether the IP address belongs to a public proxy.isResidentialProxy- Whether the IP address is on a suspected anonymizing network and belongs to a residential ISP.isTorExitNode- Whether the IP address is a Tor exit node.network- The network associated with the record. In particular, this is the largest network where all the fields besides IP address have the same value.ipRisk- The IP risk of a model.
- All Implemented Interfaces:
JsonSerializable
public record IpRiskResponse(InetAddress ipAddress, boolean isAnonymous, boolean isAnonymousVpn, boolean isHostingProvider, boolean isPublicProxy, boolean isResidentialProxy, boolean isTorExitNode, Network network, double ipRisk)
extends Record
implements JsonSerializable
This class provides the GeoIP2 IP Risk model.
-
Constructor Summary
ConstructorsConstructorDescriptionIpRiskResponse(InetAddress ipAddress, boolean isAnonymous, boolean isAnonymousVpn, boolean isHostingProvider, boolean isPublicProxy, boolean isResidentialProxy, boolean isTorExitNode, Network network, double ipRisk) Creates an instance of aIpRiskResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Deprecated, for removal: This API element is subject to removal in a future version.doubleDeprecated, for removal: This API element is subject to removal in a future version.UseipRisk()instead.Deprecated, for removal: This API element is subject to removal in a future version.Usenetwork()instead.final inthashCode()Returns a hash code value for this object.Returns the value of theipAddressrecord component.doubleipRisk()Returns the value of theipRiskrecord component.booleanReturns the value of theisAnonymousrecord component.booleanReturns the value of theisAnonymousVpnrecord component.booleanReturns the value of theisHostingProviderrecord component.booleanReturns the value of theisPublicProxyrecord component.booleanReturns the value of theisResidentialProxyrecord component.booleanReturns the value of theisTorExitNoderecord component.network()Returns the value of thenetworkrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface JsonSerializable
toJson
-
Constructor Details
-
IpRiskResponse
public IpRiskResponse(InetAddress ipAddress, boolean isAnonymous, boolean isAnonymousVpn, boolean isHostingProvider, boolean isPublicProxy, boolean isResidentialProxy, boolean isTorExitNode, Network network, double ipRisk) Creates an instance of aIpRiskResponserecord class.- Parameters:
ipAddress- the value for theipAddressrecord componentisAnonymous- the value for theisAnonymousrecord componentisAnonymousVpn- the value for theisAnonymousVpnrecord componentisHostingProvider- the value for theisHostingProviderrecord componentisPublicProxy- the value for theisPublicProxyrecord componentisResidentialProxy- the value for theisResidentialProxyrecord componentisTorExitNode- the value for theisTorExitNoderecord componentnetwork- the value for thenetworkrecord componentipRisk- the value for theipRiskrecord component
-
-
Method Details
-
getIpAddress
Deprecated, for removal: This API element is subject to removal in a future version.UseipAddress()instead. This method will be removed in 6.0.0.- Returns:
- The IP address that the data in the model is for.
-
getNetwork
Deprecated, for removal: This API element is subject to removal in a future version.Usenetwork()instead. This method will be removed in 6.0.0.- Returns:
- The network associated with the record. In particular, this is the largest network where all the fields besides IP address have the same value.
-
getIpRisk
Deprecated, for removal: This API element is subject to removal in a future version.UseipRisk()instead. This method will be removed in 6.0.0.- Returns:
- The IP risk of a model.
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
ipAddress
-
isAnonymous
public boolean isAnonymous()Returns the value of theisAnonymousrecord component.- Returns:
- the value of the
isAnonymousrecord component
-
isAnonymousVpn
public boolean isAnonymousVpn()Returns the value of theisAnonymousVpnrecord component.- Returns:
- the value of the
isAnonymousVpnrecord component
-
isHostingProvider
public boolean isHostingProvider()Returns the value of theisHostingProviderrecord component.- Returns:
- the value of the
isHostingProviderrecord component
-
isPublicProxy
public boolean isPublicProxy()Returns the value of theisPublicProxyrecord component.- Returns:
- the value of the
isPublicProxyrecord component
-
isResidentialProxy
public boolean isResidentialProxy()Returns the value of theisResidentialProxyrecord component.- Returns:
- the value of the
isResidentialProxyrecord component
-
isTorExitNode
public boolean isTorExitNode()Returns the value of theisTorExitNoderecord component.- Returns:
- the value of the
isTorExitNoderecord component
-
network
-
ipRisk
-
ipAddress()instead.