var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
/* Generated from Java with JSweet 2.3.7 - http://www.jsweet.org */
import { Aai20CorrelationId } from '../../../../asyncapi/v2/models/Aai20CorrelationId';
import { Constants } from '../../../Constants';
import { RequiredPropertyValidationRule } from './RequiredPropertyValidationRule';
import { AaiCorrelationId } from '../../../../asyncapi/models/AaiCorrelationId';
/**
 * @author cfoskin@redhat.com
 * @param {ValidationRuleMetaData} ruleInfo
 * @class
 * @extends RequiredPropertyValidationRule
 */
var AaMissingCorrelationIdRule = /** @class */ (function (_super) {
    __extends(AaMissingCorrelationIdRule, _super);
    function AaMissingCorrelationIdRule(ruleInfo) {
        return _super.call(this, ruleInfo) || this;
    }
    AaMissingCorrelationIdRule.prototype.visitCorrelationId$io_apicurio_datamodels_asyncapi_v2_models_Aai20CorrelationId = function (node) {
        this.requireProperty(node, Constants.PROP_CORRELATION_ID, this.map.apply(this));
    };
    AaMissingCorrelationIdRule.prototype.visitCorrelationId = function (node) {
        if (((node != null && node instanceof Aai20CorrelationId) || node === null)) {
            return this.visitCorrelationId$io_apicurio_datamodels_asyncapi_v2_models_Aai20CorrelationId(node);
        }
        else if (((node != null && node instanceof AaiCorrelationId) || node === null)) {
            _super.prototype.visitCorrelationId.call(this, node);
        }
        else
            throw new Error('invalid overload');
    };
    return AaMissingCorrelationIdRule;
}(RequiredPropertyValidationRule));
export { AaMissingCorrelationIdRule };
AaMissingCorrelationIdRule["__class"] = "io.apicurio.datamodels.core.validation.rules.required.AaMissingCorrelationIdRule";
AaMissingCorrelationIdRule["__interfaces"] = ["io.apicurio.datamodels.core.visitors.IVisitor", "io.apicurio.datamodels.asyncapi.v2.visitors.IAai20Visitor", "io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor", "io.apicurio.datamodels.asyncapi.visitors.IAaiVisitor", "io.apicurio.datamodels.openapi.v2.visitors.IOas20Visitor", "io.apicurio.datamodels.openapi.visitors.IOasVisitor"];
//# sourceMappingURL=AaMissingCorrelationIdRule.js.map