package com.ruoyi.platform.domain;

public enum PodStatus {
    Pending("Pending",1), Running("Running",2),Terminated("Terminated",3), Failed("Failed",4), Unknown("Unknown",5);
    private String name;
    private int index;
    private PodStatus(String name, int index) {
        this.name = name;
        this.index = index;
    }
    public static String getName(int index) {
        for (PodStatus c : PodStatus.values()) {
            if (c.getIndex() == index) {
                return c.name;
            }
        }
        return null;
    }
    // get set 方法
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public int getIndex() {
        return index;
    }
    public void setIndex(int index) {
        this.index = index;
    }
    }
