"use strict";
var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (g && (g = 0, op[0] && (_ = 0)), _) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
var __values = (this && this.__values) || function(o) {
    var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
    if (m) return m.call(o);
    if (o && typeof o.length === "number") return {
        next: function () {
            if (o && i >= o.length) o = void 0;
            return { value: o && o[i++], done: !o };
        }
    };
    throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
var __read = (this && this.__read) || function (o, n) {
    var m = typeof Symbol === "function" && o[Symbol.iterator];
    if (!m) return o;
    var i = m.call(o), r, ar = [], e;
    try {
        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
    }
    catch (error) { e = { error: error }; }
    finally {
        try {
            if (r && !r.done && (m = i["return"])) m.call(i);
        }
        finally { if (e) throw e.error; }
    }
    return ar;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.attempts = void 0;
exports.getByOwnerAndRepoAndHook_id = getByOwnerAndRepoAndHook_id;
exports.getByOwnerAndRepoAndHook_idAndDelivery_id = getByOwnerAndRepoAndHook_idAndDelivery_id;
var PlainFetcher_1 = require("@nestia/fetcher/lib/PlainFetcher");
var typia_1 = __importDefault(require("typia"));
var NestiaSimulator_1 = require("@nestia/fetcher/lib/NestiaSimulator");
exports.attempts = __importStar(require("./attempts"));
/**
 * List deliveries for a repository webhook.
 * Returns a list of webhook deliveries for a webhook configured in a repository.
 *
 * @tag repos
 * @path repos/:owner/:repo/hooks/:hook_id/deliveries
 * @nestia Generated by Nestia - https://github.com/samchon/nestia
 */
function getByOwnerAndRepoAndHook_id(connection, owner, repo, hook_id, query) {
    return __awaiter(this, void 0, void 0, function () {
        return __generator(this, function (_a) {
            return [2 /*return*/, !!connection.simulate
                    ? getByOwnerAndRepoAndHook_id.simulate(connection, owner, repo, hook_id, query)
                    : PlainFetcher_1.PlainFetcher.fetch(__assign(__assign({}, connection), { headers: __assign(__assign({}, connection.headers), { "Content-Type": "application/json" }) }), __assign(__assign({}, getByOwnerAndRepoAndHook_id.METADATA), { path: getByOwnerAndRepoAndHook_id.path(owner, repo, hook_id, query), status: null }))];
        });
    });
}
(function (getByOwnerAndRepoAndHook_id) {
    getByOwnerAndRepoAndHook_id.METADATA = {
        method: "GET",
        path: "/repos/:owner/:repo/hooks/:hook_id/deliveries",
        request: null,
        response: {
            type: "application/json",
            encrypted: false,
        },
    };
    getByOwnerAndRepoAndHook_id.path = function (owner, repo, hook_id, query) {
        var e_1, _a;
        var variables = new URLSearchParams();
        var _loop_1 = function (key, value) {
            if (undefined === value)
                return "continue";
            else if (Array.isArray(value))
                value.forEach(function (elem) { return variables.append(key, String(elem)); });
            else
                variables.set(key, String(value));
        };
        try {
            for (var _b = __values(Object.entries(query)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var _d = __read(_c.value, 2), key = _d[0], value = _d[1];
                _loop_1(key, value);
            }
        }
        catch (e_1_1) { e_1 = { error: e_1_1 }; }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
            }
            finally { if (e_1) throw e_1.error; }
        }
        var location = "/repos/".concat(encodeURIComponent(owner !== null && owner !== void 0 ? owner : "null"), "/").concat(encodeURIComponent(repo !== null && repo !== void 0 ? repo : "null"), "/hooks/").concat(encodeURIComponent(hook_id !== null && hook_id !== void 0 ? hook_id : "null"), "/deliveries");
        return 0 === variables.size
            ? location
            : "".concat(location, "?").concat(variables.toString());
    };
    getByOwnerAndRepoAndHook_id.random = function (g) { return (function () { var $generator = typia_1.default.random.generator; var $pick = typia_1.default.random.pick; var $ro0 = function (_recursive, _depth) {
        var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11;
        if (_recursive === void 0) { _recursive = false; }
        if (_depth === void 0) { _depth = 0; }
        return ({
            id: (_d = (_c = (_b = ((_a = _generator === null || _generator === void 0 ? void 0 : _generator.customs) !== null && _a !== void 0 ? _a : $generator.customs)) === null || _b === void 0 ? void 0 : _b.number) === null || _c === void 0 ? void 0 : _c.call(_b, [
                {
                    name: "Type<\"int32\">",
                    kind: "type",
                    value: "int32"
                },
                {
                    name: "JsonSchemaPlugin<__type>",
                    kind: "jsonPlugin"
                }
            ])) !== null && _d !== void 0 ? _d : ((_e = _generator === null || _generator === void 0 ? void 0 : _generator.integer) !== null && _e !== void 0 ? _e : $generator.integer)(0, 100),
            guid: (_j = (_h = (_g = ((_f = _generator === null || _generator === void 0 ? void 0 : _generator.customs) !== null && _f !== void 0 ? _f : $generator.customs)) === null || _g === void 0 ? void 0 : _g.string) === null || _h === void 0 ? void 0 : _h.call(_g, [
                {
                    name: "JsonSchemaPlugin<__type>",
                    kind: "jsonPlugin"
                }
            ])) !== null && _j !== void 0 ? _j : ((_k = _generator === null || _generator === void 0 ? void 0 : _generator.string) !== null && _k !== void 0 ? _k : $generator.string)(),
            delivered_at: (_p = (_o = (_m = ((_l = _generator === null || _generator === void 0 ? void 0 : _generator.customs) !== null && _l !== void 0 ? _l : $generator.customs)) === null || _m === void 0 ? void 0 : _m.string) === null || _o === void 0 ? void 0 : _o.call(_m, [
                {
                    name: "Format<\"date-time\">",
                    kind: "format",
                    value: "date-time"
                },
                {
                    name: "JsonSchemaPlugin<__type>",
                    kind: "jsonPlugin"
                }
            ])) !== null && _p !== void 0 ? _p : ((_q = _generator === null || _generator === void 0 ? void 0 : _generator.datetime) !== null && _q !== void 0 ? _q : $generator.datetime)(),
            redelivery: ((_r = _generator === null || _generator === void 0 ? void 0 : _generator.boolean) !== null && _r !== void 0 ? _r : $generator.boolean)(),
            duration: (_v = (_u = (_t = ((_s = _generator === null || _generator === void 0 ? void 0 : _generator.customs) !== null && _s !== void 0 ? _s : $generator.customs)) === null || _t === void 0 ? void 0 : _t.number) === null || _u === void 0 ? void 0 : _u.call(_t, [
                {
                    name: "JsonSchemaPlugin<__type>",
                    kind: "jsonPlugin"
                }
            ])) !== null && _v !== void 0 ? _v : ((_w = _generator === null || _generator === void 0 ? void 0 : _generator.number) !== null && _w !== void 0 ? _w : $generator.number)(0, 100),
            status: (_0 = (_z = (_y = ((_x = _generator === null || _generator === void 0 ? void 0 : _generator.customs) !== null && _x !== void 0 ? _x : $generator.customs)) === null || _y === void 0 ? void 0 : _y.string) === null || _z === void 0 ? void 0 : _z.call(_y, [
                {
                    name: "JsonSchemaPlugin<__type>",
                    kind: "jsonPlugin"
                }
            ])) !== null && _0 !== void 0 ? _0 : ((_1 = _generator === null || _generator === void 0 ? void 0 : _generator.string) !== null && _1 !== void 0 ? _1 : $generator.string)(),
            status_code: (_5 = (_4 = (_3 = ((_2 = _generator === null || _generator === void 0 ? void 0 : _generator.customs) !== null && _2 !== void 0 ? _2 : $generator.customs)) === null || _3 === void 0 ? void 0 : _3.number) === null || _4 === void 0 ? void 0 : _4.call(_3, [
                {
                    name: "Type<\"int32\">",
                    kind: "type",
                    value: "int32"
                },
                {
                    name: "JsonSchemaPlugin<__type>",
                    kind: "jsonPlugin"
                }
            ])) !== null && _5 !== void 0 ? _5 : ((_6 = _generator === null || _generator === void 0 ? void 0 : _generator.integer) !== null && _6 !== void 0 ? _6 : $generator.integer)(0, 100),
            event: (_10 = (_9 = (_8 = ((_7 = _generator === null || _generator === void 0 ? void 0 : _generator.customs) !== null && _7 !== void 0 ? _7 : $generator.customs)) === null || _8 === void 0 ? void 0 : _8.string) === null || _9 === void 0 ? void 0 : _9.call(_8, [
                {
                    name: "JsonSchemaPlugin<__type>",
                    kind: "jsonPlugin"
                }
            ])) !== null && _10 !== void 0 ? _10 : ((_11 = _generator === null || _generator === void 0 ? void 0 : _generator.string) !== null && _11 !== void 0 ? _11 : $generator.string)(),
            action: $pick([
                function () { return null; },
                function () { var _a, _b, _c, _d, _e; return (_d = (_c = (_b = ((_a = _generator === null || _generator === void 0 ? void 0 : _generator.customs) !== null && _a !== void 0 ? _a : $generator.customs)) === null || _b === void 0 ? void 0 : _b.string) === null || _c === void 0 ? void 0 : _c.call(_b, [
                    {
                        name: "JsonSchemaPlugin<__type>",
                        kind: "jsonPlugin"
                    }
                ])) !== null && _d !== void 0 ? _d : ((_e = _generator === null || _generator === void 0 ? void 0 : _generator.string) !== null && _e !== void 0 ? _e : $generator.string)(); }
            ])(),
            installation_id: $pick([
                function () { return null; },
                function () { var _a, _b, _c, _d, _e; return (_d = (_c = (_b = ((_a = _generator === null || _generator === void 0 ? void 0 : _generator.customs) !== null && _a !== void 0 ? _a : $generator.customs)) === null || _b === void 0 ? void 0 : _b.number) === null || _c === void 0 ? void 0 : _c.call(_b, [
                    {
                        name: "Type<\"int32\">",
                        kind: "type",
                        value: "int32"
                    },
                    {
                        name: "JsonSchemaPlugin<__type>",
                        kind: "jsonPlugin"
                    }
                ])) !== null && _d !== void 0 ? _d : ((_e = _generator === null || _generator === void 0 ? void 0 : _generator.integer) !== null && _e !== void 0 ? _e : $generator.integer)(0, 100); }
            ])(),
            repository_id: $pick([
                function () { return null; },
                function () { var _a, _b, _c, _d, _e; return (_d = (_c = (_b = ((_a = _generator === null || _generator === void 0 ? void 0 : _generator.customs) !== null && _a !== void 0 ? _a : $generator.customs)) === null || _b === void 0 ? void 0 : _b.number) === null || _c === void 0 ? void 0 : _c.call(_b, [
                    {
                        name: "Type<\"int32\">",
                        kind: "type",
                        value: "int32"
                    },
                    {
                        name: "JsonSchemaPlugin<__type>",
                        kind: "jsonPlugin"
                    }
                ])) !== null && _d !== void 0 ? _d : ((_e = _generator === null || _generator === void 0 ? void 0 : _generator.integer) !== null && _e !== void 0 ? _e : $generator.integer)(0, 100); }
            ])(),
            throttled_at: $pick([
                function () { return undefined; },
                function () { return null; },
                function () { var _a, _b, _c, _d, _e; return (_d = (_c = (_b = ((_a = _generator === null || _generator === void 0 ? void 0 : _generator.customs) !== null && _a !== void 0 ? _a : $generator.customs)) === null || _b === void 0 ? void 0 : _b.string) === null || _c === void 0 ? void 0 : _c.call(_b, [
                    {
                        name: "Format<\"date-time\">",
                        kind: "format",
                        value: "date-time"
                    },
                    {
                        name: "JsonSchemaPlugin<__type>",
                        kind: "jsonPlugin"
                    }
                ])) !== null && _d !== void 0 ? _d : ((_e = _generator === null || _generator === void 0 ? void 0 : _generator.datetime) !== null && _e !== void 0 ? _e : $generator.datetime)(); }
            ])()
        });
    }; var _generator; return function (generator) {
        var _a;
        _generator = generator;
        return ((_a = _generator === null || _generator === void 0 ? void 0 : _generator.array) !== null && _a !== void 0 ? _a : $generator.array)(function () { return $ro0(); });
    }; })()(g); };
    getByOwnerAndRepoAndHook_id.simulate = function (connection, owner, repo, hook_id, query) {
        var assert = NestiaSimulator_1.NestiaSimulator.assert({
            method: getByOwnerAndRepoAndHook_id.METADATA.method,
            host: connection.host,
            path: getByOwnerAndRepoAndHook_id.path(owner, repo, hook_id, query),
            contentType: "application/json",
        });
        try {
            assert.param("owner")(function () { return (function () { var $guard = typia_1.default.assert.guard; var __is = function (input) { return "string" === typeof input; }; var _errorFactory; return function (input, errorFactory) {
                if (false === __is(input)) {
                    _errorFactory = errorFactory;
                    (function (input, _path, _exceptionable) {
                        if (_exceptionable === void 0) { _exceptionable = true; }
                        return "string" === typeof input || $guard(true, {
                            path: _path + "",
                            expected: "string",
                            value: input
                        }, _errorFactory);
                    })(input, "$input", true);
                }
                return input;
            }; })()(owner); });
            assert.param("repo")(function () { return (function () { var $guard = typia_1.default.assert.guard; var __is = function (input) { return "string" === typeof input; }; var _errorFactory; return function (input, errorFactory) {
                if (false === __is(input)) {
                    _errorFactory = errorFactory;
                    (function (input, _path, _exceptionable) {
                        if (_exceptionable === void 0) { _exceptionable = true; }
                        return "string" === typeof input || $guard(true, {
                            path: _path + "",
                            expected: "string",
                            value: input
                        }, _errorFactory);
                    })(input, "$input", true);
                }
                return input;
            }; })()(repo); });
            assert.param("hook_id")(function () { return (function () { var $guard = typia_1.default.assert.guard; var __is = function (input) { return "string" === typeof input; }; var _errorFactory; return function (input, errorFactory) {
                if (false === __is(input)) {
                    _errorFactory = errorFactory;
                    (function (input, _path, _exceptionable) {
                        if (_exceptionable === void 0) { _exceptionable = true; }
                        return "string" === typeof input || $guard(true, {
                            path: _path + "",
                            expected: "string",
                            value: input
                        }, _errorFactory);
                    })(input, "$input", true);
                }
                return input;
            }; })()(hook_id); });
            assert.query(function () { return (function () { var $guard = typia_1.default.assert.guard; var $io0 = function (input) { return undefined === input.redelivery || "boolean" === typeof input.redelivery; }; var $ao0 = function (input, _path, _exceptionable) {
                if (_exceptionable === void 0) { _exceptionable = true; }
                return undefined === input.redelivery || "boolean" === typeof input.redelivery || $guard(_exceptionable, {
                    path: _path + ".redelivery",
                    expected: "(boolean | undefined)",
                    value: input.redelivery
                }, _errorFactory);
            }; var __is = function (input) { return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input); }; var _errorFactory; return function (input, errorFactory) {
                if (false === __is(input)) {
                    _errorFactory = errorFactory;
                    (function (input, _path, _exceptionable) {
                        if (_exceptionable === void 0) { _exceptionable = true; }
                        return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
                            path: _path + "",
                            expected: "IApiReposHooksDeliveries.GetQuery",
                            value: input
                        }, _errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
                            path: _path + "",
                            expected: "IApiReposHooksDeliveries.GetQuery",
                            value: input
                        }, _errorFactory);
                    })(input, "$input", true);
                }
                return input;
            }; })()(query); });
        }
        catch (exp) {
            if (!(function () { var $io0 = function (input) { return ("HEAD" === input.method || "GET" === input.method || "DELETE" === input.method || "POST" === input.method || "PUT" === input.method || "PATCH" === input.method) && "string" === typeof input.path && "number" === typeof input.status && ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io1(input.headers)) && "string" === typeof input.name && "string" === typeof input.message && (undefined === input.stack || "string" === typeof input.stack); }; var $io1 = function (input) { return Object.keys(input).every(function (key) {
                var value = input[key];
                if (undefined === value)
                    return true;
                return null !== value && undefined !== value && ("string" === typeof value || Array.isArray(value) && value.every(function (elem) { return "string" === typeof elem; }));
            }); }; return function (input) { return "object" === typeof input && null !== input && $io0(input); }; })()(exp))
                throw exp;
            return {
                success: false,
                status: exp.status,
                headers: exp.headers,
                data: exp.toJSON().message,
            };
        }
        return getByOwnerAndRepoAndHook_id.random("object" === typeof connection.simulate && null !== connection.simulate
            ? connection.simulate
            : undefined);
    };
})(getByOwnerAndRepoAndHook_id || (exports.getByOwnerAndRepoAndHook_id = getByOwnerAndRepoAndHook_id = {}));
/**
 * Get a delivery for a repository webhook.
 * Returns a delivery for a webhook configured in a repository.
 *
 * @tag repos
 * @path repos/:owner/:repo/hooks/:hook_id/deliveries/:delivery_id
 * @nestia Generated by Nestia - https://github.com/samchon/nestia
 */
