"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.CreateCourseComponentResponse$ = exports.CreateCourseComponentResponse$outboundSchema = exports.CreateCourseComponentResponse$inboundSchema = exports.CreateCourseComponentSourcedIdPairs$ = exports.CreateCourseComponentSourcedIdPairs$outboundSchema = exports.CreateCourseComponentSourcedIdPairs$inboundSchema = exports.CreateCourseComponentRequest$ = exports.CreateCourseComponentRequest$outboundSchema = exports.CreateCourseComponentRequest$inboundSchema = exports.CreateCourseComponentCourseComponent1$ = exports.CreateCourseComponentCourseComponent1$outboundSchema = exports.CreateCourseComponentCourseComponent1$inboundSchema = exports.CreateCourseComponentParent$ = exports.CreateCourseComponentParent$outboundSchema = exports.CreateCourseComponentParent$inboundSchema = exports.CreateCourseComponentCourseComponent2$ = exports.CreateCourseComponentCourseComponent2$outboundSchema = exports.CreateCourseComponentCourseComponent2$inboundSchema = exports.CreateCourseComponentCourse$ = exports.CreateCourseComponentCourse$outboundSchema = exports.CreateCourseComponentCourse$inboundSchema = exports.CreateCourseComponentStatus$ = exports.CreateCourseComponentStatus$outboundSchema = exports.CreateCourseComponentStatus$inboundSchema = exports.CreateCourseComponentStatus = void 0;
exports.createCourseComponentCourseToJSON = createCourseComponentCourseToJSON;
exports.createCourseComponentCourseFromJSON = createCourseComponentCourseFromJSON;
exports.createCourseComponentCourseComponent2ToJSON = createCourseComponentCourseComponent2ToJSON;
exports.createCourseComponentCourseComponent2FromJSON = createCourseComponentCourseComponent2FromJSON;
exports.createCourseComponentParentToJSON = createCourseComponentParentToJSON;
exports.createCourseComponentParentFromJSON = createCourseComponentParentFromJSON;
exports.createCourseComponentCourseComponent1ToJSON = createCourseComponentCourseComponent1ToJSON;
exports.createCourseComponentCourseComponent1FromJSON = createCourseComponentCourseComponent1FromJSON;
exports.createCourseComponentRequestToJSON = createCourseComponentRequestToJSON;
exports.createCourseComponentRequestFromJSON = createCourseComponentRequestFromJSON;
exports.createCourseComponentSourcedIdPairsToJSON = createCourseComponentSourcedIdPairsToJSON;
exports.createCourseComponentSourcedIdPairsFromJSON = createCourseComponentSourcedIdPairsFromJSON;
exports.createCourseComponentResponseToJSON = createCourseComponentResponseToJSON;
exports.createCourseComponentResponseFromJSON = createCourseComponentResponseFromJSON;
const z = __importStar(require("zod"));
const schemas_js_1 = require("../../lib/schemas.js");
exports.CreateCourseComponentStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
/** @internal */
exports.CreateCourseComponentStatus$inboundSchema = z.nativeEnum(exports.CreateCourseComponentStatus);
/** @internal */
exports.CreateCourseComponentStatus$outboundSchema = exports.CreateCourseComponentStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CreateCourseComponentStatus$;
(function (CreateCourseComponentStatus$) {
    /** @deprecated use `CreateCourseComponentStatus$inboundSchema` instead. */
    CreateCourseComponentStatus$.inboundSchema = exports.CreateCourseComponentStatus$inboundSchema;
    /** @deprecated use `CreateCourseComponentStatus$outboundSchema` instead. */
    CreateCourseComponentStatus$.outboundSchema = exports.CreateCourseComponentStatus$outboundSchema;
})(CreateCourseComponentStatus$ || (exports.CreateCourseComponentStatus$ = CreateCourseComponentStatus$ = {}));
/** @internal */
exports.CreateCourseComponentCourse$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.CreateCourseComponentCourse$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 CreateCourseComponentCourse$;
(function (CreateCourseComponentCourse$) {
    /** @deprecated use `CreateCourseComponentCourse$inboundSchema` instead. */
    CreateCourseComponentCourse$.inboundSchema = exports.CreateCourseComponentCourse$inboundSchema;
    /** @deprecated use `CreateCourseComponentCourse$outboundSchema` instead. */
    CreateCourseComponentCourse$.outboundSchema = exports.CreateCourseComponentCourse$outboundSchema;
})(CreateCourseComponentCourse$ || (exports.CreateCourseComponentCourse$ = CreateCourseComponentCourse$ = {}));
function createCourseComponentCourseToJSON(createCourseComponentCourse) {
    return JSON.stringify(exports.CreateCourseComponentCourse$outboundSchema.parse(createCourseComponentCourse));
}
function createCourseComponentCourseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateCourseComponentCourse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateCourseComponentCourse' from JSON`);
}
/** @internal */
exports.CreateCourseComponentCourseComponent2$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.CreateCourseComponentCourseComponent2$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 CreateCourseComponentCourseComponent2$;
(function (CreateCourseComponentCourseComponent2$) {
    /** @deprecated use `CreateCourseComponentCourseComponent2$inboundSchema` instead. */
    CreateCourseComponentCourseComponent2$.inboundSchema = exports.CreateCourseComponentCourseComponent2$inboundSchema;
    /** @deprecated use `CreateCourseComponentCourseComponent2$outboundSchema` instead. */
    CreateCourseComponentCourseComponent2$.outboundSchema = exports.CreateCourseComponentCourseComponent2$outboundSchema;
})(CreateCourseComponentCourseComponent2$ || (exports.CreateCourseComponentCourseComponent2$ = CreateCourseComponentCourseComponent2$ = {}));
function createCourseComponentCourseComponent2ToJSON(createCourseComponentCourseComponent2) {
    return JSON.stringify(exports.CreateCourseComponentCourseComponent2$outboundSchema.parse(createCourseComponentCourseComponent2));
}
function createCourseComponentCourseComponent2FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateCourseComponentCourseComponent2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateCourseComponentCourseComponent2' from JSON`);
}
/** @internal */
exports.CreateCourseComponentParent$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.CreateCourseComponentParent$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 CreateCourseComponentParent$;
(function (CreateCourseComponentParent$) {
    /** @deprecated use `CreateCourseComponentParent$inboundSchema` instead. */
    CreateCourseComponentParent$.inboundSchema = exports.CreateCourseComponentParent$inboundSchema;
    /** @deprecated use `CreateCourseComponentParent$outboundSchema` instead. */
    CreateCourseComponentParent$.outboundSchema = exports.CreateCourseComponentParent$outboundSchema;
})(CreateCourseComponentParent$ || (exports.CreateCourseComponentParent$ = CreateCourseComponentParent$ = {}));
function createCourseComponentParentToJSON(createCourseComponentParent) {
    return JSON.stringify(exports.CreateCourseComponentParent$outboundSchema.parse(createCourseComponentParent));
}
function createCourseComponentParentFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateCourseComponentParent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateCourseComponentParent' from JSON`);
}
/** @internal */
exports.CreateCourseComponentCourseComponent1$inboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: exports.CreateCourseComponentStatus$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.CreateCourseComponentCourse$inboundSchema),
    courseComponent: z.nullable(z.lazy(() => exports.CreateCourseComponentCourseComponent2$inboundSchema)).optional(),
    parent: z.nullable(z.lazy(() => exports.CreateCourseComponentParent$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.CreateCourseComponentCourseComponent1$outboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: exports.CreateCourseComponentStatus$outboundSchema,
    dateLastModified: z.date().transform(v => v.toISOString()).optional(),
    metadata: z.nullable(z.record(z.any())).optional(),
    course: z.lazy(() => exports.CreateCourseComponentCourse$outboundSchema),
    courseComponent: z.nullable(z.lazy(() => exports.CreateCourseComponentCourseComponent2$outboundSchema)).optional(),
    parent: z.nullable(z.lazy(() => exports.CreateCourseComponentParent$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 CreateCourseComponentCourseComponent1$;
(function (CreateCourseComponentCourseComponent1$) {
    /** @deprecated use `CreateCourseComponentCourseComponent1$inboundSchema` instead. */
    CreateCourseComponentCourseComponent1$.inboundSchema = exports.CreateCourseComponentCourseComponent1$inboundSchema;
    /** @deprecated use `CreateCourseComponentCourseComponent1$outboundSchema` instead. */
    CreateCourseComponentCourseComponent1$.outboundSchema = exports.CreateCourseComponentCourseComponent1$outboundSchema;
})(CreateCourseComponentCourseComponent1$ || (exports.CreateCourseComponentCourseComponent1$ = CreateCourseComponentCourseComponent1$ = {}));
function createCourseComponentCourseComponent1ToJSON(createCourseComponentCourseComponent1) {
    return JSON.stringify(exports.CreateCourseComponentCourseComponent1$outboundSchema.parse(createCourseComponentCourseComponent1));
}
function createCourseComponentCourseComponent1FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateCourseComponentCourseComponent1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateCourseComponentCourseComponent1' from JSON`);
}
/** @internal */
exports.CreateCourseComponentRequest$inboundSchema = z.object({
    courseComponent: z.lazy(() => exports.CreateCourseComponentCourseComponent1$inboundSchema),
});
/** @internal */
exports.CreateCourseComponentRequest$outboundSchema = z.object({
    courseComponent: z.lazy(() => exports.CreateCourseComponentCourseComponent1$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CreateCourseComponentRequest$;
(function (CreateCourseComponentRequest$) {
    /** @deprecated use `CreateCourseComponentRequest$inboundSchema` instead. */
    CreateCourseComponentRequest$.inboundSchema = exports.CreateCourseComponentRequest$inboundSchema;
    /** @deprecated use `CreateCourseComponentRequest$outboundSchema` instead. */
    CreateCourseComponentRequest$.outboundSchema = exports.CreateCourseComponentRequest$outboundSchema;
})(CreateCourseComponentRequest$ || (exports.CreateCourseComponentRequest$ = CreateCourseComponentRequest$ = {}));
function createCourseComponentRequestToJSON(createCourseComponentRequest) {
    return JSON.stringify(exports.CreateCourseComponentRequest$outboundSchema.parse(createCourseComponentRequest));
}
function createCourseComponentRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateCourseComponentRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateCourseComponentRequest' from JSON`);
}
/** @internal */
exports.CreateCourseComponentSourcedIdPairs$inboundSchema = z.object({
    suppliedSourcedId: z.string(),
    allocatedSourcedId: z.string(),
});
/** @internal */
exports.CreateCourseComponentSourcedIdPairs$outboundSchema = z.object({
    suppliedSourcedId: z.string(),
    allocatedSourcedId: z.string(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CreateCourseComponentSourcedIdPairs$;
(function (CreateCourseComponentSourcedIdPairs$) {
    /** @deprecated use `CreateCourseComponentSourcedIdPairs$inboundSchema` instead. */
    CreateCourseComponentSourcedIdPairs$.inboundSchema = exports.CreateCourseComponentSourcedIdPairs$inboundSchema;
    /** @deprecated use `CreateCourseComponentSourcedIdPairs$outboundSchema` instead. */
    CreateCourseComponentSourcedIdPairs$.outboundSchema = exports.CreateCourseComponentSourcedIdPairs$outboundSchema;
})(CreateCourseComponentSourcedIdPairs$ || (exports.CreateCourseComponentSourcedIdPairs$ = CreateCourseComponentSourcedIdPairs$ = {}));
function createCourseComponentSourcedIdPairsToJSON(createCourseComponentSourcedIdPairs) {
    return JSON.stringify(exports.CreateCourseComponentSourcedIdPairs$outboundSchema.parse(createCourseComponentSourcedIdPairs));
}
function createCourseComponentSourcedIdPairsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateCourseComponentSourcedIdPairs$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateCourseComponentSourcedIdPairs' from JSON`);
}
/** @internal */
exports.CreateCourseComponentResponse$inboundSchema = z.object({
    sourcedIdPairs: z.lazy(() => exports.CreateCourseComponentSourcedIdPairs$inboundSchema),
});
/** @internal */
exports.CreateCourseComponentResponse$outboundSchema = z.object({
    sourcedIdPairs: z.lazy(() => exports.CreateCourseComponentSourcedIdPairs$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CreateCourseComponentResponse$;
(function (CreateCourseComponentResponse$) {
    /** @deprecated use `CreateCourseComponentResponse$inboundSchema` instead. */
    CreateCourseComponentResponse$.inboundSchema = exports.CreateCourseComponentResponse$inboundSchema;
    /** @deprecated use `CreateCourseComponentResponse$outboundSchema` instead. */
    CreateCourseComponentResponse$.outboundSchema = exports.CreateCourseComponentResponse$outboundSchema;
})(CreateCourseComponentResponse$ || (exports.CreateCourseComponentResponse$ = CreateCourseComponentResponse$ = {}));
function createCourseComponentResponseToJSON(createCourseComponentResponse) {
    return JSON.stringify(exports.CreateCourseComponentResponse$outboundSchema.parse(createCourseComponentResponse));
}
function createCourseComponentResponseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateCourseComponentResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateCourseComponentResponse' from JSON`);
}
//# sourceMappingURL=createcoursecomponent.js.map