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 Summary
ConstructorsConstructorDescriptionConstructs anAnonymizerrecord withnullvalues for all the nullable fields andfalsefor all boolean fields.Anonymizer(Integer confidence, boolean isAnonymous, boolean isAnonymousVpn, boolean isHostingProvider, boolean isPublicProxy, boolean isResidentialProxy, boolean isTorExitNode, LocalDate networkLastSeen, String providerName) Creates an instance of aAnonymizerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconfidencerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.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.Returns the value of thenetworkLastSeenrecord component.Returns the value of theproviderNamerecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface JsonSerializable
toJson
-
Constructor Details
-
Anonymizer
public Anonymizer()Constructs anAnonymizerrecord withnullvalues for all the nullable fields andfalsefor 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 aAnonymizerrecord class.- Parameters:
confidence- the value for theconfidencerecord 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 componentnetworkLastSeen- the value for thenetworkLastSeenrecord componentproviderName- the value for theproviderNamerecord component
-
-
Method Details
-
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. -
confidence
Returns the value of theconfidencerecord component.- Returns:
- the value of the
confidencerecord component
-
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
-
networkLastSeen
Returns the value of thenetworkLastSeenrecord component.- Returns:
- the value of the
networkLastSeenrecord component
-
providerName
Returns the value of theproviderNamerecord component.- Returns:
- the value of the
providerNamerecord component
-