function getByOwnerAndRepoAndHook_idAndDelivery_id(connection, owner, repo, hook_id, delivery_id) {
    return __awaiter(this, void 0, void 0, function () {
        return __generator(this, function (_a) {
            return [2 /*return*/, !!connection.simulate
                    ? getByOwnerAndRepoAndHook_idAndDelivery_id.simulate(connection, owner, repo, hook_id, delivery_id)
                    : PlainFetcher_1.PlainFetcher.fetch(__assign(__assign({}, connection), { headers: __assign(__assign({}, connection.headers), { "Content-Type": "application/json" }) }), __assign(__assign({}, getByOwnerAndRepoAndHook_idAndDelivery_id.METADATA), { path: getByOwnerAndRepoAndHook_idAndDelivery_id.path(owner, repo, hook_id, delivery_id), status: null }))];
        });
    });
}
(function (getByOwnerAndRepoAndHook_idAndDelivery_id) {
    getByOwnerAndRepoAndHook_idAndDelivery_id.METADATA = {
        method: "GET",
        path: "/repos/:owner/:repo/hooks/:hook_id/deliveries/:delivery_id",
        request: null,
        response: {
            type: "application/json",
            encrypted: false,
        },
    };
    getByOwnerAndRepoAndHook_idAndDelivery_id.path = function (owner, repo, hook_id, delivery_id) {
        return "/repos/".concat(encodeURIComponent(owner !== null && owner !== void 0 ? owner : "null"), "/").concat(encodeURIComponent(repo !== null && repo !== void 0 ? repo : "null"), "/hooks/").concat(encodeURIComponent(hook_id !== null && hook_id !== void 0 ? hook_id : "null"), "/deliveries/").concat(encodeURIComponent(delivery_id !== null && delivery_id !== void 0 ? delivery_id : "null"));
    };
    getByOwnerAndRepoAndHook_idAndDelivery_id.random = function (g) { return (function () { var $generator = typia_1.default.random.generator; var $pick = typia_1.default.random.pick; var $ro0 = function (_recursive, _depth) {
        var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11;
        if (_recursive === void 0) { _recursive = false; }
        if (_depth === void 0) { _depth = 0; }
        return ({
            id: (_d = (_c = (_b = ((_a = _generator === null || _generator === void 0 ? void 0 : _generator.customs) !== null && _a !== void 0 ? _a : $generator.customs)) === null || _b === void 0 ? void 0 : _b.number) === null || _c === void 0 ? void 0 : _c.call(_b, [
                {
                    name: "Type<\"int32\">",
                    kind: "type",
                    value: "int32"
                },
                {
                    name: "JsonSchemaPlugin<__type>",
                    kind: "jsonPlugin"
                }
            ])) !== null && _d !== void 0 ? _d : ((_e = _generator === null || _generator === void 0 ? void 0 : _generator.integer) !== null && _e !== void 0 ? _e : $generator.integer)(0, 100),
            guid: (_j = (_h = (_g = ((_f = _generator === null || _generator === void 0 ? void 0 : _generator.customs) !== null && _f !== void 0 ? _f : $generator.customs)) === null || _g === void 0 ? void 0 : _g.string) === null || _h === void 0 ? void 0 : _h.call(_g, [
                {
                    name: "JsonSchemaPlugin<__type>",
                    kind: "jsonPlugin"
                }
            ])) !== null && _j !== void 0 ? _j : ((_k = _generator === null || _generator === void 0 ? void 0 : _generator.string) !== null && _k !== void 0 ? _k : $generator.string)(),
            delivered_at: (_p = (_o = (_m = ((_l = _generator === null || _generator === void 0 ? void 0 : _generator.customs) !== null && _l !== void 0 ? _l : $generator.customs)) === null || _m === void 0 ? void 0 : _m.string) === null || _o === void 0 ? void 0 : _o.call(_m, [
                {
                    name: "Format<\"date-time\">",
                    kind: "format",
                    value: "date-time"
                },
                {
                    name: "JsonSchemaPlugin<__type>",
                    kind: "jsonPlugin"
                }
            ])) !== null && _p !== void 0 ? _p : ((_q = _generator === null || _generator === void 0 ? void 0 : _generator.datetime) !== null && _q !== void 0 ? _q : $generator.datetime)(),
            redelivery: ((_r = _generator === null || _generator === void 0 ? void 0 : _generator.boolean) !== null && _r !== void 0 ? _r : $generator.boolean)(),
            duration: (_v = (_u = (_t = ((_s = _generator === null || _generator === void 0 ? void 0 : _generator.customs) !== null && _s !== void 0 ? _s : $generator.customs)) === null || _t === void 0 ? void 0 : _t.number) === null || _u === void 0 ? void 0 : _u.call(_t, [
                {
                    name: "JsonSchemaPlugin<__type>",
                    kind: "jsonPlugin"
                }
            ])) !== null && _v !== void 0 ? _v : ((_w = _generator === null || _generator === void 0 ? void 0 : _generator.number) !== null && _w !== void 0 ? _w : $generator.number)(0, 100),
            status: (_0 = (_z = (_y = ((_x = _generator === null || _generator === void 0 ? void 0 : _generator.customs) !== null && _x !== void 0 ? _x : $generator.customs)) === null || _y === void 0 ? void 0 : _y.string) === null || _z === void 0 ? void 0 : _z.call(_y, [
                {
                    name: "JsonSchemaPlugin<__type>",
                    kind: "jsonPlugin"
                }
            ])) !== null && _0 !== void 0 ? _0 : ((_1 = _generator === null || _generator === void 0 ? void 0 : _generator.string) !== null && _1 !== void 0 ? _1 : $generator.string)(),
            status_code: (_5 = (_4 = (_3 = ((_2 = _generator === null || _generator === void 0 ? void 0 : _generator.customs) !== null && _2 !== void 0 ? _2 : $generator.customs)) === null || _3 === void 0 ? void 0 : _3.number) === null || _4 === void 0 ? void 0 : _4.call(_3, [
                {
                    name: "Type<\"int32\">",
                    kind: "type",
                    value: "int32"
                },
                {
                    name: "JsonSchemaPlugin<__type>",
                    kind: "jsonPlugin"
                }
            ])) !== null && _5 !== void 0 ? _5 : ((_6 = _generator === null || _generator === void 0 ? void 0 : _generator.integer) !== null && _6 !== void 0 ? _6 : $generator.integer)(0, 100),
            event: (_10 = (_9 = (_8 = ((_7 = _generator === null || _generator === void 0 ? void 0 : _generator.customs) !== null && _7 !== void 0 ? _7 : $generator.customs)) === null || _8 === void 0 ? void 0 : _8.string) === null || _9 === void 0 ? void 0 : _9.call(_8, [
                {
                    name: "JsonSchemaPlugin<__type>",
                    kind: "jsonPlugin"
                }
            ])) !== null && _10 !== void 0 ? _10 : ((_11 = _generator === null || _generator === void 0 ? void 0 : _generator.string) !== null && _11 !== void 0 ? _11 : $generator.string)(),
            action: $pick([
                function () { return null; },
                function () { var _a, _b, _c, _d, _e; return (_d = (_c = (_b = ((_a = _generator === null || _generator === void 0 ? void 0 : _generator.customs) !== null && _a !== void 0 ? _a : $generator.customs)) === null || _b === void 0 ? void 0 : _b.string) === null || _c === void 0 ? void 0 : _c.call(_b, [
                    {
                        name: "JsonSchemaPlugin<__type>",
                        kind: "jsonPlugin"
                    }
                ])) !== null && _d !== void 0 ? _d : ((_e = _generator === null || _generator === void 0 ? void 0 : _generator.string) !== null && _e !== void 0 ? _e : $generator.string)(); }
            ])(),
            installation_id: $pick([
                function () { return null; },
                function () { var _a, _b, _c, _d, _e; return (_d = (_c = (_b = ((_a = _generator === null || _generator === void 0 ? void 0 : _generator.customs) !== null && _a !== void 0 ? _a : $generator.customs)) === null || _b === void 0 ? void 0 : _b.number) === null || _c === void 0 ? void 0 : _c.call(_b, [
                    {
                        name: "Type<\"int32\">",
                        kind: "type",
                        value: "int32"
                    },
                    {
                        name: "JsonSchemaPlugin<__type>",
                        kind: "jsonPlugin"
                    }
                ])) !== null && _d !== void 0 ? _d : ((_e = _generator === null || _generator === void 0 ? void 0 : _generator.integer) !== null && _e !== void 0 ? _e : $generator.integer)(0, 100); }
            ])(),
            repository_id: $pick([
                function () { return null; },
                function () { var _a, _b, _c, _d, _e; return (_d = (_c = (_b = ((_a = _generator === null || _generator === void 0 ? void 0 : _generator.customs) !== null && _a !== void 0 ? _a : $generator.customs)) === null || _b === void 0 ? void 0 : _b.number) === null || _c === void 0 ? void 0 : _c.call(_b, [
                    {
                        name: "Type<\"int32\">",
                        kind: "type",
                        value: "int32"
                    },
                    {
                        name: "JsonSchemaPlugin<__type>",
                        kind: "jsonPlugin"
                    }
                ])) !== null && _d !== void 0 ? _d : ((_e = _generator === null || _generator === void 0 ? void 0 : _generator.integer) !== null && _e !== void 0 ? _e : $generator.integer)(0, 100); }
            ])(),
            throttled_at: $pick([
                function () { return undefined; },
                function () { return null; },
                function () { var _a, _b, _c, _d, _e; return (_d = (_c = (_b = ((_a = _generator === null || _generator === void 0 ? void 0 : _generator.customs) !== null && _a !== void 0 ? _a : $generator.customs)) === null || _b === void 0 ? void 0 : _b.string) === null || _c === void 0 ? void 0 : _c.call(_b, [
                    {
                        name: "Format<\"date-time\">",
                        kind: "format",
                        value: "date-time"
                    },
                    {
                        name: "JsonSchemaPlugin<__type>",
                        kind: "jsonPlugin"
                    }
                ])) !== null && _d !== void 0 ? _d : ((_e = _generator === null || _generator === void 0 ? void 0 : _generator.datetime) !== null && _e !== void 0 ? _e : $generator.datetime)(); }
            ])(),
            url: $pick([
                function () { return undefined; },
                function () { var _a, _b, _c, _d, _e; return (_d = (_c = (_b = ((_a = _generator === null || _generator === void 0 ? void 0 : _generator.customs) !== null && _a !== void 0 ? _a : $generator.customs)) === null || _b === void 0 ? void 0 : _b.string) === null || _c === void 0 ? void 0 : _c.call(_b, [
                    {
                        name: "JsonSchemaPlugin<__type>",
                        kind: "jsonPlugin"
                    }
                ])) !== null && _d !== void 0 ? _d : ((_e = _generator === null || _generator === void 0 ? void 0 : _generator.string) !== null && _e !== void 0 ? _e : $generator.string)(); }
            ])(),
            request: $ro1(_recursive, _recursive ? 1 + _depth : _depth),
            response: $ro3(_recursive, _recursive ? 1 + _depth : _depth)
        });
    }; var $ro1 = function (_recursive, _depth) {
        if (_recursive === void 0) { _recursive = false; }
        if (_depth === void 0) { _depth = 0; }
        return ({
            headers: $pick([
                function () { return null; },
                function () { return $ro2(_recursive, _recursive ? 1 + _depth : _depth); }
            ])(),
            payload: $pick([
                function () { return null; },
                function () { return $ro2(_recursive, _recursive ? 1 + _depth : _depth); }
            ])()
        });
    }; var $ro2 = function (_recursive, _depth) {
        if (_recursive === void 0) { _recursive = false; }
        if (_depth === void 0) { _depth = 0; }
        return {};
    }; var $ro3 = function (_recursive, _depth) {
        if (_recursive === void 0) { _recursive = false; }
        if (_depth === void 0) { _depth = 0; }
        return ({
            headers: $pick([
                function () { return null; },
                function () { return $ro2(_recursive, _recursive ? 1 + _depth : _depth); }
            ])(),
            payload: $pick([
                function () { return null; },
                function () { var _a, _b, _c, _d, _e; return (_d = (_c = (_b = ((_a = _generator === null || _generator === void 0 ? void 0 : _generator.customs) !== null && _a !== void 0 ? _a : $generator.customs)) === null || _b === void 0 ? void 0 : _b.string) === null || _c === void 0 ? void 0 : _c.call(_b, [
                    {
                        name: "JsonSchemaPlugin<__type>",
                        kind: "jsonPlugin"
                    }
                ])) !== null && _d !== void 0 ? _d : ((_e = _generator === null || _generator === void 0 ? void 0 : _generator.string) !== null && _e !== void 0 ? _e : $generator.string)(); }
            ])()
        });
    }; var _generator; return function (generator) {
        _generator = generator;
        return $ro0();
    }; })()(g); };
    getByOwnerAndRepoAndHook_idAndDelivery_id.simulate = function (connection, owner, repo, hook_id, delivery_id) {
        var assert = NestiaSimulator_1.NestiaSimulator.assert({
            method: getByOwnerAndRepoAndHook_idAndDelivery_id.METADATA.method,
            host: connection.host,
            path: getByOwnerAndRepoAndHook_idAndDelivery_id.path(owner, repo, hook_id, delivery_id),
            contentType: "application/json",
        });
        try {
            assert.param("owner")(function () { return (function () { var $guard = typia_1.default.assert.guard; var __is = function (input) { return "string" === typeof input; }; var _errorFactory; return function (input, errorFactory) {
                if (false === __is(input)) {
                    _errorFactory = errorFactory;
                    (function (input, _path, _exceptionable) {
                        if (_exceptionable === void 0) { _exceptionable = true; }
                        return "string" === typeof input || $guard(true, {
                            path: _path + "",
                            expected: "string",
                            value: input
                        }, _errorFactory);
                    })(input, "$input", true);
                }
                return input;
            }; })()(owner); });
            assert.param("repo")(function () { return (function () { var $guard = typia_1.default.assert.guard; var __is = function (input) { return "string" === typeof input; }; var _errorFactory; return function (input, errorFactory) {
                if (false === __is(input)) {
                    _errorFactory = errorFactory;
                    (function (input, _path, _exceptionable) {
                        if (_exceptionable === void 0) { _exceptionable = true; }
                        return "string" === typeof input || $guard(true, {
                            path: _path + "",
                            expected: "string",
                            value: input
                        }, _errorFactory);
                    })(input, "$input", true);
                }
                return input;
            }; })()(repo); });
            assert.param("hook_id")(function () { return (function () { var $guard = typia_1.default.assert.guard; var __is = function (input) { return "string" === typeof input; }; var _errorFactory; return function (input, errorFactory) {
                if (false === __is(input)) {
                    _errorFactory = errorFactory;
                    (function (input, _path, _exceptionable) {
                        if (_exceptionable === void 0) { _exceptionable = true; }
                        return "string" === typeof input || $guard(true, {
                            path: _path + "",
                            expected: "string",
                            value: input
                        }, _errorFactory);
                    })(input, "$input", true);
                }
                return input;
            }; })()(hook_id); });
            assert.param("delivery_id")(function () { return (function () { var $guard = typia_1.default.assert.guard; var __is = function (input) { return "string" === typeof input; }; var _errorFactory; return function (input, errorFactory) {
                if (false === __is(input)) {
                    _errorFactory = errorFactory;
                    (function (input, _path, _exceptionable) {
                        if (_exceptionable === void 0) { _exceptionable = true; }
                        return "string" === typeof input || $guard(true, {
                            path: _path + "",
                            expected: "string",
                            value: input
                        }, _errorFactory);
                    })(input, "$input", true);
                }
                return input;
            }; })()(delivery_id); });
        }
        catch (exp) {
            if (!(function () { var $io0 = function (input) { return ("HEAD" === input.method || "GET" === input.method || "DELETE" === input.method || "POST" === input.method || "PUT" === input.method || "PATCH" === input.method) && "string" === typeof input.path && "number" === typeof input.status && ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io1(input.headers)) && "string" === typeof input.name && "string" === typeof input.message && (undefined === input.stack || "string" === typeof input.stack); }; var $io1 = function (input) { return Object.keys(input).every(function (key) {
                var value = input[key];
                if (undefined === value)
                    return true;
                return null !== value && undefined !== value && ("string" === typeof value || Array.isArray(value) && value.every(function (elem) { return "string" === typeof elem; }));
            }); }; return function (input) { return "object" === typeof input && null !== input && $io0(input); }; })()(exp))
                throw exp;
            return {
                success: false,
                status: exp.status,
                headers: exp.headers,
                data: exp.toJSON().message,
            };
        }
        return getByOwnerAndRepoAndHook_idAndDelivery_id.random("object" === typeof connection.simulate && null !== connection.simulate
            ? connection.simulate
            : undefined);
    };
})(getByOwnerAndRepoAndHook_idAndDelivery_id || (exports.getByOwnerAndRepoAndHook_idAndDelivery_id = getByOwnerAndRepoAndHook_idAndDelivery_id = {}));
//# sourceMappingURL=index.js.map