"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.PutCourseComponentRequest$ = exports.PutCourseComponentRequest$outboundSchema = exports.PutCourseComponentRequest$inboundSchema = exports.PutCourseComponentRequestBody$ = exports.PutCourseComponentRequestBody$outboundSchema = exports.PutCourseComponentRequestBody$inboundSchema = exports.PutCourseComponentCourseComponent1$ = exports.PutCourseComponentCourseComponent1$outboundSchema = exports.PutCourseComponentCourseComponent1$inboundSchema = exports.PutCourseComponentParent$ = exports.PutCourseComponentParent$outboundSchema = exports.PutCourseComponentParent$inboundSchema = exports.PutCourseComponentCourseComponent2$ = exports.PutCourseComponentCourseComponent2$outboundSchema = exports.PutCourseComponentCourseComponent2$inboundSchema = exports.PutCourseComponentCourse$ = exports.PutCourseComponentCourse$outboundSchema = exports.PutCourseComponentCourse$inboundSchema = exports.PutCourseComponentStatus$ = exports.PutCourseComponentStatus$outboundSchema = exports.PutCourseComponentStatus$inboundSchema = exports.PutCourseComponentStatus = void 0;
exports.putCourseComponentCourseToJSON = putCourseComponentCourseToJSON;
exports.putCourseComponentCourseFromJSON = putCourseComponentCourseFromJSON;
exports.putCourseComponentCourseComponent2ToJSON = putCourseComponentCourseComponent2ToJSON;
exports.putCourseComponentCourseComponent2FromJSON = putCourseComponentCourseComponent2FromJSON;
exports.putCourseComponentParentToJSON = putCourseComponentParentToJSON;
exports.putCourseComponentParentFromJSON = putCourseComponentParentFromJSON;
exports.putCourseComponentCourseComponent1ToJSON = putCourseComponentCourseComponent1ToJSON;
exports.putCourseComponentCourseComponent1FromJSON = putCourseComponentCourseComponent1FromJSON;
exports.putCourseComponentRequestBodyToJSON = putCourseComponentRequestBodyToJSON;
exports.putCourseComponentRequestBodyFromJSON = putCourseComponentRequestBodyFromJSON;
exports.putCourseComponentRequestToJSON = putCourseComponentRequestToJSON;
exports.putCourseComponentRequestFromJSON = putCourseComponentRequestFromJSON;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
exports.PutCourseComponentStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
/** @internal */
exports.PutCourseComponentStatus$inboundSchema = z.nativeEnum(exports.PutCourseComponentStatus);
/** @internal */
exports.PutCourseComponentStatus$outboundSchema = exports.PutCourseComponentStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var PutCourseComponentStatus$;
(function (PutCourseComponentStatus$) {
    /** @deprecated use `PutCourseComponentStatus$inboundSchema` instead. */
    PutCourseComponentStatus$.inboundSchema = exports.PutCourseComponentStatus$inboundSchema;
    /** @deprecated use `PutCourseComponentStatus$outboundSchema` instead. */
    PutCourseComponentStatus$.outboundSchema = exports.PutCourseComponentStatus$outboundSchema;
})(PutCourseComponentStatus$ || (exports.PutCourseComponentStatus$ = PutCourseComponentStatus$ = {}));
/** @internal */
exports.PutCourseComponentCourse$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.PutCourseComponentCourse$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 PutCourseComponentCourse$;
(function (PutCourseComponentCourse$) {
    /** @deprecated use `PutCourseComponentCourse$inboundSchema` instead. */
    PutCourseComponentCourse$.inboundSchema = exports.PutCourseComponentCourse$inboundSchema;
    /** @deprecated use `PutCourseComponentCourse$outboundSchema` instead. */
    PutCourseComponentCourse$.outboundSchema = exports.PutCourseComponentCourse$outboundSchema;
})(PutCourseComponentCourse$ || (exports.PutCourseComponentCourse$ = PutCourseComponentCourse$ = {}));
function putCourseComponentCourseToJSON(putCourseComponentCourse) {
    return JSON.stringify(exports.PutCourseComponentCourse$outboundSchema.parse(putCourseComponentCourse));
}
function putCourseComponentCourseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PutCourseComponentCourse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PutCourseComponentCourse' from JSON`);
}
/** @internal */
exports.PutCourseComponentCourseComponent2$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.PutCourseComponentCourseComponent2$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 PutCourseComponentCourseComponent2$;
(function (PutCourseComponentCourseComponent2$) {
    /** @deprecated use `PutCourseComponentCourseComponent2$inboundSchema` instead. */
    PutCourseComponentCourseComponent2$.inboundSchema = exports.PutCourseComponentCourseComponent2$inboundSchema;
    /** @deprecated use `PutCourseComponentCourseComponent2$outboundSchema` instead. */
    PutCourseComponentCourseComponent2$.outboundSchema = exports.PutCourseComponentCourseComponent2$outboundSchema;
})(PutCourseComponentCourseComponent2$ || (exports.PutCourseComponentCourseComponent2$ = PutCourseComponentCourseComponent2$ = {}));
function putCourseComponentCourseComponent2ToJSON(putCourseComponentCourseComponent2) {
    return JSON.stringify(exports.PutCourseComponentCourseComponent2$outboundSchema.parse(putCourseComponentCourseComponent2));
}
function putCourseComponentCourseComponent2FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PutCourseComponentCourseComponent2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PutCourseComponentCourseComponent2' from JSON`);
}
/** @internal */
exports.PutCourseComponentParent$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.PutCourseComponentParent$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 PutCourseComponentParent$;
(function (PutCourseComponentParent$) {
    /** @deprecated use `PutCourseComponentParent$inboundSchema` instead. */
    PutCourseComponentParent$.inboundSchema = exports.PutCourseComponentParent$inboundSchema;
    /** @deprecated use `PutCourseComponentParent$outboundSchema` instead. */
    PutCourseComponentParent$.outboundSchema = exports.PutCourseComponentParent$outboundSchema;
})(PutCourseComponentParent$ || (exports.PutCourseComponentParent$ = PutCourseComponentParent$ = {}));
function putCourseComponentParentToJSON(putCourseComponentParent) {
    return JSON.stringify(exports.PutCourseComponentParent$outboundSchema.parse(putCourseComponentParent));
}
function putCourseComponentParentFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PutCourseComponentParent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PutCourseComponentParent' from JSON`);
}
/** @internal */
exports.PutCourseComponentCourseComponent1$inboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: exports.PutCourseComponentStatus$inboundSchema,
    dateLastModified: z.string().datetime({ offset: true }).transform(v => new Date(v)).optional(),
    metadata: z.nullable(z.record(z.any())).optional(),
    course: z.lazy(() => exports.PutCourseComponentCourse$inboundSchema),
    courseComponent: z.nullable(z.lazy(() => exports.PutCourseComponentCourseComponent2$inboundSchema)).optional(),
    parent: z.nullable(z.lazy(() => exports.PutCourseComponentParent$inboundSchema))
        .optional(),
    title: z.string(),
    sortOrder: z.number().optional(),
    prerequisites: z.nullable(z.array(z.string())).optional(),
    prerequisiteCriteria: z.nullable(z.string()).optional(),
    unlockDate: z.string().optional(),
});
/** @internal */
exports.PutCourseComponentCourseComponent1$outboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: exports.PutCourseComponentStatus$outboundSchema,
    dateLastModified: z.date().transform(v => v.toISOString()).optional(),
    metadata: z.nullable(z.record(z.any())).optional(),
    course: z.lazy(() => exports.PutCourseComponentCourse$outboundSchema),
    courseComponent: z.nullable(z.lazy(() => exports.PutCourseComponentCourseComponent2$outboundSchema)).optional(),
    parent: z.nullable(z.lazy(() => exports.PutCourseComponentParent$outboundSchema))
        .optional(),
    title: z.string(),
    sortOrder: z.number().optional(),
    prerequisites: z.nullable(z.array(z.string())).optional(),
    prerequisiteCriteria: z.nullable(z.string()).optional(),
    unlockDate: z.string().optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var PutCourseComponentCourseComponent1$;
