public class GeoLocationLogInfo
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
GeoLocationLogInfo.Builder
Builder for
GeoLocationLogInfo . |
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
city |
protected java.lang.String |
country |
protected java.lang.String |
ipAddress |
protected java.lang.String |
region |
Constructor and Description |
---|
GeoLocationLogInfo(java.lang.String ipAddress)
Geographic location details.
|
GeoLocationLogInfo(java.lang.String ipAddress,
java.lang.String city,
java.lang.String region,
java.lang.String country)
Geographic location details.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getCity()
City name.
|
java.lang.String |
getCountry()
Country code.
|
java.lang.String |
getIpAddress()
IP address.
|
java.lang.String |
getRegion()
Region name.
|
int |
hashCode() |
static GeoLocationLogInfo.Builder |
newBuilder(java.lang.String ipAddress)
Returns a new builder for creating an instance of this class.
|
java.lang.String |
toString() |
java.lang.String |
toStringMultiline()
Returns a String representation of this object formatted for easier
readability.
|
protected final java.lang.String city
protected final java.lang.String region
protected final java.lang.String country
protected final java.lang.String ipAddress
public GeoLocationLogInfo(java.lang.String ipAddress, java.lang.String city, java.lang.String region, java.lang.String country)
Use newBuilder
to create instances of this class without
specifying values for all optional fields.
ipAddress
- IP address. Must not be null
.city
- City name.region
- Region name.country
- Country code.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public GeoLocationLogInfo(java.lang.String ipAddress)
The default values for unset fields will be used.
ipAddress
- IP address. Must not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public java.lang.String getIpAddress()
null
.public java.lang.String getCity()
null
if not present.public java.lang.String getRegion()
null
if not present.public java.lang.String getCountry()
null
if not present.public static GeoLocationLogInfo.Builder newBuilder(java.lang.String ipAddress)
ipAddress
- IP address. Must not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toStringMultiline()
The returned String may contain newlines.