"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AwsAccountRef = exports.AzureSubscriptionRef = exports.CloudAccountRefCriteria = exports.CloudAccountRefBase = void 0;
const contracts_1 = require("@codiac.io/codiac-common/contracts");
const codiac_domain_1 = require("@codiac.io/codiac-domain");
/** A reference to a third party cloud resource provider account. */
class CloudAccountRefBase {
    constructor(providerCode, accountName, id, modified, modifiedBy, created, createdBy) {
        this.providerCode = providerCode;
        this.accountName = accountName;
        this.id = id;
        this.created = created !== null && created !== void 0 ? created : new Date(Date.now());
        this.createdBy = createdBy !== null && createdBy !== void 0 ? createdBy : "unknown";
        this.modified = modified !== null && modified !== void 0 ? modified : this.created;
        this.modifiedBy = modifiedBy !== null && modifiedBy !== void 0 ? modifiedBy : this.createdBy;
    }
}
exports.CloudAccountRefBase = CloudAccountRefBase;
class CloudAccountRefCriteria extends contracts_1.CriteriaBase {
}
exports.CloudAccountRefCriteria = CloudAccountRefCriteria;
class AzureSubscriptionRef extends CloudAccountRefBase {
    constructor(subscriptionId, accountName, tenantId, id, modified, modifiedBy, created, createdBy) {
        super(codiac_domain_1.CloudProviderEnum.azure, accountName, id, modified, modifiedBy, created, createdBy);
        this.subscriptionId = subscriptionId;
        this.tenantId = tenantId;
    }
}
exports.AzureSubscriptionRef = AzureSubscriptionRef;
class AwsAccountRef extends CloudAccountRefBase {
    constructor(accountId, accountName, id, modified, modifiedBy, created, createdBy) {
        super(codiac_domain_1.CloudProviderEnum.aws, accountName, id, modified, modifiedBy, created, createdBy);
        this.accountId = accountId;
    }
}
exports.AwsAccountRef = AwsAccountRef;
//# sourceMappingURL=cloud-account-ref.js.map