com.grafana.foundation.canvas.CanvasConnection 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.canvas;
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;
import com.grafana.foundation.common.ColorDimensionConfig;
import com.grafana.foundation.common.ScaleDimensionConfig;
import java.util.List;
public class CanvasConnection {
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonProperty("source")
public ConnectionCoordinates source;
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonProperty("target")
public ConnectionCoordinates target;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty("targetName")
public String targetName;
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonProperty("path")
public ConnectionPath path;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty("color")
public ColorDimensionConfig color;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty("size")
public ScaleDimensionConfig size;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty("vertices")
public List vertices;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty("sourceOriginal")
public ConnectionCoordinates sourceOriginal;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty("targetOriginal")
public ConnectionCoordinates targetOriginal;
public String toJSON() throws JsonProcessingException {
ObjectWriter ow = new ObjectMapper().writer().withDefaultPrettyPrinter();
return ow.writeValueAsString(this);
}
public static class Builder implements com.grafana.foundation.cog.Builder {
protected final CanvasConnection internal;
public Builder() {
this.internal = new CanvasConnection();
}
public Builder source(com.grafana.foundation.cog.Builder source) {
this.internal.source = source.build();
return this;
}
public Builder target(com.grafana.foundation.cog.Builder target) {
this.internal.target = target.build();
return this;
}
public Builder targetName(String targetName) {
this.internal.targetName = targetName;
return this;
}
public Builder path(ConnectionPath path) {
this.internal.path = path;
return this;
}
public Builder color(com.grafana.foundation.cog.Builder color) {
this.internal.color = color.build();
return this;
}
public Builder size(com.grafana.foundation.cog.Builder size) {
this.internal.size = size.build();
return this;
}
public Builder vertices(com.grafana.foundation.cog.Builder> vertices) {
this.internal.vertices = vertices.build();
return this;
}
public Builder sourceOriginal(com.grafana.foundation.cog.Builder sourceOriginal) {
this.internal.sourceOriginal = sourceOriginal.build();
return this;
}
public Builder targetOriginal(com.grafana.foundation.cog.Builder targetOriginal) {
this.internal.targetOriginal = targetOriginal.build();
return this;
}
public CanvasConnection build() {
return this.internal;
}
}
}