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 GeoIP 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 GeoIP 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 GeoIP Insights web service.residential- Residential proxy data for the network. This may be populated even when none of the other fields on this record are set. This is only available from the GeoIP 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, AnonymizerFeed residential)
extends Record
implements JsonSerializable
Contains data for the anonymizer record associated with an IP address.
This record is returned by the GeoIP 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) Deprecated, for removal: This API element is subject to removal in a future version.Anonymizer(Integer confidence, boolean isAnonymous, boolean isAnonymousVpn, boolean isHostingProvider, boolean isPublicProxy, boolean isResidentialProxy, boolean isTorExitNode, LocalDate networkLastSeen, String providerName, AnonymizerFeed residential) Compact canonical constructor that sets a default for a nullresidentialvalue. -
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.Returns the value of theresidentialrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface JsonSerializable
toJson
-
Constructor Details
-
Anonymizer
public Anonymizer(Integer confidence, boolean isAnonymous, boolean isAnonymousVpn, boolean isHostingProvider, boolean isPublicProxy, boolean isResidentialProxy, boolean isTorExitNode, LocalDate networkLastSeen, String providerName, AnonymizerFeed residential) Compact canonical constructor that sets a default for a nullresidentialvalue. -
Anonymizer
public Anonymizer()Constructs anAnonymizerrecord withnullvalues for all the nullable fields andfalsefor all boolean fields. Theresidentialfield defaults to an emptyAnonymizerFeedrather thannull. -
Anonymizer
@Deprecated(since="5.2.0", forRemoval=true) public Anonymizer(Integer confidence, boolean isAnonymous, boolean isAnonymousVpn, boolean isHostingProvider, boolean isPublicProxy, boolean isResidentialProxy, boolean isTorExitNode, LocalDate networkLastSeen, String providerName) Deprecated, for removal: This API element is subject to removal in a future version.Use the canonical constructor that also accepts theresidentialfield. This constructor is provided for backward compatibility and will be removed in version 6.0.0.Constructs anAnonymizerrecord without theresidentialfield.- Parameters:
confidence- the confidence that the network is an actively used VPN serviceisAnonymous- whether the IP address belongs to any sort of anonymous networkisAnonymousVpn- whether the IP address is registered to an anonymous VPN providerisHostingProvider- whether the IP address belongs to a hosting or VPN providerisPublicProxy- whether the IP address belongs to a public proxyisResidentialProxy- whether the IP address is on a suspected anonymizing network and belongs to a residential ISPisTorExitNode- whether the IP address is a Tor exit nodenetworkLastSeen- the last day that the network was sighted in our analysis of anonymized networksproviderName- the name of the VPN provider associated with the network
-
-
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
-
residential
Returns the value of theresidentialrecord component.- Returns:
- the value of the
residentialrecord component
-
residentialfield.