/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../../lib/schemas.js";
export const GetCourseComponentStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
/** @internal */
export const GetCourseComponentRequest$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const GetCourseComponentRequest$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 GetCourseComponentRequest$;
(function (GetCourseComponentRequest$) {
    /** @deprecated use `GetCourseComponentRequest$inboundSchema` instead. */
    GetCourseComponentRequest$.inboundSchema = GetCourseComponentRequest$inboundSchema;
    /** @deprecated use `GetCourseComponentRequest$outboundSchema` instead. */
    GetCourseComponentRequest$.outboundSchema = GetCourseComponentRequest$outboundSchema;
})(GetCourseComponentRequest$ || (GetCourseComponentRequest$ = {}));
export function getCourseComponentRequestToJSON(getCourseComponentRequest) {
    return JSON.stringify(GetCourseComponentRequest$outboundSchema.parse(getCourseComponentRequest));
}
export function getCourseComponentRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetCourseComponentRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetCourseComponentRequest' from JSON`);
}
/** @internal */
export const GetCourseComponentStatus$inboundSchema = z.nativeEnum(GetCourseComponentStatus);
/** @internal */
export const GetCourseComponentStatus$outboundSchema = GetCourseComponentStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetCourseComponentStatus$;
(function (GetCourseComponentStatus$) {
    /** @deprecated use `GetCourseComponentStatus$inboundSchema` instead. */
    GetCourseComponentStatus$.inboundSchema = GetCourseComponentStatus$inboundSchema;
    /** @deprecated use `GetCourseComponentStatus$outboundSchema` instead. */
    GetCourseComponentStatus$.outboundSchema = GetCourseComponentStatus$outboundSchema;
})(GetCourseComponentStatus$ || (GetCourseComponentStatus$ = {}));
/** @internal */
export const GetCourseComponentCourse$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const GetCourseComponentCourse$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 GetCourseComponentCourse$;
(function (GetCourseComponentCourse$) {
    /** @deprecated use `GetCourseComponentCourse$inboundSchema` instead. */
    GetCourseComponentCourse$.inboundSchema = GetCourseComponentCourse$inboundSchema;
    /** @deprecated use `GetCourseComponentCourse$outboundSchema` instead. */
    GetCourseComponentCourse$.outboundSchema = GetCourseComponentCourse$outboundSchema;
})(GetCourseComponentCourse$ || (GetCourseComponentCourse$ = {}));
export function getCourseComponentCourseToJSON(getCourseComponentCourse) {
    return JSON.stringify(GetCourseComponentCourse$outboundSchema.parse(getCourseComponentCourse));
}
export function getCourseComponentCourseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetCourseComponentCourse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetCourseComponentCourse' from JSON`);
}
/** @internal */
export const GetCourseComponentCourseComponentCourseComponent$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const GetCourseComponentCourseComponentCourseComponent$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 GetCourseComponentCourseComponentCourseComponent$;
(function (GetCourseComponentCourseComponentCourseComponent$) {
    /** @deprecated use `GetCourseComponentCourseComponentCourseComponent$inboundSchema` instead. */
    GetCourseComponentCourseComponentCourseComponent$.inboundSchema = GetCourseComponentCourseComponentCourseComponent$inboundSchema;
    /** @deprecated use `GetCourseComponentCourseComponentCourseComponent$outboundSchema` instead. */
    GetCourseComponentCourseComponentCourseComponent$.outboundSchema = GetCourseComponentCourseComponentCourseComponent$outboundSchema;
})(GetCourseComponentCourseComponentCourseComponent$ || (GetCourseComponentCourseComponentCourseComponent$ = {}));
export function getCourseComponentCourseComponentCourseComponentToJSON(getCourseComponentCourseComponentCourseComponent) {
    return JSON.stringify(GetCourseComponentCourseComponentCourseComponent$outboundSchema.parse(getCourseComponentCourseComponentCourseComponent));
}
export function getCourseComponentCourseComponentCourseComponentFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetCourseComponentCourseComponentCourseComponent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetCourseComponentCourseComponentCourseComponent' from JSON`);
}
/** @internal */
export const GetCourseComponentParent$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const GetCourseComponentParent$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 GetCourseComponentParent$;
(function (GetCourseComponentParent$) {
    /** @deprecated use `GetCourseComponentParent$inboundSchema` instead. */
    GetCourseComponentParent$.inboundSchema = GetCourseComponentParent$inboundSchema;
    /** @deprecated use `GetCourseComponentParent$outboundSchema` instead. */
    GetCourseComponentParent$.outboundSchema = GetCourseComponentParent$outboundSchema;
})(GetCourseComponentParent$ || (GetCourseComponentParent$ = {}));
export function getCourseComponentParentToJSON(getCourseComponentParent) {
    return JSON.stringify(GetCourseComponentParent$outboundSchema.parse(getCourseComponentParent));
}
export function getCourseComponentParentFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetCourseComponentParent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetCourseComponentParent' from JSON`);
}
/** @internal */
export const GetCourseComponentCourseComponent$inboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: GetCourseComponentStatus$inboundSchema,
    dateLastModified: z.string().datetime({ offset: true }).transform(v => new Date(v)).optional(),
    metadata: z.nullable(z.record(z.any())).optional(),
    course: z.lazy(() => GetCourseComponentCourse$inboundSchema),
    courseComponent: z.nullable(z.lazy(() => GetCourseComponentCourseComponentCourseComponent$inboundSchema)).optional(),
    parent: z.nullable(z.lazy(() => GetCourseComponentParent$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 GetCourseComponentCourseComponent$outboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: GetCourseComponentStatus$outboundSchema,
    dateLastModified: z.date().transform(v => v.toISOString()).optional(),
    metadata: z.nullable(z.record(z.any())).optional(),
    course: z.lazy(() => GetCourseComponentCourse$outboundSchema),
    courseComponent: z.nullable(z.lazy(() => GetCourseComponentCourseComponentCourseComponent$outboundSchema)).optional(),
    parent: z.nullable(z.lazy(() => GetCourseComponentParent$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 GetCourseComponentCourseComponent$;
(function (GetCourseComponentCourseComponent$) {
    /** @deprecated use `GetCourseComponentCourseComponent$inboundSchema` instead. */
    GetCourseComponentCourseComponent$.inboundSchema = GetCourseComponentCourseComponent$inboundSchema;
    /** @deprecated use `GetCourseComponentCourseComponent$outboundSchema` instead. */
    GetCourseComponentCourseComponent$.outboundSchema = GetCourseComponentCourseComponent$outboundSchema;
})(GetCourseComponentCourseComponent$ || (GetCourseComponentCourseComponent$ = {}));
export function getCourseComponentCourseComponentToJSON(getCourseComponentCourseComponent) {
    return JSON.stringify(GetCourseComponentCourseComponent$outboundSchema.parse(getCourseComponentCourseComponent));
}
export function getCourseComponentCourseComponentFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetCourseComponentCourseComponent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetCourseComponentCourseComponent' from JSON`);
}
/** @internal */
export const GetCourseComponentResponse$inboundSchema = z.object({
    courseComponent: z.lazy(() => GetCourseComponentCourseComponent$inboundSchema),
});
/** @internal */
export const GetCourseComponentResponse$outboundSchema = z.object({
    courseComponent: z.lazy(() => GetCourseComponentCourseComponent$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetCourseComponentResponse$;
(function (GetCourseComponentResponse$) {
    /** @deprecated use `GetCourseComponentResponse$inboundSchema` instead. */
    GetCourseComponentResponse$.inboundSchema = GetCourseComponentResponse$inboundSchema;
    /** @deprecated use `GetCourseComponentResponse$outboundSchema` instead. */
    GetCourseComponentResponse$.outboundSchema = GetCourseComponentResponse$outboundSchema;
})(GetCourseComponentResponse$ || (GetCourseComponentResponse$ = {}));
export function getCourseComponentResponseToJSON(getCourseComponentResponse) {
    return JSON.stringify(GetCourseComponentResponse$outboundSchema.parse(getCourseComponentResponse));
}
export function getCourseComponentResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetCourseComponentResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetCourseComponentResponse' from JSON`);
}
//# sourceMappingURL=getcoursecomponent.js.map