"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.LessonPlanTreeComponent$ = exports.LessonPlanTreeComponent$outboundSchema = exports.LessonPlanTreeComponent$inboundSchema = exports.LessonPlanTreeComponentComponentResource$ = exports.LessonPlanTreeComponentComponentResource$outboundSchema = exports.LessonPlanTreeComponentComponentResource$inboundSchema = exports.Resource$ = exports.Resource$outboundSchema = exports.Resource$inboundSchema = exports.MetadataDetails$ = exports.MetadataDetails$outboundSchema = exports.MetadataDetails$inboundSchema = exports.Importance$ = exports.Importance$outboundSchema = exports.Importance$inboundSchema = exports.Role$ = exports.Role$outboundSchema = exports.Role$inboundSchema = exports.ResourceStatus$ = exports.ResourceStatus$outboundSchema = exports.ResourceStatus$inboundSchema = exports.LessonPlanTreeComponentStatus$ = exports.LessonPlanTreeComponentStatus$outboundSchema = exports.LessonPlanTreeComponentStatus$inboundSchema = exports.Importance = exports.Role = exports.ResourceStatus = exports.LessonPlanTreeComponentStatus = void 0;
exports.metadataDetailsToJSON = metadataDetailsToJSON;
exports.metadataDetailsFromJSON = metadataDetailsFromJSON;
exports.resourceToJSON = resourceToJSON;
exports.resourceFromJSON = resourceFromJSON;
exports.lessonPlanTreeComponentComponentResourceToJSON = lessonPlanTreeComponentComponentResourceToJSON;
exports.lessonPlanTreeComponentComponentResourceFromJSON = lessonPlanTreeComponentComponentResourceFromJSON;
exports.lessonPlanTreeComponentToJSON = lessonPlanTreeComponentToJSON;
exports.lessonPlanTreeComponentFromJSON = lessonPlanTreeComponentFromJSON;
const z = __importStar(require("zod"));
const schemas_js_1 = require("../../lib/schemas.js");
exports.LessonPlanTreeComponentStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
exports.ResourceStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
exports.Role = {
    Primary: "primary",
    Secondary: "secondary",
};
exports.Importance = {
    Primary: "primary",
    Secondary: "secondary",
};
/** @internal */
exports.LessonPlanTreeComponentStatus$inboundSchema = z.nativeEnum(exports.LessonPlanTreeComponentStatus);
/** @internal */
exports.LessonPlanTreeComponentStatus$outboundSchema = exports.LessonPlanTreeComponentStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var LessonPlanTreeComponentStatus$;
(function (LessonPlanTreeComponentStatus$) {
    /** @deprecated use `LessonPlanTreeComponentStatus$inboundSchema` instead. */
    LessonPlanTreeComponentStatus$.inboundSchema = exports.LessonPlanTreeComponentStatus$inboundSchema;
    /** @deprecated use `LessonPlanTreeComponentStatus$outboundSchema` instead. */
    LessonPlanTreeComponentStatus$.outboundSchema = exports.LessonPlanTreeComponentStatus$outboundSchema;
})(LessonPlanTreeComponentStatus$ || (exports.LessonPlanTreeComponentStatus$ = LessonPlanTreeComponentStatus$ = {}));
/** @internal */
exports.ResourceStatus$inboundSchema = z.nativeEnum(exports.ResourceStatus);
/** @internal */
exports.ResourceStatus$outboundSchema = exports.ResourceStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var ResourceStatus$;
(function (ResourceStatus$) {
    /** @deprecated use `ResourceStatus$inboundSchema` instead. */
    ResourceStatus$.inboundSchema = exports.ResourceStatus$inboundSchema;
    /** @deprecated use `ResourceStatus$outboundSchema` instead. */
    ResourceStatus$.outboundSchema = exports.ResourceStatus$outboundSchema;
})(ResourceStatus$ || (exports.ResourceStatus$ = ResourceStatus$ = {}));
/** @internal */
exports.Role$inboundSchema = z.nativeEnum(exports.Role);
/** @internal */
exports.Role$outboundSchema = exports.Role$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var Role$;
(function (Role$) {
    /** @deprecated use `Role$inboundSchema` instead. */
    Role$.inboundSchema = exports.Role$inboundSchema;
    /** @deprecated use `Role$outboundSchema` instead. */
    Role$.outboundSchema = exports.Role$outboundSchema;
})(Role$ || (exports.Role$ = Role$ = {}));
/** @internal */
exports.Importance$inboundSchema = z
    .nativeEnum(exports.Importance);
