Package io.sentry.protocol
Class Geo
java.lang.Object
io.sentry.protocol.Geo
- All Implemented Interfaces:
JsonSerializable
,JsonUnknown
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
static final class
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Geo
Creates geo from a map.@Nullable String
getCity()
Gets the human readable city name.@Nullable String
Gets the two-letter country code (ISO 3166-1 alpha-2).@Nullable String
Gets the human readable region name or code.void
serialize
(@NotNull ObjectWriter writer, @NotNull ILogger logger) void
Sets the human readable city name.void
setCountryCode
(@Nullable String countryCode) Sets the two-letter country code (ISO 3166-1 alpha-2).void
Sets the human readable region name or code.void
setUnknown
(@Nullable Map<String, Object> unknown)
-
Constructor Details
-
Geo
public Geo() -
Geo
-
-
Method Details
-
fromMap
Creates geo from a map.- Parameters:
map
- - The geo data as map- Returns:
- the geo
-
getCity
Gets the human readable city name.- Returns:
- human readable city name
-
setCity
Sets the human readable city name.- Parameters:
city
- human readable city name
-
getCountryCode
Gets the two-letter country code (ISO 3166-1 alpha-2).- Returns:
- two-letter country code (ISO 3166-1 alpha-2).
-
setCountryCode
Sets the two-letter country code (ISO 3166-1 alpha-2).- Parameters:
countryCode
- two-letter country code (ISO 3166-1 alpha-2).
-
getRegion
Gets the human readable region name or code.- Returns:
- human readable region name or code.
-
setRegion
Sets the human readable region name or code.- Parameters:
region
- human readable region name or code.
-
getUnknown
- Specified by:
getUnknown
in interfaceJsonUnknown
-
setUnknown
- Specified by:
setUnknown
in interfaceJsonUnknown
-
serialize
public void serialize(@NotNull @NotNull ObjectWriter writer, @NotNull @NotNull ILogger logger) throws IOException - Specified by:
serialize
in interfaceJsonSerializable
- Throws:
IOException
-