io.knotx.repository.http.ClientDestinationConverter Maven / Gradle / Ivy
package io.knotx.repository.http;
import io.vertx.core.json.JsonObject;
import io.vertx.core.json.JsonArray;
import java.time.Instant;
import java.time.format.DateTimeFormatter;
/**
* Converter for {@link io.knotx.repository.http.ClientDestination}.
* NOTE: This class has been automatically generated from the {@link io.knotx.repository.http.ClientDestination} original class using Vert.x codegen.
*/
class ClientDestinationConverter {
static void fromJson(Iterable> json, ClientDestination obj) {
for (java.util.Map.Entry member : json) {
switch (member.getKey()) {
case "domain":
if (member.getValue() instanceof String) {
obj.setDomain((String)member.getValue());
}
break;
case "hostHeader":
if (member.getValue() instanceof String) {
obj.setHostHeader((String)member.getValue());
}
break;
case "port":
if (member.getValue() instanceof Number) {
obj.setPort(((Number)member.getValue()).intValue());
}
break;
case "scheme":
if (member.getValue() instanceof String) {
obj.setScheme((String)member.getValue());
}
break;
}
}
}
static void toJson(ClientDestination obj, JsonObject json) {
toJson(obj, json.getMap());
}
static void toJson(ClientDestination obj, java.util.Map json) {
if (obj.getDomain() != null) {
json.put("domain", obj.getDomain());
}
if (obj.getHostHeader() != null) {
json.put("hostHeader", obj.getHostHeader());
}
json.put("port", obj.getPort());
if (obj.getScheme() != null) {
json.put("scheme", obj.getScheme());
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy