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 { Library } from '../../Library';
import { AbstractCommand } from '../AbstractCommand';
/**
 * A command used to set the Example for a 3.0 MediaType or a 2.0 Response.
 * @author eric.wittmann@gmail.com
 * @extends AbstractCommand
 * @class
 */
var SetExampleCommand = /** @class */ (function (_super) {
    __extends(SetExampleCommand, _super);
    function SetExampleCommand(parent, example) {
        var _this = this;
        if (((parent != null && (parent["__interfaces"] != null && parent["__interfaces"].indexOf("io.apicurio.datamodels.core.models.common.IExampleParent") >= 0 || parent.constructor != null && parent.constructor["__interfaces"] != null && parent.constructor["__interfaces"].indexOf("io.apicurio.datamodels.core.models.common.IExampleParent") >= 0)) || parent === null) && ((example != null) || example === null)) {
            var __args = arguments;
            _this = _super.call(this) || this;
            if (_this._parentPath === undefined)
                _this._parentPath = null;
            if (_this._newExample === undefined)
                _this._newExample = null;
            if (_this._oldValue === undefined)
                _this._oldValue = null;
            if (_this._parentPath === undefined)
                _this._parentPath = null;
            if (_this._newExample === undefined)
                _this._newExample = null;
            if (_this._oldValue === undefined)
                _this._oldValue = null;
            (function () {
                _this._parentPath = Library.createNodePath(parent);
                _this._newExample = example;
            })();
        }
        else if (parent === undefined && example === undefined) {
            var __args = arguments;
            _this = _super.call(this) || this;
            if (_this._parentPath === undefined)
                _this._parentPath = null;
            if (_this._newExample === undefined)
                _this._newExample = null;
            if (_this._oldValue === undefined)
                _this._oldValue = null;
            if (_this._parentPath === undefined)
                _this._parentPath = null;
            if (_this._newExample === undefined)
                _this._newExample = null;
            if (_this._oldValue === undefined)
                _this._oldValue = null;
        }
        else
            throw new Error('invalid overload');
        return _this;
    }
    return SetExampleCommand;
}(AbstractCommand));
export { SetExampleCommand };
SetExampleCommand["__class"] = "io.apicurio.datamodels.cmd.commands.SetExampleCommand";
SetExampleCommand["__interfaces"] = ["io.apicurio.datamodels.cmd.ICommand"];
//# sourceMappingURL=SetExampleCommand.js.map