/*
 * 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 PutComponentResourceStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
/** @internal */
export const PutComponentResourceStatus$inboundSchema = z.nativeEnum(PutComponentResourceStatus);
/** @internal */
export const PutComponentResourceStatus$outboundSchema = PutComponentResourceStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var PutComponentResourceStatus$;
(function (PutComponentResourceStatus$) {
    /** @deprecated use `PutComponentResourceStatus$inboundSchema` instead. */
    PutComponentResourceStatus$.inboundSchema = PutComponentResourceStatus$inboundSchema;
    /** @deprecated use `PutComponentResourceStatus$outboundSchema` instead. */
    PutComponentResourceStatus$.outboundSchema = PutComponentResourceStatus$outboundSchema;
})(PutComponentResourceStatus$ || (PutComponentResourceStatus$ = {}));
/** @internal */
export const PutComponentResourceCourseComponent$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const PutComponentResourceCourseComponent$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 PutComponentResourceCourseComponent$;
(function (PutComponentResourceCourseComponent$) {
    /** @deprecated use `PutComponentResourceCourseComponent$inboundSchema` instead. */
    PutComponentResourceCourseComponent$.inboundSchema = PutComponentResourceCourseComponent$inboundSchema;
    /** @deprecated use `PutComponentResourceCourseComponent$outboundSchema` instead. */
    PutComponentResourceCourseComponent$.outboundSchema = PutComponentResourceCourseComponent$outboundSchema;
})(PutComponentResourceCourseComponent$ || (PutComponentResourceCourseComponent$ = {}));
export function putComponentResourceCourseComponentToJSON(putComponentResourceCourseComponent) {
    return JSON.stringify(PutComponentResourceCourseComponent$outboundSchema.parse(putComponentResourceCourseComponent));
}
export function putComponentResourceCourseComponentFromJSON(jsonString) {
    return safeParse(jsonString, (x) => PutComponentResourceCourseComponent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PutComponentResourceCourseComponent' from JSON`);
}
/** @internal */
export const PutComponentResourceResource$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const PutComponentResourceResource$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 PutComponentResourceResource$;
(function (PutComponentResourceResource$) {
    /** @deprecated use `PutComponentResourceResource$inboundSchema` instead. */
    PutComponentResourceResource$.inboundSchema = PutComponentResourceResource$inboundSchema;
    /** @deprecated use `PutComponentResourceResource$outboundSchema` instead. */
    PutComponentResourceResource$.outboundSchema = PutComponentResourceResource$outboundSchema;
})(PutComponentResourceResource$ || (PutComponentResourceResource$ = {}));
export function putComponentResourceResourceToJSON(putComponentResourceResource) {
    return JSON.stringify(PutComponentResourceResource$outboundSchema.parse(putComponentResourceResource));
}
export function putComponentResourceResourceFromJSON(jsonString) {
    return safeParse(jsonString, (x) => PutComponentResourceResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PutComponentResourceResource' from JSON`);
}
/** @internal */
export const PutComponentResourceComponentResource$inboundSchema = z.object({
    sourcedId: z.string(),
    status: PutComponentResourceStatus$inboundSchema,
    dateLastModified: z.string().datetime({ offset: true }).transform(v => new Date(v)).optional(),
    metadata: z.nullable(z.record(z.any())).optional(),
    courseComponent: z.lazy(() => PutComponentResourceCourseComponent$inboundSchema),
    resource: z.lazy(() => PutComponentResourceResource$inboundSchema),
    title: z.string(),
    sortOrder: z.number().default(0),
});
/** @internal */
export const PutComponentResourceComponentResource$outboundSchema = z.object({
    sourcedId: z.string(),
    status: PutComponentResourceStatus$outboundSchema,
    dateLastModified: z.date().transform(v => v.toISOString()).optional(),
    metadata: z.nullable(z.record(z.any())).optional(),
    courseComponent: z.lazy(() => PutComponentResourceCourseComponent$outboundSchema),
    resource: z.lazy(() => PutComponentResourceResource$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 PutComponentResourceComponentResource$;
(function (PutComponentResourceComponentResource$) {
    /** @deprecated use `PutComponentResourceComponentResource$inboundSchema` instead. */
    PutComponentResourceComponentResource$.inboundSchema = PutComponentResourceComponentResource$inboundSchema;
    /** @deprecated use `PutComponentResourceComponentResource$outboundSchema` instead. */
    PutComponentResourceComponentResource$.outboundSchema = PutComponentResourceComponentResource$outboundSchema;
})(PutComponentResourceComponentResource$ || (PutComponentResourceComponentResource$ = {}));
export function putComponentResourceComponentResourceToJSON(putComponentResourceComponentResource) {
    return JSON.stringify(PutComponentResourceComponentResource$outboundSchema.parse(putComponentResourceComponentResource));
}
export function putComponentResourceComponentResourceFromJSON(jsonString) {
    return safeParse(jsonString, (x) => PutComponentResourceComponentResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PutComponentResourceComponentResource' from JSON`);
}
/** @internal */
export const PutComponentResourceRequestBody$inboundSchema = z.object({
    componentResource: z.lazy(() => PutComponentResourceComponentResource$inboundSchema),
});
/** @internal */
export const PutComponentResourceRequestBody$outboundSchema = z.object({
    componentResource: z.lazy(() => PutComponentResourceComponentResource$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var PutComponentResourceRequestBody$;
(function (PutComponentResourceRequestBody$) {
    /** @deprecated use `PutComponentResourceRequestBody$inboundSchema` instead. */
    PutComponentResourceRequestBody$.inboundSchema = PutComponentResourceRequestBody$inboundSchema;
    /** @deprecated use `PutComponentResourceRequestBody$outboundSchema` instead. */
    PutComponentResourceRequestBody$.outboundSchema = PutComponentResourceRequestBody$outboundSchema;
})(PutComponentResourceRequestBody$ || (PutComponentResourceRequestBody$ = {}));
export function putComponentResourceRequestBodyToJSON(putComponentResourceRequestBody) {
    return JSON.stringify(PutComponentResourceRequestBody$outboundSchema.parse(putComponentResourceRequestBody));
}
export function putComponentResourceRequestBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => PutComponentResourceRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PutComponentResourceRequestBody' from JSON`);
}
/** @internal */
export const PutComponentResourceRequest$inboundSchema = z.object({
    sourcedId: z.string(),
    RequestBody: z.lazy(() => PutComponentResourceRequestBody$inboundSchema)
        .optional(),
}).transform((v) => {
    return remap$(v, {
        "RequestBody": "requestBody",
    });
});
/** @internal */
export const PutComponentResourceRequest$outboundSchema = z.object({
    sourcedId: z.string(),
    requestBody: z.lazy(() => PutComponentResourceRequestBody$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 PutComponentResourceRequest$;
(function (PutComponentResourceRequest$) {
    /** @deprecated use `PutComponentResourceRequest$inboundSchema` instead. */
    PutComponentResourceRequest$.inboundSchema = PutComponentResourceRequest$inboundSchema;
    /** @deprecated use `PutComponentResourceRequest$outboundSchema` instead. */
    PutComponentResourceRequest$.outboundSchema = PutComponentResourceRequest$outboundSchema;
})(PutComponentResourceRequest$ || (PutComponentResourceRequest$ = {}));
export function putComponentResourceRequestToJSON(putComponentResourceRequest) {
    return JSON.stringify(PutComponentResourceRequest$outboundSchema.parse(putComponentResourceRequest));
}
export function putComponentResourceRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => PutComponentResourceRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PutComponentResourceRequest' from JSON`);
}
//# sourceMappingURL=putcomponentresource.js.map