/*
 * 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 AttachComponentType = {
    Component: "component",
    Resource: "resource",
};
/** @internal */
export const AttachComponentRequestBody$inboundSchema = z.object({
    componentId: z.nullable(z.string()),
    order: z.number(),
    parentId: z.nullable(z.string()).optional(),
    skipped: z.nullable(z.boolean().default(false)),
});
/** @internal */
export const AttachComponentRequestBody$outboundSchema = z.object({
    componentId: z.nullable(z.string()),
    order: z.number(),
    parentId: z.nullable(z.string()).optional(),
    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 AttachComponentRequestBody$;
(function (AttachComponentRequestBody$) {
    /** @deprecated use `AttachComponentRequestBody$inboundSchema` instead. */
    AttachComponentRequestBody$.inboundSchema = AttachComponentRequestBody$inboundSchema;
    /** @deprecated use `AttachComponentRequestBody$outboundSchema` instead. */
    AttachComponentRequestBody$.outboundSchema = AttachComponentRequestBody$outboundSchema;
})(AttachComponentRequestBody$ || (AttachComponentRequestBody$ = {}));
export function attachComponentRequestBodyToJSON(attachComponentRequestBody) {
    return JSON.stringify(AttachComponentRequestBody$outboundSchema.parse(attachComponentRequestBody));
}
export function attachComponentRequestBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => AttachComponentRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AttachComponentRequestBody' from JSON`);
}
/** @internal */
export const AttachComponentRequest$inboundSchema = z.object({
    lessonPlanId: z.string(),
    RequestBody: z.lazy(() => AttachComponentRequestBody$inboundSchema)
        .optional(),
}).transform((v) => {
    return remap$(v, {
        "RequestBody": "requestBody",
    });
});
/** @internal */
export const AttachComponentRequest$outboundSchema = z.object({
    lessonPlanId: z.string(),
    requestBody: z.lazy(() => AttachComponentRequestBody$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 AttachComponentRequest$;
(function (AttachComponentRequest$) {
    /** @deprecated use `AttachComponentRequest$inboundSchema` instead. */
    AttachComponentRequest$.inboundSchema = AttachComponentRequest$inboundSchema;
    /** @deprecated use `AttachComponentRequest$outboundSchema` instead. */
    AttachComponentRequest$.outboundSchema = AttachComponentRequest$outboundSchema;
})(AttachComponentRequest$ || (AttachComponentRequest$ = {}));
export function attachComponentRequestToJSON(attachComponentRequest) {
    return JSON.stringify(AttachComponentRequest$outboundSchema.parse(attachComponentRequest));
}
export function attachComponentRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => AttachComponentRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AttachComponentRequest' from JSON`);
}
/** @internal */
export const AttachComponentType$inboundSchema = z.nativeEnum(AttachComponentType);
/** @internal */
export const AttachComponentType$outboundSchema = AttachComponentType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var AttachComponentType$;
(function (AttachComponentType$) {
    /** @deprecated use `AttachComponentType$inboundSchema` instead. */
    AttachComponentType$.inboundSchema = AttachComponentType$inboundSchema;
    /** @deprecated use `AttachComponentType$outboundSchema` instead. */
    AttachComponentType$.outboundSchema = AttachComponentType$outboundSchema;
})(AttachComponentType$ || (AttachComponentType$ = {}));
/** @internal */
export const AttachComponentLessonPlanItem$inboundSchema = z.object({
    id: z.string().optional(),
    lessonPlanId: z.string(),
    type: AttachComponentType$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 AttachComponentLessonPlanItem$outboundSchema = z.object({
    id: z.string().optional(),
    lessonPlanId: z.string(),
    type: AttachComponentType$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 AttachComponentLessonPlanItem$;
(function (AttachComponentLessonPlanItem$) {
    /** @deprecated use `AttachComponentLessonPlanItem$inboundSchema` instead. */
    AttachComponentLessonPlanItem$.inboundSchema = AttachComponentLessonPlanItem$inboundSchema;
    /** @deprecated use `AttachComponentLessonPlanItem$outboundSchema` instead. */
    AttachComponentLessonPlanItem$.outboundSchema = AttachComponentLessonPlanItem$outboundSchema;
})(AttachComponentLessonPlanItem$ || (AttachComponentLessonPlanItem$ = {}));
export function attachComponentLessonPlanItemToJSON(attachComponentLessonPlanItem) {
    return JSON.stringify(AttachComponentLessonPlanItem$outboundSchema.parse(attachComponentLessonPlanItem));
}
export function attachComponentLessonPlanItemFromJSON(jsonString) {
    return safeParse(jsonString, (x) => AttachComponentLessonPlanItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AttachComponentLessonPlanItem' from JSON`);
}
/** @internal */
export const AttachComponentResponse$inboundSchema = z.object({
    lessonPlanItem: z.lazy(() => AttachComponentLessonPlanItem$inboundSchema),
});
/** @internal */
export const AttachComponentResponse$outboundSchema = z.object({
    lessonPlanItem: z.lazy(() => AttachComponentLessonPlanItem$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var AttachComponentResponse$;
(function (AttachComponentResponse$) {
    /** @deprecated use `AttachComponentResponse$inboundSchema` instead. */
    AttachComponentResponse$.inboundSchema = AttachComponentResponse$inboundSchema;
    /** @deprecated use `AttachComponentResponse$outboundSchema` instead. */
    AttachComponentResponse$.outboundSchema = AttachComponentResponse$outboundSchema;
})(AttachComponentResponse$ || (AttachComponentResponse$ = {}));
export function attachComponentResponseToJSON(attachComponentResponse) {
    return JSON.stringify(AttachComponentResponse$outboundSchema.parse(attachComponentResponse));
}
export function attachComponentResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => AttachComponentResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AttachComponentResponse' from JSON`);
}
//# sourceMappingURL=attachcomponent.js.map