package cd.casic.ci.process.enums;

import lombok.Getter;

import java.util.HashMap;
import java.util.Map;

@Getter
public enum ResourceTypeEnum {
    DOCKER("docker","镜像"),
    K8S("k8s","k8s服务器"),
    MACHINE("machine","定向机器"),
    CLOUD("cloud","弹性云"),
    ;
    private final String code;
    private final String msg;

    ResourceTypeEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
    public static Map<String, ResourceTypeEnum> getCodeMap(){
        Map<String, ResourceTypeEnum> map = new HashMap<>();
        for (ResourceTypeEnum value : values()) {
            map.put(value.code, value);
        }
        return map;
    }
}
