"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
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 () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetAllGradingPeriodsResponse$ = exports.GetAllGradingPeriodsResponse$outboundSchema = exports.GetAllGradingPeriodsResponse$inboundSchema = exports.GetAllGradingPeriodsResponseBody$ = exports.GetAllGradingPeriodsResponseBody$outboundSchema = exports.GetAllGradingPeriodsResponseBody$inboundSchema = exports.GetAllGradingPeriodsRequest$ = exports.GetAllGradingPeriodsRequest$outboundSchema = exports.GetAllGradingPeriodsRequest$inboundSchema = exports.GetAllGradingPeriodsOrderBy$ = exports.GetAllGradingPeriodsOrderBy$outboundSchema = exports.GetAllGradingPeriodsOrderBy$inboundSchema = exports.GetAllGradingPeriodsOrderBy = void 0;
exports.getAllGradingPeriodsRequestToJSON = getAllGradingPeriodsRequestToJSON;
exports.getAllGradingPeriodsRequestFromJSON = getAllGradingPeriodsRequestFromJSON;
exports.getAllGradingPeriodsResponseBodyToJSON = getAllGradingPeriodsResponseBodyToJSON;
exports.getAllGradingPeriodsResponseBodyFromJSON = getAllGradingPeriodsResponseBodyFromJSON;
exports.getAllGradingPeriodsResponseToJSON = getAllGradingPeriodsResponseToJSON;
exports.getAllGradingPeriodsResponseFromJSON = getAllGradingPeriodsResponseFromJSON;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
const components = __importStar(require("../components/index.js"));
/**
 * The order to sort the response by
 */
