"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.GetAllEnrollmentsResponse$ = exports.GetAllEnrollmentsResponse$outboundSchema = exports.GetAllEnrollmentsResponse$inboundSchema = exports.GetAllEnrollmentsResponseBody$ = exports.GetAllEnrollmentsResponseBody$outboundSchema = exports.GetAllEnrollmentsResponseBody$inboundSchema = exports.GetAllEnrollmentsRequest$ = exports.GetAllEnrollmentsRequest$outboundSchema = exports.GetAllEnrollmentsRequest$inboundSchema = exports.GetAllEnrollmentsOrderBy$ = exports.GetAllEnrollmentsOrderBy$outboundSchema = exports.GetAllEnrollmentsOrderBy$inboundSchema = exports.GetAllEnrollmentsOrderBy = void 0;
exports.getAllEnrollmentsRequestToJSON = getAllEnrollmentsRequestToJSON;
exports.getAllEnrollmentsRequestFromJSON = getAllEnrollmentsRequestFromJSON;
exports.getAllEnrollmentsResponseBodyToJSON = getAllEnrollmentsResponseBodyToJSON;
exports.getAllEnrollmentsResponseBodyFromJSON = getAllEnrollmentsResponseBodyFromJSON;
exports.getAllEnrollmentsResponseToJSON = getAllEnrollmentsResponseToJSON;
exports.getAllEnrollmentsResponseFromJSON = getAllEnrollmentsResponseFromJSON;
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.GetAllEnrollmentsOrderBy = {
    Asc: "asc",
    Desc: "desc",
};
/** @internal */
exports.GetAllEnrollmentsOrderBy$inboundSchema = z.nativeEnum(exports.GetAllEnrollmentsOrderBy);
/** @internal */
exports.GetAllEnrollmentsOrderBy$outboundSchema = exports.GetAllEnrollmentsOrderBy$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var GetAllEnrollmentsOrderBy$;
(function (GetAllEnrollmentsOrderBy$) {
    /** @deprecated use `GetAllEnrollmentsOrderBy$inboundSchema` instead. */
    GetAllEnrollmentsOrderBy$.inboundSchema = exports.GetAllEnrollmentsOrderBy$inboundSchema;
    /** @deprecated use `GetAllEnrollmentsOrderBy$outboundSchema` instead. */
    GetAllEnrollmentsOrderBy$.outboundSchema = exports.GetAllEnrollmentsOrderBy$outboundSchema;
})(GetAllEnrollmentsOrderBy$ || (exports.GetAllEnrollmentsOrderBy$ = GetAllEnrollmentsOrderBy$ = {}));
/** @internal */
exports.GetAllEnrollmentsRequest$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.GetAllEnrollmentsOrderBy$inboundSchema.optional(),
    filter: z.string().optional(),
    search: z.string().optional(),
});
/** @internal */
exports.GetAllEnrollmentsRequest$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.GetAllEnrollmentsOrderBy$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 GetAllEnrollmentsRequest$;
(function (GetAllEnrollmentsRequest$) {
    /** @deprecated use `GetAllEnrollmentsRequest$inboundSchema` instead. */
    GetAllEnrollmentsRequest$.inboundSchema = exports.GetAllEnrollmentsRequest$inboundSchema;
    /** @deprecated use `GetAllEnrollmentsRequest$outboundSchema` instead. */
    GetAllEnrollmentsRequest$.outboundSchema = exports.GetAllEnrollmentsRequest$outboundSchema;
})(GetAllEnrollmentsRequest$ || (exports.GetAllEnrollmentsRequest$ = GetAllEnrollmentsRequest$ = {}));
function getAllEnrollmentsRequestToJSON(getAllEnrollmentsRequest) {
    return JSON.stringify(exports.GetAllEnrollmentsRequest$outboundSchema.parse(getAllEnrollmentsRequest));
}
function getAllEnrollmentsRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetAllEnrollmentsRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllEnrollmentsRequest' from JSON`);
}
/** @internal */
exports.GetAllEnrollmentsResponseBody$inboundSchema = z.object({
    enrollments: z.array(components.Enrollment$inboundSchema),
    totalCount: z.number(),
    pageCount: z.number(),
    pageNumber: z.number(),
    offset: z.number(),
    limit: z.number(),
});
/** @internal */
exports.GetAllEnrollmentsResponseBody$outboundSchema = z.object({
    enrollments: z.array(components.Enrollment$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 GetAllEnrollmentsResponseBody$;
(function (GetAllEnrollmentsResponseBody$) {
    /** @deprecated use `GetAllEnrollmentsResponseBody$inboundSchema` instead. */
    GetAllEnrollmentsResponseBody$.inboundSchema = exports.GetAllEnrollmentsResponseBody$inboundSchema;
    /** @deprecated use `GetAllEnrollmentsResponseBody$outboundSchema` instead. */
    GetAllEnrollmentsResponseBody$.outboundSchema = exports.GetAllEnrollmentsResponseBody$outboundSchema;
})(GetAllEnrollmentsResponseBody$ || (exports.GetAllEnrollmentsResponseBody$ = GetAllEnrollmentsResponseBody$ = {}));
function getAllEnrollmentsResponseBodyToJSON(getAllEnrollmentsResponseBody) {
    return JSON.stringify(exports.GetAllEnrollmentsResponseBody$outboundSchema.parse(getAllEnrollmentsResponseBody));
}
function getAllEnrollmentsResponseBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetAllEnrollmentsResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllEnrollmentsResponseBody' from JSON`);
}
/** @internal */
exports.GetAllEnrollmentsResponse$inboundSchema = z.object({
    Result: z.lazy(() => exports.GetAllEnrollmentsResponseBody$inboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "Result": "result",
    });
});
/** @internal */
exports.GetAllEnrollmentsResponse$outboundSchema = z.object({
    result: z.lazy(() => exports.GetAllEnrollmentsResponseBody$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 GetAllEnrollmentsResponse$;
(function (GetAllEnrollmentsResponse$) {
    /** @deprecated use `GetAllEnrollmentsResponse$inboundSchema` instead. */
    GetAllEnrollmentsResponse$.inboundSchema = exports.GetAllEnrollmentsResponse$inboundSchema;
    /** @deprecated use `GetAllEnrollmentsResponse$outboundSchema` instead. */
    GetAllEnrollmentsResponse$.outboundSchema = exports.GetAllEnrollmentsResponse$outboundSchema;
})(GetAllEnrollmentsResponse$ || (exports.GetAllEnrollmentsResponse$ = GetAllEnrollmentsResponse$ = {}));
function getAllEnrollmentsResponseToJSON(getAllEnrollmentsResponse) {
    return JSON.stringify(exports.GetAllEnrollmentsResponse$outboundSchema.parse(getAllEnrollmentsResponse));
}
function getAllEnrollmentsResponseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetAllEnrollmentsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllEnrollmentsResponse' from JSON`);
}
//# sourceMappingURL=getallenrollments.js.map