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 { Aai20NodeFactory } from '../asyncapi/v2/models/Aai20NodeFactory';
import { ModelClonerVisitor } from './ModelClonerVisitor';
/**
 * @author eric.wittmann@gmail.com
 * @class
 * @extends ModelClonerVisitor
 */
var Aai20ModelClonerVisitor = /** @class */ (function (_super) {
    __extends(Aai20ModelClonerVisitor, _super);
    function Aai20ModelClonerVisitor() {
        return _super.call(this) || this;
    }
    Aai20ModelClonerVisitor.factory_$LI$ = function () { if (Aai20ModelClonerVisitor.factory == null)
        Aai20ModelClonerVisitor.factory = new Aai20NodeFactory(); return Aai20ModelClonerVisitor.factory; };
    ;
    /**
     * @see io.apicurio.datamodels.core.visitors.IVisitor#visitOperation(io.apicurio.datamodels.core.models.common.Operation)
     * @param {Operation} node
     */
    Aai20ModelClonerVisitor.prototype.visitOperation = function (node) {
        this.__clone = Aai20ModelClonerVisitor.factory_$LI$().createOperation(node.parent(), node.getType());
    };
    /**
     * @see io.apicurio.datamodels.core.visitors.IVisitor#visitParameterDefinition(io.apicurio.datamodels.core.models.common.IDefinition)
     * @param {*} node
     */
    Aai20ModelClonerVisitor.prototype.visitParameterDefinition = function (node) {
        this.__clone = Aai20ModelClonerVisitor.factory_$LI$().createParameter(node.parent(), node.getName());
    };
    /**
     * @see io.apicurio.datamodels.core.visitors.IVisitor#visitParameter(io.apicurio.datamodels.core.models.common.Parameter)
     * @param {Parameter} node
     */
    Aai20ModelClonerVisitor.prototype.visitParameter = function (node) {
        this.__clone = Aai20ModelClonerVisitor.factory_$LI$().createParameter(node.parent(), node.getName());
    };
    /**
     * @see io.apicurio.datamodels.core.visitors.IVisitor#visitSchemaDefinition(io.apicurio.datamodels.core.models.common.IDefinition)
     * @param {*} node
     */
    Aai20ModelClonerVisitor.prototype.visitSchemaDefinition = function (node) {
    };
    /**
     * @see io.apicurio.datamodels.core.visitors.IVisitor#visitSchema(io.apicurio.datamodels.core.models.common.Schema)
     * @param {Schema} node
     */
    Aai20ModelClonerVisitor.prototype.visitSchema = function (node) {
    };
    /**
     * @see io.apicurio.datamodels.core.visitors.IVisitor#visitSecurityRequirement(io.apicurio.datamodels.core.models.common.SecurityRequirement)
     * @param {SecurityRequirement} node
     */
    Aai20ModelClonerVisitor.prototype.visitSecurityRequirement = function (node) {
        this.__clone = Aai20ModelClonerVisitor.factory_$LI$().createSecurityRequirement(node.parent());
    };
    /**
     * @see io.apicurio.datamodels.core.visitors.IVisitor#visitSecurityScheme(io.apicurio.datamodels.core.models.common.SecurityScheme)
     * @param {SecurityScheme} node
     */
    Aai20ModelClonerVisitor.prototype.visitSecurityScheme = function (node) {
        this.__clone = Aai20ModelClonerVisitor.factory_$LI$().createSecurityScheme(node.parent(), node.getName());
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitComponents(io.apicurio.datamodels.core.models.common.Components)
     * @param {Components} node
     */
    Aai20ModelClonerVisitor.prototype.visitComponents = function (node) {
        this.__clone = Aai20ModelClonerVisitor.factory_$LI$().createComponents(node.parent());
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitServer(io.apicurio.datamodels.core.models.common.Server)
     * @param {Server} node
     */
    Aai20ModelClonerVisitor.prototype.visitServer = function (node) {
        this.__clone = Aai20ModelClonerVisitor.factory_$LI$().createServer(node.parent(), node.getName());
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitServerVariable(io.apicurio.datamodels.core.models.common.ServerVariable)
     * @param {ServerVariable} node
     */
    Aai20ModelClonerVisitor.prototype.visitServerVariable = function (node) {
        this.__clone = Aai20ModelClonerVisitor.factory_$LI$().createServerVariable(node.parent(), node.getName());
    };
    /**
     * @see io.apicurio.datamodels.asyncapi.visitors.IAaiVisitor#visitAuthorizationCodeOAuthFlow(io.apicurio.datamodels.core.models.common.AuthorizationCodeOAuthFlow)
     * @param {AuthorizationCodeOAuthFlow} node
     */
    Aai20ModelClonerVisitor.prototype.visitAuthorizationCodeOAuthFlow = function (node) {
        this.__clone = Aai20ModelClonerVisitor.factory_$LI$().createOAuthFlows(node.parent()).createAuthorizationCodeOAuthFlow();
    };
    /**
     * @see io.apicurio.datamodels.asyncapi.visitors.IAaiVisitor#visitChannelItem(io.apicurio.datamodels.asyncapi.models.AaiChannelItem)
     * @param {AaiChannelItem} node
     */
    Aai20ModelClonerVisitor.prototype.visitChannelItem = function (node) {
        this.__clone = Aai20ModelClonerVisitor.factory_$LI$().createChannelItem(node.parent(), node.getName());
    };
    /**
     * @see io.apicurio.datamodels.asyncapi.visitors.IAaiVisitor#visitClientCredentialsOAuthFlow(io.apicurio.datamodels.core.models.common.ClientCredentialsOAuthFlow)
     * @param {ClientCredentialsOAuthFlow} node
     */
    Aai20ModelClonerVisitor.prototype.visitClientCredentialsOAuthFlow = function (node) {
        this.__clone = Aai20ModelClonerVisitor.factory_$LI$().createOAuthFlows(node.parent()).createClientCredentialsOAuthFlow();
    };
    /**
     * @see io.apicurio.datamodels.asyncapi.visitors.IAaiVisitor#visitCorrelationId(io.apicurio.datamodels.asyncapi.models.AaiCorrelationId)
     * @param {AaiCorrelationId} node
     */
    Aai20ModelClonerVisitor.prototype.visitCorrelationId = function (node) {
        this.__clone = Aai20ModelClonerVisitor.factory_$LI$().createCorrelationId(node.parent(), node.getName());
    };
    /**
     * @see io.apicurio.datamodels.asyncapi.visitors.IAaiVisitor#visitHeaderItem(io.apicurio.datamodels.asyncapi.models.AaiHeaderItem)
     * @param {AaiHeaderItem} node
     */
    Aai20ModelClonerVisitor.prototype.visitHeaderItem = function (node) {
        this.__clone = Aai20ModelClonerVisitor.factory_$LI$().createHeaderItem(node.parent());
    };
    /**
     * @see io.apicurio.datamodels.asyncapi.visitors.IAaiVisitor#visitImplicitOAuthFlow(io.apicurio.datamodels.core.models.common.ImplicitOAuthFlow)
     * @param {ImplicitOAuthFlow} node
     */
    Aai20ModelClonerVisitor.prototype.visitImplicitOAuthFlow = function (node) {
        this.__clone = Aai20ModelClonerVisitor.factory_$LI$().createOAuthFlows(node.parent()).createImplicitOAuthFlow();
    };
    /**
     * @see io.apicurio.datamodels.asyncapi.visitors.IAaiVisitor#visitMessage(io.apicurio.datamodels.asyncapi.models.AaiMessage)
     * @param {AaiMessage} node
     */
    Aai20ModelClonerVisitor.prototype.visitMessage = function (node) {
        this.__clone = Aai20ModelClonerVisitor.factory_$LI$().createMessage(node.parent(), node.getName());
    };
    /**
     * @see io.apicurio.datamodels.asyncapi.visitors.IAaiVisitor#visitMessageTrait(io.apicurio.datamodels.asyncapi.models.AaiMessageTrait)
     * @param {AaiMessageTrait} node
     */
    Aai20ModelClonerVisitor.prototype.visitMessageTrait = function (node) {
        this.__clone = Aai20ModelClonerVisitor.factory_$LI$().createMessageTrait(node.parent(), node.getName());
    };
    /**
     * @see io.apicurio.datamodels.asyncapi.visitors.IAaiVisitor#visitMessageTraitDefinition(io.apicurio.datamodels.asyncapi.models.AaiMessageTraitDefinition)
     * @param {AaiMessageTraitDefinition} node
     */
    Aai20ModelClonerVisitor.prototype.visitMessageTraitDefinition = function (node) {
        this.__clone = Aai20ModelClonerVisitor.factory_$LI$().createMessageTraitDefinition(node.parent(), node.getName());
    };
    /**
     * @see io.apicurio.datamodels.asyncapi.visitors.IAaiVisitor#visitOAuthFlows(io.apicurio.datamodels.core.models.common.OAuthFlows)
     * @param {OAuthFlows} node
     */
    Aai20ModelClonerVisitor.prototype.visitOAuthFlows = function (node) {
        this.__clone = Aai20ModelClonerVisitor.factory_$LI$().createOAuthFlows(node.parent());
    };
    /**
     * @see io.apicurio.datamodels.asyncapi.visitors.IAaiVisitor#visitOperationTrait(io.apicurio.datamodels.asyncapi.models.AaiOperationTrait)
     * @param {AaiOperationTrait} node
     */
    Aai20ModelClonerVisitor.prototype.visitOperationTrait = function (node) {
        this.__clone = Aai20ModelClonerVisitor.factory_$LI$().createOperationTrait(node.parent(), node.getType());
    };
    /**
     * @see io.apicurio.datamodels.asyncapi.visitors.IAaiVisitor#visitOperationTraitDefinition(io.apicurio.datamodels.asyncapi.models.AaiOperationTraitDefinition)
     * @param {AaiOperationTraitDefinition} node
     */
    Aai20ModelClonerVisitor.prototype.visitOperationTraitDefinition = function (node) {
        this.__clone = Aai20ModelClonerVisitor.factory_$LI$().createOperationTraitDefinition(node.parent(), node.getName());
    };
    /**
     * @see io.apicurio.datamodels.asyncapi.visitors.IAaiVisitor#visitPasswordOAuthFlow(io.apicurio.datamodels.core.models.common.PasswordOAuthFlow)
     * @param {PasswordOAuthFlow} node
     */
    Aai20ModelClonerVisitor.prototype.visitPasswordOAuthFlow = function (node) {
        this.__clone = Aai20ModelClonerVisitor.factory_$LI$().createOAuthFlows(node.parent()).createPasswordOAuthFlow();
    };
    /**
     * @see io.apicurio.datamodels.asyncapi.visitors.IAaiVisitor#visitAaiParameter(io.apicurio.datamodels.asyncapi.models.AaiParameter)
     * @param {AaiParameter} node
     */
    Aai20ModelClonerVisitor.prototype.visitAaiParameter = function (node) {
        this.__clone = Aai20ModelClonerVisitor.factory_$LI$().createParameter(node.parent(), node.getName());
    };
    /**
     * @see io.apicurio.datamodels.asyncapi.visitors.IAaiVisitor#visitServerBindings(io.apicurio.datamodels.asyncapi.models.AaiServerBindings)
     * @param {AaiServerBindings} node
     */
    Aai20ModelClonerVisitor.prototype.visitServerBindings = function (node) {
        this.__clone = Aai20ModelClonerVisitor.factory_$LI$().createServerBindings(node.parent());
    };
    /**
     * @see io.apicurio.datamodels.asyncapi.visitors.IAaiVisitor#visitServerBindingsDefinition(io.apicurio.datamodels.asyncapi.models.AaiServerBindingsDefinition)
     * @param {AaiServerBindingsDefinition} node
     */
    Aai20ModelClonerVisitor.prototype.visitServerBindingsDefinition = function (node) {
        this.__clone = Aai20ModelClonerVisitor.factory_$LI$().createServerBindingsDefinition(node.parent(), node.getName());
    };
    /**
     * @see io.apicurio.datamodels.asyncapi.visitors.IAaiVisitor#visitOperationBindings(io.apicurio.datamodels.asyncapi.models.AaiOperationBindings)
     * @param {AaiOperationBindings} node
     */
    Aai20ModelClonerVisitor.prototype.visitOperationBindings = function (node) {
        this.__clone = Aai20ModelClonerVisitor.factory_$LI$().createOperationBindings(node.parent());
    };
    /**
     * @see io.apicurio.datamodels.asyncapi.visitors.IAaiVisitor#visitOperationBindingsDefinition(io.apicurio.datamodels.asyncapi.models.AaiOperationBindingsDefinition)
     * @param {AaiOperationBindingsDefinition} node
     */
    Aai20ModelClonerVisitor.prototype.visitOperationBindingsDefinition = function (node) {
        this.__clone = Aai20ModelClonerVisitor.factory_$LI$().createOperationBindingsDefinition(node.parent(), node.getName());
    };
    /**
     * @see io.apicurio.datamodels.asyncapi.visitors.IAaiVisitor#visitMessageBindings(io.apicurio.datamodels.asyncapi.models.AaiMessageBindings)
     * @param {AaiMessageBindings} node
     */
    Aai20ModelClonerVisitor.prototype.visitMessageBindings = function (node) {
        this.__clone = Aai20ModelClonerVisitor.factory_$LI$().createMessageBindings(node.parent());
    };
    /**
     * @see io.apicurio.datamodels.asyncapi.visitors.IAaiVisitor#visitMessageBindingsDefinition(io.apicurio.datamodels.asyncapi.models.AaiMessageBindingsDefinition)
     * @param {AaiMessageBindingsDefinition} node
     */
    Aai20ModelClonerVisitor.prototype.visitMessageBindingsDefinition = function (node) {
        this.__clone = Aai20ModelClonerVisitor.factory_$LI$().createMessageBindingsDefinition(node.parent(), node.getName());
    };
    /**
     * @see io.apicurio.datamodels.asyncapi.visitors.IAaiVisitor#visitChannelBindings(io.apicurio.datamodels.asyncapi.models.AaiChannelBindings)
     * @param {AaiChannelBindings} node
     */
    Aai20ModelClonerVisitor.prototype.visitChannelBindings = function (node) {
        this.__clone = Aai20ModelClonerVisitor.factory_$LI$().createChannelBindings(node.parent());
    };
    /**
     * @see io.apicurio.datamodels.asyncapi.visitors.IAaiVisitor#visitChannelBindingsDefinition(io.apicurio.datamodels.asyncapi.models.AaiChannelBindingsDefinition)
     * @param {AaiChannelBindingsDefinition} node
     */
    Aai20ModelClonerVisitor.prototype.visitChannelBindingsDefinition = function (node) {
        this.__clone = Aai20ModelClonerVisitor.factory_$LI$().createChannelBindingsDefinition(node.parent(), node.getName());
    };
    return Aai20ModelClonerVisitor;
}(ModelClonerVisitor));
export { Aai20ModelClonerVisitor };
Aai20ModelClonerVisitor["__class"] = "io.apicurio.datamodels.cloning.Aai20ModelClonerVisitor";
Aai20ModelClonerVisitor["__interfaces"] = ["io.apicurio.datamodels.core.visitors.IVisitor", "io.apicurio.datamodels.asyncapi.v2.visitors.IAai20Visitor", "io.apicurio.datamodels.asyncapi.visitors.IAaiVisitor"];
//# sourceMappingURL=Aai20ModelClonerVisitor.js.map