/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../../lib/schemas.js";
export const GetComponentResourceStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
/** @internal */
export const GetComponentResourceRequest$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const GetComponentResourceRequest$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 GetComponentResourceRequest$;
(function (GetComponentResourceRequest$) {
    /** @deprecated use `GetComponentResourceRequest$inboundSchema` instead. */
    GetComponentResourceRequest$.inboundSchema = GetComponentResourceRequest$inboundSchema;
    /** @deprecated use `GetComponentResourceRequest$outboundSchema` instead. */
    GetComponentResourceRequest$.outboundSchema = GetComponentResourceRequest$outboundSchema;
})(GetComponentResourceRequest$ || (GetComponentResourceRequest$ = {}));
export function getComponentResourceRequestToJSON(getComponentResourceRequest) {
    return JSON.stringify(GetComponentResourceRequest$outboundSchema.parse(getComponentResourceRequest));
}
export function getComponentResourceRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetComponentResourceRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetComponentResourceRequest' from JSON`);
}
/** @internal */
export const GetComponentResourceStatus$inboundSchema = z.nativeEnum(GetComponentResourceStatus);
/** @internal */
export const GetComponentResourceStatus$outboundSchema = GetComponentResourceStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetComponentResourceStatus$;
(function (GetComponentResourceStatus$) {
    /** @deprecated use `GetComponentResourceStatus$inboundSchema` instead. */
    GetComponentResourceStatus$.inboundSchema = GetComponentResourceStatus$inboundSchema;
    /** @deprecated use `GetComponentResourceStatus$outboundSchema` instead. */
    GetComponentResourceStatus$.outboundSchema = GetComponentResourceStatus$outboundSchema;
})(GetComponentResourceStatus$ || (GetComponentResourceStatus$ = {}));
/** @internal */
export const GetComponentResourceCourseComponent$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const GetComponentResourceCourseComponent$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 GetComponentResourceCourseComponent$;
(function (GetComponentResourceCourseComponent$) {
    /** @deprecated use `GetComponentResourceCourseComponent$inboundSchema` instead. */
    GetComponentResourceCourseComponent$.inboundSchema = GetComponentResourceCourseComponent$inboundSchema;
    /** @deprecated use `GetComponentResourceCourseComponent$outboundSchema` instead. */
    GetComponentResourceCourseComponent$.outboundSchema = GetComponentResourceCourseComponent$outboundSchema;
})(GetComponentResourceCourseComponent$ || (GetComponentResourceCourseComponent$ = {}));
export function getComponentResourceCourseComponentToJSON(getComponentResourceCourseComponent) {
    return JSON.stringify(GetComponentResourceCourseComponent$outboundSchema.parse(getComponentResourceCourseComponent));
}
export function getComponentResourceCourseComponentFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetComponentResourceCourseComponent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetComponentResourceCourseComponent' from JSON`);
}
/** @internal */
export const GetComponentResourceResource$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const GetComponentResourceResource$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 GetComponentResourceResource$;
(function (GetComponentResourceResource$) {
    /** @deprecated use `GetComponentResourceResource$inboundSchema` instead. */
    GetComponentResourceResource$.inboundSchema = GetComponentResourceResource$inboundSchema;
    /** @deprecated use `GetComponentResourceResource$outboundSchema` instead. */
    GetComponentResourceResource$.outboundSchema = GetComponentResourceResource$outboundSchema;
})(GetComponentResourceResource$ || (GetComponentResourceResource$ = {}));
export function getComponentResourceResourceToJSON(getComponentResourceResource) {
    return JSON.stringify(GetComponentResourceResource$outboundSchema.parse(getComponentResourceResource));
}
export function getComponentResourceResourceFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetComponentResourceResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetComponentResourceResource' from JSON`);
}
/** @internal */
export const GetComponentResourceComponentResource$inboundSchema = z.object({
    sourcedId: z.string(),
    status: GetComponentResourceStatus$inboundSchema,
    dateLastModified: z.string().datetime({ offset: true }).transform(v => new Date(v)).optional(),
    metadata: z.nullable(z.record(z.any())).optional(),
    courseComponent: z.lazy(() => GetComponentResourceCourseComponent$inboundSchema),
    resource: z.lazy(() => GetComponentResourceResource$inboundSchema),
    title: z.string(),
    sortOrder: z.number().default(0),
});
/** @internal */
export const GetComponentResourceComponentResource$outboundSchema = z.object({
    sourcedId: z.string(),
    status: GetComponentResourceStatus$outboundSchema,
    dateLastModified: z.date().transform(v => v.toISOString()).optional(),
    metadata: z.nullable(z.record(z.any())).optional(),
    courseComponent: z.lazy(() => GetComponentResourceCourseComponent$outboundSchema),
    resource: z.lazy(() => GetComponentResourceResource$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 GetComponentResourceComponentResource$;
(function (GetComponentResourceComponentResource$) {
    /** @deprecated use `GetComponentResourceComponentResource$inboundSchema` instead. */
    GetComponentResourceComponentResource$.inboundSchema = GetComponentResourceComponentResource$inboundSchema;
    /** @deprecated use `GetComponentResourceComponentResource$outboundSchema` instead. */
    GetComponentResourceComponentResource$.outboundSchema = GetComponentResourceComponentResource$outboundSchema;
})(GetComponentResourceComponentResource$ || (GetComponentResourceComponentResource$ = {}));
export function getComponentResourceComponentResourceToJSON(getComponentResourceComponentResource) {
    return JSON.stringify(GetComponentResourceComponentResource$outboundSchema.parse(getComponentResourceComponentResource));
}
export function getComponentResourceComponentResourceFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetComponentResourceComponentResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetComponentResourceComponentResource' from JSON`);
}
/** @internal */
export const GetComponentResourceResponse$inboundSchema = z.object({
    componentResource: z.lazy(() => GetComponentResourceComponentResource$inboundSchema),
});
/** @internal */
export const GetComponentResourceResponse$outboundSchema = z.object({
    componentResource: z.lazy(() => GetComponentResourceComponentResource$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetComponentResourceResponse$;
(function (GetComponentResourceResponse$) {
    /** @deprecated use `GetComponentResourceResponse$inboundSchema` instead. */
    GetComponentResourceResponse$.inboundSchema = GetComponentResourceResponse$inboundSchema;
    /** @deprecated use `GetComponentResourceResponse$outboundSchema` instead. */
    GetComponentResourceResponse$.outboundSchema = GetComponentResourceResponse$outboundSchema;
})(GetComponentResourceResponse$ || (GetComponentResourceResponse$ = {}));
export function getComponentResourceResponseToJSON(getComponentResourceResponse) {
    return JSON.stringify(GetComponentResourceResponse$outboundSchema.parse(getComponentResourceResponse));
}
export function getComponentResourceResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetComponentResourceResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetComponentResourceResponse' from JSON`);
}
//# sourceMappingURL=getcomponentresource.js.map