Record Class AsnResponse
java.lang.Object
java.lang.Record
com.maxmind.geoip2.model.AsnResponse
- Record Components:
autonomousSystemNumber- The autonomous system number associated with the IP address.autonomousSystemOrganization- The organization associated with the registered autonomous system number for the IP address.ipAddress- The IP address that the data in the model is for.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.
- All Implemented Interfaces:
JsonSerializable
public record AsnResponse(Long autonomousSystemNumber, String autonomousSystemOrganization, InetAddress ipAddress, Network network)
extends Record
implements JsonSerializable
This class provides the GeoLite2 ASN model.
-
Constructor Summary
ConstructorsConstructorDescriptionAsnResponse(Long autonomousSystemNumber, String autonomousSystemOrganization, InetAddress ipAddress, Network network) Creates an instance of aAsnResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theautonomousSystemNumberrecord component.Returns the value of theautonomousSystemOrganizationrecord 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.UseipAddress()instead.Deprecated, for removal: This API element is subject to removal in a future version.Usenetwork()instead.final inthashCode()Returns a hash code value for this object.Returns the value of theipAddressrecord component.network()Returns the value of thenetworkrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface JsonSerializable
toJson
-
Constructor Details
-
AsnResponse
public AsnResponse(Long autonomousSystemNumber, String autonomousSystemOrganization, InetAddress ipAddress, Network network) Creates an instance of aAsnResponserecord class.- Parameters:
autonomousSystemNumber- the value for theautonomousSystemNumberrecord componentautonomousSystemOrganization- the value for theautonomousSystemOrganizationrecord componentipAddress- the value for theipAddressrecord componentnetwork- the value for thenetworkrecord 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.
-
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
-
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.
-
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.
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
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
-
ipAddress
-
network
-
autonomousSystemNumber()instead.