"use strict";
/** @format */
Object.defineProperty(exports, "__esModule", { value: true });
exports.getInputData = exports.checkProviderList = exports.providerAccessFormat = exports.providerCollection = exports.providerArray = exports.ProviderObject = void 0;
var ProviderObject;
(function (ProviderObject) {
    ProviderObject["alibaba"] = "Alibaba Cloud (alibaba)";
    ProviderObject["baidu"] = "Baidu Cloud (baidu)";
    ProviderObject["huawei"] = "Huawei Cloud (huawei)";
    ProviderObject["aws"] = "AWS (aws)";
    ProviderObject["azure"] = "Azure (azure)";
    ProviderObject["google"] = "Google Cloud (google)";
    ProviderObject["tencent"] = "Tencent Cloud (tencent)";
})(ProviderObject = exports.ProviderObject || (exports.ProviderObject = {}));
exports.providerArray = ['alibaba', 'baidu', 'huawei', 'aws', 'azure', 'google', 'tencent'];
exports.providerCollection = {
    alibaba: [
        {
            type: 'input',
            message: 'AccountID',
            name: 'AccountID',
            default: '',
        },
        {
            type: 'input',
            message: 'AccessKeyID',
            name: 'AccessKeyID',
            default: '',
        },
        {
            type: 'input',
            message: 'AccessKeySecret',
            name: 'AccessKeySecret',
            default: '',
        },
    ],
    aws: [
        {
            type: 'input',
            message: 'AccessKeyID',
            name: 'AccessKeyID',
            default: '',
        },
        {
            type: 'input',
            message: 'SecretAccessKey',
            name: 'SecretAccessKey',
            default: '',
        },
    ],
    huawei: [
        {
            type: 'input',
            message: 'AccessKeyID',
            name: 'AccessKeyID',
            default: '',
        },
        {
            type: 'input',
            message: 'SecretAccessKey',
            name: 'SecretAccessKey',
            default: '',
        },
    ],
    azure: [
        {
            type: 'input',
            message: 'KeyVaultName',
            name: 'KeyVaultName',
            default: '',
        },
        {
            type: 'input',
            message: 'TenantID',
            name: 'TenantID',
            default: '',
        },
        {
            type: 'input',
            message: 'ClentID',
            name: 'ClentID',
            default: '',
        },
        {
            type: 'input',
            message: 'ClientSecret',
            name: 'ClientSecret',
            default: '',
        },
    ],
    baidu: [
        {
            type: 'input',
            message: 'AccessKeyID',
            name: 'AccessKeyID',
            default: '',
        },
        {
            type: 'input',
            message: 'SecretAccessKey',
            name: 'SecretAccessKey',
            default: '',
        },
    ],
    google: [
        {
            type: 'input',
            message: 'PrivateKeyData',
            name: 'PrivateKeyData',
            default: '',
        },
    ],
    tencent: [
        {
            type: 'input',
            message: 'AccountID',
            name: 'AccountID',
            default: '',
        },
        {
            type: 'input',
            message: 'SecretID',
            name: 'SecretID',
            default: '',
        },
        {
            type: 'input',
            message: 'SecretKey',
            name: 'SecretKey',
            default: '',
        },
    ],
};
exports.providerAccessFormat = {
    alibaba: ['AccountID', 'AccessKeyID', 'AccessKeySecret'],
    aws: ['AccessKeyID', 'SecretAccessKey'],
    baidu: ['AccessKeyID', 'SecretAccessKey'],
    huawei: ['AccessKeyID', 'SecretAccessKey'],
    azure: ['KeyVaultName', 'TenantID', 'ClientID', 'ClientSecret'],
    tencent: ['AccountID', 'SecretID'],
    google: ['PrivateKeyData'],
};
exports.checkProviderList = [
    {
        type: 'list',
        name: 'provider',
        message: 'Please select a provider:',
        choices: [
            { name: ProviderObject.alibaba, value: 'alibaba' },
            { name: ProviderObject.aws, value: 'aws' },
            { name: ProviderObject.azure, value: 'azure' },
            { name: ProviderObject.baidu, value: 'baidu' },
            { name: ProviderObject.google, value: 'google' },
            { name: ProviderObject.huawei, value: 'huawei' },
            { name: ProviderObject.tencent, value: 'tencent' },
        ],
    },
];
function getInputData(program) {
    var inputSecretCheck = {};
    if (program.AccountID) {
        inputSecretCheck.AccountID = program.AccountID;
    }
    if (program.AccessKeyID) {
        inputSecretCheck.AccessKeyID = program.AccessKeyID;
    }
    if (program.AccessKeySecret) {
        inputSecretCheck.AccessKeySecret = program.AccessKeySecret;
    }
    if (program.SecretID) {
        inputSecretCheck.SecretID = program.SecretID;
    }
    if (program.SecretAccessKey) {
        inputSecretCheck.SecretAccessKey = program.SecretAccessKey;
    }
    if (program.KeyVaultName) {
        inputSecretCheck.KeyVaultName = program.KeyVaultName;
    }
    if (program.TenantID) {
        inputSecretCheck.TenantID = program.TenantID;
    }
    if (program.ClientID) {
        inputSecretCheck.ClientID = program.ClientID;
    }
    if (program.ClientSecret) {
        inputSecretCheck.ClientSecret = program.ClientSecret;
    }
    if (program.PrivateKeyData) {
        inputSecretCheck.PrivateKeyData = program.PrivateKeyData;
    }
    return inputSecretCheck;
}
exports.getInputData = getInputData;
//# sourceMappingURL=data:application/json;base64, 