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 __());
    };
})();
import { OasTraverser } from '../../visitors/OasTraverser';
/**
 * Constructor.
 * @param {*} visitor
 * @class
 * @extends OasTraverser
 * @author eric.wittmann@gmail.com
 */
var Oas20Traverser = /** @class */ (function (_super) {
    __extends(Oas20Traverser, _super);
    function Oas20Traverser(visitor) {
        return _super.call(this, visitor) || this;
    }
    /**
     * @see io.apicurio.datamodels.openapi.visitors.OasTraverser#traverseDocument(io.apicurio.datamodels.core.models.Document)
     * @param {Document} node
     */
    Oas20Traverser.prototype.traverseDocument = function (node) {
        _super.prototype.traverseDocument.call(this, node);
        var doc = node;
        this.traverseIfNotNull(doc.definitions);
        this.traverseIfNotNull(doc.parameters);
        this.traverseIfNotNull(doc.responses);
        this.traverseIfNotNull(doc.securityDefinitions);
    };
    /**
     * @see io.apicurio.datamodels.core.visitors.Traverser#traverseParameter(io.apicurio.datamodels.core.models.common.Parameter)
     * @param {Parameter} node
     */
    Oas20Traverser.prototype.traverseParameter = function (node) {
        _super.prototype.traverseParameter.call(this, node);
        var param = node;
        this.traverseIfNotNull(param.items);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v2.visitors.IOas20Visitor#visitItems(io.apicurio.datamodels.openapi.v2.models.Oas20Items)
     * @param {Oas20Items} node
     */
    Oas20Traverser.prototype.visitItems = function (node) {
        node.accept(this.visitor);
        this.traverseIfNotNull(node.items);
        this.traverseExtensions(node);
        this.traverseValidationProblems(node);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v2.visitors.IOas20Visitor#visitScopes(io.apicurio.datamodels.openapi.v2.models.Oas20Scopes)
     * @param {Oas20Scopes} node
     */
    Oas20Traverser.prototype.visitScopes = function (node) {
        node.accept(this.visitor);
        this.traverseExtensions(node);
        this.traverseValidationProblems(node);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v2.visitors.IOas20Visitor#visitSecurityDefinitions(io.apicurio.datamodels.openapi.v2.models.Oas20SecurityDefinitions)
     * @param {Oas20SecurityDefinitions} node
     */
    Oas20Traverser.prototype.visitSecurityDefinitions = function (node) {
        node.accept(this.visitor);
        this.traverseIndexedNode(node);
        this.traverseValidationProblems(node);
    };
    /**
     * @see io.apicurio.datamodels.core.visitors.IVisitor#visitSecurityScheme(io.apicurio.datamodels.core.models.common.SecurityScheme)
     * @param {SecurityScheme} node
     */
    Oas20Traverser.prototype.visitSecurityScheme = function (node) {
        var node20 = node;
        node.accept(this.visitor);
        this.traverseIfNotNull(node20.scopes);
        this.traverseExtensions(node);
        this.traverseValidationProblems(node);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v2.visitors.IOas20Visitor#visitDefinitions(io.apicurio.datamodels.openapi.v2.models.Oas20Definitions)
     * @param {Oas20Definitions} node
     */
    Oas20Traverser.prototype.visitDefinitions = function (node) {
        node.accept(this.visitor);
        this.traverseIndexedNode(node);
        this.traverseValidationProblems(node);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v2.visitors.IOas20Visitor#visitParameterDefinitions(io.apicurio.datamodels.openapi.v2.models.Oas20ParameterDefinitions)
     * @param {Oas20ParameterDefinitions} node
     */
    Oas20Traverser.prototype.visitParameterDefinitions = function (node) {
        node.accept(this.visitor);
        this.traverseIndexedNode(node);
        this.traverseValidationProblems(node);
    };
    /**
     * @see io.apicurio.datamodels.openapi.visitors.OasTraverser#traverseHeader(io.apicurio.datamodels.openapi.models.OasHeader)
     * @param {OasHeader} node
     */
    Oas20Traverser.prototype.traverseHeader = function (node) {
        var header = node;
        this.traverseIfNotNull(header.items);
        _super.prototype.traverseHeader.call(this, node);
    };
    /**
     * @see io.apicurio.datamodels.openapi.visitors.IOasVisitor#visitExample(io.apicurio.datamodels.core.models.common.IExample)
     * @param {*} node
     */
    Oas20Traverser.prototype.visitExample = function (node) {
        node.accept(this.visitor);
        this.traverseValidationProblems(node);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v2.visitors.IOas20Visitor#visitHeaders(io.apicurio.datamodels.openapi.v2.models.Oas20Headers)
     * @param {Oas20Headers} node
     */
    Oas20Traverser.prototype.visitHeaders = function (node) {
        node.accept(this.visitor);
        this.traverseIndexedNode(node);
        this.traverseValidationProblems(node);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v2.visitors.IOas20Visitor#visitResponseDefinitions(io.apicurio.datamodels.openapi.v2.models.Oas20ResponseDefinitions)
     * @param {Oas20ResponseDefinitions} node
     */
    Oas20Traverser.prototype.visitResponseDefinitions = function (node) {
        node.accept(this.visitor);
        this.traverseIndexedNode(node);
        this.traverseValidationProblems(node);
    };
    /**
     * @see io.apicurio.datamodels.openapi.visitors.OasTraverser#traverseResponse(io.apicurio.datamodels.openapi.models.OasResponse)
     * @param {OasResponse} node
     */
    Oas20Traverser.prototype.traverseResponse = function (node) {
        var response = node;
        this.traverseIfNotNull(response.headers);
        this.traverseIfNotNull(response.schema);
        this.traverseIfNotNull(response.examples);
        _super.prototype.traverseResponse.call(this, node);
    };
    return Oas20Traverser;
}(OasTraverser));
export { Oas20Traverser };
Oas20Traverser["__class"] = "io.apicurio.datamodels.openapi.v2.visitors.Oas20Traverser";
Oas20Traverser["__interfaces"] = ["io.apicurio.datamodels.core.visitors.IVisitor", "io.apicurio.datamodels.openapi.v2.visitors.IOas20Visitor", "io.apicurio.datamodels.core.visitors.ITraverser", "io.apicurio.datamodels.openapi.visitors.IOasVisitor"];
//# sourceMappingURL=Oas20Traverser.js.map