Package rs.adsdev.ifconfig.client
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 Summary
ConstructorsConstructorDescriptionIpInfo(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 aIpInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionas()Returns the value of theasrecord component.asname()Returns the value of theasnamerecord component.city()Returns the value of thecityrecord component.Returns the value of thecontinentrecord component.Returns the value of thecontinentCoderecord component.country()Returns the value of thecountryrecord component.Returns the value of thecountryCoderecord component.currency()Returns the value of thecurrencyrecord component.district()Returns the value of thedistrictrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.hosting()Returns the value of thehostingrecord component.isp()Returns the value of theisprecord component.booleanConvenience predicate: did the server report a successful lookup?lat()Returns the value of thelatrecord component.lon()Returns the value of thelonrecord component.message()Returns the value of themessagerecord component.mobile()Returns the value of themobilerecord component.offset()Returns the value of theoffsetrecord component.org()Returns the value of theorgrecord component.proxy()Returns the value of theproxyrecord component.query()Returns the value of thequeryrecord component.region()Returns the value of theregionrecord component.Returns the value of theregionNamerecord component.reverse()Returns the value of thereverserecord component.status()Returns the value of thestatusrecord component.timezone()Returns the value of thetimezonerecord component.final StringtoString()Returns a string representation of this record class.zip()Returns the value of theziprecord component.
-
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 aIpInforecord class.- Parameters:
status- the value for thestatusrecord componentmessage- the value for themessagerecord componentquery- the value for thequeryrecord componentcontinent- the value for thecontinentrecord componentcontinentCode- the value for thecontinentCoderecord componentcountry- the value for thecountryrecord componentcountryCode- the value for thecountryCoderecord componentregion- the value for theregionrecord componentregionName- the value for theregionNamerecord componentcity- the value for thecityrecord componentdistrict- the value for thedistrictrecord componentzip- the value for theziprecord componentlat- the value for thelatrecord componentlon- the value for thelonrecord componenttimezone- the value for thetimezonerecord componentoffset- the value for theoffsetrecord componentcurrency- the value for thecurrencyrecord componentisp- the value for theisprecord componentorg- the value for theorgrecord componentas- the value for theasrecord componentasname- the value for theasnamerecord componentreverse- the value for thereverserecord componentmobile- the value for themobilerecord componentproxy- the value for theproxyrecord componenthosting- the value for thehostingrecord component
-
-
Method Details
-
isSuccess
public boolean isSuccess()Convenience predicate: did the server report a successful lookup? -
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. -
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. -
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). -
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-
query
Returns the value of thequeryrecord component.- Returns:
- the value of the
queryrecord component
-
continent
Returns the value of thecontinentrecord component.- Returns:
- the value of the
continentrecord component
-
continentCode
Returns the value of thecontinentCoderecord component.- Returns:
- the value of the
continentCoderecord component
-
country
Returns the value of thecountryrecord component.- Returns:
- the value of the
countryrecord component
-
countryCode
Returns the value of thecountryCoderecord component.- Returns:
- the value of the
countryCoderecord component
-
region
Returns the value of theregionrecord component.- Returns:
- the value of the
regionrecord component
-
regionName
Returns the value of theregionNamerecord component.- Returns:
- the value of the
regionNamerecord component
-
city
Returns the value of thecityrecord component.- Returns:
- the value of the
cityrecord component
-
district
Returns the value of thedistrictrecord component.- Returns:
- the value of the
districtrecord component
-
zip
Returns the value of theziprecord component.- Returns:
- the value of the
ziprecord component
-
lat
Returns the value of thelatrecord component.- Returns:
- the value of the
latrecord component
-
lon
Returns the value of thelonrecord component.- Returns:
- the value of the
lonrecord component
-
timezone
Returns the value of thetimezonerecord component.- Returns:
- the value of the
timezonerecord component
-
offset
Returns the value of theoffsetrecord component.- Returns:
- the value of the
offsetrecord component
-
currency
Returns the value of thecurrencyrecord component.- Returns:
- the value of the
currencyrecord component
-
isp
Returns the value of theisprecord component.- Returns:
- the value of the
isprecord component
-
org
Returns the value of theorgrecord component.- Returns:
- the value of the
orgrecord component
-
as
Returns the value of theasrecord component.- Returns:
- the value of the
asrecord component
-
asname
Returns the value of theasnamerecord component.- Returns:
- the value of the
asnamerecord component
-
reverse
Returns the value of thereverserecord component.- Returns:
- the value of the
reverserecord component
-
mobile
Returns the value of themobilerecord component.- Returns:
- the value of the
mobilerecord component
-
proxy
Returns the value of theproxyrecord component.- Returns:
- the value of the
proxyrecord component
-
hosting
Returns the value of thehostingrecord component.- Returns:
- the value of the
hostingrecord component
-