Package com.maxmind.geoip2.record
Class Traits
- java.lang.Object
-
- com.maxmind.geoip2.record.AbstractRecord
-
- com.maxmind.geoip2.record.Traits
-
public final class Traits extends AbstractRecord
Contains data for the traits record associated with an IP address.
This record is returned by all the end points.
-
-
Constructor Summary
Constructors Constructor Description Traits()
Traits(Traits traits, String ipAddress, Network network)
Traits(Integer autonomousSystemNumber, String autonomousSystemOrganization, ConnectionTypeResponse.ConnectionType connectionType, String domain, String ipAddress, boolean isAnonymous, boolean isAnonymousProxy, boolean isAnonymousVpn, boolean isHostingProvider, boolean isLegitimateProxy, boolean isPublicProxy, boolean isResidentialProxy, boolean isSatelliteProvider, boolean isTorExitNode, String isp, Network network, String organization, String userType, Integer userCount, Double staticIpScore)
Traits(Integer autonomousSystemNumber, String autonomousSystemOrganization, ConnectionTypeResponse.ConnectionType connectionType, String domain, String ipAddress, boolean isAnonymous, boolean isAnonymousProxy, boolean isAnonymousVpn, boolean isHostingProvider, boolean isLegitimateProxy, boolean isPublicProxy, boolean isSatelliteProvider, boolean isTorExitNode, String isp, Network network, String organization, String userType, Integer userCount, Double staticIpScore)
Traits(Integer autonomousSystemNumber, String autonomousSystemOrganization, ConnectionTypeResponse.ConnectionType connectionType, String domain, String ipAddress, boolean isAnonymous, boolean isAnonymousProxy, boolean isAnonymousVpn, boolean isHostingProvider, boolean isLegitimateProxy, boolean isPublicProxy, boolean isSatelliteProvider, boolean isTorExitNode, String isp, String organization, String userType)
Traits(Integer autonomousSystemNumber, String autonomousSystemOrganization, ConnectionTypeResponse.ConnectionType connectionType, String domain, String ipAddress, boolean isAnonymousProxy, boolean isLegitimateProxy, boolean isSatelliteProvider, String isp, String organization, String userType)
Traits(Integer autonomousSystemNumber, String autonomousSystemOrganization, String domain, String ipAddress, boolean isAnonymousProxy, boolean isSatelliteProvider, String isp, String organization, String userType)
Traits(Long autonomousSystemNumber, String autonomousSystemOrganization, String connectionType, String domain, String ipAddress, Boolean isAnonymous, Boolean isAnonymousProxy, Boolean isAnonymousVpn, Boolean isHostingProvider, Boolean isLegitimateProxy, Boolean isPublicProxy, Boolean isResidentialProxy, Boolean isSatelliteProvider, Boolean isTorExitNode, String isp, Network network, String organization, String userType, Integer userCount, Double staticIpScore)
Traits(String ipAddress)
Traits(String ipAddress, Network network)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Integer
getAutonomousSystemNumber()
String
getAutonomousSystemOrganization()
ConnectionTypeResponse.ConnectionType
getConnectionType()
String
getDomain()
String
getIpAddress()
String
getIsp()
Network
getNetwork()
String
getOrganization()
Double
getStaticIpScore()
Integer
getUserCount()
String
getUserType()
boolean
isAnonymous()
boolean
isAnonymousProxy()
Deprecated.Use our GeoIP2 Anonymous IP database instead.boolean
isAnonymousVpn()
boolean
isHostingProvider()
boolean
isLegitimateProxy()
boolean
isPublicProxy()
boolean
isResidentialProxy()
boolean
isSatelliteProvider()
Deprecated.Due to increased mobile usage, we have insufficient data to maintain this field.boolean
isTorExitNode()
-
Methods inherited from class com.maxmind.geoip2.record.AbstractRecord
toJson, toString
-
-
-
-
Constructor Detail
-
Traits
public Traits()
-
Traits
public Traits(String ipAddress)
-
Traits
public Traits(Integer autonomousSystemNumber, String autonomousSystemOrganization, String domain, String ipAddress, boolean isAnonymousProxy, boolean isSatelliteProvider, String isp, String organization, String userType)
-
Traits
public Traits(Integer autonomousSystemNumber, String autonomousSystemOrganization, ConnectionTypeResponse.ConnectionType connectionType, String domain, String ipAddress, boolean isAnonymousProxy, boolean isLegitimateProxy, boolean isSatelliteProvider, String isp, String organization, String userType)
-
Traits
public Traits(Integer autonomousSystemNumber, String autonomousSystemOrganization, ConnectionTypeResponse.ConnectionType connectionType, String domain, String ipAddress, boolean isAnonymous, boolean isAnonymousProxy, boolean isAnonymousVpn, boolean isHostingProvider, boolean isLegitimateProxy, boolean isPublicProxy, boolean isSatelliteProvider, boolean isTorExitNode, String isp, String organization, String userType)
-
Traits
public Traits(Integer autonomousSystemNumber, String autonomousSystemOrganization, ConnectionTypeResponse.ConnectionType connectionType, String domain, String ipAddress, boolean isAnonymous, boolean isAnonymousProxy, boolean isAnonymousVpn, boolean isHostingProvider, boolean isLegitimateProxy, boolean isPublicProxy, boolean isSatelliteProvider, boolean isTorExitNode, String isp, Network network, String organization, String userType, Integer userCount, Double staticIpScore)
-
Traits
public Traits(Integer autonomousSystemNumber, String autonomousSystemOrganization, ConnectionTypeResponse.ConnectionType connectionType, String domain, String ipAddress, boolean isAnonymous, boolean isAnonymousProxy, boolean isAnonymousVpn, boolean isHostingProvider, boolean isLegitimateProxy, boolean isPublicProxy, boolean isResidentialProxy, boolean isSatelliteProvider, boolean isTorExitNode, String isp, Network network, String organization, String userType, Integer userCount, Double staticIpScore)
-
Traits
public Traits(Long autonomousSystemNumber, String autonomousSystemOrganization, String connectionType, String domain, String ipAddress, Boolean isAnonymous, Boolean isAnonymousProxy, Boolean isAnonymousVpn, Boolean isHostingProvider, Boolean isLegitimateProxy, Boolean isPublicProxy, Boolean isResidentialProxy, Boolean isSatelliteProvider, Boolean isTorExitNode, String isp, Network network, String organization, String userType, Integer userCount, Double staticIpScore)
-
-
Method Detail
-
getAutonomousSystemNumber
public Integer getAutonomousSystemNumber()
- Returns:
- The autonomous system number associated with the IP address. This attribute is only available from the City and Insights web service end points and the GeoIP2 Enterprise database.
-
getAutonomousSystemOrganization
public String getAutonomousSystemOrganization()
- Returns:
- The organization associated with the registered autonomous system number for the IP address. This attribute is only available from the City and Insights web service end points and the GeoIP2 Enterprise database.
-
getConnectionType
public ConnectionTypeResponse.ConnectionType getConnectionType()
- Returns:
- The connection type of the IP address. This attribute is only available in the GeoIP2 Enterprise database.
-
getStaticIpScore
public Double getStaticIpScore()
- Returns:
- The static IP score of the IP address. This is an indicator of how static or dynamic an IP address is. This attribute is only available from GeoIP2 Precision Insights.
-
getUserCount
public Integer getUserCount()
- Returns:
- The estimated number of users sharing the IP address/network during the past 24 hours. For IPv4, the count is for the individual IP address. For IPv6, the count is for the /64 network. This attribute is only available from GeoIP2 Precision Insights.
-
getDomain
public String getDomain()
- Returns:
- The second level domain associated with the IP address. This will be something like "example.com" or "example.co.uk", not "foo.example.com". This attribute is only available from the City and Insights web service end points and the GeoIP2 Enterprise database.
-
getIpAddress
public String getIpAddress()
- Returns:
- The IP address that the data in the model is for. If you performed a "me" lookup against the web service, this will be the externally routable IP address for the system the code is running on. If the system is behind a NAT, this may differ from the IP address locally assigned to it. This attribute is returned by all end points.
-
getIsp
public String getIsp()
- Returns:
- The name of the ISP associated with the IP address. This attribute is only available from the City and Insights web service end points and the GeoIP2 Enterprise database.
-
isAnonymous
public boolean isAnonymous()
- Returns:
- This is true if the IP address belongs to any sort of anonymous network. This is only available from GeoIP2 Precision Insights.
-
isAnonymousProxy
@Deprecated public boolean isAnonymousProxy()
Deprecated.Use our GeoIP2 Anonymous IP database instead.- Returns:
- This is true if the IP is an anonymous proxy. This attribute is returned by all end points.
- See Also:
- MaxMind's GeoIP FAQ
-
isAnonymousVpn
public boolean isAnonymousVpn()
- Returns:
- This is true if 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. This is only available from GeoIP2 Precision Insights.
-
isHostingProvider
public boolean isHostingProvider()
- Returns:
- This is true if the IP address belongs to a hosting or VPN provider (see description of isAnonymousVpn). This is only available from GeoIP2 Precision Insights.
-
isLegitimateProxy
public boolean isLegitimateProxy()
- Returns:
- This is true if MaxMind believes this IP address to be a legitimate proxy, such as an internal VPN used by a corporation. This is only available in the GeoIP2 Enterprise database.
-
isPublicProxy
public boolean isPublicProxy()
- Returns:
- This is true if the IP address belongs to a public proxy. This is only available from GeoIP2 Precision Insights.
-
isResidentialProxy
public boolean isResidentialProxy()
- Returns:
- This is true if the IP address is on a suspected anonymizing network and belongs to a residential ISP. This attribute is only available from GeoIP2 Precision Insights.
-
isSatelliteProvider
@Deprecated public boolean isSatelliteProvider()
Deprecated.Due to increased mobile usage, we have insufficient data to maintain this field.- Returns:
- This is true if the IP belong to a satellite Internet provider. This attribute is returned by all end points.
-
isTorExitNode
public boolean isTorExitNode()
- Returns:
- This is true if the IP address belongs to a Tor exit node. This is only available from GeoIP2 Precision Insights.
-
getNetwork
public Network getNetwork()
- Returns:
- The network associated with the record. In particular, this is the largest network where all of the fields besides IP address have the same value.
-
getOrganization
public String getOrganization()
- Returns:
- The name of the organization associated with the IP address. This attribute is only available from the City and Insights web service end points and the GeoIP2 Enterprise database.
-
getUserType
public String getUserType()
- Returns:
The user type associated with the IP address. This can be one of the following values:
- business
- cafe
- cellular
- college
- content_delivery_network
- dialup
- government
- hosting
- library
- military
- residential
- router
- school
- search_engine_spider
- traveler
This attribute is only available from the Insights end point and the GeoIP2 Enterprise database.
-
-