"use strict";
/*
 *  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 *  SPDX-License-Identifier: Apache-2.0
 */
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 costCenter_1 = __importDefault(require("./costCenter"));
class CostCenters extends collectionResource_1.default {
    constructor(clientSession) {
        super(clientSession, 'costCenters', 'costCenter');
        this._api = 'costCenters';
    }
    costCenter(id) {
        return new costCenter_1.default(id, this._clientSession, this._api);
    }
    _buildDefaults(resource) {
        var _a, _b, _c;
        const randomTextGenerator = new randomTextGenerator_1.default(this._settings.get('runId'));
        return {
            name: (_a = resource.name) !== null && _a !== void 0 ? _a : randomTextGenerator.getFakeText('costCenterName'),
            accountId: (_b = resource.accountId) !== null && _b !== void 0 ? _b : randomTextGenerator.getFakeText('accountId'),
            description: (_c = resource.description) !== null && _c !== void 0 ? _c : randomTextGenerator.getFakeText('description')
        };
    }
}
exports.default = CostCenters;
//# sourceMappingURL=costCenters.js.map