/*
 * 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 AttachResourceType = {
    Component: "component",
    Resource: "resource",
};
/** @internal */
export const AttachResourceRequestBody$inboundSchema = z.object({
    componentResourceId: z.string(),
    order: z.number(),
    parentId: z.nullable(z.string()),
    skipped: z.nullable(z.boolean().default(false)),
});
/** @internal */
export const AttachResourceRequestBody$outboundSchema = z.object({
    componentResourceId: z.string(),
    order: z.number(),
    parentId: z.nullable(z.string()),
    skipped: z.nullable(z.boolean().default(false)),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var AttachResourceRequestBody$;
(function (AttachResourceRequestBody$) {
    /** @deprecated use `AttachResourceRequestBody$inboundSchema` instead. */
    AttachResourceRequestBody$.inboundSchema = AttachResourceRequestBody$inboundSchema;
    /** @deprecated use `AttachResourceRequestBody$outboundSchema` instead. */
    AttachResourceRequestBody$.outboundSchema = AttachResourceRequestBody$outboundSchema;
})(AttachResourceRequestBody$ || (AttachResourceRequestBody$ = {}));
export function attachResourceRequestBodyToJSON(attachResourceRequestBody) {
    return JSON.stringify(AttachResourceRequestBody$outboundSchema.parse(attachResourceRequestBody));
}
export function attachResourceRequestBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => AttachResourceRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AttachResourceRequestBody' from JSON`);
}
/** @internal */
export const AttachResourceRequest$inboundSchema = z.object({
    lessonPlanId: z.string(),
    RequestBody: z.lazy(() => AttachResourceRequestBody$inboundSchema).optional(),
}).transform((v) => {
    return remap$(v, {
        "RequestBody": "requestBody",
    });
});
/** @internal */
export const AttachResourceRequest$outboundSchema = z.object({
    lessonPlanId: z.string(),
    requestBody: z.lazy(() => AttachResourceRequestBody$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 AttachResourceRequest$;
(function (AttachResourceRequest$) {
    /** @deprecated use `AttachResourceRequest$inboundSchema` instead. */
    AttachResourceRequest$.inboundSchema = AttachResourceRequest$inboundSchema;
    /** @deprecated use `AttachResourceRequest$outboundSchema` instead. */
    AttachResourceRequest$.outboundSchema = AttachResourceRequest$outboundSchema;
})(AttachResourceRequest$ || (AttachResourceRequest$ = {}));
export function attachResourceRequestToJSON(attachResourceRequest) {
    return JSON.stringify(AttachResourceRequest$outboundSchema.parse(attachResourceRequest));
}
export function attachResourceRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => AttachResourceRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AttachResourceRequest' from JSON`);
}
/** @internal */
export const AttachResourceType$inboundSchema = z.nativeEnum(AttachResourceType);
/** @internal */
export const AttachResourceType$outboundSchema = AttachResourceType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var AttachResourceType$;
(function (AttachResourceType$) {
    /** @deprecated use `AttachResourceType$inboundSchema` instead. */
    AttachResourceType$.inboundSchema = AttachResourceType$inboundSchema;
    /** @deprecated use `AttachResourceType$outboundSchema` instead. */
    AttachResourceType$.outboundSchema = AttachResourceType$outboundSchema;
})(AttachResourceType$ || (AttachResourceType$ = {}));
/** @internal */
export const AttachResourceLessonPlanItem$inboundSchema = z.object({
    id: z.string().optional(),
    lessonPlanId: z.string(),
    type: AttachResourceType$inboundSchema,
    componentId: z.nullable(z.string()).optional(),
    componentResourceId: z.nullable(z.string()).optional(),
    order: z.number(),
    parentId: z.nullable(z.string()).optional(),
    skipped: z.boolean().default(false),
});
/** @internal */
export const AttachResourceLessonPlanItem$outboundSchema = z.object({
    id: z.string().optional(),
    lessonPlanId: z.string(),
    type: AttachResourceType$outboundSchema,
    componentId: z.nullable(z.string()).optional(),
    componentResourceId: z.nullable(z.string()).optional(),
    order: z.number(),
    parentId: z.nullable(z.string()).optional(),
    skipped: z.boolean().default(false),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var AttachResourceLessonPlanItem$;
(function (AttachResourceLessonPlanItem$) {
    /** @deprecated use `AttachResourceLessonPlanItem$inboundSchema` instead. */
    AttachResourceLessonPlanItem$.inboundSchema = AttachResourceLessonPlanItem$inboundSchema;
    /** @deprecated use `AttachResourceLessonPlanItem$outboundSchema` instead. */
    AttachResourceLessonPlanItem$.outboundSchema = AttachResourceLessonPlanItem$outboundSchema;
})(AttachResourceLessonPlanItem$ || (AttachResourceLessonPlanItem$ = {}));
export function attachResourceLessonPlanItemToJSON(attachResourceLessonPlanItem) {
    return JSON.stringify(AttachResourceLessonPlanItem$outboundSchema.parse(attachResourceLessonPlanItem));
}
export function attachResourceLessonPlanItemFromJSON(jsonString) {
    return safeParse(jsonString, (x) => AttachResourceLessonPlanItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AttachResourceLessonPlanItem' from JSON`);
}
/** @internal */
export const AttachResourceResponse$inboundSchema = z.object({
    lessonPlanItem: z.lazy(() => AttachResourceLessonPlanItem$inboundSchema),
});
/** @internal */
export const AttachResourceResponse$outboundSchema = z.object({
    lessonPlanItem: z.lazy(() => AttachResourceLessonPlanItem$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var AttachResourceResponse$;
(function (AttachResourceResponse$) {
    /** @deprecated use `AttachResourceResponse$inboundSchema` instead. */
    AttachResourceResponse$.inboundSchema = AttachResourceResponse$inboundSchema;
    /** @deprecated use `AttachResourceResponse$outboundSchema` instead. */
    AttachResourceResponse$.outboundSchema = AttachResourceResponse$outboundSchema;
})(AttachResourceResponse$ || (AttachResourceResponse$ = {}));
export function attachResourceResponseToJSON(attachResourceResponse) {
    return JSON.stringify(AttachResourceResponse$outboundSchema.parse(attachResourceResponse));
}
export function attachResourceResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => AttachResourceResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AttachResourceResponse' from JSON`);
}
//# sourceMappingURL=attachresource.js.map