Record Class IpInfo

java.lang.Object
java.lang.Record
rs.adsdev.ifconfig.client.IpInfo

public record IpInfo(String status, String message, String query, String continent, String continentCode, String country, String countryCode, String region, String regionName, String city, String district, String zip, Double lat, Double lon, String timezone, Integer offset, String currency, String isp, String org, String as, String asname, String reverse, Boolean mobile, Boolean proxy, Boolean hosting) extends Record
Flat response shape from /json, /xml, and per-item /batch responses. Mirrors FlatInfo on the server side.

Envelope fields (status, message, query) describe the outcome of the lookup. The rest are enrichment, hoisted to the top level, so the wire is a single object with no nested wrappers. Any field that the server omitted (e.g., enrichment for a private IP, or fields filtered out via ?fields=) arrives as null.

  • Constructor Details

    • IpInfo

      public IpInfo(String status, String message, String query, String continent, String continentCode, String country, String countryCode, String region, String regionName, String city, String district, String zip, Double lat, Double lon, String timezone, Integer offset, String currency, String isp, String org, String as, String asname, String reverse, Boolean mobile, Boolean proxy, Boolean hosting)
      Creates an instance of a IpInfo record class.
      Parameters:
      status - the value for the status record component
      message - the value for the message record component
      query - the value for the query record component
      continent - the value for the continent record component
      continentCode - the value for the continentCode record component
      country - the value for the country record component
      countryCode - the value for the countryCode record component
      region - the value for the region record component
      regionName - the value for the regionName record component
      city - the value for the city record component
      district - the value for the district record component
      zip - the value for the zip record component
      lat - the value for the lat record component
      lon - the value for the lon record component
      timezone - the value for the timezone record component
      offset - the value for the offset record component
      currency - the value for the currency record component
      isp - the value for the isp record component
      org - the value for the org record component
      as - the value for the as record component
      asname - the value for the asname record component
      reverse - the value for the reverse record component
      mobile - the value for the mobile record component
      proxy - the value for the proxy record component
      hosting - the value for the hosting record component
  • Method Details

    • isSuccess

      public boolean isSuccess()
      Convenience predicate: did the server report a successful lookup?
    • 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.
    • status

      public String status()
      Returns the value of the status record component.
      Returns:
      the value of the status record component
    • message

      public String message()
      Returns the value of the message record component.
      Returns:
      the value of the message record component
    • query

      public String query()
      Returns the value of the query record component.
      Returns:
      the value of the query record component
    • continent

      public String continent()
      Returns the value of the continent record component.
      Returns:
      the value of the continent record component
    • continentCode

      public String continentCode()
      Returns the value of the continentCode record component.
      Returns:
      the value of the continentCode record component
    • country

      public String country()
      Returns the value of the country record component.
      Returns:
      the value of the country record component
    • countryCode

      public String countryCode()
      Returns the value of the countryCode record component.
      Returns:
      the value of the countryCode record component
    • region

      public String region()
      Returns the value of the region record component.
      Returns:
      the value of the region record component
    • regionName

      public String regionName()
      Returns the value of the regionName record component.
      Returns:
      the value of the regionName record component
    • city

      public String city()
      Returns the value of the city record component.
      Returns:
      the value of the city record component
    • district

      public String district()
      Returns the value of the district record component.
      Returns:
      the value of the district record component
    • zip

      public String zip()
      Returns the value of the zip record component.
      Returns:
      the value of the zip record component
    • lat

      public Double lat()
      Returns the value of the lat record component.
      Returns:
      the value of the lat record component
    • lon

      public Double lon()
      Returns the value of the lon record component.
      Returns:
      the value of the lon record component
    • timezone

      public String timezone()
      Returns the value of the timezone record component.
      Returns:
      the value of the timezone record component
    • offset

      public Integer offset()
      Returns the value of the offset record component.
      Returns:
      the value of the offset record component
    • currency

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

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

      public String org()
      Returns the value of the org record component.
      Returns:
      the value of the org record component
    • as

      public String as()
      Returns the value of the as record component.
      Returns:
      the value of the as record component
    • asname

      public String asname()
      Returns the value of the asname record component.
      Returns:
      the value of the asname record component
    • reverse

      public String reverse()
      Returns the value of the reverse record component.
      Returns:
      the value of the reverse record component
    • mobile

      public Boolean mobile()
      Returns the value of the mobile record component.
      Returns:
      the value of the mobile record component
    • proxy

      public Boolean proxy()
      Returns the value of the proxy record component.
      Returns:
      the value of the proxy record component
    • hosting

      public Boolean hosting()
      Returns the value of the hosting record component.
      Returns:
      the value of the hosting record component