Record Class IpAddress
java.lang.Object
java.lang.Record
com.maxmind.minfraud.response.IpAddress
- Record Components:
city- City record for the requested IP address.continent- Continent record for the requested IP address.country- Country record for the requested IP address.location- Location record for the requested IP address.postal- Postal record for the requested IP address.registeredCountry- Registered country record for the requested IP address.representedCountry- Represented country record for the requested IP address.risk- The risk associated with the IP address.riskReasons- An unmodifiable list containing risk reason objects that identify the reasons why the IP address received the associated risk. This will be an empty list if there are no reasons.subdivisions- List of subdivision records for the requested IP address.traits- Traits record for the requested IP address.
- All Implemented Interfaces:
JsonSerializable, IpAddressInterface
public record IpAddress(com.maxmind.geoip2.record.City city, com.maxmind.geoip2.record.Continent continent, com.maxmind.geoip2.record.Country country, GeoIp2Location location, com.maxmind.geoip2.record.Postal postal, com.maxmind.geoip2.record.Country registeredCountry, com.maxmind.geoip2.record.RepresentedCountry representedCountry, Double risk, List<IpRiskReason> riskReasons, List<com.maxmind.geoip2.record.Subdivision> subdivisions, com.maxmind.geoip2.record.Traits traits)
extends Record
implements IpAddressInterface, JsonSerializable
This class contains minFraud response data related to the IP location.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs an instance ofIpAddresswith no data.IpAddress(com.maxmind.geoip2.record.City city, com.maxmind.geoip2.record.Continent continent, com.maxmind.geoip2.record.Country country, GeoIp2Location location, com.maxmind.geoip2.record.Postal postal, com.maxmind.geoip2.record.Country registeredCountry, com.maxmind.geoip2.record.RepresentedCountry representedCountry, Double risk, List<IpRiskReason> riskReasons, List<com.maxmind.geoip2.record.Subdivision> subdivisions, com.maxmind.geoip2.record.Traits traits) Compact canonical constructor that sets defaults for null values. -
Method Summary
Modifier and TypeMethodDescriptioncom.maxmind.geoip2.record.Citycity()Returns the value of thecityrecord component.com.maxmind.geoip2.record.ContinentReturns the value of thecontinentrecord component.com.maxmind.geoip2.record.Countrycountry()Returns the value of thecountryrecord component.final booleanIndicates whether some other object is "equal to" this one.com.maxmind.geoip2.record.CitygetCity()Deprecated, for removal: This API element is subject to removal in a future version.com.maxmind.geoip2.record.ContinentDeprecated, for removal: This API element is subject to removal in a future version.Usecontinent()instead.com.maxmind.geoip2.record.CountryDeprecated, for removal: This API element is subject to removal in a future version.Usecountry()instead.Deprecated, for removal: This API element is subject to removal in a future version.Uselocation()instead.com.maxmind.geoip2.record.PostalDeprecated, for removal: This API element is subject to removal in a future version.Usepostal()instead.com.maxmind.geoip2.record.CountryDeprecated, for removal: This API element is subject to removal in a future version.UseregisteredCountry()instead.com.maxmind.geoip2.record.RepresentedCountryDeprecated, for removal: This API element is subject to removal in a future version.UserepresentedCountry()instead.getRisk()Deprecated, for removal: This API element is subject to removal in a future version.Userisk()instead.Deprecated, for removal: This API element is subject to removal in a future version.UseriskReasons()instead.List<com.maxmind.geoip2.record.Subdivision> Deprecated, for removal: This API element is subject to removal in a future version.Usesubdivisions()instead.com.maxmind.geoip2.record.TraitsDeprecated, for removal: This API element is subject to removal in a future version.Usetraits()instead.final inthashCode()Returns a hash code value for this object.location()Returns the value of thelocationrecord component.com.maxmind.geoip2.record.Postalpostal()Returns the value of thepostalrecord component.com.maxmind.geoip2.record.CountryReturns the value of theregisteredCountryrecord component.com.maxmind.geoip2.record.RepresentedCountryReturns the value of therepresentedCountryrecord component.risk()Returns the value of theriskrecord component.Returns the value of theriskReasonsrecord component.List<com.maxmind.geoip2.record.Subdivision> Returns the value of thesubdivisionsrecord component.final StringtoString()Returns a string representation of this record class.com.maxmind.geoip2.record.Traitstraits()Returns the value of thetraitsrecord component.Methods inherited from interface JsonSerializable
toJson
-
Constructor Details
-
IpAddress
public IpAddress(com.maxmind.geoip2.record.City city, com.maxmind.geoip2.record.Continent continent, com.maxmind.geoip2.record.Country country, GeoIp2Location location, com.maxmind.geoip2.record.Postal postal, com.maxmind.geoip2.record.Country registeredCountry, com.maxmind.geoip2.record.RepresentedCountry representedCountry, Double risk, List<IpRiskReason> riskReasons, List<com.maxmind.geoip2.record.Subdivision> subdivisions, com.maxmind.geoip2.record.Traits traits) Compact canonical constructor that sets defaults for null values. -
IpAddress
public IpAddress()Constructs an instance ofIpAddresswith no data.
-
-
Method Details
-
getLocation
Deprecated, for removal: This API element is subject to removal in a future version.Uselocation()instead. This method will be removed in 5.0.0.- Returns:
- Location record for the requested IP address.
-
getCity
Deprecated, for removal: This API element is subject to removal in a future version.Usecity()instead. This method will be removed in 5.0.0.- Returns:
- City record for the requested IP address.
-
getContinent
@Deprecated(since="4.0.0", forRemoval=true) public com.maxmind.geoip2.record.Continent getContinent()Deprecated, for removal: This API element is subject to removal in a future version.Usecontinent()instead. This method will be removed in 5.0.0.- Returns:
- Continent record for the requested IP address.
-
getCountry
Deprecated, for removal: This API element is subject to removal in a future version.Usecountry()instead. This method will be removed in 5.0.0.- Returns:
- Country record for the requested IP address.
-
getPostal
Deprecated, for removal: This API element is subject to removal in a future version.Usepostal()instead. This method will be removed in 5.0.0.- Returns:
- Postal record for the requested IP address.
-
getRegisteredCountry
@Deprecated(since="4.0.0", forRemoval=true) public com.maxmind.geoip2.record.Country getRegisteredCountry()Deprecated, for removal: This API element is subject to removal in a future version.UseregisteredCountry()instead. This method will be removed in 5.0.0.- Returns:
- Registered country record for the requested IP address.
-
getRepresentedCountry
@Deprecated(since="4.0.0", forRemoval=true) public com.maxmind.geoip2.record.RepresentedCountry getRepresentedCountry()Deprecated, for removal: This API element is subject to removal in a future version.UserepresentedCountry()instead. This method will be removed in 5.0.0.- Returns:
- Represented country record for the requested IP address.
-
getSubdivisions
@Deprecated(since="4.0.0", forRemoval=true) public List<com.maxmind.geoip2.record.Subdivision> getSubdivisions()Deprecated, for removal: This API element is subject to removal in a future version.Usesubdivisions()instead. This method will be removed in 5.0.0.- Returns:
- List of subdivision records for the requested IP address.
-
getTraits
Deprecated, for removal: This API element is subject to removal in a future version.Usetraits()instead. This method will be removed in 5.0.0.- Returns:
- Traits record for the requested IP address.
-
getRisk
Deprecated, for removal: This API element is subject to removal in a future version.Userisk()instead. This method will be removed in 5.0.0.- Specified by:
getRiskin interfaceIpAddressInterface- Returns:
- The risk associated with the IP address.
-
getRiskReasons
Deprecated, for removal: This API element is subject to removal in a future version.UseriskReasons()instead. This method will be removed in 5.0.0.- Returns:
- An unmodifiable list containing risk reason objects that identify the reasons why the IP address received the associated risk. This will be an empty list if there are no reasons.
-
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). -
city
-
continent
-
country
-
location
-
postal
-
registeredCountry
public com.maxmind.geoip2.record.Country registeredCountry()Returns the value of theregisteredCountryrecord component.- Returns:
- the value of the
registeredCountryrecord component
-
representedCountry
public com.maxmind.geoip2.record.RepresentedCountry representedCountry()Returns the value of therepresentedCountryrecord component.- Returns:
- the value of the
representedCountryrecord component
-
risk
Returns the value of theriskrecord component.- Specified by:
riskin interfaceIpAddressInterface- Returns:
- the value of the
riskrecord component
-
riskReasons
Returns the value of theriskReasonsrecord component.- Returns:
- the value of the
riskReasonsrecord component
-
subdivisions
Returns the value of thesubdivisionsrecord component.- Returns:
- the value of the
subdivisionsrecord component
-
traits
-
city()instead.