"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.PutComponentResourceRequest$ = exports.PutComponentResourceRequest$outboundSchema = exports.PutComponentResourceRequest$inboundSchema = exports.PutComponentResourceRequestBody$ = exports.PutComponentResourceRequestBody$outboundSchema = exports.PutComponentResourceRequestBody$inboundSchema = exports.PutComponentResourceComponentResource$ = exports.PutComponentResourceComponentResource$outboundSchema = exports.PutComponentResourceComponentResource$inboundSchema = exports.PutComponentResourceResource$ = exports.PutComponentResourceResource$outboundSchema = exports.PutComponentResourceResource$inboundSchema = exports.PutComponentResourceCourseComponent$ = exports.PutComponentResourceCourseComponent$outboundSchema = exports.PutComponentResourceCourseComponent$inboundSchema = exports.PutComponentResourceStatus$ = exports.PutComponentResourceStatus$outboundSchema = exports.PutComponentResourceStatus$inboundSchema = exports.PutComponentResourceStatus = void 0;
exports.putComponentResourceCourseComponentToJSON = putComponentResourceCourseComponentToJSON;
exports.putComponentResourceCourseComponentFromJSON = putComponentResourceCourseComponentFromJSON;
exports.putComponentResourceResourceToJSON = putComponentResourceResourceToJSON;
exports.putComponentResourceResourceFromJSON = putComponentResourceResourceFromJSON;
exports.putComponentResourceComponentResourceToJSON = putComponentResourceComponentResourceToJSON;
exports.putComponentResourceComponentResourceFromJSON = putComponentResourceComponentResourceFromJSON;
exports.putComponentResourceRequestBodyToJSON = putComponentResourceRequestBodyToJSON;
exports.putComponentResourceRequestBodyFromJSON = putComponentResourceRequestBodyFromJSON;
exports.putComponentResourceRequestToJSON = putComponentResourceRequestToJSON;
exports.putComponentResourceRequestFromJSON = putComponentResourceRequestFromJSON;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
exports.PutComponentResourceStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
/** @internal */
exports.PutComponentResourceStatus$inboundSchema = z.nativeEnum(exports.PutComponentResourceStatus);
/** @internal */
exports.PutComponentResourceStatus$outboundSchema = exports.PutComponentResourceStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var PutComponentResourceStatus$;
(function (PutComponentResourceStatus$) {
    /** @deprecated use `PutComponentResourceStatus$inboundSchema` instead. */
    PutComponentResourceStatus$.inboundSchema = exports.PutComponentResourceStatus$inboundSchema;
    /** @deprecated use `PutComponentResourceStatus$outboundSchema` instead. */
    PutComponentResourceStatus$.outboundSchema = exports.PutComponentResourceStatus$outboundSchema;
})(PutComponentResourceStatus$ || (exports.PutComponentResourceStatus$ = PutComponentResourceStatus$ = {}));
/** @internal */
exports.PutComponentResourceCourseComponent$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.PutComponentResourceCourseComponent$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.
 */
var PutComponentResourceCourseComponent$;
(function (PutComponentResourceCourseComponent$) {
    /** @deprecated use `PutComponentResourceCourseComponent$inboundSchema` instead. */
    PutComponentResourceCourseComponent$.inboundSchema = exports.PutComponentResourceCourseComponent$inboundSchema;
    /** @deprecated use `PutComponentResourceCourseComponent$outboundSchema` instead. */
    PutComponentResourceCourseComponent$.outboundSchema = exports.PutComponentResourceCourseComponent$outboundSchema;
})(PutComponentResourceCourseComponent$ || (exports.PutComponentResourceCourseComponent$ = PutComponentResourceCourseComponent$ = {}));
function putComponentResourceCourseComponentToJSON(putComponentResourceCourseComponent) {
    return JSON.stringify(exports.PutComponentResourceCourseComponent$outboundSchema.parse(putComponentResourceCourseComponent));
}
function putComponentResourceCourseComponentFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PutComponentResourceCourseComponent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PutComponentResourceCourseComponent' from JSON`);
}
/** @internal */
exports.PutComponentResourceResource$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.PutComponentResourceResource$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.
 */
