Package io.sentry.protocol
Class Geo
java.lang.Object
io.sentry.protocol.Geo
- All Implemented Interfaces:
JsonSerializable,JsonUnknown
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic final class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic GeoCreates geo from a map.@Nullable StringgetCity()Gets the human readable city name.@Nullable StringGets the two-letter country code (ISO 3166-1 alpha-2).@Nullable StringGets the human readable region name or code.voidserialize(@NotNull ObjectWriter writer, @NotNull ILogger logger) voidSets the human readable city name.voidsetCountryCode(@Nullable String countryCode) Sets the two-letter country code (ISO 3166-1 alpha-2).voidSets the human readable region name or code.voidsetUnknown(@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:
getUnknownin interfaceJsonUnknown
-
setUnknown
- Specified by:
setUnknownin interfaceJsonUnknown
-
serialize
public void serialize(@NotNull @NotNull ObjectWriter writer, @NotNull @NotNull ILogger logger) throws IOException - Specified by:
serializein interfaceJsonSerializable- Throws:
IOException
-