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 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 a IpRiskResponse record class.
      Parameters:
      ipAddress - the value for the ipAddress record component
      isAnonymous - the value for the isAnonymous record component
      isAnonymousVpn - the value for the isAnonymousVpn record component
      isHostingProvider - the value for the isHostingProvider record component
      isPublicProxy - the value for the isPublicProxy record component
      isResidentialProxy - the value for the isResidentialProxy record component
      isTorExitNode - the value for the isTorExitNode record component
      network - the value for the network record component
      ipRisk - the value for the ipRisk record component
  • Method Details

    • getIpAddress

      @Deprecated(since="5.0.0", forRemoval=true) public String getIpAddress()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use ipAddress() instead. This method will be removed in 6.0.0.
      Returns:
      The IP address that the data in the model is for.
    • getNetwork

      @Deprecated(since="5.0.0", forRemoval=true) public Network getNetwork()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use network() 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(since="5.0.0", forRemoval=true) public double getIpRisk()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use ipRisk() instead. This method will be removed in 6.0.0.
      Returns:
      The IP risk of a model.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • ipAddress

      public InetAddress ipAddress()
      Returns the value of the ipAddress record component.
      Returns:
      the value of the ipAddress record component
    • isAnonymous

      public boolean isAnonymous()
      Returns the value of the isAnonymous record component.
      Returns:
      the value of the isAnonymous record component
    • isAnonymousVpn

      public boolean isAnonymousVpn()
      Returns the value of the isAnonymousVpn record component.
      Returns:
      the value of the isAnonymousVpn record component
    • isHostingProvider

      public boolean isHostingProvider()
      Returns the value of the isHostingProvider record component.
      Returns:
      the value of the isHostingProvider record component
    • isPublicProxy

      public boolean isPublicProxy()
      Returns the value of the isPublicProxy record component.
      Returns:
      the value of the isPublicProxy record component
    • isResidentialProxy

      public boolean isResidentialProxy()
      Returns the value of the isResidentialProxy record component.
      Returns:
      the value of the isResidentialProxy record component
    • isTorExitNode

      public boolean isTorExitNode()
      Returns the value of the isTorExitNode record component.
      Returns:
      the value of the isTorExitNode record component
    • network

      public Network network()
      Returns the value of the network record component.
      Returns:
      the value of the network record component
    • ipRisk

      public double ipRisk()
      Returns the value of the ipRisk record component.
      Returns:
      the value of the ipRisk record component