"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 collectionResource_1 = __importDefault(require("../base/collectionResource"));
const account_1 = __importDefault(require("./account"));
class Accounts extends collectionResource_1.default {
    constructor(clientSession) {
        super(clientSession, 'aws-accounts', 'account');
        this._api = 'awsAccounts';
    }
    account(id) {
        return new account_1.default(id, this._clientSession, this._api);
    }
    async getHostingAccountTemplate(externalId) {
        return await this._axiosInstance.post('/awsAccountTemplateUrls', { externalId });
    }
    _buildDefaults(resource) {
        return {
            awsAccountId: 'sampleAccountId',
            envMgmtRoleArn: resource.envMgmtRoleArn,
            hostingAccountHandlerRoleArn: resource.hostingAccountHandlerRoleArn,
            name: resource.name,
            externalId: resource.externalId
        };
    }
}
exports.default = Accounts;
//# sourceMappingURL=accounts.js.map