Package com.dropbox.core.v2.teamlog
Class GeoLocationLogInfo
- java.lang.Object
-
- com.dropbox.core.v2.teamlog.GeoLocationLogInfo
-
public class GeoLocationLogInfo extends java.lang.Object
Geographic location details.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GeoLocationLogInfo.Builder
Builder forGeoLocationLogInfo
.
-
Constructor Summary
Constructors Constructor 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.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Constructor Detail
-
GeoLocationLogInfo
public GeoLocationLogInfo(@Nonnull java.lang.String ipAddress, @Nullable java.lang.String city, @Nullable java.lang.String region, @Nullable java.lang.String country)
Geographic location details.Use
newBuilder(java.lang.String)
to create instances of this class without specifying values for all optional fields.- Parameters:
ipAddress
- IP address. Must not benull
.city
- City name.region
- Region name.country
- Country code.- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.
-
GeoLocationLogInfo
public GeoLocationLogInfo(@Nonnull java.lang.String ipAddress)
Geographic location details.The default values for unset fields will be used.
- Parameters:
ipAddress
- IP address. Must not benull
.- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.
-
-
Method Detail
-
getIpAddress
@Nonnull public java.lang.String getIpAddress()
IP address.- Returns:
- value for this field, never
null
.
-
getCity
@Nullable public java.lang.String getCity()
City name.- Returns:
- value for this field, or
null
if not present.
-
getRegion
@Nullable public java.lang.String getRegion()
Region name.- Returns:
- value for this field, or
null
if not present.
-
getCountry
@Nullable public java.lang.String getCountry()
Country code.- Returns:
- value for this field, or
null
if not present.
-
newBuilder
public static GeoLocationLogInfo.Builder newBuilder(java.lang.String ipAddress)
Returns a new builder for creating an instance of this class.- Parameters:
ipAddress
- IP address. Must not benull
.- Returns:
- builder for this class.
- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
toStringMultiline
public java.lang.String toStringMultiline()
Returns a String representation of this object formatted for easier readability.The returned String may contain newlines.
- Returns:
- Formatted, multiline String representation of this object
-
-