"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 __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 __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getByClassroom_id = getByClassroom_id;
var PlainFetcher_1 = require("@nestia/fetcher/lib/PlainFetcher");
var typia_1 = __importDefault(require("typia"));
var NestiaSimulator_1 = require("@nestia/fetcher/lib/NestiaSimulator");
/**
 * List assignments for a classroom.
 * Lists GitHub Classroom assignments for a classroom. Assignments will only be returned if the current user is an administrator of the GitHub Classroom.
 *
 * @tag classroom
 * @path classrooms/:classroom_id/assignments
 * @nestia Generated by Nestia - https://github.com/samchon/nestia
 */
function getByClassroom_id(connection, classroom_id) {
    return __awaiter(this, void 0, void 0, function () {
        return __generator(this, function (_a) {
            return [2 /*return*/, !!connection.simulate
                    ? getByClassroom_id.simulate(connection, classroom_id)
                    : PlainFetcher_1.PlainFetcher.fetch(__assign(__assign({}, connection), { headers: __assign(__assign({}, connection.headers), { "Content-Type": "application/json" }) }), __assign(__assign({}, getByClassroom_id.METADATA), { path: getByClassroom_id.path(classroom_id), status: null }))];
        });
    });
}
(function (getByClassroom_id) {
    getByClassroom_id.METADATA = {
        method: "GET",
        path: "/classrooms/:classroom_id/assignments",
        request: null,
        response: {
            type: "application/json",
            encrypted: false,
        },
    };
    getByClassroom_id.path = function (classroom_id) {
        return "/classrooms/".concat(encodeURIComponent(classroom_id !== null && classroom_id !== void 0 ? classroom_id : "null"), "/assignments");
    };
    getByClassroom_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, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24;
        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),
            public_repo: ((_f = _generator === null || _generator === void 0 ? void 0 : _generator.boolean) !== null && _f !== void 0 ? _f : $generator.boolean)(),
            title: (_k = (_j = (_h = ((_g = _generator === null || _generator === void 0 ? void 0 : _generator.customs) !== null && _g !== void 0 ? _g : $generator.customs)) === null || _h === void 0 ? void 0 : _h.string) === null || _j === void 0 ? void 0 : _j.call(_h, [
                {
                    name: "JsonSchemaPlugin<__type>",
                    kind: "jsonPlugin"
                }
            ])) !== null && _k !== void 0 ? _k : ((_l = _generator === null || _generator === void 0 ? void 0 : _generator.string) !== null && _l !== void 0 ? _l : $generator.string)(),
            type: $pick([
                function () { return "individual"; },
                function () { return "group"; }
            ])(),
            invite_link: (_q = (_p = (_o = ((_m = _generator === null || _generator === void 0 ? void 0 : _generator.customs) !== null && _m !== void 0 ? _m : $generator.customs)) === null || _o === void 0 ? void 0 : _o.string) === null || _p === void 0 ? void 0 : _p.call(_o, [
                {
                    name: "JsonSchemaPlugin<__type>",
                    kind: "jsonPlugin"
                }
            ])) !== null && _q !== void 0 ? _q : ((_r = _generator === null || _generator === void 0 ? void 0 : _generator.string) !== null && _r !== void 0 ? _r : $generator.string)(),
            invitations_enabled: ((_s = _generator === null || _generator === void 0 ? void 0 : _generator.boolean) !== null && _s !== void 0 ? _s : $generator.boolean)(),
            slug: (_w = (_v = (_u = ((_t = _generator === null || _generator === void 0 ? void 0 : _generator.customs) !== null && _t !== void 0 ? _t : $generator.customs)) === null || _u === void 0 ? void 0 : _u.string) === null || _v === void 0 ? void 0 : _v.call(_u, [
                {
                    name: "JsonSchemaPlugin<__type>",
                    kind: "jsonPlugin"
                }
            ])) !== null && _w !== void 0 ? _w : ((_x = _generator === null || _generator === void 0 ? void 0 : _generator.string) !== null && _x !== void 0 ? _x : $generator.string)(),
            students_are_repo_admins: ((_y = _generator === null || _generator === void 0 ? void 0 : _generator.boolean) !== null && _y !== void 0 ? _y : $generator.boolean)(),
            feedback_pull_requests_enabled: ((_z = _generator === null || _generator === void 0 ? void 0 : _generator.boolean) !== null && _z !== void 0 ? _z : $generator.boolean)(),
            max_teams: $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.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); }
            ])(),
            max_members: $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.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); }
            ])(),
            editor: (_3 = (_2 = (_1 = ((_0 = _generator === null || _generator === void 0 ? void 0 : _generator.customs) !== null && _0 !== void 0 ? _0 : $generator.customs)) === null || _1 === void 0 ? void 0 : _1.string) === null || _2 === void 0 ? void 0 : _2.call(_1, [
                {
                    name: "JsonSchemaPlugin<__type>",
                    kind: "jsonPlugin"
                }
            ])) !== null && _3 !== void 0 ? _3 : ((_4 = _generator === null || _generator === void 0 ? void 0 : _generator.string) !== null && _4 !== void 0 ? _4 : $generator.string)(),
            accepted: (_8 = (_7 = (_6 = ((_5 = _generator === null || _generator === void 0 ? void 0 : _generator.customs) !== null && _5 !== void 0 ? _5 : $generator.customs)) === null || _6 === void 0 ? void 0 : _6.number) === null || _7 === void 0 ? void 0 : _7.call(_6, [
                {
                    name: "Type<\"int32\">",
                    kind: "type",
                    value: "int32"
                },
                {
                    name: "JsonSchemaPlugin<__type>",
                    kind: "jsonPlugin"
                }
            ])) !== null && _8 !== void 0 ? _8 : ((_9 = _generator === null || _generator === void 0 ? void 0 : _generator.integer) !== null && _9 !== void 0 ? _9 : $generator.integer)(0, 100),
            submitted: (_13 = (_12 = (_11 = ((_10 = _generator === null || _generator === void 0 ? void 0 : _generator.customs) !== null && _10 !== void 0 ? _10 : $generator.customs)) === null || _11 === void 0 ? void 0 : _11.number) === null || _12 === void 0 ? void 0 : _12.call(_11, [
                {
                    name: "Type<\"int32\">",
                    kind: "type",
                    value: "int32"
                },
                {
                    name: "JsonSchemaPlugin<__type>",
                    kind: "jsonPlugin"
                }
            ])) !== null && _13 !== void 0 ? _13 : ((_14 = _generator === null || _generator === void 0 ? void 0 : _generator.integer) !== null && _14 !== void 0 ? _14 : $generator.integer)(0, 100),
            passing: (_18 = (_17 = (_16 = ((_15 = _generator === null || _generator === void 0 ? void 0 : _generator.customs) !== null && _15 !== void 0 ? _15 : $generator.customs)) === null || _16 === void 0 ? void 0 : _16.number) === null || _17 === void 0 ? void 0 : _17.call(_16, [
                {
                    name: "Type<\"int32\">",
                    kind: "type",
                    value: "int32"
                },
                {
                    name: "JsonSchemaPlugin<__type>",
                    kind: "jsonPlugin"
                }
            ])) !== null && _18 !== void 0 ? _18 : ((_19 = _generator === null || _generator === void 0 ? void 0 : _generator.integer) !== null && _19 !== void 0 ? _19 : $generator.integer)(0, 100),
            language: (_23 = (_22 = (_21 = ((_20 = _generator === null || _generator === void 0 ? void 0 : _generator.customs) !== null && _20 !== void 0 ? _20 : $generator.customs)) === null || _21 === void 0 ? void 0 : _21.string) === null || _22 === void 0 ? void 0 : _22.call(_21, [
                {
                    name: "JsonSchemaPlugin<__type>",
                    kind: "jsonPlugin"
                }
            ])) !== null && _23 !== void 0 ? _23 : ((_24 = _generator === null || _generator === void 0 ? void 0 : _generator.string) !== null && _24 !== void 0 ? _24 : $generator.string)(),
            deadline: $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: "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)(); }
            ])(),
            classroom: $ro1(_recursive, _recursive ? 1 + _depth : _depth)
        });
    }; var $ro1 = function (_recursive, _depth) {
        var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
        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),
            name: (_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)(),
            archived: ((_l = _generator === null || _generator === void 0 ? void 0 : _generator.boolean) !== null && _l !== void 0 ? _l : $generator.boolean)(),
            url: (_q = (_p = (_o = ((_m = _generator === null || _generator === void 0 ? void 0 : _generator.customs) !== null && _m !== void 0 ? _m : $generator.customs)) === null || _o === void 0 ? void 0 : _o.string) === null || _p === void 0 ? void 0 : _p.call(_o, [
                {
                    name: "JsonSchemaPlugin<__type>",
                    kind: "jsonPlugin"
                }
            ])) !== null && _q !== void 0 ? _q : ((_r = _generator === null || _generator === void 0 ? void 0 : _generator.string) !== null && _r !== void 0 ? _r : $generator.string)()
        });
    }; 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); };
    getByClassroom_id.simulate = function (connection, classroom_id) {
        var assert = NestiaSimulator_1.NestiaSimulator.assert({
            method: getByClassroom_id.METADATA.method,
            host: connection.host,
            path: getByClassroom_id.path(classroom_id),
            contentType: "application/json",
        });
        try {
            assert.param("classroom_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;
            }; })()(classroom_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 getByClassroom_id.random("object" === typeof connection.simulate && null !== connection.simulate
            ? connection.simulate
            : undefined);
    };
})(getByClassroom_id || (exports.getByClassroom_id = getByClassroom_id = {}));
//# sourceMappingURL=index.js.map