LocationRequestOptions implements JsonSerializable, Parcelable { @NonNull @Override public JsonValue toJsonValue() { Map<String, Object> map = new HashMap<>(); map.put("priority", getPriority()); map.put("minDistance", getMinDistance()); map.put("minTime", getMinTime()); try { return JsonValue.wrap(map); } catch (JsonException e) { Logger.error(e, "LocationRequestOptions - Unable to serialize to JSON."); return JsonValue.NULL; } } private  LocationRequestOptions(@NonNull Builder builder); private  LocationRequestOptions(@NonNull Parcel in); private  LocationRequestOptions(int priority, long minTime, float minDistance); @Override int describeContents(); @Override void writeToParcel(@NonNull Parcel dest, int flags); @NonNull static LocationRequestOptions createDefaultOptions(); int getPriority(); long getMinTime(); float getMinDistance(); @NonNull @Override String toString(); @Override boolean equals(@Nullable Object o); @NonNull @Override JsonValue toJsonValue(); @NonNull static LocationRequestOptions fromJson(@NonNull JsonValue value); @NonNull static Builder newBuilder(); @NonNull
    static final String MIN_DISTANCE_KEY; @NonNull
    static final String MIN_TIME_KEY; @NonNull
    static final String PRIORITY_KEY; static final float DEFAULT_UPDATE_INTERVAL_METERS; static final long DEFAULT_UPDATE_INTERVAL_MILLISECONDS; static final int DEFAULT_REQUEST_PRIORITY; static final int PRIORITY_HIGH_ACCURACY; static final int PRIORITY_BALANCED_POWER_ACCURACY; static final int PRIORITY_LOW_POWER; static final int PRIORITY_NO_POWER; @NonNull
    static final Parcelable.Creator<LocationRequestOptions> CREATOR; }
@Test public void testToJsonValue() { LocationRequestOptions options = LocationRequestOptions.newBuilder() .setPriority(LocationRequestOptions.PRIORITY_LOW_POWER) .setMinDistance(44.4f) .setMinTime(1111, TimeUnit.MILLISECONDS) .build(); JsonValue value = options.toJsonValue(); assertEquals(44.4f, value.getMap().get(LocationRequestOptions.MIN_DISTANCE_KEY).getNumber().floatValue()); assertEquals(1111, value.getMap().get(LocationRequestOptions.MIN_TIME_KEY).getLong(0)); assertEquals(LocationRequestOptions.PRIORITY_LOW_POWER, value.getMap().get(LocationRequestOptions.PRIORITY_KEY).getInt(-1)); }