io.vertx.config.vault.client.LookupConverter Maven / Gradle / Ivy
The newest version!
package io.vertx.config.vault.client;
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.config.vault.client.Lookup}.
* NOTE: This class has been automatically generated from the {@link io.vertx.config.vault.client.Lookup} original class using Vert.x codegen.
*/
public class LookupConverter {
static void fromJson(Iterable> json, Lookup obj) {
for (java.util.Map.Entry member : json) {
switch (member.getKey()) {
case "accessor":
if (member.getValue() instanceof String) {
obj.setAccessor((String)member.getValue());
}
break;
case "creation_time":
if (member.getValue() instanceof Number) {
obj.setCreationTime(((Number)member.getValue()).longValue());
}
break;
case "creation_ttl":
if (member.getValue() instanceof Number) {
obj.setCreationTTL(((Number)member.getValue()).longValue());
}
break;
case "display_name":
if (member.getValue() instanceof String) {
obj.setDisplayName((String)member.getValue());
}
break;
case "explicit_max_ttl":
if (member.getValue() instanceof Number) {
obj.setExplicitMaxTTL(((Number)member.getValue()).longValue());
}
break;
case "id":
if (member.getValue() instanceof String) {
obj.setId((String)member.getValue());
}
break;
case "last_renewal_time":
if (member.getValue() instanceof Number) {
obj.setLastRenewalTime(((Number)member.getValue()).longValue());
}
break;
case "num_uses":
if (member.getValue() instanceof Number) {
obj.setNumUses(((Number)member.getValue()).longValue());
}
break;
case "orphan":
if (member.getValue() instanceof Boolean) {
obj.setOrphan((Boolean)member.getValue());
}
break;
case "path":
if (member.getValue() instanceof String) {
obj.setPath((String)member.getValue());
}
break;
case "policies":
if (member.getValue() instanceof JsonArray) {
java.util.ArrayList list = new java.util.ArrayList<>();
((Iterable
© 2015 - 2025 Weber Informatics LLC | Privacy Policy