io.vertx.config.vault.client.AuthConverter 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.Auth}.
* NOTE: This class has been automatically generated from the {@link io.vertx.config.vault.client.Auth} original class using Vert.x codegen.
*/
public class AuthConverter {
static void fromJson(Iterable> json, Auth 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 "lease_duration":
if (member.getValue() instanceof Number) {
obj.setLeaseDuration(((Number)member.getValue()).longValue());
}
break;
case "renewable":
if (member.getValue() instanceof Boolean) {
obj.setRenewable((Boolean)member.getValue());
}
break;
case "metadata":
if (member.getValue() instanceof JsonObject) {
obj.setMetadata(((JsonObject)member.getValue()).copy());
}
break;
case "client_token":
if (member.getValue() instanceof String) {
obj.setClientToken((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