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 { CombinedAllNodeVisitor } from './CombinedAllNodeVisitor';
/**
 * Constructor.
 *
 * @param {*[]} visitors
 * @class
 * @extends CombinedAllNodeVisitor
 * @author eric.wittmann@gmail.com
 */
var CombinedCompositeVisitor = /** @class */ (function (_super) {
    __extends(CombinedCompositeVisitor, _super);
    function CombinedCompositeVisitor(visitors) {
        var _this = _super.call(this) || this;
        _this.visitors = ([]);
        _this.visitors = visitors;
        return _this;
    }
    /**
     * Adds a visitor.
     *
     * @param {*} visitor
     */
    CombinedCompositeVisitor.prototype.addVisitor = function (visitor) {
        /* add */ (this.visitors.push(visitor) > 0);
    };
    /**
     * Adds multiple visitors.
     *
     * @param {Bound[]} visitors
     */
    CombinedCompositeVisitor.prototype.addVisitors = function (visitors) {
        /* addAll */ (function (l1, l2) { return l1.push.apply(l1, l2); })(this.visitors, visitors);
    };
    /**
     * Make the node accept all of the visitors.
     *
     * @param {*} node
     */
    CombinedCompositeVisitor.prototype.acceptAll = function (node) {
        this.visitors.forEach(function (visitor) {
            node.accept(visitor);
        });
    };
    /**
     * @see io.apicurio.datamodels.openapi.visitors.IOasVisitor#visitPaths(io.apicurio.datamodels.openapi.models.OasPaths)
     * @param {OasPaths} node
     */
    CombinedCompositeVisitor.prototype.visitPaths = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.openapi.visitors.IOasVisitor#visitPathItem(io.apicurio.datamodels.openapi.models.OasPathItem)
     * @param {OasPathItem} node
     */
    CombinedCompositeVisitor.prototype.visitPathItem = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.openapi.visitors.IOasVisitor#visitResponse(io.apicurio.datamodels.openapi.models.OasResponse)
     * @param {OasResponse} node
     */
    CombinedCompositeVisitor.prototype.visitResponse = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.openapi.visitors.IOasVisitor#visitResponses(io.apicurio.datamodels.openapi.models.OasResponses)
     * @param {OasResponses} node
     */
    CombinedCompositeVisitor.prototype.visitResponses = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.openapi.visitors.IOasVisitor#visitXML(io.apicurio.datamodels.openapi.models.OasXML)
     * @param {OasXML} node
     */
    CombinedCompositeVisitor.prototype.visitXML = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.openapi.visitors.IOasVisitor#visitAllOfSchema(io.apicurio.datamodels.openapi.models.OasSchema)
     * @param {OasSchema} node
     */
    CombinedCompositeVisitor.prototype.visitAllOfSchema = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.openapi.visitors.IOasVisitor#visitItemsSchema(io.apicurio.datamodels.openapi.models.OasSchema)
     * @param {OasSchema} node
     */
    CombinedCompositeVisitor.prototype.visitItemsSchema = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.openapi.visitors.IOasVisitor#visitAdditionalPropertiesSchema(io.apicurio.datamodels.openapi.models.OasSchema)
     * @param {OasSchema} node
     */
    CombinedCompositeVisitor.prototype.visitAdditionalPropertiesSchema = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.openapi.visitors.IOasVisitor#visitPropertySchema(io.apicurio.datamodels.openapi.models.IOasPropertySchema)
     * @param {*} node
     */
    CombinedCompositeVisitor.prototype.visitPropertySchema = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.openapi.visitors.IOasVisitor#visitHeader(io.apicurio.datamodels.openapi.models.OasHeader)
     * @param {OasHeader} node
     */
    CombinedCompositeVisitor.prototype.visitHeader = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.openapi.visitors.IOasVisitor#visitResponseDefinition(io.apicurio.datamodels.core.models.common.IDefinition)
     * @param {*} node
     */
    CombinedCompositeVisitor.prototype.visitResponseDefinition = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.core.visitors.IVisitor#visitDocument(io.apicurio.datamodels.core.models.Document)
     * @param {Document} node
     */
    CombinedCompositeVisitor.prototype.visitDocument = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.core.visitors.IVisitor#visitInfo(io.apicurio.datamodels.core.models.common.Info)
     * @param {Info} node
     */
    CombinedCompositeVisitor.prototype.visitInfo = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.core.visitors.IVisitor#visitContact(io.apicurio.datamodels.core.models.common.Contact)
     * @param {Contact} node
     */
    CombinedCompositeVisitor.prototype.visitContact = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.core.visitors.IVisitor#visitLicense(io.apicurio.datamodels.core.models.common.License)
     * @param {License} node
     */
    CombinedCompositeVisitor.prototype.visitLicense = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.core.visitors.IVisitor#visitTag(io.apicurio.datamodels.core.models.common.Tag)
     * @param {Tag} node
     */
    CombinedCompositeVisitor.prototype.visitTag = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.core.visitors.IVisitor#visitExternalDocumentation(io.apicurio.datamodels.core.models.common.ExternalDocumentation)
     * @param {ExternalDocumentation} node
     */
    CombinedCompositeVisitor.prototype.visitExternalDocumentation = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.core.visitors.IVisitor#visitExtension(io.apicurio.datamodels.core.models.Extension)
     * @param {Extension} node
     */
    CombinedCompositeVisitor.prototype.visitExtension = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitServer(io.apicurio.datamodels.core.models.common.Server)
     * @param {Server} node
     */
    CombinedCompositeVisitor.prototype.visitServer = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.core.visitors.IVisitor#visitSecurityRequirement(io.apicurio.datamodels.core.models.common.SecurityRequirement)
     * @param {SecurityRequirement} node
     */
    CombinedCompositeVisitor.prototype.visitSecurityRequirement = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitServerVariable(io.apicurio.datamodels.core.models.common.ServerVariable)
     * @param {ServerVariable} node
     */
    CombinedCompositeVisitor.prototype.visitServerVariable = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.core.visitors.IVisitor#visitValidationProblem(io.apicurio.datamodels.core.models.ValidationProblem)
     * @param {ValidationProblem} problem
     */
    CombinedCompositeVisitor.prototype.visitValidationProblem = function (problem) {
        this.acceptAll(problem);
    };
    /**
     * @see io.apicurio.datamodels.core.visitors.IVisitor#visitSchema(io.apicurio.datamodels.core.models.common.Schema)
     * @param {Schema} node
     */
    CombinedCompositeVisitor.prototype.visitSchema = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.core.visitors.IVisitor#visitSchemaDefinition(io.apicurio.datamodels.core.models.common.IDefinition)
     * @param {*} node
     */
    CombinedCompositeVisitor.prototype.visitSchemaDefinition = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.core.visitors.IVisitor#visitParameter(io.apicurio.datamodels.core.models.common.Parameter)
     * @param {Parameter} node
     */
    CombinedCompositeVisitor.prototype.visitParameter = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.core.visitors.IVisitor#visitOperation(io.apicurio.datamodels.core.models.common.Operation)
     * @param {Operation} node
     */
    CombinedCompositeVisitor.prototype.visitOperation = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.core.visitors.IVisitor#visitSecurityScheme(io.apicurio.datamodels.core.models.common.SecurityScheme)
     * @param {SecurityScheme} node
     */
    CombinedCompositeVisitor.prototype.visitSecurityScheme = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitCallbackPathItem(io.apicurio.datamodels.openapi.v3.models.Oas30CallbackPathItem)
     * @param {Oas30CallbackPathItem} node
     */
    CombinedCompositeVisitor.prototype.visitCallbackPathItem = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitCallback(io.apicurio.datamodels.openapi.v3.models.Oas30Callback)
     * @param {Oas30Callback} node
     */
    CombinedCompositeVisitor.prototype.visitCallback = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitLinkServer(io.apicurio.datamodels.openapi.v3.models.Oas30LinkServer)
     * @param {Oas30LinkServer} node
     */
    CombinedCompositeVisitor.prototype.visitLinkServer = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitCallbackDefinition(io.apicurio.datamodels.openapi.v3.models.Oas30CallbackDefinition)
     * @param {Oas30CallbackDefinition} node
     */
    CombinedCompositeVisitor.prototype.visitCallbackDefinition = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitLink(io.apicurio.datamodels.openapi.v3.models.Oas30Link)
     * @param {Oas30Link} node
     */
    CombinedCompositeVisitor.prototype.visitLink = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitLinkRequestBodyExpression(io.apicurio.datamodels.openapi.v3.models.Oas30LinkRequestBodyExpression)
     * @param {Oas30LinkRequestBodyExpression} node
     */
    CombinedCompositeVisitor.prototype.visitLinkRequestBodyExpression = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitLinkParameterExpression(io.apicurio.datamodels.openapi.v3.models.Oas30LinkParameterExpression)
     * @param {Oas30LinkParameterExpression} node
     */
    CombinedCompositeVisitor.prototype.visitLinkParameterExpression = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitLinkDefinition(io.apicurio.datamodels.openapi.v3.models.Oas30LinkDefinition)
     * @param {Oas30LinkDefinition} node
     */
    CombinedCompositeVisitor.prototype.visitLinkDefinition = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.combined.visitors.CombinedAllNodeVisitor#visitAuthorizationCodeOAuthFlow(io.apicurio.datamodels.core.models.common.AuthorizationCodeOAuthFlow)
     * @param {AuthorizationCodeOAuthFlow} node
     */
    CombinedCompositeVisitor.prototype.visitAuthorizationCodeOAuthFlow = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.combined.visitors.CombinedAllNodeVisitor#visitClientCredentialsOAuthFlow(io.apicurio.datamodels.core.models.common.ClientCredentialsOAuthFlow)
     * @param {ClientCredentialsOAuthFlow} node
     */
    CombinedCompositeVisitor.prototype.visitClientCredentialsOAuthFlow = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.combined.visitors.CombinedAllNodeVisitor#visitPasswordOAuthFlow(io.apicurio.datamodels.core.models.common.PasswordOAuthFlow)
     * @param {PasswordOAuthFlow} node
     */
    CombinedCompositeVisitor.prototype.visitPasswordOAuthFlow = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.combined.visitors.CombinedAllNodeVisitor#visitImplicitOAuthFlow(io.apicurio.datamodels.core.models.common.ImplicitOAuthFlow)
     * @param {ImplicitOAuthFlow} node
     */
    CombinedCompositeVisitor.prototype.visitImplicitOAuthFlow = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.combined.visitors.CombinedAllNodeVisitor#visitOAuthFlows(io.apicurio.datamodels.core.models.common.OAuthFlows)
     * @param {OAuthFlows} node
     */
    CombinedCompositeVisitor.prototype.visitOAuthFlows = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitEncoding(io.apicurio.datamodels.openapi.v3.models.Oas30Encoding)
     * @param {Oas30Encoding} node
     */
    CombinedCompositeVisitor.prototype.visitEncoding = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitMediaType(io.apicurio.datamodels.openapi.v3.models.Oas30MediaType)
     * @param {Oas30MediaType} node
     */
    CombinedCompositeVisitor.prototype.visitMediaType = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitHeaderDefinition(io.apicurio.datamodels.openapi.v3.models.Oas30HeaderDefinition)
     * @param {Oas30HeaderDefinition} node
     */
    CombinedCompositeVisitor.prototype.visitHeaderDefinition = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitRequestBody(io.apicurio.datamodels.openapi.v3.models.Oas30RequestBody)
     * @param {Oas30RequestBody} node
     */
    CombinedCompositeVisitor.prototype.visitRequestBody = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitRequestBodyDefinition(io.apicurio.datamodels.openapi.v3.models.Oas30RequestBodyDefinition)
     * @param {Oas30RequestBodyDefinition} node
     */
    CombinedCompositeVisitor.prototype.visitRequestBodyDefinition = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitExampleDefinition(io.apicurio.datamodels.openapi.v3.models.Oas30ExampleDefinition)
     * @param {Oas30ExampleDefinition} node
     */
    CombinedCompositeVisitor.prototype.visitExampleDefinition = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitDiscriminator(io.apicurio.datamodels.openapi.v3.models.Oas30Discriminator)
     * @param {Oas30Discriminator} node
     */
    CombinedCompositeVisitor.prototype.visitDiscriminator = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.combined.visitors.CombinedAllNodeVisitor#visitNotSchema(io.apicurio.datamodels.openapi.v3.models.Oas30Schema.Oas30NotSchema)
     * @param {Oas30Schema.Oas30NotSchema} node
     */
    CombinedCompositeVisitor.prototype.visitNotSchema = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.combined.visitors.CombinedAllNodeVisitor#visitOneOfSchema(io.apicurio.datamodels.openapi.v3.models.Oas30Schema.Oas30OneOfSchema)
     * @param {Oas30Schema.Oas30OneOfSchema} node
     */
    CombinedCompositeVisitor.prototype.visitOneOfSchema = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.combined.visitors.CombinedAllNodeVisitor#visitAnyOfSchema(io.apicurio.datamodels.openapi.v3.models.Oas30Schema.Oas30AnyOfSchema)
     * @param {Oas30Schema.Oas30AnyOfSchema} node
     */
    CombinedCompositeVisitor.prototype.visitAnyOfSchema = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.core.visitors.IVisitor#visitParameterDefinition(io.apicurio.datamodels.core.models.common.IDefinition)
     * @param {*} node
     */
    CombinedCompositeVisitor.prototype.visitParameterDefinition = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v2.visitors.IOas20Visitor#visitItems(io.apicurio.datamodels.openapi.v2.models.Oas20Items)
     * @param {Oas20Items} node
     */
    CombinedCompositeVisitor.prototype.visitItems = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v2.visitors.IOas20Visitor#visitScopes(io.apicurio.datamodels.openapi.v2.models.Oas20Scopes)
     * @param {Oas20Scopes} node
     */
    CombinedCompositeVisitor.prototype.visitScopes = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v2.visitors.IOas20Visitor#visitSecurityDefinitions(io.apicurio.datamodels.openapi.v2.models.Oas20SecurityDefinitions)
     * @param {Oas20SecurityDefinitions} node
     */
    CombinedCompositeVisitor.prototype.visitSecurityDefinitions = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v2.visitors.IOas20Visitor#visitDefinitions(io.apicurio.datamodels.openapi.v2.models.Oas20Definitions)
     * @param {Oas20Definitions} node
     */
    CombinedCompositeVisitor.prototype.visitDefinitions = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v2.visitors.IOas20Visitor#visitParameterDefinitions(io.apicurio.datamodels.openapi.v2.models.Oas20ParameterDefinitions)
     * @param {Oas20ParameterDefinitions} node
     */
    CombinedCompositeVisitor.prototype.visitParameterDefinitions = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.combined.visitors.CombinedAllNodeVisitor#visitExample(io.apicurio.datamodels.core.models.common.IExample)
     * @param {*} node
     */
    CombinedCompositeVisitor.prototype.visitExample = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v2.visitors.IOas20Visitor#visitHeaders(io.apicurio.datamodels.openapi.v2.models.Oas20Headers)
     * @param {Oas20Headers} node
     */
    CombinedCompositeVisitor.prototype.visitHeaders = function (node) {
        this.acceptAll(node);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v2.visitors.IOas20Visitor#visitResponseDefinitions(io.apicurio.datamodels.openapi.v2.models.Oas20ResponseDefinitions)
     * @param {Oas20ResponseDefinitions} node
     */
    CombinedCompositeVisitor.prototype.visitResponseDefinitions = function (node) {
        this.acceptAll(node);
    };
    CombinedCompositeVisitor.prototype.visitNode = function (node) {
    };
    return CombinedCompositeVisitor;
}(CombinedAllNodeVisitor));
export { CombinedCompositeVisitor };
CombinedCompositeVisitor["__class"] = "io.apicurio.datamodels.combined.visitors.CombinedCompositeVisitor";
CombinedCompositeVisitor["__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=CombinedCompositeVisitor.js.map