/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../../lib/schemas.js";
export const CreateCourseComponentStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
/** @internal */
export const CreateCourseComponentStatus$inboundSchema = z.nativeEnum(CreateCourseComponentStatus);
/** @internal */
export const CreateCourseComponentStatus$outboundSchema = CreateCourseComponentStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateCourseComponentStatus$;
(function (CreateCourseComponentStatus$) {
    /** @deprecated use `CreateCourseComponentStatus$inboundSchema` instead. */
    CreateCourseComponentStatus$.inboundSchema = CreateCourseComponentStatus$inboundSchema;
    /** @deprecated use `CreateCourseComponentStatus$outboundSchema` instead. */
    CreateCourseComponentStatus$.outboundSchema = CreateCourseComponentStatus$outboundSchema;
})(CreateCourseComponentStatus$ || (CreateCourseComponentStatus$ = {}));
/** @internal */
export const CreateCourseComponentCourse$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const CreateCourseComponentCourse$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 CreateCourseComponentCourse$;
(function (CreateCourseComponentCourse$) {
    /** @deprecated use `CreateCourseComponentCourse$inboundSchema` instead. */
    CreateCourseComponentCourse$.inboundSchema = CreateCourseComponentCourse$inboundSchema;
    /** @deprecated use `CreateCourseComponentCourse$outboundSchema` instead. */
    CreateCourseComponentCourse$.outboundSchema = CreateCourseComponentCourse$outboundSchema;
})(CreateCourseComponentCourse$ || (CreateCourseComponentCourse$ = {}));
export function createCourseComponentCourseToJSON(createCourseComponentCourse) {
    return JSON.stringify(CreateCourseComponentCourse$outboundSchema.parse(createCourseComponentCourse));
}
export function createCourseComponentCourseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateCourseComponentCourse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateCourseComponentCourse' from JSON`);
}
/** @internal */
export const CreateCourseComponentCourseComponent2$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const CreateCourseComponentCourseComponent2$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 CreateCourseComponentCourseComponent2$;
(function (CreateCourseComponentCourseComponent2$) {
    /** @deprecated use `CreateCourseComponentCourseComponent2$inboundSchema` instead. */
    CreateCourseComponentCourseComponent2$.inboundSchema = CreateCourseComponentCourseComponent2$inboundSchema;
    /** @deprecated use `CreateCourseComponentCourseComponent2$outboundSchema` instead. */
    CreateCourseComponentCourseComponent2$.outboundSchema = CreateCourseComponentCourseComponent2$outboundSchema;
})(CreateCourseComponentCourseComponent2$ || (CreateCourseComponentCourseComponent2$ = {}));
export function createCourseComponentCourseComponent2ToJSON(createCourseComponentCourseComponent2) {
    return JSON.stringify(CreateCourseComponentCourseComponent2$outboundSchema.parse(createCourseComponentCourseComponent2));
}
export function createCourseComponentCourseComponent2FromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateCourseComponentCourseComponent2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateCourseComponentCourseComponent2' from JSON`);
}
/** @internal */
export const CreateCourseComponentParent$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const CreateCourseComponentParent$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 CreateCourseComponentParent$;
(function (CreateCourseComponentParent$) {
    /** @deprecated use `CreateCourseComponentParent$inboundSchema` instead. */
    CreateCourseComponentParent$.inboundSchema = CreateCourseComponentParent$inboundSchema;
    /** @deprecated use `CreateCourseComponentParent$outboundSchema` instead. */
    CreateCourseComponentParent$.outboundSchema = CreateCourseComponentParent$outboundSchema;
})(CreateCourseComponentParent$ || (CreateCourseComponentParent$ = {}));
export function createCourseComponentParentToJSON(createCourseComponentParent) {
    return JSON.stringify(CreateCourseComponentParent$outboundSchema.parse(createCourseComponentParent));
}
export function createCourseComponentParentFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateCourseComponentParent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateCourseComponentParent' from JSON`);
}
/** @internal */
export const CreateCourseComponentCourseComponent1$inboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: CreateCourseComponentStatus$inboundSchema,
    dateLastModified: z.string().datetime({ offset: true }).transform(v => new Date(v)).optional(),
    metadata: z.nullable(z.record(z.any())).optional(),
    course: z.lazy(() => CreateCourseComponentCourse$inboundSchema),
    courseComponent: z.nullable(z.lazy(() => CreateCourseComponentCourseComponent2$inboundSchema)).optional(),
    parent: z.nullable(z.lazy(() => CreateCourseComponentParent$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 CreateCourseComponentCourseComponent1$outboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: CreateCourseComponentStatus$outboundSchema,
    dateLastModified: z.date().transform(v => v.toISOString()).optional(),
    metadata: z.nullable(z.record(z.any())).optional(),
    course: z.lazy(() => CreateCourseComponentCourse$outboundSchema),
    courseComponent: z.nullable(z.lazy(() => CreateCourseComponentCourseComponent2$outboundSchema)).optional(),
    parent: z.nullable(z.lazy(() => CreateCourseComponentParent$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 CreateCourseComponentCourseComponent1$;
(function (CreateCourseComponentCourseComponent1$) {
    /** @deprecated use `CreateCourseComponentCourseComponent1$inboundSchema` instead. */
    CreateCourseComponentCourseComponent1$.inboundSchema = CreateCourseComponentCourseComponent1$inboundSchema;
    /** @deprecated use `CreateCourseComponentCourseComponent1$outboundSchema` instead. */
    CreateCourseComponentCourseComponent1$.outboundSchema = CreateCourseComponentCourseComponent1$outboundSchema;
})(CreateCourseComponentCourseComponent1$ || (CreateCourseComponentCourseComponent1$ = {}));
export function createCourseComponentCourseComponent1ToJSON(createCourseComponentCourseComponent1) {
    return JSON.stringify(CreateCourseComponentCourseComponent1$outboundSchema.parse(createCourseComponentCourseComponent1));
}
export function createCourseComponentCourseComponent1FromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateCourseComponentCourseComponent1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateCourseComponentCourseComponent1' from JSON`);
}
/** @internal */
export const CreateCourseComponentRequest$inboundSchema = z.object({
    courseComponent: z.lazy(() => CreateCourseComponentCourseComponent1$inboundSchema),
});
/** @internal */
export const CreateCourseComponentRequest$outboundSchema = z.object({
    courseComponent: z.lazy(() => CreateCourseComponentCourseComponent1$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateCourseComponentRequest$;
(function (CreateCourseComponentRequest$) {
    /** @deprecated use `CreateCourseComponentRequest$inboundSchema` instead. */
    CreateCourseComponentRequest$.inboundSchema = CreateCourseComponentRequest$inboundSchema;
    /** @deprecated use `CreateCourseComponentRequest$outboundSchema` instead. */
    CreateCourseComponentRequest$.outboundSchema = CreateCourseComponentRequest$outboundSchema;
})(CreateCourseComponentRequest$ || (CreateCourseComponentRequest$ = {}));
export function createCourseComponentRequestToJSON(createCourseComponentRequest) {
    return JSON.stringify(CreateCourseComponentRequest$outboundSchema.parse(createCourseComponentRequest));
}
export function createCourseComponentRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateCourseComponentRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateCourseComponentRequest' from JSON`);
}
/** @internal */
export const CreateCourseComponentSourcedIdPairs$inboundSchema = z.object({
    suppliedSourcedId: z.string(),
    allocatedSourcedId: z.string(),
});
/** @internal */
export const CreateCourseComponentSourcedIdPairs$outboundSchema = z.object({
    suppliedSourcedId: z.string(),
    allocatedSourcedId: 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 CreateCourseComponentSourcedIdPairs$;
(function (CreateCourseComponentSourcedIdPairs$) {
    /** @deprecated use `CreateCourseComponentSourcedIdPairs$inboundSchema` instead. */
    CreateCourseComponentSourcedIdPairs$.inboundSchema = CreateCourseComponentSourcedIdPairs$inboundSchema;
    /** @deprecated use `CreateCourseComponentSourcedIdPairs$outboundSchema` instead. */
    CreateCourseComponentSourcedIdPairs$.outboundSchema = CreateCourseComponentSourcedIdPairs$outboundSchema;
})(CreateCourseComponentSourcedIdPairs$ || (CreateCourseComponentSourcedIdPairs$ = {}));
export function createCourseComponentSourcedIdPairsToJSON(createCourseComponentSourcedIdPairs) {
    return JSON.stringify(CreateCourseComponentSourcedIdPairs$outboundSchema.parse(createCourseComponentSourcedIdPairs));
}
export function createCourseComponentSourcedIdPairsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateCourseComponentSourcedIdPairs$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateCourseComponentSourcedIdPairs' from JSON`);
}
/** @internal */
export const CreateCourseComponentResponse$inboundSchema = z.object({
    sourcedIdPairs: z.lazy(() => CreateCourseComponentSourcedIdPairs$inboundSchema),
});
/** @internal */
export const CreateCourseComponentResponse$outboundSchema = z.object({
    sourcedIdPairs: z.lazy(() => CreateCourseComponentSourcedIdPairs$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateCourseComponentResponse$;
(function (CreateCourseComponentResponse$) {
    /** @deprecated use `CreateCourseComponentResponse$inboundSchema` instead. */
    CreateCourseComponentResponse$.inboundSchema = CreateCourseComponentResponse$inboundSchema;
    /** @deprecated use `CreateCourseComponentResponse$outboundSchema` instead. */
    CreateCourseComponentResponse$.outboundSchema = CreateCourseComponentResponse$outboundSchema;
})(CreateCourseComponentResponse$ || (CreateCourseComponentResponse$ = {}));
export function createCourseComponentResponseToJSON(createCourseComponentResponse) {
    return JSON.stringify(CreateCourseComponentResponse$outboundSchema.parse(createCourseComponentResponse));
}
export function createCourseComponentResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateCourseComponentResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateCourseComponentResponse' from JSON`);
}
//# sourceMappingURL=createcoursecomponent.js.map