/*
 * 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";
export const PutCourseComponentStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
/** @internal */
export const PutCourseComponentStatus$inboundSchema = z.nativeEnum(PutCourseComponentStatus);
/** @internal */
export const PutCourseComponentStatus$outboundSchema = PutCourseComponentStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var PutCourseComponentStatus$;
(function (PutCourseComponentStatus$) {
    /** @deprecated use `PutCourseComponentStatus$inboundSchema` instead. */
    PutCourseComponentStatus$.inboundSchema = PutCourseComponentStatus$inboundSchema;
    /** @deprecated use `PutCourseComponentStatus$outboundSchema` instead. */
    PutCourseComponentStatus$.outboundSchema = PutCourseComponentStatus$outboundSchema;
})(PutCourseComponentStatus$ || (PutCourseComponentStatus$ = {}));
/** @internal */
export const PutCourseComponentCourse$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const PutCourseComponentCourse$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 PutCourseComponentCourse$;
(function (PutCourseComponentCourse$) {
    /** @deprecated use `PutCourseComponentCourse$inboundSchema` instead. */
    PutCourseComponentCourse$.inboundSchema = PutCourseComponentCourse$inboundSchema;
    /** @deprecated use `PutCourseComponentCourse$outboundSchema` instead. */
    PutCourseComponentCourse$.outboundSchema = PutCourseComponentCourse$outboundSchema;
})(PutCourseComponentCourse$ || (PutCourseComponentCourse$ = {}));
export function putCourseComponentCourseToJSON(putCourseComponentCourse) {
    return JSON.stringify(PutCourseComponentCourse$outboundSchema.parse(putCourseComponentCourse));
}
export function putCourseComponentCourseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => PutCourseComponentCourse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PutCourseComponentCourse' from JSON`);
}
/** @internal */
export const PutCourseComponentCourseComponent2$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const PutCourseComponentCourseComponent2$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 PutCourseComponentCourseComponent2$;
(function (PutCourseComponentCourseComponent2$) {
    /** @deprecated use `PutCourseComponentCourseComponent2$inboundSchema` instead. */
    PutCourseComponentCourseComponent2$.inboundSchema = PutCourseComponentCourseComponent2$inboundSchema;
    /** @deprecated use `PutCourseComponentCourseComponent2$outboundSchema` instead. */
    PutCourseComponentCourseComponent2$.outboundSchema = PutCourseComponentCourseComponent2$outboundSchema;
})(PutCourseComponentCourseComponent2$ || (PutCourseComponentCourseComponent2$ = {}));
export function putCourseComponentCourseComponent2ToJSON(putCourseComponentCourseComponent2) {
    return JSON.stringify(PutCourseComponentCourseComponent2$outboundSchema.parse(putCourseComponentCourseComponent2));
}
export function putCourseComponentCourseComponent2FromJSON(jsonString) {
    return safeParse(jsonString, (x) => PutCourseComponentCourseComponent2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PutCourseComponentCourseComponent2' from JSON`);
}
/** @internal */
export const PutCourseComponentParent$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const PutCourseComponentParent$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 PutCourseComponentParent$;
(function (PutCourseComponentParent$) {
    /** @deprecated use `PutCourseComponentParent$inboundSchema` instead. */
    PutCourseComponentParent$.inboundSchema = PutCourseComponentParent$inboundSchema;
    /** @deprecated use `PutCourseComponentParent$outboundSchema` instead. */
    PutCourseComponentParent$.outboundSchema = PutCourseComponentParent$outboundSchema;
})(PutCourseComponentParent$ || (PutCourseComponentParent$ = {}));
export function putCourseComponentParentToJSON(putCourseComponentParent) {
    return JSON.stringify(PutCourseComponentParent$outboundSchema.parse(putCourseComponentParent));
}
export function putCourseComponentParentFromJSON(jsonString) {
    return safeParse(jsonString, (x) => PutCourseComponentParent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PutCourseComponentParent' from JSON`);
}
/** @internal */
export const PutCourseComponentCourseComponent1$inboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: PutCourseComponentStatus$inboundSchema,
    dateLastModified: z.string().datetime({ offset: true }).transform(v => new Date(v)).optional(),
    metadata: z.nullable(z.record(z.any())).optional(),
    course: z.lazy(() => PutCourseComponentCourse$inboundSchema),
    courseComponent: z.nullable(z.lazy(() => PutCourseComponentCourseComponent2$inboundSchema)).optional(),
    parent: z.nullable(z.lazy(() => PutCourseComponentParent$inboundSchema))
        .optional(),
    title: z.string(),
    sortOrder: z.number().optional(),
    prerequisites: z.nullable(z.array(z.string())).optional(),
    prerequisiteCriteria: z.nullable(z.string()).optional(),
    unlockDate: z.string().optional(),
});
/** @internal */
export const PutCourseComponentCourseComponent1$outboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: PutCourseComponentStatus$outboundSchema,
    dateLastModified: z.date().transform(v => v.toISOString()).optional(),
    metadata: z.nullable(z.record(z.any())).optional(),
    course: z.lazy(() => PutCourseComponentCourse$outboundSchema),
    courseComponent: z.nullable(z.lazy(() => PutCourseComponentCourseComponent2$outboundSchema)).optional(),
    parent: z.nullable(z.lazy(() => PutCourseComponentParent$outboundSchema))
        .optional(),
    title: z.string(),
    sortOrder: z.number().optional(),
    prerequisites: z.nullable(z.array(z.string())).optional(),
    prerequisiteCriteria: z.nullable(z.string()).optional(),
    unlockDate: 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 PutCourseComponentCourseComponent1$;
