com.grafana.foundation.dashboard.VariableOption 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.dashboard;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.ObjectWriter;
import com.fasterxml.jackson.annotation.JsonInclude;
// Option to be selected in a variable.
public class VariableOption {
// Whether the option is selected or not
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty("selected")
public Boolean selected;
// Text to be displayed for the option
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonProperty("text")
public StringOrArrayOfString text;
// Value of the option
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonProperty("value")
public StringOrArrayOfString value;
public String toJSON() throws JsonProcessingException {
ObjectWriter ow = new ObjectMapper().writer().withDefaultPrettyPrinter();
return ow.writeValueAsString(this);
}
}