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 { NodeCompat } from '../../../compat/NodeCompat';
import { Constants } from '../../../core/Constants';
import { OasNodePathVisitor } from '../../visitors/OasNodePathVisitor';
/**
 * Constructor.
 * @class
 * @extends OasNodePathVisitor
 * @author eric.wittmann@gmail.com
 */
var Oas30NodePathVisitor = /** @class */ (function (_super) {
    __extends(Oas30NodePathVisitor, _super);
    function Oas30NodePathVisitor() {
        return _super.call(this) || this;
    }
    /**
     * @see io.apicurio.datamodels.core.visitors.NodePathVisitor#visitSchemaDefinition(io.apicurio.datamodels.core.models.common.IDefinition)
     * @param {*} node
     */
    Oas30NodePathVisitor.prototype.visitSchemaDefinition = function (node) {
        this.path.prependSegment(node.getName(), true);
        this.path.prependSegment(Constants.PROP_SCHEMAS, false);
    };
    /**
     * @see io.apicurio.datamodels.core.visitors.NodePathVisitor#visitParameterDefinition(io.apicurio.datamodels.core.models.common.IDefinition)
     * @param {*} node
     */
    Oas30NodePathVisitor.prototype.visitParameterDefinition = function (node) {
        this.path.prependSegment(node.getName(), true);
        this.path.prependSegment(Constants.PROP_PARAMETERS, false);
    };
    /**
     * @see io.apicurio.datamodels.core.visitors.NodePathVisitor#visitSecurityScheme(io.apicurio.datamodels.core.models.common.SecurityScheme)
     * @param {SecurityScheme} node
     */
    Oas30NodePathVisitor.prototype.visitSecurityScheme = function (node) {
        this.path.prependSegment(node.getSchemeName(), true);
        this.path.prependSegment(Constants.PROP_SECURITY_SCHEMES, false);
    };
    /**
     * @see io.apicurio.datamodels.openapi.visitors.OasNodePathVisitor#visitResponseDefinition(io.apicurio.datamodels.core.models.common.IDefinition)
     * @param {*} node
     */
    Oas30NodePathVisitor.prototype.visitResponseDefinition = function (node) {
        this.path.prependSegment(node.getName(), true);
        this.path.prependSegment(Constants.PROP_RESPONSES, false);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitComponents(io.apicurio.datamodels.core.models.common.Components)
     * @param {Components} node
     */
    Oas30NodePathVisitor.prototype.visitComponents = function (node) {
        this.path.prependSegment(Constants.PROP_COMPONENTS, false);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitCallbackPathItem(io.apicurio.datamodels.openapi.v3.models.Oas30CallbackPathItem)
     * @param {Oas30CallbackPathItem} node
     */
    Oas30NodePathVisitor.prototype.visitCallbackPathItem = function (node) {
        this.path.prependSegment(node.getPath(), true);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitCallback(io.apicurio.datamodels.openapi.v3.models.Oas30Callback)
     * @param {Oas30Callback} node
     */
    Oas30NodePathVisitor.prototype.visitCallback = function (node) {
        this.path.prependSegment(node.getName(), true);
        this.path.prependSegment(Constants.PROP_CALLBACKS, false);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitLinkServer(io.apicurio.datamodels.openapi.v3.models.Oas30LinkServer)
     * @param {Oas30LinkServer} node
     */
    Oas30NodePathVisitor.prototype.visitLinkServer = function (node) {
        this.path.prependSegment(Constants.PROP_SERVER, false);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitCallbackDefinition(io.apicurio.datamodels.openapi.v3.models.Oas30CallbackDefinition)
     * @param {Oas30CallbackDefinition} node
     */
    Oas30NodePathVisitor.prototype.visitCallbackDefinition = function (node) {
        this.path.prependSegment(node.getName(), true);
        this.path.prependSegment(Constants.PROP_CALLBACKS, false);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitLink(io.apicurio.datamodels.openapi.v3.models.Oas30Link)
     * @param {Oas30Link} node
     */
    Oas30NodePathVisitor.prototype.visitLink = function (node) {
        this.path.prependSegment(node.getName(), true);
        this.path.prependSegment(Constants.PROP_LINKS, false);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitLinkRequestBodyExpression(io.apicurio.datamodels.openapi.v3.models.Oas30LinkRequestBodyExpression)
     * @param {Oas30LinkRequestBodyExpression} node
     */
    Oas30NodePathVisitor.prototype.visitLinkRequestBodyExpression = function (node) {
        this.path.prependSegment(Constants.PROP_REQUEST_BODY, false);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitLinkParameterExpression(io.apicurio.datamodels.openapi.v3.models.Oas30LinkParameterExpression)
     * @param {Oas30LinkParameterExpression} node
     */
    Oas30NodePathVisitor.prototype.visitLinkParameterExpression = function (node) {
        this.path.prependSegment(node.getName(), true);
        this.path.prependSegment(Constants.PROP_PARAMETERS, false);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitLinkDefinition(io.apicurio.datamodels.openapi.v3.models.Oas30LinkDefinition)
     * @param {Oas30LinkDefinition} node
     */
    Oas30NodePathVisitor.prototype.visitLinkDefinition = function (node) {
        this.path.prependSegment(node.getName(), true);
        this.path.prependSegment(Constants.PROP_LINKS, false);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitAuthorizationCodeOAuthFlow(io.apicurio.datamodels.core.models.common.AuthorizationCodeOAuthFlow)
     * @param {AuthorizationCodeOAuthFlow} node
     */
    Oas30NodePathVisitor.prototype.visitAuthorizationCodeOAuthFlow = function (node) {
        this.path.prependSegment(Constants.PROP_AUTHORIZATION_CODE, false);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitClientCredentialsOAuthFlow(io.apicurio.datamodels.core.models.common.ClientCredentialsOAuthFlow)
     * @param {ClientCredentialsOAuthFlow} node
     */
    Oas30NodePathVisitor.prototype.visitClientCredentialsOAuthFlow = function (node) {
        this.path.prependSegment(Constants.PROP_CLIENT_CREDENTIALS, false);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitPasswordOAuthFlow(io.apicurio.datamodels.core.models.common.PasswordOAuthFlow)
     * @param {PasswordOAuthFlow} node
     */
    Oas30NodePathVisitor.prototype.visitPasswordOAuthFlow = function (node) {
        this.path.prependSegment(Constants.PROP_PASSWORD, false);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitImplicitOAuthFlow(io.apicurio.datamodels.core.models.common.ImplicitOAuthFlow)
     * @param {ImplicitOAuthFlow} node
     */
    Oas30NodePathVisitor.prototype.visitImplicitOAuthFlow = function (node) {
        this.path.prependSegment(Constants.PROP_IMPLICIT, false);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitOAuthFlows(io.apicurio.datamodels.core.models.common.OAuthFlows)
     * @param {OAuthFlows} node
     */
    Oas30NodePathVisitor.prototype.visitOAuthFlows = function (node) {
        this.path.prependSegment(Constants.PROP_FLOWS, false);
    };
    /**
     * @see io.apicurio.datamodels.openapi.visitors.IOasVisitor#visitExample(io.apicurio.datamodels.core.models.common.IExample)
     * @param {*} node
     */
    Oas30NodePathVisitor.prototype.visitExample = function (node) {
        var example30 = node;
        this.path.prependSegment(example30.getName(), true);
        this.path.prependSegment(Constants.PROP_EXAMPLES, false);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitEncoding(io.apicurio.datamodels.openapi.v3.models.Oas30Encoding)
     * @param {Oas30Encoding} node
     */
    Oas30NodePathVisitor.prototype.visitEncoding = function (node) {
        this.path.prependSegment(node.getName(), true);
        this.path.prependSegment(Constants.PROP_ENCODING, false);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitMediaType(io.apicurio.datamodels.openapi.v3.models.Oas30MediaType)
     * @param {Oas30MediaType} node
     */
    Oas30NodePathVisitor.prototype.visitMediaType = function (node) {
        this.path.prependSegment(node.getName(), true);
        this.path.prependSegment(Constants.PROP_CONTENT, false);
    };
    /**
     * @see io.apicurio.datamodels.openapi.visitors.OasNodePathVisitor#visitHeader(io.apicurio.datamodels.openapi.models.OasHeader)
     * @param {OasHeader} node
     */
    Oas30NodePathVisitor.prototype.visitHeader = function (node) {
        this.path.prependSegment(node.getName(), true);
        this.path.prependSegment(Constants.PROP_HEADERS, false);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitHeaderDefinition(io.apicurio.datamodels.openapi.v3.models.Oas30HeaderDefinition)
     * @param {Oas30HeaderDefinition} node
     */
    Oas30NodePathVisitor.prototype.visitHeaderDefinition = function (node) {
        this.path.prependSegment(node.getName(), true);
        this.path.prependSegment(Constants.PROP_HEADERS, false);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitRequestBody(io.apicurio.datamodels.openapi.v3.models.Oas30RequestBody)
     * @param {Oas30RequestBody} node
     */
    Oas30NodePathVisitor.prototype.visitRequestBody = function (node) {
        this.path.prependSegment(Constants.PROP_REQUEST_BODY, false);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitRequestBodyDefinition(io.apicurio.datamodels.openapi.v3.models.Oas30RequestBodyDefinition)
     * @param {Oas30RequestBodyDefinition} node
     */
    Oas30NodePathVisitor.prototype.visitRequestBodyDefinition = function (node) {
        this.path.prependSegment(node.getName(), true);
        this.path.prependSegment(Constants.PROP_REQUEST_BODIES, false);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitExampleDefinition(io.apicurio.datamodels.openapi.v3.models.Oas30ExampleDefinition)
     * @param {Oas30ExampleDefinition} node
     */
    Oas30NodePathVisitor.prototype.visitExampleDefinition = function (node) {
        this.path.prependSegment(node.getName(), true);
        this.path.prependSegment(Constants.PROP_EXAMPLES, false);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitDiscriminator(io.apicurio.datamodels.openapi.v3.models.Oas30Discriminator)
     * @param {Oas30Discriminator} node
     */
    Oas30NodePathVisitor.prototype.visitDiscriminator = function (node) {
        this.path.prependSegment(Constants.PROP_DISCRIMINATOR, false);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitNotSchema(io.apicurio.datamodels.openapi.v3.models.Oas30Schema.Oas30NotSchema)
     * @param {Oas30Schema.Oas30NotSchema} node
     */
    Oas30NodePathVisitor.prototype.visitNotSchema = function (node) {
        this.path.prependSegment(Constants.PROP_NOT, false);
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitOneOfSchema(io.apicurio.datamodels.openapi.v3.models.Oas30Schema.Oas30OneOfSchema)
     * @param {Oas30Schema.Oas30OneOfSchema} node
     */
    Oas30NodePathVisitor.prototype.visitOneOfSchema = function (node) {
        var idx = NodeCompat.indexOf(node, node.parent(), Constants.PROP_ONE_OF);
        if (idx !== -1) {
            this.path.prependSegment(/* valueOf */ new String(idx).toString(), true);
            this.path.prependSegment(Constants.PROP_ONE_OF, false);
        }
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitAnyOfSchema(io.apicurio.datamodels.openapi.v3.models.Oas30Schema.Oas30AnyOfSchema)
     * @param {Oas30Schema.Oas30AnyOfSchema} node
     */
    Oas30NodePathVisitor.prototype.visitAnyOfSchema = function (node) {
        var idx = NodeCompat.indexOf(node, node.parent(), Constants.PROP_ANY_OF);
        if (idx !== -1) {
            this.path.prependSegment(/* valueOf */ new String(idx).toString(), true);
            this.path.prependSegment(Constants.PROP_ANY_OF, false);
        }
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitServer(io.apicurio.datamodels.core.models.common.Server)
     * @param {Server} node
     */
    Oas30NodePathVisitor.prototype.visitServer = function (node) {
        var idx = NodeCompat.indexOf(node, node.parent(), Constants.PROP_SERVERS);
        if (idx !== -1) {
            this.path.prependSegment(/* valueOf */ new String(idx).toString(), true);
            this.path.prependSegment(Constants.PROP_SERVERS, false);
        }
    };
    /**
     * @see io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor#visitServerVariable(io.apicurio.datamodels.core.models.common.ServerVariable)
     * @param {ServerVariable} node
     */
    Oas30NodePathVisitor.prototype.visitServerVariable = function (node) {
        this.path.prependSegment(node.getName(), true);
        this.path.prependSegment(Constants.PROP_VARIABLES, false);
    };
    return Oas30NodePathVisitor;
}(OasNodePathVisitor));
export { Oas30NodePathVisitor };
Oas30NodePathVisitor["__class"] = "io.apicurio.datamodels.openapi.v3.visitors.Oas30NodePathVisitor";
Oas30NodePathVisitor["__interfaces"] = ["io.apicurio.datamodels.core.visitors.IVisitor", "io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor", "io.apicurio.datamodels.openapi.visitors.IOasVisitor"];
//# sourceMappingURL=Oas30NodePathVisitor.js.map