package io.vertx.kafka.admin;
import io.vertx.core.json.JsonObject;
import io.vertx.core.json.JsonArray;
import java.time.Instant;
import java.time.format.DateTimeFormatter;
public class ConsumerGroupListingConverter {
public static void fromJson(Iterable<java.util.Map.Entry<String, Object>> json, ConsumerGroupListing obj) {
for (java.util.Map.Entry<String, Object> member : json) {
switch (member.getKey()) {
case "groupId":
if (member.getValue() instanceof String) {
obj.setGroupId((String)member.getValue());
}
break;
case "simpleConsumerGroup":
if (member.getValue() instanceof Boolean) {
obj.setSimpleConsumerGroup((Boolean)member.getValue());
}
break;
}
}
}
public static void toJson(ConsumerGroupListing obj, JsonObject json) {
toJson(obj, json.getMap());
}
public static void toJson(ConsumerGroupListing obj, java.util.Map<String, Object> json) {
if (obj.getGroupId() != null) {
json.put("groupId", obj.getGroupId());
}
json.put("simpleConsumerGroup", obj.isSimpleConsumerGroup());
}
}