(function (PutCourseComponentCourseComponent1$) {
    /** @deprecated use `PutCourseComponentCourseComponent1$inboundSchema` instead. */
    PutCourseComponentCourseComponent1$.inboundSchema = PutCourseComponentCourseComponent1$inboundSchema;
    /** @deprecated use `PutCourseComponentCourseComponent1$outboundSchema` instead. */
    PutCourseComponentCourseComponent1$.outboundSchema = PutCourseComponentCourseComponent1$outboundSchema;
})(PutCourseComponentCourseComponent1$ || (PutCourseComponentCourseComponent1$ = {}));
export function putCourseComponentCourseComponent1ToJSON(putCourseComponentCourseComponent1) {
    return JSON.stringify(PutCourseComponentCourseComponent1$outboundSchema.parse(putCourseComponentCourseComponent1));
}
export function putCourseComponentCourseComponent1FromJSON(jsonString) {
    return safeParse(jsonString, (x) => PutCourseComponentCourseComponent1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PutCourseComponentCourseComponent1' from JSON`);
}
/** @internal */
export const PutCourseComponentRequestBody$inboundSchema = z.object({
    courseComponent: z.lazy(() => PutCourseComponentCourseComponent1$inboundSchema),
});
/** @internal */
export const PutCourseComponentRequestBody$outboundSchema = z.object({
    courseComponent: z.lazy(() => PutCourseComponentCourseComponent1$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var PutCourseComponentRequestBody$;
(function (PutCourseComponentRequestBody$) {
    /** @deprecated use `PutCourseComponentRequestBody$inboundSchema` instead. */
    PutCourseComponentRequestBody$.inboundSchema = PutCourseComponentRequestBody$inboundSchema;
    /** @deprecated use `PutCourseComponentRequestBody$outboundSchema` instead. */
    PutCourseComponentRequestBody$.outboundSchema = PutCourseComponentRequestBody$outboundSchema;
})(PutCourseComponentRequestBody$ || (PutCourseComponentRequestBody$ = {}));
export function putCourseComponentRequestBodyToJSON(putCourseComponentRequestBody) {
    return JSON.stringify(PutCourseComponentRequestBody$outboundSchema.parse(putCourseComponentRequestBody));
}
export function putCourseComponentRequestBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => PutCourseComponentRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PutCourseComponentRequestBody' from JSON`);
}
/** @internal */
export const PutCourseComponentRequest$inboundSchema = z.object({
    sourcedId: z.string(),
    RequestBody: z.lazy(() => PutCourseComponentRequestBody$inboundSchema)
        .optional(),
}).transform((v) => {
    return remap$(v, {
        "RequestBody": "requestBody",
    });
});
/** @internal */
export const PutCourseComponentRequest$outboundSchema = z.object({
    sourcedId: z.string(),
    requestBody: z.lazy(() => PutCourseComponentRequestBody$outboundSchema)
        .optional(),
}).transform((v) => {
    return remap$(v, {
        requestBody: "RequestBody",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var PutCourseComponentRequest$;
(function (PutCourseComponentRequest$) {
    /** @deprecated use `PutCourseComponentRequest$inboundSchema` instead. */
    PutCourseComponentRequest$.inboundSchema = PutCourseComponentRequest$inboundSchema;
    /** @deprecated use `PutCourseComponentRequest$outboundSchema` instead. */
    PutCourseComponentRequest$.outboundSchema = PutCourseComponentRequest$outboundSchema;
})(PutCourseComponentRequest$ || (PutCourseComponentRequest$ = {}));
export function putCourseComponentRequestToJSON(putCourseComponentRequest) {
    return JSON.stringify(PutCourseComponentRequest$outboundSchema.parse(putCourseComponentRequest));
}
export function putCourseComponentRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => PutCourseComponentRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PutCourseComponentRequest' from JSON`);
}
//# sourceMappingURL=putcoursecomponent.js.map