Class Geo

java.lang.Object
io.sentry.protocol.Geo
All Implemented Interfaces:
JsonSerializable, JsonUnknown

public final class Geo extends Object implements JsonUnknown, JsonSerializable
  • Constructor Details

    • Geo

      public Geo()
    • Geo

      public Geo(@NotNull @NotNull Geo geo)
  • Method Details

    • fromMap

      public static Geo fromMap(@NotNull @NotNull Map<String,Object> map)
      Creates geo from a map.
      Parameters:
      map - - The geo data as map
      Returns:
      the geo
    • getCity

      @Nullable public @Nullable String getCity()
      Gets the human readable city name.
      Returns:
      human readable city name
    • setCity

      public void setCity(@Nullable @Nullable String city)
      Sets the human readable city name.
      Parameters:
      city - human readable city name
    • getCountryCode

      @Nullable public @Nullable String getCountryCode()
      Gets the two-letter country code (ISO 3166-1 alpha-2).
      Returns:
      two-letter country code (ISO 3166-1 alpha-2).
    • setCountryCode

      public void setCountryCode(@Nullable @Nullable String countryCode)
      Sets the two-letter country code (ISO 3166-1 alpha-2).
      Parameters:
      countryCode - two-letter country code (ISO 3166-1 alpha-2).
    • getRegion

      @Nullable public @Nullable String getRegion()
      Gets the human readable region name or code.
      Returns:
      human readable region name or code.
    • setRegion

      public void setRegion(@Nullable @Nullable String region)
      Sets the human readable region name or code.
      Parameters:
      region - human readable region name or code.
    • getUnknown

      @Nullable public @Nullable Map<String,Object> getUnknown()
      Specified by:
      getUnknown in interface JsonUnknown
    • setUnknown

      public void setUnknown(@Nullable @Nullable Map<String,Object> unknown)
      Specified by:
      setUnknown in interface JsonUnknown
    • serialize

      public void serialize(@NotNull @NotNull ObjectWriter writer, @NotNull @NotNull ILogger logger) throws IOException
      Specified by:
      serialize in interface JsonSerializable
      Throws:
      IOException