package com.friday.operation.api.tooldriver.constant;

import java.util.Arrays;

/**
 * @Author YaoYao
 * @Date Created In 17:07 2022/12/1
 * @Description 供应商枚举
 * @Modified By
 */
public class SupplierEnum {
    public enum RPASupplierEnum {
        UIPATH("UIPATH", "UIPATHDriver","UIPATH"),
        INFODATOR("INFODATOR","INFODATORDriver", "容智信息"),
        SMARTRPA("SMARTRPA", "SmartRPADriver","神州数码"),
        HTDE("HTDE","ProgramDefaultDriver", "程序默认")
        ;

        private String supplierName;
        private String driverServiceName;
        private String description;

        RPASupplierEnum(String supplierName, String driverServiceName, String description) {
            this.supplierName = supplierName;
            this.driverServiceName = driverServiceName;
            this.description = description;
        }

        public String getSupplierName() {
            return supplierName;
        }

        public String getDriverServiceName() {
            return driverServiceName;
        }

        public static String getDriverServiceName(String supplierName){
            return Arrays.stream(values()).filter(rpaSupplierEnum -> rpaSupplierEnum.getSupplierName().equalsIgnoreCase(supplierName)).map(RPASupplierEnum::getDriverServiceName).findFirst().orElse(DriverConstant.EMPTY_STRING);
        }
    }

    public enum AISupplierEnum {
        SINGULARITY("SINGULARITY", "元初"),
        HT_AI_PLATFORM("HT_AI_PLATFORM", "华泰AI平台");
        private String supplierName;
        private String description;

        AISupplierEnum(String supplierName, String description) {
            this.supplierName = supplierName;
            this.description = description;
        }

        public String getSupplierName() {
            return supplierName;
        }
    }

    public enum ProgramSupplierEnum {
        DIGITAL_EMPLOYEE("DIGITAL_EMPLOYEE", "数字员工");
        private String supplierName;
        private String description;

        ProgramSupplierEnum(String supplierName, String description) {
            this.supplierName = supplierName;
            this.description = description;
        }

        public String getSupplierName() {
            return supplierName;
        }
    }

}
