Record Class IpResponse
java.lang.Object
java.lang.Record
net.flectone.pulse.module.command.geolocate.model.IpResponse
- Record Components:
status- whether the lookup succeededcountry- the countryregion- the region namecity- the citytimezone- the time zoneoffset- the utc offset in secondsmobile- whether the address belongs to a mobile networkproxy- whether it looks like a proxy or vpnhosting- whether it belongs to a hosting providerquery- the address that was looked up
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncity()Returns the value of thecityrecord component.country()Returns the value of thecountryrecord 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.booleanWhether the lookup returned usable data.mobile()Returns the value of themobilerecord component.offset()Returns the value of theoffsetrecord component.proxy()Returns the value of theproxyrecord component.query()Returns the value of thequeryrecord component.region()Returns the value of theregionrecord 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.
-
Constructor Details
-
IpResponse
public IpResponse(String status, String country, String region, String city, String timezone, Integer offset, Boolean mobile, Boolean proxy, Boolean hosting, String query) Creates an instance of aIpResponserecord class.- Parameters:
status- the value for thestatusrecord componentcountry- the value for thecountryrecord componentregion- the value for theregionrecord componentcity- the value for thecityrecord componenttimezone- the value for thetimezonerecord componentoffset- the value for theoffsetrecord componentmobile- the value for themobilerecord componentproxy- the value for theproxyrecord componenthosting- the value for thehostingrecord componentquery- the value for thequeryrecord component
-
-
Method Details
-
isSuccess
public boolean isSuccess()Whether the lookup returned usable data.- Returns:
- true if the service reported success
-
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). -
status
-
country
-
region
-
city
-
timezone
-
offset
-
mobile
-
proxy
-
hosting
-
query
-