"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const randomTextGenerator_1 = __importDefault(require("../../utils/randomTextGenerator"));
const collectionResource_1 = __importDefault(require("../base/collectionResource"));
const environmentTypeConfig_1 = __importDefault(require("./environmentTypeConfig"));
class EnvironmentTypeConfigs extends collectionResource_1.default {
    constructor(clientSession, parentApi, parentId) {
        super(clientSession, 'environmentTypeConfigs', 'environmentTypeConfig');
        this._api = `${parentApi}/configurations`;
        this._parentId = parentId;
    }
    // eslint-disable-next-line @typescript-eslint/naming-convention
    environmentTypeConfig(id) {
        return new environmentTypeConfig_1.default(id, this._clientSession, this._api, this._parentId);
    }
    _buildDefaults(resource) {
        var _a, _b, _c, _d, _e;
        const randomTextGenerator = new randomTextGenerator_1.default(this._settings.get('runId'));
        return {
            description: (_a = resource.description) !== null && _a !== void 0 ? _a : randomTextGenerator.getFakeText('fakeDescription'),
            name: (_b = resource.name) !== null && _b !== void 0 ? _b : randomTextGenerator.getFakeText('fakeName'),
            type: (_c = resource.type) !== null && _c !== void 0 ? _c : randomTextGenerator.getFakeText('fakeType'),
            params: (_d = resource.params) !== null && _d !== void 0 ? _d : [],
            estimatedCost: (_e = resource.name) !== null && _e !== void 0 ? _e : randomTextGenerator.getFakeText('fakeEstimatedCost')
        };
    }
}
exports.default = EnvironmentTypeConfigs;
//# sourceMappingURL=environmentTypeConfigs.js.map