com.satori.composer.ddog.DdogExt Maven / Gradle / Ivy
package com.satori.composer.ddog;
import java.util.*;
import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.databind.*;
import com.fasterxml.jackson.databind.node.*;
public class DdogExt {
@JsonIgnore
HashMap ext = null;
@JsonAnyGetter
public Map ext() {
return ext;
}
@JsonAnySetter
public void ext(String name, JsonNode value) {
if (ext == null) {
ext = new HashMap<>();
}
ext.put(name, value);
}
public JsonNode ext(String name) {
if (ext == null) {
return null;
}
return ext.getOrDefault(name, null);
}
public void ext(String name, String value) {
ext(name, JsonNodeFactory.instance.textNode(value));
}
public void ext(String name, Float value) {
ext(name, JsonNodeFactory.instance.numberNode(value));
}
}