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

ca.ibodrov.mica.api.kinds.MicaDashboardV1 Maven / Gradle / Ivy

The newest version!
package ca.ibodrov.mica.api.kinds;

import ca.ibodrov.mica.api.validation.ValidName;
import com.fasterxml.jackson.databind.JsonNode;

import java.util.List;
import java.util.Optional;

import static java.util.Objects.requireNonNull;

public record MicaDashboardV1(String title,
        ViewRef view,
        Layout layout,
        Optional table) {

    public static final String MICA_DASHBOARD_V1 = "/mica/dashboard/v1";

    public MicaDashboardV1 {
        requireNonNull(title, "missing 'title'");
        requireNonNull(view, "missing 'view'");
        requireNonNull(layout, "missing 'layout'");
        requireNonNull(table, "missing 'table'");
    }

    public enum Layout {
        TABLE
    }

    public record ViewRef(@ValidName String name, Optional parameters) {
    }

    public record TableLayout(List columns) {
    }

    public record TableColumnDef(String title, String jsonPath) {
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy