Record Class Anonymizer

java.lang.Object
java.lang.Record
com.maxmind.geoip2.record.Anonymizer
Record Components:
confidence - A score ranging from 1 to 99 that is our percent confidence that the network is currently part of an actively used VPN service. This is only available from the GeoIP2 Precision Insights web service.
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.
networkLastSeen - The last day that the network was sighted in our analysis of anonymized networks. This is only available from the GeoIP2 Precision Insights web service.
providerName - The name of the VPN provider (e.g., NordVPN, SurfShark, etc.) associated with the network. This is only available from the GeoIP2 Precision Insights web service.
All Implemented Interfaces:
JsonSerializable

public record Anonymizer(Integer confidence, boolean isAnonymous, boolean isAnonymousVpn, boolean isHostingProvider, boolean isPublicProxy, boolean isResidentialProxy, boolean isTorExitNode, LocalDate networkLastSeen, String providerName) extends Record implements JsonSerializable

Contains data for the anonymizer record associated with an IP address.

This record is returned by the GeoIP2 Precision Insights web service.

  • Constructor Details

    • Anonymizer

      public Anonymizer()
      Constructs an Anonymizer record with null values for all the nullable fields and false for all boolean fields.
    • Anonymizer

      public Anonymizer(Integer confidence, boolean isAnonymous, boolean isAnonymousVpn, boolean isHostingProvider, boolean isPublicProxy, boolean isResidentialProxy, boolean isTorExitNode, LocalDate networkLastSeen, String providerName)
      Creates an instance of a Anonymizer record class.
      Parameters:
      confidence - the value for the confidence 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
      networkLastSeen - the value for the networkLastSeen record component
      providerName - the value for the providerName record component
  • Method Details

    • 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.
    • confidence

      public Integer confidence()
      Returns the value of the confidence record component.
      Returns:
      the value of the confidence 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
    • networkLastSeen

      public LocalDate networkLastSeen()
      Returns the value of the networkLastSeen record component.
      Returns:
      the value of the networkLastSeen record component
    • providerName

      public String providerName()
      Returns the value of the providerName record component.
      Returns:
      the value of the providerName record component