exports.GetAllGradingPeriodsOrderBy = {
    Asc: "asc",
    Desc: "desc",
};
/** @internal */
exports.GetAllGradingPeriodsOrderBy$inboundSchema = z.nativeEnum(exports.GetAllGradingPeriodsOrderBy);
/** @internal */
exports.GetAllGradingPeriodsOrderBy$outboundSchema = exports.GetAllGradingPeriodsOrderBy$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var GetAllGradingPeriodsOrderBy$;
(function (GetAllGradingPeriodsOrderBy$) {
    /** @deprecated use `GetAllGradingPeriodsOrderBy$inboundSchema` instead. */
    GetAllGradingPeriodsOrderBy$.inboundSchema = exports.GetAllGradingPeriodsOrderBy$inboundSchema;
    /** @deprecated use `GetAllGradingPeriodsOrderBy$outboundSchema` instead. */
    GetAllGradingPeriodsOrderBy$.outboundSchema = exports.GetAllGradingPeriodsOrderBy$outboundSchema;
})(GetAllGradingPeriodsOrderBy$ || (exports.GetAllGradingPeriodsOrderBy$ = GetAllGradingPeriodsOrderBy$ = {}));
/** @internal */
exports.GetAllGradingPeriodsRequest$inboundSchema = z.object({
    fields: z.string().optional(),
    limit: z.number().int().default(100),
    offset: z.number().int().default(0),
    sort: z.string().optional(),
    orderBy: exports.GetAllGradingPeriodsOrderBy$inboundSchema.optional(),
    filter: z.string().optional(),
    search: z.string().optional(),
});
/** @internal */
exports.GetAllGradingPeriodsRequest$outboundSchema = z.object({
    fields: z.string().optional(),
    limit: z.number().int().default(100),
    offset: z.number().int().default(0),
    sort: z.string().optional(),
    orderBy: exports.GetAllGradingPeriodsOrderBy$outboundSchema.optional(),
    filter: z.string().optional(),
    search: z.string().optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var GetAllGradingPeriodsRequest$;
(function (GetAllGradingPeriodsRequest$) {
    /** @deprecated use `GetAllGradingPeriodsRequest$inboundSchema` instead. */
    GetAllGradingPeriodsRequest$.inboundSchema = exports.GetAllGradingPeriodsRequest$inboundSchema;
    /** @deprecated use `GetAllGradingPeriodsRequest$outboundSchema` instead. */
    GetAllGradingPeriodsRequest$.outboundSchema = exports.GetAllGradingPeriodsRequest$outboundSchema;
})(GetAllGradingPeriodsRequest$ || (exports.GetAllGradingPeriodsRequest$ = GetAllGradingPeriodsRequest$ = {}));
function getAllGradingPeriodsRequestToJSON(getAllGradingPeriodsRequest) {
    return JSON.stringify(exports.GetAllGradingPeriodsRequest$outboundSchema.parse(getAllGradingPeriodsRequest));
}
function getAllGradingPeriodsRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetAllGradingPeriodsRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllGradingPeriodsRequest' from JSON`);
}
/** @internal */
exports.GetAllGradingPeriodsResponseBody$inboundSchema = z.object({
    gradingPeriods: z.array(components.AcademicSession$inboundSchema),
    totalCount: z.number(),
    pageCount: z.number(),
    pageNumber: z.number(),
    offset: z.number(),
    limit: z.number(),
});
/** @internal */
exports.GetAllGradingPeriodsResponseBody$outboundSchema = z.object({
    gradingPeriods: z.array(components.AcademicSession$outboundSchema),
    totalCount: z.number(),
    pageCount: z.number(),
    pageNumber: z.number(),
    offset: z.number(),
    limit: z.number(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var GetAllGradingPeriodsResponseBody$;
(function (GetAllGradingPeriodsResponseBody$) {
    /** @deprecated use `GetAllGradingPeriodsResponseBody$inboundSchema` instead. */
    GetAllGradingPeriodsResponseBody$.inboundSchema = exports.GetAllGradingPeriodsResponseBody$inboundSchema;
    /** @deprecated use `GetAllGradingPeriodsResponseBody$outboundSchema` instead. */
    GetAllGradingPeriodsResponseBody$.outboundSchema = exports.GetAllGradingPeriodsResponseBody$outboundSchema;
})(GetAllGradingPeriodsResponseBody$ || (exports.GetAllGradingPeriodsResponseBody$ = GetAllGradingPeriodsResponseBody$ = {}));
function getAllGradingPeriodsResponseBodyToJSON(getAllGradingPeriodsResponseBody) {
    return JSON.stringify(exports.GetAllGradingPeriodsResponseBody$outboundSchema.parse(getAllGradingPeriodsResponseBody));
}
function getAllGradingPeriodsResponseBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetAllGradingPeriodsResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllGradingPeriodsResponseBody' from JSON`);
}
/** @internal */
exports.GetAllGradingPeriodsResponse$inboundSchema = z.object({
    Result: z.lazy(() => exports.GetAllGradingPeriodsResponseBody$inboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "Result": "result",
    });
});
/** @internal */
exports.GetAllGradingPeriodsResponse$outboundSchema = z.object({
    result: z.lazy(() => exports.GetAllGradingPeriodsResponseBody$outboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        result: "Result",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var GetAllGradingPeriodsResponse$;
(function (GetAllGradingPeriodsResponse$) {
    /** @deprecated use `GetAllGradingPeriodsResponse$inboundSchema` instead. */
    GetAllGradingPeriodsResponse$.inboundSchema = exports.GetAllGradingPeriodsResponse$inboundSchema;
    /** @deprecated use `GetAllGradingPeriodsResponse$outboundSchema` instead. */
    GetAllGradingPeriodsResponse$.outboundSchema = exports.GetAllGradingPeriodsResponse$outboundSchema;
})(GetAllGradingPeriodsResponse$ || (exports.GetAllGradingPeriodsResponse$ = GetAllGradingPeriodsResponse$ = {}));
function getAllGradingPeriodsResponseToJSON(getAllGradingPeriodsResponse) {
    return JSON.stringify(exports.GetAllGradingPeriodsResponse$outboundSchema.parse(getAllGradingPeriodsResponse));
}
function getAllGradingPeriodsResponseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetAllGradingPeriodsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllGradingPeriodsResponse' from JSON`);
}
//# sourceMappingURL=getallgradingperiods.js.map