(function (PutCourseComponentCourseComponent1$) {
    /** @deprecated use `PutCourseComponentCourseComponent1$inboundSchema` instead. */
    PutCourseComponentCourseComponent1$.inboundSchema = exports.PutCourseComponentCourseComponent1$inboundSchema;
    /** @deprecated use `PutCourseComponentCourseComponent1$outboundSchema` instead. */
    PutCourseComponentCourseComponent1$.outboundSchema = exports.PutCourseComponentCourseComponent1$outboundSchema;
})(PutCourseComponentCourseComponent1$ || (exports.PutCourseComponentCourseComponent1$ = PutCourseComponentCourseComponent1$ = {}));
function putCourseComponentCourseComponent1ToJSON(putCourseComponentCourseComponent1) {
    return JSON.stringify(exports.PutCourseComponentCourseComponent1$outboundSchema.parse(putCourseComponentCourseComponent1));
}
function putCourseComponentCourseComponent1FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PutCourseComponentCourseComponent1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PutCourseComponentCourseComponent1' from JSON`);
}
/** @internal */
exports.PutCourseComponentRequestBody$inboundSchema = z.object({
    courseComponent: z.lazy(() => exports.PutCourseComponentCourseComponent1$inboundSchema),
});
/** @internal */
exports.PutCourseComponentRequestBody$outboundSchema = z.object({
    courseComponent: z.lazy(() => exports.PutCourseComponentCourseComponent1$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var PutCourseComponentRequestBody$;
(function (PutCourseComponentRequestBody$) {
    /** @deprecated use `PutCourseComponentRequestBody$inboundSchema` instead. */
    PutCourseComponentRequestBody$.inboundSchema = exports.PutCourseComponentRequestBody$inboundSchema;
    /** @deprecated use `PutCourseComponentRequestBody$outboundSchema` instead. */
    PutCourseComponentRequestBody$.outboundSchema = exports.PutCourseComponentRequestBody$outboundSchema;
})(PutCourseComponentRequestBody$ || (exports.PutCourseComponentRequestBody$ = PutCourseComponentRequestBody$ = {}));
function putCourseComponentRequestBodyToJSON(putCourseComponentRequestBody) {
    return JSON.stringify(exports.PutCourseComponentRequestBody$outboundSchema.parse(putCourseComponentRequestBody));
}
function putCourseComponentRequestBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PutCourseComponentRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PutCourseComponentRequestBody' from JSON`);
}
/** @internal */
exports.PutCourseComponentRequest$inboundSchema = z.object({
    sourcedId: z.string(),
    RequestBody: z.lazy(() => exports.PutCourseComponentRequestBody$inboundSchema)
        .optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "RequestBody": "requestBody",
    });
});
/** @internal */
exports.PutCourseComponentRequest$outboundSchema = z.object({
    sourcedId: z.string(),
    requestBody: z.lazy(() => exports.PutCourseComponentRequestBody$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 PutCourseComponentRequest$;
(function (PutCourseComponentRequest$) {
    /** @deprecated use `PutCourseComponentRequest$inboundSchema` instead. */
    PutCourseComponentRequest$.inboundSchema = exports.PutCourseComponentRequest$inboundSchema;
    /** @deprecated use `PutCourseComponentRequest$outboundSchema` instead. */
    PutCourseComponentRequest$.outboundSchema = exports.PutCourseComponentRequest$outboundSchema;
})(PutCourseComponentRequest$ || (exports.PutCourseComponentRequest$ = PutCourseComponentRequest$ = {}));
function putCourseComponentRequestToJSON(putCourseComponentRequest) {
    return JSON.stringify(exports.PutCourseComponentRequest$outboundSchema.parse(putCourseComponentRequest));
}
function putCourseComponentRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PutCourseComponentRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PutCourseComponentRequest' from JSON`);
}
//# sourceMappingURL=putcoursecomponent.js.map