/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../../lib/schemas.js";
export const CreateComponentResourceStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
/** @internal */
export const CreateComponentResourceStatus$inboundSchema = z.nativeEnum(CreateComponentResourceStatus);
/** @internal */
export const CreateComponentResourceStatus$outboundSchema = CreateComponentResourceStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateComponentResourceStatus$;
(function (CreateComponentResourceStatus$) {
    /** @deprecated use `CreateComponentResourceStatus$inboundSchema` instead. */
    CreateComponentResourceStatus$.inboundSchema = CreateComponentResourceStatus$inboundSchema;
    /** @deprecated use `CreateComponentResourceStatus$outboundSchema` instead. */
    CreateComponentResourceStatus$.outboundSchema = CreateComponentResourceStatus$outboundSchema;
})(CreateComponentResourceStatus$ || (CreateComponentResourceStatus$ = {}));
/** @internal */
export const CreateComponentResourceCourseComponent$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const CreateComponentResourceCourseComponent$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 CreateComponentResourceCourseComponent$;
(function (CreateComponentResourceCourseComponent$) {
    /** @deprecated use `CreateComponentResourceCourseComponent$inboundSchema` instead. */
    CreateComponentResourceCourseComponent$.inboundSchema = CreateComponentResourceCourseComponent$inboundSchema;
    /** @deprecated use `CreateComponentResourceCourseComponent$outboundSchema` instead. */
    CreateComponentResourceCourseComponent$.outboundSchema = CreateComponentResourceCourseComponent$outboundSchema;
})(CreateComponentResourceCourseComponent$ || (CreateComponentResourceCourseComponent$ = {}));
export function createComponentResourceCourseComponentToJSON(createComponentResourceCourseComponent) {
    return JSON.stringify(CreateComponentResourceCourseComponent$outboundSchema.parse(createComponentResourceCourseComponent));
}
export function createComponentResourceCourseComponentFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateComponentResourceCourseComponent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateComponentResourceCourseComponent' from JSON`);
}
/** @internal */
export const CreateComponentResourceResource$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const CreateComponentResourceResource$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 CreateComponentResourceResource$;
(function (CreateComponentResourceResource$) {
    /** @deprecated use `CreateComponentResourceResource$inboundSchema` instead. */
    CreateComponentResourceResource$.inboundSchema = CreateComponentResourceResource$inboundSchema;
    /** @deprecated use `CreateComponentResourceResource$outboundSchema` instead. */
    CreateComponentResourceResource$.outboundSchema = CreateComponentResourceResource$outboundSchema;
})(CreateComponentResourceResource$ || (CreateComponentResourceResource$ = {}));
export function createComponentResourceResourceToJSON(createComponentResourceResource) {
    return JSON.stringify(CreateComponentResourceResource$outboundSchema.parse(createComponentResourceResource));
}
export function createComponentResourceResourceFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateComponentResourceResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateComponentResourceResource' from JSON`);
}
/** @internal */
export const CreateComponentResourceComponentResource$inboundSchema = z.object({
    sourcedId: z.string(),
    status: CreateComponentResourceStatus$inboundSchema,
    dateLastModified: z.string().datetime({ offset: true }).transform(v => new Date(v)).optional(),
    metadata: z.nullable(z.record(z.any())).optional(),
    courseComponent: z.lazy(() => CreateComponentResourceCourseComponent$inboundSchema),
    resource: z.lazy(() => CreateComponentResourceResource$inboundSchema),
    title: z.string(),
    sortOrder: z.number().default(0),
});
/** @internal */
export const CreateComponentResourceComponentResource$outboundSchema = z.object({
    sourcedId: z.string(),
    status: CreateComponentResourceStatus$outboundSchema,
    dateLastModified: z.date().transform(v => v.toISOString()).optional(),
    metadata: z.nullable(z.record(z.any())).optional(),
    courseComponent: z.lazy(() => CreateComponentResourceCourseComponent$outboundSchema),
    resource: z.lazy(() => CreateComponentResourceResource$outboundSchema),
    title: z.string(),
    sortOrder: z.number().default(0),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateComponentResourceComponentResource$;
(function (CreateComponentResourceComponentResource$) {
    /** @deprecated use `CreateComponentResourceComponentResource$inboundSchema` instead. */
    CreateComponentResourceComponentResource$.inboundSchema = CreateComponentResourceComponentResource$inboundSchema;
    /** @deprecated use `CreateComponentResourceComponentResource$outboundSchema` instead. */
    CreateComponentResourceComponentResource$.outboundSchema = CreateComponentResourceComponentResource$outboundSchema;
})(CreateComponentResourceComponentResource$ || (CreateComponentResourceComponentResource$ = {}));
export function createComponentResourceComponentResourceToJSON(createComponentResourceComponentResource) {
    return JSON.stringify(CreateComponentResourceComponentResource$outboundSchema.parse(createComponentResourceComponentResource));
}
export function createComponentResourceComponentResourceFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateComponentResourceComponentResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateComponentResourceComponentResource' from JSON`);
}
/** @internal */
export const CreateComponentResourceRequest$inboundSchema = z.object({
    componentResource: z.lazy(() => CreateComponentResourceComponentResource$inboundSchema),
});
/** @internal */
export const CreateComponentResourceRequest$outboundSchema = z.object({
    componentResource: z.lazy(() => CreateComponentResourceComponentResource$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateComponentResourceRequest$;
(function (CreateComponentResourceRequest$) {
    /** @deprecated use `CreateComponentResourceRequest$inboundSchema` instead. */
    CreateComponentResourceRequest$.inboundSchema = CreateComponentResourceRequest$inboundSchema;
    /** @deprecated use `CreateComponentResourceRequest$outboundSchema` instead. */
    CreateComponentResourceRequest$.outboundSchema = CreateComponentResourceRequest$outboundSchema;
})(CreateComponentResourceRequest$ || (CreateComponentResourceRequest$ = {}));
export function createComponentResourceRequestToJSON(createComponentResourceRequest) {
    return JSON.stringify(CreateComponentResourceRequest$outboundSchema.parse(createComponentResourceRequest));
}
export function createComponentResourceRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateComponentResourceRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateComponentResourceRequest' from JSON`);
}
/** @internal */
export const CreateComponentResourceSourcedIdPairs$inboundSchema = z.object({
    suppliedSourcedId: z.string(),
    allocatedSourcedId: z.string(),
});
/** @internal */
export const CreateComponentResourceSourcedIdPairs$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 CreateComponentResourceSourcedIdPairs$;
(function (CreateComponentResourceSourcedIdPairs$) {
    /** @deprecated use `CreateComponentResourceSourcedIdPairs$inboundSchema` instead. */
    CreateComponentResourceSourcedIdPairs$.inboundSchema = CreateComponentResourceSourcedIdPairs$inboundSchema;
    /** @deprecated use `CreateComponentResourceSourcedIdPairs$outboundSchema` instead. */
    CreateComponentResourceSourcedIdPairs$.outboundSchema = CreateComponentResourceSourcedIdPairs$outboundSchema;
})(CreateComponentResourceSourcedIdPairs$ || (CreateComponentResourceSourcedIdPairs$ = {}));
export function createComponentResourceSourcedIdPairsToJSON(createComponentResourceSourcedIdPairs) {
    return JSON.stringify(CreateComponentResourceSourcedIdPairs$outboundSchema.parse(createComponentResourceSourcedIdPairs));
}
export function createComponentResourceSourcedIdPairsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateComponentResourceSourcedIdPairs$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateComponentResourceSourcedIdPairs' from JSON`);
}
/** @internal */
export const CreateComponentResourceResponse$inboundSchema = z.object({
    sourcedIdPairs: z.lazy(() => CreateComponentResourceSourcedIdPairs$inboundSchema),
});
/** @internal */
export const CreateComponentResourceResponse$outboundSchema = z.object({
    sourcedIdPairs: z.lazy(() => CreateComponentResourceSourcedIdPairs$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateComponentResourceResponse$;
(function (CreateComponentResourceResponse$) {
    /** @deprecated use `CreateComponentResourceResponse$inboundSchema` instead. */
    CreateComponentResourceResponse$.inboundSchema = CreateComponentResourceResponse$inboundSchema;
    /** @deprecated use `CreateComponentResourceResponse$outboundSchema` instead. */
    CreateComponentResourceResponse$.outboundSchema = CreateComponentResourceResponse$outboundSchema;
})(CreateComponentResourceResponse$ || (CreateComponentResourceResponse$ = {}));
export function createComponentResourceResponseToJSON(createComponentResourceResponse) {
    return JSON.stringify(CreateComponentResourceResponse$outboundSchema.parse(createComponentResourceResponse));
}
export function createComponentResourceResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateComponentResourceResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateComponentResourceResponse' from JSON`);
}
//# sourceMappingURL=createcomponentresource.js.map