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