io.vertx.ext.consul.PreparedQueryExecuteOptionsConverter Maven / Gradle / Ivy
package io.vertx.ext.consul;
import io.vertx.core.json.JsonObject;
import io.vertx.core.json.JsonArray;
import java.time.Instant;
import java.time.format.DateTimeFormatter;
/**
* Converter and mapper for {@link io.vertx.ext.consul.PreparedQueryExecuteOptions}.
* NOTE: This class has been automatically generated from the {@link io.vertx.ext.consul.PreparedQueryExecuteOptions} original class using Vert.x codegen.
*/
public class PreparedQueryExecuteOptionsConverter {
static void fromJson(Iterable> json, PreparedQueryExecuteOptions obj) {
for (java.util.Map.Entry member : json) {
switch (member.getKey()) {
case "near":
if (member.getValue() instanceof String) {
obj.setNear((String)member.getValue());
}
break;
case "limit":
if (member.getValue() instanceof Number) {
obj.setLimit(((Number)member.getValue()).intValue());
}
break;
}
}
}
static void toJson(PreparedQueryExecuteOptions obj, JsonObject json) {
toJson(obj, json.getMap());
}
static void toJson(PreparedQueryExecuteOptions obj, java.util.Map json) {
if (obj.getNear() != null) {
json.put("near", obj.getNear());
}
json.put("limit", obj.getLimit());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy