"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.GetAllCourseComponentsResponse$ = exports.GetAllCourseComponentsResponse$outboundSchema = exports.GetAllCourseComponentsResponse$inboundSchema = exports.GetAllCourseComponentsResponseBody$ = exports.GetAllCourseComponentsResponseBody$outboundSchema = exports.GetAllCourseComponentsResponseBody$inboundSchema = exports.GetAllCourseComponentsCourseComponent$ = exports.GetAllCourseComponentsCourseComponent$outboundSchema = exports.GetAllCourseComponentsCourseComponent$inboundSchema = exports.GetAllCourseComponentsParent$ = exports.GetAllCourseComponentsParent$outboundSchema = exports.GetAllCourseComponentsParent$inboundSchema = exports.GetAllCourseComponentsCourseComponentCourseComponent$ = exports.GetAllCourseComponentsCourseComponentCourseComponent$outboundSchema = exports.GetAllCourseComponentsCourseComponentCourseComponent$inboundSchema = exports.GetAllCourseComponentsCourse$ = exports.GetAllCourseComponentsCourse$outboundSchema = exports.GetAllCourseComponentsCourse$inboundSchema = exports.GetAllCourseComponentsStatus$ = exports.GetAllCourseComponentsStatus$outboundSchema = exports.GetAllCourseComponentsStatus$inboundSchema = exports.GetAllCourseComponentsRequest$ = exports.GetAllCourseComponentsRequest$outboundSchema = exports.GetAllCourseComponentsRequest$inboundSchema = exports.GetAllCourseComponentsOrderBy$ = exports.GetAllCourseComponentsOrderBy$outboundSchema = exports.GetAllCourseComponentsOrderBy$inboundSchema = exports.GetAllCourseComponentsStatus = exports.GetAllCourseComponentsOrderBy = void 0;
exports.getAllCourseComponentsRequestToJSON = getAllCourseComponentsRequestToJSON;
exports.getAllCourseComponentsRequestFromJSON = getAllCourseComponentsRequestFromJSON;
exports.getAllCourseComponentsCourseToJSON = getAllCourseComponentsCourseToJSON;
exports.getAllCourseComponentsCourseFromJSON = getAllCourseComponentsCourseFromJSON;
exports.getAllCourseComponentsCourseComponentCourseComponentToJSON = getAllCourseComponentsCourseComponentCourseComponentToJSON;
exports.getAllCourseComponentsCourseComponentCourseComponentFromJSON = getAllCourseComponentsCourseComponentCourseComponentFromJSON;
exports.getAllCourseComponentsParentToJSON = getAllCourseComponentsParentToJSON;
exports.getAllCourseComponentsParentFromJSON = getAllCourseComponentsParentFromJSON;
exports.getAllCourseComponentsCourseComponentToJSON = getAllCourseComponentsCourseComponentToJSON;
exports.getAllCourseComponentsCourseComponentFromJSON = getAllCourseComponentsCourseComponentFromJSON;
exports.getAllCourseComponentsResponseBodyToJSON = getAllCourseComponentsResponseBodyToJSON;
exports.getAllCourseComponentsResponseBodyFromJSON = getAllCourseComponentsResponseBodyFromJSON;
exports.getAllCourseComponentsResponseToJSON = getAllCourseComponentsResponseToJSON;
exports.getAllCourseComponentsResponseFromJSON = getAllCourseComponentsResponseFromJSON;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
/**
 * The order to sort the response by
 */
