Record Class Traits
java.lang.Object
java.lang.Record
com.maxmind.geoip2.record.Traits
- Record Components:
autonomousSystemNumber- The autonomous system number associated with the IP address. This is only available from the City Plus and Insights web services and the Enterprise database.autonomousSystemOrganization- The organization associated with the registered autonomous system number for the IP address. This is only available from the City Plus and Insights web services and the Enterprise database.connectionType- The connection type of the IP address. This is only available from the City Plus and Insights web services and the Enterprise database.domain- 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 is only available from the City Plus and Insights web services and the Enterprise database.ipAddress- 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.isAnonymous- This is true if the IP address belongs to any sort of anonymous network. This field is deprecated. Please use the anonymizer object from the Insights response.isAnonymousVpn- This is true if the IP address belongs to an anonymous VPN system. This field is deprecated. Please use the anonymizer object from the Insights response.isAnycast- This is true if the IP address is an anycast address.isHostingProvider- This is true if the IP address belongs to a hosting provider. This field is deprecated. Please use the anonymizer object from the Insights response.isLegitimateProxy- This is true if the IP address belongs to a legitimate proxy.isPublicProxy- This is true if the IP address belongs to a public proxy. This field is deprecated. Please use the anonymizer object from the Insights response.isResidentialProxy- This is true if the IP address is on a suspected anonymizing network and belongs to a residential ISP. This field is deprecated. Please use the anonymizer object from the Insights response.isTorExitNode- This is true if the IP address is a Tor exit node. This field is deprecated. Please use the anonymizer object from the Insights response.ipRiskSnapshot- The risk associated with the IP address. The value ranges from 0.01 to 99, with a higher score indicating a higher risk. The IP risk score provided in GeoIP products and services is more static than the IP risk score provided in minFraud and is not responsive to traffic on your network. If you need realtime IP risk scoring based on behavioral signals on your own network, please use minFraud. This is only available from the Insights web service.isp- The name of the ISP associated with the IP address. This is only available from the City Plus and Insights web services and the Enterprise database.mobileCountryCode- The mobile country code (MCC) associated with the IP address and ISP. This is available from the City Plus and Insights web services and the Enterprise database.mobileNetworkCode- The mobile network code (MNC) associated with the IP address and ISP. This is available from the City Plus and Insights web services and the Enterprise database.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.organization- The name of the organization associated with the IP address. This is only available from the City Plus and Insights web services and the Enterprise database.userType- The user type associated with the IP address. This can be one of the following values: business, cafe, cellular, college, consumer_privacy_network, content_delivery_network, dialup, government, hosting, library, military, residential, router, school, search_engine_spider, traveler. This is only available from the Insights web service and the Enterprise database.userCount- 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 is only available from the Insights web service.staticIpScore- The static IP score of the IP address. This is an indicator of how static or dynamic an IP address is. This is only available from the Insights web service.
- All Implemented Interfaces:
JsonSerializable
public record Traits(Long autonomousSystemNumber, String autonomousSystemOrganization, ConnectionTypeResponse.ConnectionType connectionType, String domain, InetAddress ipAddress, boolean isAnonymous, boolean isAnonymousVpn, boolean isAnycast, boolean isHostingProvider, boolean isLegitimateProxy, boolean isPublicProxy, boolean isResidentialProxy, boolean isTorExitNode, Double ipRiskSnapshot, String isp, String mobileCountryCode, String mobileNetworkCode, Network network, String organization, String userType, Integer userCount, Double staticIpScore)
extends Record
implements JsonSerializable
Contains data for the traits record associated with an IP address.
-
Constructor Summary
ConstructorsConstructorDescriptionTraits()Constructs an instance ofTraits.Traits(Long autonomousSystemNumber, String autonomousSystemOrganization, ConnectionTypeResponse.ConnectionType connectionType, String domain, InetAddress ipAddress, boolean isAnonymous, boolean isAnonymousVpn, boolean isAnycast, boolean isHostingProvider, boolean isLegitimateProxy, boolean isPublicProxy, boolean isResidentialProxy, boolean isTorExitNode, Double ipRiskSnapshot, String isp, String mobileCountryCode, String mobileNetworkCode, Network network, String organization, String userType, Integer userCount, Double staticIpScore) Creates an instance of aTraitsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theautonomousSystemNumberrecord component.Returns the value of theautonomousSystemOrganizationrecord component.Returns the value of theconnectionTyperecord component.domain()Returns the value of thedomainrecord component.final booleanIndicates whether some other object is "equal to" this one.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.UseautonomousSystemOrganization()instead.Deprecated, for removal: This API element is subject to removal in a future version.UseconnectionType()instead.Deprecated, for removal: This API element is subject to removal in a future version.Usedomain()instead.Deprecated, for removal: This API element is subject to removal in a future version.UseipAddress()instead.getIsp()Deprecated, for removal: This API element is subject to removal in a future version.Useisp()instead.Deprecated, for removal: This API element is subject to removal in a future version.UsemobileCountryCode()instead.Deprecated, for removal: This API element is subject to removal in a future version.UsemobileNetworkCode()instead.Deprecated, for removal: This API element is subject to removal in a future version.Usenetwork()instead.Deprecated, for removal: This API element is subject to removal in a future version.Useorganization()instead.Deprecated, for removal: This API element is subject to removal in a future version.UsestaticIpScore()instead.Deprecated, for removal: This API element is subject to removal in a future version.UseuserCount()instead.Deprecated, for removal: This API element is subject to removal in a future version.UseuserType()instead.final inthashCode()Returns a hash code value for this object.Returns the value of theipAddressrecord component.Returns the value of theipRiskSnapshotrecord component.booleanDeprecated, for removal: This API element is subject to removal in a future version.booleanDeprecated, for removal: This API element is subject to removal in a future version.booleanReturns the value of theisAnycastrecord component.booleanDeprecated, for removal: This API element is subject to removal in a future version.booleanReturns the value of theisLegitimateProxyrecord component.isp()Returns the value of theisprecord component.booleanDeprecated, for removal: This API element is subject to removal in a future version.booleanDeprecated, for removal: This API element is subject to removal in a future version.booleanDeprecated, for removal: This API element is subject to removal in a future version.Returns the value of themobileCountryCoderecord component.Returns the value of themobileNetworkCoderecord component.network()Returns the value of thenetworkrecord component.Returns the value of theorganizationrecord component.Returns the value of thestaticIpScorerecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theuserCountrecord component.userType()Returns the value of theuserTyperecord component.Methods inherited from interface JsonSerializable
toJson
-
Constructor Details
-
Traits
public Traits()Constructs an instance ofTraits. -
Traits
public Traits(Long autonomousSystemNumber, String autonomousSystemOrganization, ConnectionTypeResponse.ConnectionType connectionType, String domain, InetAddress ipAddress, @Deprecated(since="5.0.0",forRemoval=true) boolean isAnonymous, @Deprecated(since="5.0.0",forRemoval=true) boolean isAnonymousVpn, boolean isAnycast, @Deprecated(since="5.0.0",forRemoval=true) boolean isHostingProvider, boolean isLegitimateProxy, @Deprecated(since="5.0.0",forRemoval=true) boolean isPublicProxy, @Deprecated(since="5.0.0",forRemoval=true) boolean isResidentialProxy, @Deprecated(since="5.0.0",forRemoval=true) boolean isTorExitNode, Double ipRiskSnapshot, String isp, String mobileCountryCode, String mobileNetworkCode, Network network, String organization, String userType, Integer userCount, Double staticIpScore) Creates an instance of aTraitsrecord class.- Parameters:
autonomousSystemNumber- the value for theautonomousSystemNumberrecord componentautonomousSystemOrganization- the value for theautonomousSystemOrganizationrecord componentconnectionType- the value for theconnectionTyperecord componentdomain- the value for thedomainrecord componentipAddress- the value for theipAddressrecord componentisAnonymous- the value for theisAnonymousrecord componentisAnonymousVpn- the value for theisAnonymousVpnrecord componentisAnycast- the value for theisAnycastrecord componentisHostingProvider- the value for theisHostingProviderrecord componentisLegitimateProxy- the value for theisLegitimateProxyrecord componentisPublicProxy- the value for theisPublicProxyrecord componentisResidentialProxy- the value for theisResidentialProxyrecord componentisTorExitNode- the value for theisTorExitNoderecord componentipRiskSnapshot- the value for theipRiskSnapshotrecord componentisp- the value for theisprecord componentmobileCountryCode- the value for themobileCountryCoderecord componentmobileNetworkCode- the value for themobileNetworkCoderecord componentnetwork- the value for thenetworkrecord componentorganization- the value for theorganizationrecord componentuserType- the value for theuserTyperecord componentuserCount- the value for theuserCountrecord componentstaticIpScore- the value for thestaticIpScorerecord component
-
-
Method Details
-
getAutonomousSystemNumber
Deprecated, for removal: This API element is subject to removal in a future version.UseautonomousSystemNumber()instead. This method will be removed in 6.0.0.- Returns:
- The autonomous system number associated with the IP address. This is only available from the City Plus and Insights web services and the Enterprise database.
-
getAutonomousSystemOrganization
Deprecated, for removal: This API element is subject to removal in a future version.UseautonomousSystemOrganization()instead. This method will be removed in 6.0.0.- Returns:
- The organization associated with the registered autonomous system number for the IP address. This is only available from the City Plus and Insights web services and the Enterprise database.
-
getConnectionType
@Deprecated(since="5.0.0", forRemoval=true) public ConnectionTypeResponse.ConnectionType getConnectionType()Deprecated, for removal: This API element is subject to removal in a future version.UseconnectionType()instead. This method will be removed in 6.0.0.- Returns:
- The connection type of the IP address. This is only available from the City Plus and Insights web services and the Enterprise database.
-
getStaticIpScore
Deprecated, for removal: This API element is subject to removal in a future version.UsestaticIpScore()instead. This method will be removed in 6.0.0.- Returns:
- The static IP score of the IP address. This is an indicator of how static or dynamic an IP address is. This is only available from the Insights web service.
-
getUserCount
Deprecated, for removal: This API element is subject to removal in a future version.UseuserCount()instead. This method will be removed in 6.0.0.- 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 is only available from the Insights web service.
-
getDomain
Deprecated, for removal: This API element is subject to removal in a future version.Usedomain()instead. This method will be removed in 6.0.0.- 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 is only available from the City Plus and Insights web services and the Enterprise database.
-
getIpAddress
Deprecated, for removal: This API element is subject to removal in a future version.UseipAddress()instead. This method will be removed in 6.0.0.- 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.
-
getIsp
Deprecated, for removal: This API element is subject to removal in a future version.Useisp()instead. This method will be removed in 6.0.0.- Returns:
- The name of the ISP associated with the IP address. This is only available from the City Plus and Insights web services and the Enterprise database.
-
getMobileCountryCode
Deprecated, for removal: This API element is subject to removal in a future version.UsemobileCountryCode()instead. This method will be removed in 6.0.0.- Returns:
- The mobile country code (MCC) associated with the IP address and ISP. This is available from the City Plus and Insights web services and the Enterprise database.
-
getMobileNetworkCode
Deprecated, for removal: This API element is subject to removal in a future version.UsemobileNetworkCode()instead. This method will be removed in 6.0.0.- Returns:
- The mobile network code (MNC) associated with the IP address and ISP. This is available from the City Plus and Insights web services and the Enterprise database.
-
getNetwork
Deprecated, for removal: This API element is subject to removal in a future version.Usenetwork()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.
-
getOrganization
Deprecated, for removal: This API element is subject to removal in a future version.Useorganization()instead. This method will be removed in 6.0.0.- Returns:
- The name of the organization associated with the IP address. This is only available from the City Plus and Insights web services and the Enterprise database.
-
getUserType
Deprecated, for removal: This API element is subject to removal in a future version.UseuserType()instead. This method will be removed in 6.0.0.- Returns:
The user type associated with the IP address. This can be one of the following values:
- business
- cafe
- cellular
- college
- consumer_privacy_network
- content_delivery_network
- dialup
- government
- hosting
- library
- military
- residential
- router
- school
- search_engine_spider
- traveler
This is only available from the Insights web service and the Enterprise database.
-
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. -
autonomousSystemNumber
Returns the value of theautonomousSystemNumberrecord component.- Returns:
- the value of the
autonomousSystemNumberrecord component
-
autonomousSystemOrganization
Returns the value of theautonomousSystemOrganizationrecord component.- Returns:
- the value of the
autonomousSystemOrganizationrecord component
-
connectionType
Returns the value of theconnectionTyperecord component.- Returns:
- the value of the
connectionTyperecord component
-
domain
-
ipAddress
-
isAnonymous
Deprecated, for removal: This API element is subject to removal in a future version.Returns the value of theisAnonymousrecord component.- Returns:
- the value of the
isAnonymousrecord component
-
isAnonymousVpn
Deprecated, for removal: This API element is subject to removal in a future version.Returns the value of theisAnonymousVpnrecord component.- Returns:
- the value of the
isAnonymousVpnrecord component
-
isAnycast
-
isHostingProvider
Deprecated, for removal: This API element is subject to removal in a future version.Returns the value of theisHostingProviderrecord component.- Returns:
- the value of the
isHostingProviderrecord component
-
isLegitimateProxy
public boolean isLegitimateProxy()Returns the value of theisLegitimateProxyrecord component.- Returns:
- the value of the
isLegitimateProxyrecord component
-
isPublicProxy
Deprecated, for removal: This API element is subject to removal in a future version.Returns the value of theisPublicProxyrecord component.- Returns:
- the value of the
isPublicProxyrecord component
-
isResidentialProxy
Deprecated, for removal: This API element is subject to removal in a future version.Returns the value of theisResidentialProxyrecord component.- Returns:
- the value of the
isResidentialProxyrecord component
-
isTorExitNode
Deprecated, for removal: This API element is subject to removal in a future version.Returns the value of theisTorExitNoderecord component.- Returns:
- the value of the
isTorExitNoderecord component
-
ipRiskSnapshot
Returns the value of theipRiskSnapshotrecord component.- Returns:
- the value of the
ipRiskSnapshotrecord component
-
isp
-
mobileCountryCode
Returns the value of themobileCountryCoderecord component.- Returns:
- the value of the
mobileCountryCoderecord component
-
mobileNetworkCode
Returns the value of themobileNetworkCoderecord component.- Returns:
- the value of the
mobileNetworkCoderecord component
-
network
-
organization
Returns the value of theorganizationrecord component.- Returns:
- the value of the
organizationrecord component
-
userType
-
userCount
-
staticIpScore
Returns the value of thestaticIpScorerecord component.- Returns:
- the value of the
staticIpScorerecord component
-
autonomousSystemNumber()instead.