com.grafana.foundation.tempo.StringOrArrayOfStringSerializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of grafana-foundation-sdk Show documentation
Show all versions of grafana-foundation-sdk Show documentation
A set of tools, types and libraries for building and manipulating Grafana objects.
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
package com.grafana.foundation.tempo;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import java.io.IOException;
public class StringOrArrayOfStringSerializer extends JsonSerializer {
@Override
public void serialize(StringOrArrayOfString value, JsonGenerator gen, SerializerProvider serializerProvider) throws IOException {
if (value.string != null) {
gen.writeObject(value.string);
}
else if (value.arrayOfString != null) {
gen.writeObject(value.arrayOfString);
}
}
}