All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.knotx.repository.http.CustomHttpHeaderOptionsConverter Maven / Gradle / Ivy

There is a newer version: 2.4.0
Show newest version
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