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 { Constants } from '../../../../Constants';
import { ValidationRule } from '../../../ValidationRule';
/**
 * Constructor.
 * @param {ValidationRuleMetaData} ruleInfo
 * @class
 * @extends ValidationRule
 * @author eric.wittmann@gmail.com
 */
var OasInvalidOAuthAuthorizationUrlRule = /** @class */ (function (_super) {
    __extends(OasInvalidOAuthAuthorizationUrlRule, _super);
    function OasInvalidOAuthAuthorizationUrlRule(ruleInfo) {
        return _super.call(this, ruleInfo) || this;
    }
    /**
     * Validate an OAuth flow's auth URL.
     * @param {OAuthFlow} node
     */
    OasInvalidOAuthAuthorizationUrlRule.prototype.visitFlow = function (node) {
        if (this.hasValue(node.authorizationUrl)) {
            this.reportIfInvalid(this.isValidUrl(node.authorizationUrl), node, Constants.PROP_AUTHORIZATION_URL, this.map.apply(this));
        }
    };
    /**
     * @see io.apicurio.datamodels.combined.visitors.CombinedAllNodeVisitor#visitImplicitOAuthFlow(io.apicurio.datamodels.core.models.common.ImplicitOAuthFlow)
     * @param {ImplicitOAuthFlow} node
     */
    OasInvalidOAuthAuthorizationUrlRule.prototype.visitImplicitOAuthFlow = function (node) {
        this.visitFlow(node);
    };
    /**
     * @see io.apicurio.datamodels.combined.visitors.CombinedAllNodeVisitor#visitPasswordOAuthFlow(io.apicurio.datamodels.core.models.common.PasswordOAuthFlow)
     * @param {PasswordOAuthFlow} node
     */
    OasInvalidOAuthAuthorizationUrlRule.prototype.visitPasswordOAuthFlow = function (node) {
        this.visitFlow(node);
    };
    /**
     * @see io.apicurio.datamodels.combined.visitors.CombinedAllNodeVisitor#visitClientCredentialsOAuthFlow(io.apicurio.datamodels.core.models.common.ClientCredentialsOAuthFlow)
     * @param {ClientCredentialsOAuthFlow} node
     */
    OasInvalidOAuthAuthorizationUrlRule.prototype.visitClientCredentialsOAuthFlow = function (node) {
        this.visitFlow(node);
    };
    /**
     * @see io.apicurio.datamodels.combined.visitors.CombinedAllNodeVisitor#visitAuthorizationCodeOAuthFlow(io.apicurio.datamodels.core.models.common.AuthorizationCodeOAuthFlow)
     * @param {AuthorizationCodeOAuthFlow} node
     */
    OasInvalidOAuthAuthorizationUrlRule.prototype.visitAuthorizationCodeOAuthFlow = function (node) {
        this.visitFlow(node);
    };
    return OasInvalidOAuthAuthorizationUrlRule;
}(ValidationRule));
export { OasInvalidOAuthAuthorizationUrlRule };
OasInvalidOAuthAuthorizationUrlRule["__class"] = "io.apicurio.datamodels.core.validation.rules.invalid.format.OasInvalidOAuthAuthorizationUrlRule";
OasInvalidOAuthAuthorizationUrlRule["__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=OasInvalidOAuthAuthorizationUrlRule.js.map