"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.AttachComponentResponse$ = exports.AttachComponentResponse$outboundSchema = exports.AttachComponentResponse$inboundSchema = exports.AttachComponentLessonPlanItem$ = exports.AttachComponentLessonPlanItem$outboundSchema = exports.AttachComponentLessonPlanItem$inboundSchema = exports.AttachComponentType$ = exports.AttachComponentType$outboundSchema = exports.AttachComponentType$inboundSchema = exports.AttachComponentRequest$ = exports.AttachComponentRequest$outboundSchema = exports.AttachComponentRequest$inboundSchema = exports.AttachComponentRequestBody$ = exports.AttachComponentRequestBody$outboundSchema = exports.AttachComponentRequestBody$inboundSchema = exports.AttachComponentType = void 0;
exports.attachComponentRequestBodyToJSON = attachComponentRequestBodyToJSON;
exports.attachComponentRequestBodyFromJSON = attachComponentRequestBodyFromJSON;
exports.attachComponentRequestToJSON = attachComponentRequestToJSON;
exports.attachComponentRequestFromJSON = attachComponentRequestFromJSON;
exports.attachComponentLessonPlanItemToJSON = attachComponentLessonPlanItemToJSON;
exports.attachComponentLessonPlanItemFromJSON = attachComponentLessonPlanItemFromJSON;
exports.attachComponentResponseToJSON = attachComponentResponseToJSON;
exports.attachComponentResponseFromJSON = attachComponentResponseFromJSON;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
exports.AttachComponentType = {
    Component: "component",
    Resource: "resource",
};
/** @internal */
exports.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 */
exports.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.
 */
var AttachComponentRequestBody$;
(function (AttachComponentRequestBody$) {
    /** @deprecated use `AttachComponentRequestBody$inboundSchema` instead. */
    AttachComponentRequestBody$.inboundSchema = exports.AttachComponentRequestBody$inboundSchema;
    /** @deprecated use `AttachComponentRequestBody$outboundSchema` instead. */
    AttachComponentRequestBody$.outboundSchema = exports.AttachComponentRequestBody$outboundSchema;
})(AttachComponentRequestBody$ || (exports.AttachComponentRequestBody$ = AttachComponentRequestBody$ = {}));
function attachComponentRequestBodyToJSON(attachComponentRequestBody) {
    return JSON.stringify(exports.AttachComponentRequestBody$outboundSchema.parse(attachComponentRequestBody));
}
function attachComponentRequestBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AttachComponentRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AttachComponentRequestBody' from JSON`);
}
/** @internal */
exports.AttachComponentRequest$inboundSchema = z.object({
    lessonPlanId: z.string(),
    RequestBody: z.lazy(() => exports.AttachComponentRequestBody$inboundSchema)
        .optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "RequestBody": "requestBody",
    });
});
/** @internal */
exports.AttachComponentRequest$outboundSchema = z.object({
    lessonPlanId: z.string(),
    requestBody: z.lazy(() => exports.AttachComponentRequestBody$outboundSchema)
        .optional(),
}).transform((v) => {
    return (0, primitives_js_1.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.
 */
var AttachComponentRequest$;
(function (AttachComponentRequest$) {
    /** @deprecated use `AttachComponentRequest$inboundSchema` instead. */
    AttachComponentRequest$.inboundSchema = exports.AttachComponentRequest$inboundSchema;
    /** @deprecated use `AttachComponentRequest$outboundSchema` instead. */
    AttachComponentRequest$.outboundSchema = exports.AttachComponentRequest$outboundSchema;
})(AttachComponentRequest$ || (exports.AttachComponentRequest$ = AttachComponentRequest$ = {}));
function attachComponentRequestToJSON(attachComponentRequest) {
    return JSON.stringify(exports.AttachComponentRequest$outboundSchema.parse(attachComponentRequest));
}
function attachComponentRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AttachComponentRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AttachComponentRequest' from JSON`);
}
/** @internal */
exports.AttachComponentType$inboundSchema = z.nativeEnum(exports.AttachComponentType);
/** @internal */
exports.AttachComponentType$outboundSchema = exports.AttachComponentType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var AttachComponentType$;
(function (AttachComponentType$) {
    /** @deprecated use `AttachComponentType$inboundSchema` instead. */
    AttachComponentType$.inboundSchema = exports.AttachComponentType$inboundSchema;
    /** @deprecated use `AttachComponentType$outboundSchema` instead. */
    AttachComponentType$.outboundSchema = exports.AttachComponentType$outboundSchema;
})(AttachComponentType$ || (exports.AttachComponentType$ = AttachComponentType$ = {}));
/** @internal */
exports.AttachComponentLessonPlanItem$inboundSchema = z.object({
    id: z.string().optional(),
    lessonPlanId: z.string(),
    type: exports.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 */
exports.AttachComponentLessonPlanItem$outboundSchema = z.object({
    id: z.string().optional(),
    lessonPlanId: z.string(),
    type: exports.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.
 */
var AttachComponentLessonPlanItem$;
(function (AttachComponentLessonPlanItem$) {
    /** @deprecated use `AttachComponentLessonPlanItem$inboundSchema` instead. */
    AttachComponentLessonPlanItem$.inboundSchema = exports.AttachComponentLessonPlanItem$inboundSchema;
    /** @deprecated use `AttachComponentLessonPlanItem$outboundSchema` instead. */
    AttachComponentLessonPlanItem$.outboundSchema = exports.AttachComponentLessonPlanItem$outboundSchema;
})(AttachComponentLessonPlanItem$ || (exports.AttachComponentLessonPlanItem$ = AttachComponentLessonPlanItem$ = {}));
function attachComponentLessonPlanItemToJSON(attachComponentLessonPlanItem) {
    return JSON.stringify(exports.AttachComponentLessonPlanItem$outboundSchema.parse(attachComponentLessonPlanItem));
}
function attachComponentLessonPlanItemFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AttachComponentLessonPlanItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AttachComponentLessonPlanItem' from JSON`);
}
/** @internal */
exports.AttachComponentResponse$inboundSchema = z.object({
    lessonPlanItem: z.lazy(() => exports.AttachComponentLessonPlanItem$inboundSchema),
});
/** @internal */
exports.AttachComponentResponse$outboundSchema = z.object({
    lessonPlanItem: z.lazy(() => exports.AttachComponentLessonPlanItem$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var AttachComponentResponse$;
(function (AttachComponentResponse$) {
    /** @deprecated use `AttachComponentResponse$inboundSchema` instead. */
    AttachComponentResponse$.inboundSchema = exports.AttachComponentResponse$inboundSchema;
    /** @deprecated use `AttachComponentResponse$outboundSchema` instead. */
    AttachComponentResponse$.outboundSchema = exports.AttachComponentResponse$outboundSchema;
})(AttachComponentResponse$ || (exports.AttachComponentResponse$ = AttachComponentResponse$ = {}));
function attachComponentResponseToJSON(attachComponentResponse) {
    return JSON.stringify(exports.AttachComponentResponse$outboundSchema.parse(attachComponentResponse));
}
function attachComponentResponseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AttachComponentResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AttachComponentResponse' from JSON`);
}
//# sourceMappingURL=attachcomponent.js.map