exports.GetAllCourseComponentsOrderBy = {
    Asc: "asc",
    Desc: "desc",
};
exports.GetAllCourseComponentsStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
/** @internal */
exports.GetAllCourseComponentsOrderBy$inboundSchema = z.nativeEnum(exports.GetAllCourseComponentsOrderBy);
/** @internal */
exports.GetAllCourseComponentsOrderBy$outboundSchema = exports.GetAllCourseComponentsOrderBy$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var GetAllCourseComponentsOrderBy$;
(function (GetAllCourseComponentsOrderBy$) {
    /** @deprecated use `GetAllCourseComponentsOrderBy$inboundSchema` instead. */
    GetAllCourseComponentsOrderBy$.inboundSchema = exports.GetAllCourseComponentsOrderBy$inboundSchema;
    /** @deprecated use `GetAllCourseComponentsOrderBy$outboundSchema` instead. */
    GetAllCourseComponentsOrderBy$.outboundSchema = exports.GetAllCourseComponentsOrderBy$outboundSchema;
})(GetAllCourseComponentsOrderBy$ || (exports.GetAllCourseComponentsOrderBy$ = GetAllCourseComponentsOrderBy$ = {}));
/** @internal */
exports.GetAllCourseComponentsRequest$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.GetAllCourseComponentsOrderBy$inboundSchema.optional(),
    filter: z.string().optional(),
    search: z.string().optional(),
});
/** @internal */
exports.GetAllCourseComponentsRequest$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.GetAllCourseComponentsOrderBy$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 GetAllCourseComponentsRequest$;
(function (GetAllCourseComponentsRequest$) {
    /** @deprecated use `GetAllCourseComponentsRequest$inboundSchema` instead. */
    GetAllCourseComponentsRequest$.inboundSchema = exports.GetAllCourseComponentsRequest$inboundSchema;
    /** @deprecated use `GetAllCourseComponentsRequest$outboundSchema` instead. */
    GetAllCourseComponentsRequest$.outboundSchema = exports.GetAllCourseComponentsRequest$outboundSchema;
})(GetAllCourseComponentsRequest$ || (exports.GetAllCourseComponentsRequest$ = GetAllCourseComponentsRequest$ = {}));
function getAllCourseComponentsRequestToJSON(getAllCourseComponentsRequest) {
    return JSON.stringify(exports.GetAllCourseComponentsRequest$outboundSchema.parse(getAllCourseComponentsRequest));
}
function getAllCourseComponentsRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetAllCourseComponentsRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllCourseComponentsRequest' from JSON`);
}
/** @internal */
exports.GetAllCourseComponentsStatus$inboundSchema = z.nativeEnum(exports.GetAllCourseComponentsStatus);
/** @internal */
exports.GetAllCourseComponentsStatus$outboundSchema = exports.GetAllCourseComponentsStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var GetAllCourseComponentsStatus$;
(function (GetAllCourseComponentsStatus$) {
    /** @deprecated use `GetAllCourseComponentsStatus$inboundSchema` instead. */
    GetAllCourseComponentsStatus$.inboundSchema = exports.GetAllCourseComponentsStatus$inboundSchema;
    /** @deprecated use `GetAllCourseComponentsStatus$outboundSchema` instead. */
    GetAllCourseComponentsStatus$.outboundSchema = exports.GetAllCourseComponentsStatus$outboundSchema;
})(GetAllCourseComponentsStatus$ || (exports.GetAllCourseComponentsStatus$ = GetAllCourseComponentsStatus$ = {}));
/** @internal */
exports.GetAllCourseComponentsCourse$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.GetAllCourseComponentsCourse$outboundSchema = z.object({
    sourcedId: z.string(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var GetAllCourseComponentsCourse$;
(function (GetAllCourseComponentsCourse$) {
    /** @deprecated use `GetAllCourseComponentsCourse$inboundSchema` instead. */
    GetAllCourseComponentsCourse$.inboundSchema = exports.GetAllCourseComponentsCourse$inboundSchema;
    /** @deprecated use `GetAllCourseComponentsCourse$outboundSchema` instead. */
    GetAllCourseComponentsCourse$.outboundSchema = exports.GetAllCourseComponentsCourse$outboundSchema;
})(GetAllCourseComponentsCourse$ || (exports.GetAllCourseComponentsCourse$ = GetAllCourseComponentsCourse$ = {}));
function getAllCourseComponentsCourseToJSON(getAllCourseComponentsCourse) {
    return JSON.stringify(exports.GetAllCourseComponentsCourse$outboundSchema.parse(getAllCourseComponentsCourse));
}
function getAllCourseComponentsCourseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetAllCourseComponentsCourse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllCourseComponentsCourse' from JSON`);
}
/** @internal */
exports.GetAllCourseComponentsCourseComponentCourseComponent$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.GetAllCourseComponentsCourseComponentCourseComponent$outboundSchema = z.object({
    sourcedId: z.string(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var GetAllCourseComponentsCourseComponentCourseComponent$;
(function (GetAllCourseComponentsCourseComponentCourseComponent$) {
    /** @deprecated use `GetAllCourseComponentsCourseComponentCourseComponent$inboundSchema` instead. */
    GetAllCourseComponentsCourseComponentCourseComponent$.inboundSchema = exports.GetAllCourseComponentsCourseComponentCourseComponent$inboundSchema;
    /** @deprecated use `GetAllCourseComponentsCourseComponentCourseComponent$outboundSchema` instead. */
    GetAllCourseComponentsCourseComponentCourseComponent$.outboundSchema = exports.GetAllCourseComponentsCourseComponentCourseComponent$outboundSchema;
})(GetAllCourseComponentsCourseComponentCourseComponent$ || (exports.GetAllCourseComponentsCourseComponentCourseComponent$ = GetAllCourseComponentsCourseComponentCourseComponent$ = {}));
function getAllCourseComponentsCourseComponentCourseComponentToJSON(getAllCourseComponentsCourseComponentCourseComponent) {
    return JSON.stringify(exports.GetAllCourseComponentsCourseComponentCourseComponent$outboundSchema.parse(getAllCourseComponentsCourseComponentCourseComponent));
}
function getAllCourseComponentsCourseComponentCourseComponentFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetAllCourseComponentsCourseComponentCourseComponent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllCourseComponentsCourseComponentCourseComponent' from JSON`);
}
/** @internal */
exports.GetAllCourseComponentsParent$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.GetAllCourseComponentsParent$outboundSchema = z.object({
    sourcedId: z.string(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var GetAllCourseComponentsParent$;
(function (GetAllCourseComponentsParent$) {
    /** @deprecated use `GetAllCourseComponentsParent$inboundSchema` instead. */
    GetAllCourseComponentsParent$.inboundSchema = exports.GetAllCourseComponentsParent$inboundSchema;
    /** @deprecated use `GetAllCourseComponentsParent$outboundSchema` instead. */
    GetAllCourseComponentsParent$.outboundSchema = exports.GetAllCourseComponentsParent$outboundSchema;
})(GetAllCourseComponentsParent$ || (exports.GetAllCourseComponentsParent$ = GetAllCourseComponentsParent$ = {}));
function getAllCourseComponentsParentToJSON(getAllCourseComponentsParent) {
    return JSON.stringify(exports.GetAllCourseComponentsParent$outboundSchema.parse(getAllCourseComponentsParent));
}
function getAllCourseComponentsParentFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetAllCourseComponentsParent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllCourseComponentsParent' from JSON`);
}
/** @internal */
exports.GetAllCourseComponentsCourseComponent$inboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: exports.GetAllCourseComponentsStatus$inboundSchema,
    dateLastModified: z.string().datetime({ offset: true }).transform(v => new Date(v)).optional(),
    metadata: z.nullable(z.record(z.any())).optional(),
    course: z.lazy(() => exports.GetAllCourseComponentsCourse$inboundSchema),
    courseComponent: z.nullable(z.lazy(() => exports.GetAllCourseComponentsCourseComponentCourseComponent$inboundSchema)).optional(),
    parent: z.nullable(z.lazy(() => exports.GetAllCourseComponentsParent$inboundSchema))
        .optional(),
    title: z.string(),
    sortOrder: z.number(),
    prerequisites: z.nullable(z.array(z.string())).optional(),
    prerequisiteCriteria: z.nullable(z.string()).optional(),
    unlockDate: z.string(),
});
/** @internal */
exports.GetAllCourseComponentsCourseComponent$outboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: exports.GetAllCourseComponentsStatus$outboundSchema,
    dateLastModified: z.date().transform(v => v.toISOString()).optional(),
    metadata: z.nullable(z.record(z.any())).optional(),
    course: z.lazy(() => exports.GetAllCourseComponentsCourse$outboundSchema),
    courseComponent: z.nullable(z.lazy(() => exports.GetAllCourseComponentsCourseComponentCourseComponent$outboundSchema)).optional(),
    parent: z.nullable(z.lazy(() => exports.GetAllCourseComponentsParent$outboundSchema))
        .optional(),
    title: z.string(),
    sortOrder: z.number(),
    prerequisites: z.nullable(z.array(z.string())).optional(),
    prerequisiteCriteria: z.nullable(z.string()).optional(),
    unlockDate: z.string(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var GetAllCourseComponentsCourseComponent$;
(function (GetAllCourseComponentsCourseComponent$) {
    /** @deprecated use `GetAllCourseComponentsCourseComponent$inboundSchema` instead. */
    GetAllCourseComponentsCourseComponent$.inboundSchema = exports.GetAllCourseComponentsCourseComponent$inboundSchema;
    /** @deprecated use `GetAllCourseComponentsCourseComponent$outboundSchema` instead. */
    GetAllCourseComponentsCourseComponent$.outboundSchema = exports.GetAllCourseComponentsCourseComponent$outboundSchema;
})(GetAllCourseComponentsCourseComponent$ || (exports.GetAllCourseComponentsCourseComponent$ = GetAllCourseComponentsCourseComponent$ = {}));
function getAllCourseComponentsCourseComponentToJSON(getAllCourseComponentsCourseComponent) {
    return JSON.stringify(exports.GetAllCourseComponentsCourseComponent$outboundSchema.parse(getAllCourseComponentsCourseComponent));
}
function getAllCourseComponentsCourseComponentFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetAllCourseComponentsCourseComponent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllCourseComponentsCourseComponent' from JSON`);
}
/** @internal */
exports.GetAllCourseComponentsResponseBody$inboundSchema = z.object({
    courseComponents: z.array(z.lazy(() => exports.GetAllCourseComponentsCourseComponent$inboundSchema)),
    totalCount: z.number(),
    pageCount: z.number(),
    pageNumber: z.number(),
    offset: z.number(),
    limit: z.number(),
});
/** @internal */
exports.GetAllCourseComponentsResponseBody$outboundSchema = z.object({
    courseComponents: z.array(z.lazy(() => exports.GetAllCourseComponentsCourseComponent$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 GetAllCourseComponentsResponseBody$;
(function (GetAllCourseComponentsResponseBody$) {
    /** @deprecated use `GetAllCourseComponentsResponseBody$inboundSchema` instead. */
    GetAllCourseComponentsResponseBody$.inboundSchema = exports.GetAllCourseComponentsResponseBody$inboundSchema;
    /** @deprecated use `GetAllCourseComponentsResponseBody$outboundSchema` instead. */
    GetAllCourseComponentsResponseBody$.outboundSchema = exports.GetAllCourseComponentsResponseBody$outboundSchema;
})(GetAllCourseComponentsResponseBody$ || (exports.GetAllCourseComponentsResponseBody$ = GetAllCourseComponentsResponseBody$ = {}));
function getAllCourseComponentsResponseBodyToJSON(getAllCourseComponentsResponseBody) {
    return JSON.stringify(exports.GetAllCourseComponentsResponseBody$outboundSchema.parse(getAllCourseComponentsResponseBody));
}
function getAllCourseComponentsResponseBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetAllCourseComponentsResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllCourseComponentsResponseBody' from JSON`);
}
/** @internal */
exports.GetAllCourseComponentsResponse$inboundSchema = z.object({
    Result: z.lazy(() => exports.GetAllCourseComponentsResponseBody$inboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "Result": "result",
    });
});
/** @internal */
exports.GetAllCourseComponentsResponse$outboundSchema = z.object({
    result: z.lazy(() => exports.GetAllCourseComponentsResponseBody$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 GetAllCourseComponentsResponse$;
(function (GetAllCourseComponentsResponse$) {
    /** @deprecated use `GetAllCourseComponentsResponse$inboundSchema` instead. */
    GetAllCourseComponentsResponse$.inboundSchema = exports.GetAllCourseComponentsResponse$inboundSchema;
    /** @deprecated use `GetAllCourseComponentsResponse$outboundSchema` instead. */
    GetAllCourseComponentsResponse$.outboundSchema = exports.GetAllCourseComponentsResponse$outboundSchema;
})(GetAllCourseComponentsResponse$ || (exports.GetAllCourseComponentsResponse$ = GetAllCourseComponentsResponse$ = {}));
function getAllCourseComponentsResponseToJSON(getAllCourseComponentsResponse) {
    return JSON.stringify(exports.GetAllCourseComponentsResponse$outboundSchema.parse(getAllCourseComponentsResponse));
}
function getAllCourseComponentsResponseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetAllCourseComponentsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllCourseComponentsResponse' from JSON`);
}
//# sourceMappingURL=getallcoursecomponents.js.map