Record Class IspResponse

java.lang.Object
java.lang.Record
com.maxmind.geoip2.model.IspResponse
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.
isp - The name of the ISP associated with the IP address.
mobileCountryCode - The mobile country code (MCC) associated with the IP address and ISP. This property is available from the City and Insights web services and the GeoIP2 Enterprise database.
mobileNetworkCode - The mobile network code (MNC) associated with the IP address and ISP. This property is available from the City and Insights web services and the GeoIP2 Enterprise database.
organization - The name of the organization associated with the IP address.
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 IspResponse(Long autonomousSystemNumber, String autonomousSystemOrganization, InetAddress ipAddress, String isp, String mobileCountryCode, String mobileNetworkCode, String organization, Network network) extends Record implements JsonSerializable
This class provides the GeoIP2 ISP model.
  • Constructor Details

    • IspResponse

      public IspResponse(Long autonomousSystemNumber, String autonomousSystemOrganization, InetAddress ipAddress, String isp, String mobileCountryCode, String mobileNetworkCode, String organization, Network network)
      Creates an instance of a IspResponse record class.
      Parameters:
      autonomousSystemNumber - the value for the autonomousSystemNumber record component
      autonomousSystemOrganization - the value for the autonomousSystemOrganization record component
      ipAddress - the value for the ipAddress record component
      isp - the value for the isp record component
      mobileCountryCode - the value for the mobileCountryCode record component
      mobileNetworkCode - the value for the mobileNetworkCode record component
      organization - the value for the organization record component
      network - the value for the network record component
  • Method Details

    • getAutonomousSystemNumber

      @Deprecated(since="5.0.0", forRemoval=true) public Long getAutonomousSystemNumber()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use autonomousSystemNumber() instead. This method will be removed in 6.0.0.
      Returns:
      The autonomous system number associated with the IP address.
    • getAutonomousSystemOrganization

      @Deprecated(since="5.0.0", forRemoval=true) public String getAutonomousSystemOrganization()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use autonomousSystemOrganization() 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(since="5.0.0", forRemoval=true) public String getIpAddress()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use ipAddress() instead. This method will be removed in 6.0.0.
      Returns:
      The IP address that the data in the model is for.
    • getIsp

      @Deprecated(since="5.0.0", forRemoval=true) public String getIsp()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use isp() instead. This method will be removed in 6.0.0.
      Returns:
      The name of the ISP associated with the IP address.
    • getMobileCountryCode

      @Deprecated(since="5.0.0", forRemoval=true) public String getMobileCountryCode()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use mobileCountryCode() instead. This method will be removed in 6.0.0.
      Returns:
      The mobile country code (MCC) associated with the IP address and ISP. This property is available from the City and Insights web services and the GeoIP2 Enterprise database.
    • getMobileNetworkCode

      @Deprecated(since="5.0.0", forRemoval=true) public String getMobileNetworkCode()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use mobileNetworkCode() instead. This method will be removed in 6.0.0.
      Returns:
      The mobile network code (MNC) associated with the IP address and ISP. This property is available from the City and Insights web services and the GeoIP2 Enterprise database.
    • getOrganization

      @Deprecated(since="5.0.0", forRemoval=true) public String getOrganization()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use organization() instead. This method will be removed in 6.0.0.
      Returns:
      The name of the organization associated with the IP address.
    • getNetwork

      @Deprecated(since="5.0.0", forRemoval=true) public Network getNetwork()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use network() 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

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • autonomousSystemNumber

      public Long autonomousSystemNumber()
      Returns the value of the autonomousSystemNumber record component.
      Returns:
      the value of the autonomousSystemNumber record component
    • autonomousSystemOrganization

      public String autonomousSystemOrganization()
      Returns the value of the autonomousSystemOrganization record component.
      Returns:
      the value of the autonomousSystemOrganization record component
    • ipAddress

      public InetAddress ipAddress()
      Returns the value of the ipAddress record component.
      Returns:
      the value of the ipAddress record component
    • isp

      public String isp()
      Returns the value of the isp record component.
      Returns:
      the value of the isp record component
    • mobileCountryCode

      public String mobileCountryCode()
      Returns the value of the mobileCountryCode record component.
      Returns:
      the value of the mobileCountryCode record component
    • mobileNetworkCode

      public String mobileNetworkCode()
      Returns the value of the mobileNetworkCode record component.
      Returns:
      the value of the mobileNetworkCode record component
    • organization

      public String organization()
      Returns the value of the organization record component.
      Returns:
      the value of the organization record component
    • network

      public Network network()
      Returns the value of the network record component.
      Returns:
      the value of the network record component