// SPDX-License-Identifier: Apache-2.0
import ValidatedDomain from "../../../core/validation/ValidatedArgs";
import { SecurityDate } from "../shared/SecurityDate";
import { Bond } from "./Bond";
export class Coupon extends ValidatedDomain {
    recordTimeStamp;
    executionTimeStamp;
    rate;
    rateDecimals;
    startTimeStamp;
    endTimeStamp;
    fixingTimeStamp;
    rateStatus;
    snapshotId;
    isDisabled;
    constructor(recordTimeStamp, executionTimeStamp, rate, rateDecimals, startTimeStamp, endTimeStamp, fixingTimeStamp, rateStatus, snapshotId, isDisabled = false) {
        super({
            executionTimeStamp: (val) => {
                return SecurityDate.checkDateTimestamp(val, this.recordTimeStamp);
            },
            rateStatus: (val) => {
                return Bond.checkRateStatus(val);
            },
        });
        this.recordTimeStamp = recordTimeStamp;
        this.executionTimeStamp = executionTimeStamp;
        this.rate = rate;
        this.rateDecimals = rateDecimals;
        this.startTimeStamp = startTimeStamp;
        this.endTimeStamp = endTimeStamp;
        this.fixingTimeStamp = fixingTimeStamp;
        this.rateStatus = rateStatus;
        this.snapshotId = snapshotId ? snapshotId : undefined;
        this.isDisabled = isDisabled;
        ValidatedDomain.handleValidation(Coupon.name, this);
    }
}