/** @internal */
exports.Importance$outboundSchema = exports.Importance$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var Importance$;
(function (Importance$) {
    /** @deprecated use `Importance$inboundSchema` instead. */
    Importance$.inboundSchema = exports.Importance$inboundSchema;
    /** @deprecated use `Importance$outboundSchema` instead. */
    Importance$.outboundSchema = exports.Importance$outboundSchema;
})(Importance$ || (exports.Importance$ = Importance$ = {}));
/** @internal */
exports.MetadataDetails$inboundSchema = z.object({
    type: z.string(),
});
/** @internal */
exports.MetadataDetails$outboundSchema = z.object({
    type: z.string(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var MetadataDetails$;
(function (MetadataDetails$) {
    /** @deprecated use `MetadataDetails$inboundSchema` instead. */
    MetadataDetails$.inboundSchema = exports.MetadataDetails$inboundSchema;
    /** @deprecated use `MetadataDetails$outboundSchema` instead. */
    MetadataDetails$.outboundSchema = exports.MetadataDetails$outboundSchema;
})(MetadataDetails$ || (exports.MetadataDetails$ = MetadataDetails$ = {}));
function metadataDetailsToJSON(metadataDetails) {
    return JSON.stringify(exports.MetadataDetails$outboundSchema.parse(metadataDetails));
}
function metadataDetailsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.MetadataDetails$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'MetadataDetails' from JSON`);
}
/** @internal */
exports.Resource$inboundSchema = z.object({
    sourcedId: z.string(),
    status: exports.ResourceStatus$inboundSchema,
    dateLastModified: z.string().datetime({ offset: true }).transform(v => new Date(v)).optional(),
    metadata: z.nullable(z.record(z.any())).optional(),
    title: z.string(),
    roles: z.array(exports.Role$inboundSchema).optional(),
    importance: exports.Importance$inboundSchema.optional(),
    vendorResourceId: z.string(),
    vendorId: z.nullable(z.string()).optional(),
    applicationId: z.nullable(z.string()).optional(),
    metadataDetails: z.lazy(() => exports.MetadataDetails$inboundSchema),
});
/** @internal */
exports.Resource$outboundSchema = z.object({
    sourcedId: z.string(),
    status: exports.ResourceStatus$outboundSchema,
    dateLastModified: z.date().transform(v => v.toISOString()).optional(),
    metadata: z.nullable(z.record(z.any())).optional(),
    title: z.string(),
    roles: z.array(exports.Role$outboundSchema).optional(),
    importance: exports.Importance$outboundSchema.optional(),
    vendorResourceId: z.string(),
    vendorId: z.nullable(z.string()).optional(),
    applicationId: z.nullable(z.string()).optional(),
    metadataDetails: z.lazy(() => exports.MetadataDetails$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var Resource$;
(function (Resource$) {
    /** @deprecated use `Resource$inboundSchema` instead. */
    Resource$.inboundSchema = exports.Resource$inboundSchema;
    /** @deprecated use `Resource$outboundSchema` instead. */
    Resource$.outboundSchema = exports.Resource$outboundSchema;
})(Resource$ || (exports.Resource$ = Resource$ = {}));
function resourceToJSON(resource) {
    return JSON.stringify(exports.Resource$outboundSchema.parse(resource));
}
function resourceFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Resource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Resource' from JSON`);
}
/** @internal */
exports.LessonPlanTreeComponentComponentResource$inboundSchema = z.object({
    tenantId: z.nullable(z.string()),
    clientAppId: z.nullable(z.string()),
    id: z.string(),
    sortOrder: z.number().optional(),
    metadata: z.record(z.any()).optional(),
    courseComponentSourcedId: z.string(),
    resource: z.lazy(() => exports.Resource$inboundSchema),
});
/** @internal */
exports.LessonPlanTreeComponentComponentResource$outboundSchema = z.object({
    tenantId: z.nullable(z.string()),
    clientAppId: z.nullable(z.string()),
    id: z.string(),
    sortOrder: z.number().optional(),
    metadata: z.record(z.any()).optional(),
    courseComponentSourcedId: z.string(),
    resource: z.lazy(() => exports.Resource$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var LessonPlanTreeComponentComponentResource$;
(function (LessonPlanTreeComponentComponentResource$) {
    /** @deprecated use `LessonPlanTreeComponentComponentResource$inboundSchema` instead. */
    LessonPlanTreeComponentComponentResource$.inboundSchema = exports.LessonPlanTreeComponentComponentResource$inboundSchema;
    /** @deprecated use `LessonPlanTreeComponentComponentResource$outboundSchema` instead. */
    LessonPlanTreeComponentComponentResource$.outboundSchema = exports.LessonPlanTreeComponentComponentResource$outboundSchema;
})(LessonPlanTreeComponentComponentResource$ || (exports.LessonPlanTreeComponentComponentResource$ = LessonPlanTreeComponentComponentResource$ = {}));
function lessonPlanTreeComponentComponentResourceToJSON(lessonPlanTreeComponentComponentResource) {
    return JSON.stringify(exports.LessonPlanTreeComponentComponentResource$outboundSchema.parse(lessonPlanTreeComponentComponentResource));
}
function lessonPlanTreeComponentComponentResourceFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.LessonPlanTreeComponentComponentResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LessonPlanTreeComponentComponentResource' from JSON`);
}
/** @internal */
exports.LessonPlanTreeComponent$inboundSchema = z.object({
    id: z.string(),
    sourcedId: z.string(),
    status: exports.LessonPlanTreeComponentStatus$inboundSchema,
    title: z.string(),
    sortOrder: z.number().optional(),
    unlockDate: z.string().optional(),
    metadata: z.record(z.any()).optional(),
    prerequisites: z.array(z.string()).optional(),
    prerequisiteCriteria: z.string().optional(),
    componentResources: z.array(z.lazy(() => exports.LessonPlanTreeComponentComponentResource$inboundSchema)).optional(),
    subComponents: z.array(z.lazy(() => exports.LessonPlanTreeComponent$inboundSchema))
        .optional(),
});
/** @internal */
exports.LessonPlanTreeComponent$outboundSchema = z.object({
    id: z.string(),
    sourcedId: z.string(),
    status: exports.LessonPlanTreeComponentStatus$outboundSchema,
    title: z.string(),
    sortOrder: z.number().optional(),
    unlockDate: z.string().optional(),
    metadata: z.record(z.any()).optional(),
    prerequisites: z.array(z.string()).optional(),
    prerequisiteCriteria: z.string().optional(),
    componentResources: z.array(z.lazy(() => exports.LessonPlanTreeComponentComponentResource$outboundSchema)).optional(),
    subComponents: z.array(z.lazy(() => exports.LessonPlanTreeComponent$outboundSchema))
        .optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var LessonPlanTreeComponent$;
(function (LessonPlanTreeComponent$) {
    /** @deprecated use `LessonPlanTreeComponent$inboundSchema` instead. */
    LessonPlanTreeComponent$.inboundSchema = exports.LessonPlanTreeComponent$inboundSchema;
    /** @deprecated use `LessonPlanTreeComponent$outboundSchema` instead. */
    LessonPlanTreeComponent$.outboundSchema = exports.LessonPlanTreeComponent$outboundSchema;
})(LessonPlanTreeComponent$ || (exports.LessonPlanTreeComponent$ = LessonPlanTreeComponent$ = {}));
function lessonPlanTreeComponentToJSON(lessonPlanTreeComponent) {
    return JSON.stringify(exports.LessonPlanTreeComponent$outboundSchema.parse(lessonPlanTreeComponent));
}
function lessonPlanTreeComponentFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.LessonPlanTreeComponent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LessonPlanTreeComponent' from JSON`);
}
//# sourceMappingURL=lessonplantreecomponent.js.map