var PutComponentResourceResource$;
(function (PutComponentResourceResource$) {
    /** @deprecated use `PutComponentResourceResource$inboundSchema` instead. */
    PutComponentResourceResource$.inboundSchema = exports.PutComponentResourceResource$inboundSchema;
    /** @deprecated use `PutComponentResourceResource$outboundSchema` instead. */
    PutComponentResourceResource$.outboundSchema = exports.PutComponentResourceResource$outboundSchema;
})(PutComponentResourceResource$ || (exports.PutComponentResourceResource$ = PutComponentResourceResource$ = {}));
function putComponentResourceResourceToJSON(putComponentResourceResource) {
    return JSON.stringify(exports.PutComponentResourceResource$outboundSchema.parse(putComponentResourceResource));
}
function putComponentResourceResourceFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PutComponentResourceResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PutComponentResourceResource' from JSON`);
}
/** @internal */
exports.PutComponentResourceComponentResource$inboundSchema = z.object({
    sourcedId: z.string(),
    status: exports.PutComponentResourceStatus$inboundSchema,
    dateLastModified: z.string().datetime({ offset: true }).transform(v => new Date(v)).optional(),
    metadata: z.nullable(z.record(z.any())).optional(),
    courseComponent: z.lazy(() => exports.PutComponentResourceCourseComponent$inboundSchema),
    resource: z.lazy(() => exports.PutComponentResourceResource$inboundSchema),
    title: z.string(),
    sortOrder: z.number().default(0),
});
/** @internal */
exports.PutComponentResourceComponentResource$outboundSchema = z.object({
    sourcedId: z.string(),
    status: exports.PutComponentResourceStatus$outboundSchema,
    dateLastModified: z.date().transform(v => v.toISOString()).optional(),
    metadata: z.nullable(z.record(z.any())).optional(),
    courseComponent: z.lazy(() => exports.PutComponentResourceCourseComponent$outboundSchema),
    resource: z.lazy(() => exports.PutComponentResourceResource$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.
 */
var PutComponentResourceComponentResource$;
(function (PutComponentResourceComponentResource$) {
    /** @deprecated use `PutComponentResourceComponentResource$inboundSchema` instead. */
    PutComponentResourceComponentResource$.inboundSchema = exports.PutComponentResourceComponentResource$inboundSchema;
    /** @deprecated use `PutComponentResourceComponentResource$outboundSchema` instead. */
    PutComponentResourceComponentResource$.outboundSchema = exports.PutComponentResourceComponentResource$outboundSchema;
})(PutComponentResourceComponentResource$ || (exports.PutComponentResourceComponentResource$ = PutComponentResourceComponentResource$ = {}));
function putComponentResourceComponentResourceToJSON(putComponentResourceComponentResource) {
    return JSON.stringify(exports.PutComponentResourceComponentResource$outboundSchema.parse(putComponentResourceComponentResource));
}
function putComponentResourceComponentResourceFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PutComponentResourceComponentResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PutComponentResourceComponentResource' from JSON`);
}
/** @internal */
exports.PutComponentResourceRequestBody$inboundSchema = z.object({
    componentResource: z.lazy(() => exports.PutComponentResourceComponentResource$inboundSchema),
});
/** @internal */
exports.PutComponentResourceRequestBody$outboundSchema = z.object({
    componentResource: z.lazy(() => exports.PutComponentResourceComponentResource$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var PutComponentResourceRequestBody$;
(function (PutComponentResourceRequestBody$) {
    /** @deprecated use `PutComponentResourceRequestBody$inboundSchema` instead. */
    PutComponentResourceRequestBody$.inboundSchema = exports.PutComponentResourceRequestBody$inboundSchema;
    /** @deprecated use `PutComponentResourceRequestBody$outboundSchema` instead. */
    PutComponentResourceRequestBody$.outboundSchema = exports.PutComponentResourceRequestBody$outboundSchema;
})(PutComponentResourceRequestBody$ || (exports.PutComponentResourceRequestBody$ = PutComponentResourceRequestBody$ = {}));
function putComponentResourceRequestBodyToJSON(putComponentResourceRequestBody) {
    return JSON.stringify(exports.PutComponentResourceRequestBody$outboundSchema.parse(putComponentResourceRequestBody));
}
function putComponentResourceRequestBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PutComponentResourceRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PutComponentResourceRequestBody' from JSON`);
}
/** @internal */
exports.PutComponentResourceRequest$inboundSchema = z.object({
    sourcedId: z.string(),
    RequestBody: z.lazy(() => exports.PutComponentResourceRequestBody$inboundSchema)
        .optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "RequestBody": "requestBody",
    });
});
/** @internal */
exports.PutComponentResourceRequest$outboundSchema = z.object({
    sourcedId: z.string(),
    requestBody: z.lazy(() => exports.PutComponentResourceRequestBody$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 PutComponentResourceRequest$;
(function (PutComponentResourceRequest$) {
    /** @deprecated use `PutComponentResourceRequest$inboundSchema` instead. */
    PutComponentResourceRequest$.inboundSchema = exports.PutComponentResourceRequest$inboundSchema;
    /** @deprecated use `PutComponentResourceRequest$outboundSchema` instead. */
    PutComponentResourceRequest$.outboundSchema = exports.PutComponentResourceRequest$outboundSchema;
})(PutComponentResourceRequest$ || (exports.PutComponentResourceRequest$ = PutComponentResourceRequest$ = {}));
function putComponentResourceRequestToJSON(putComponentResourceRequest) {
    return JSON.stringify(exports.PutComponentResourceRequest$outboundSchema.parse(putComponentResourceRequest));
}
function putComponentResourceRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PutComponentResourceRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PutComponentResourceRequest' from JSON`);
}
//# sourceMappingURL=putcomponentresource.js.map