All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.grafana.foundation.canvas.CanvasConnection Maven / Gradle / Ivy

There is a newer version: 11.3.0-1730898216
Show newest version
// 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;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy