package com.lanyuanxiaoyao.service.configuration.entity.flink;

import com.fasterxml.jackson.annotation.JsonAlias;

/**
 * Flink overview
 *
 * @author lanyuanxiaoyao
 * @date 2023-05-04
 */
public class FlinkOverview {
    @JsonAlias("taskmanagers")
    private Integer taskManagers;
    @JsonAlias("slots-total")
    private Integer slotsTotal;
    @JsonAlias("slots-available")
    private Integer slotsAvailable;
    @JsonAlias("jobs-running")
    private Integer jobsRunning;
    @JsonAlias("jobs-finished")
    private Integer jobsFinished;
    @JsonAlias("jobs-cancelled")
    private Integer jobsCanceled;
    @JsonAlias("jobs-failed")
    private Integer jobsFailed;
    @JsonAlias("flink-version")
    private String flinkVersion;
    @JsonAlias("flink-commit")
    private String flinkCommit;

    public Integer getTaskManagers() {
        return taskManagers;
    }

    public Integer getSlotsTotal() {
        return slotsTotal;
    }

    public Integer getSlotsAvailable() {
        return slotsAvailable;
    }

    public Integer getJobsRunning() {
        return jobsRunning;
    }

    public Integer getJobsFinished() {
        return jobsFinished;
    }

    public Integer getJobsCanceled() {
        return jobsCanceled;
    }

    public Integer getJobsFailed() {
        return jobsFailed;
    }

    public String getFlinkVersion() {
        return flinkVersion;
    }

    public String getFlinkCommit() {
        return flinkCommit;
    }

    @Override
    public String toString() {
        return "FlinkOverview{" +
                "taskManagers=" + taskManagers +
                ", slotsTotal=" + slotsTotal +
                ", slotsAvailable=" + slotsAvailable +
                ", jobsRunning=" + jobsRunning +
                ", jobsFinished=" + jobsFinished +
                ", jobsCanceled=" + jobsCanceled +
                ", jobsFailed=" + jobsFailed +
                ", flinkVersion='" + flinkVersion + '\'' +
                ", flinkCommit='" + flinkCommit + '\'' +
                '}';
    }
}
