io.knotx.repository.http.CustomHttpHeaderOptionsConverter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of knotx-repository-connector-http Show documentation
Show all versions of knotx-repository-connector-http Show documentation
HTTP Repository Connector - enables fetching documents from http content repositories
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.CustomHttpHeaderOptions}.
* NOTE: This class has been automatically generated from the {@link io.knotx.repository.http.CustomHttpHeaderOptions} original class using Vert.x codegen.
*/
public class CustomHttpHeaderOptionsConverter {
public static void fromJson(Iterable> json, CustomHttpHeaderOptions obj) {
for (java.util.Map.Entry member : json) {
switch (member.getKey()) {
case "name":
if (member.getValue() instanceof String) {
obj.setName((String)member.getValue());
}
break;
case "value":
if (member.getValue() instanceof String) {
obj.setValue((String)member.getValue());
}
break;
}
}
}
public static void toJson(CustomHttpHeaderOptions obj, JsonObject json) {
toJson(obj, json.getMap());
}
public static void toJson(CustomHttpHeaderOptions obj, java.util.Map json) {
if (obj.getName() != null) {
json.put("name", obj.getName());
}
if (obj.getValue() != null) {
json.put("value", obj.getValue());
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy