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