"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.AssessmentLineItem$ = exports.AssessmentLineItem$outboundSchema = exports.AssessmentLineItem$inboundSchema = exports.AssessmentLineItemComponentResource$ = exports.AssessmentLineItemComponentResource$outboundSchema = exports.AssessmentLineItemComponentResource$inboundSchema = exports.Component$ = exports.Component$outboundSchema = exports.Component$inboundSchema = exports.AssessmentLineItemScoreScale$ = exports.AssessmentLineItemScoreScale$outboundSchema = exports.AssessmentLineItemScoreScale$inboundSchema = exports.ParentAssessmentLineItem$ = exports.ParentAssessmentLineItem$outboundSchema = exports.ParentAssessmentLineItem$inboundSchema = exports.Class$ = exports.Class$outboundSchema = exports.Class$inboundSchema = exports.AssessmentLineItemStatus$ = exports.AssessmentLineItemStatus$outboundSchema = exports.AssessmentLineItemStatus$inboundSchema = exports.AssessmentLineItemStatus = void 0;
exports.classToJSON = classToJSON;
exports.classFromJSON = classFromJSON;
exports.parentAssessmentLineItemToJSON = parentAssessmentLineItemToJSON;
exports.parentAssessmentLineItemFromJSON = parentAssessmentLineItemFromJSON;
exports.assessmentLineItemScoreScaleToJSON = assessmentLineItemScoreScaleToJSON;
exports.assessmentLineItemScoreScaleFromJSON = assessmentLineItemScoreScaleFromJSON;
exports.componentToJSON = componentToJSON;
exports.componentFromJSON = componentFromJSON;
exports.assessmentLineItemComponentResourceToJSON = assessmentLineItemComponentResourceToJSON;
exports.assessmentLineItemComponentResourceFromJSON = assessmentLineItemComponentResourceFromJSON;
exports.assessmentLineItemToJSON = assessmentLineItemToJSON;
exports.assessmentLineItemFromJSON = assessmentLineItemFromJSON;
const z = __importStar(require("zod"));
const schemas_js_1 = require("../../lib/schemas.js");
const learningobjectiveset_js_1 = require("./learningobjectiveset.js");
exports.AssessmentLineItemStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
/** @internal */
exports.AssessmentLineItemStatus$inboundSchema = z.nativeEnum(exports.AssessmentLineItemStatus);
/** @internal */
exports.AssessmentLineItemStatus$outboundSchema = exports.AssessmentLineItemStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var AssessmentLineItemStatus$;
(function (AssessmentLineItemStatus$) {
    /** @deprecated use `AssessmentLineItemStatus$inboundSchema` instead. */
    AssessmentLineItemStatus$.inboundSchema = exports.AssessmentLineItemStatus$inboundSchema;
    /** @deprecated use `AssessmentLineItemStatus$outboundSchema` instead. */
    AssessmentLineItemStatus$.outboundSchema = exports.AssessmentLineItemStatus$outboundSchema;
})(AssessmentLineItemStatus$ || (exports.AssessmentLineItemStatus$ = AssessmentLineItemStatus$ = {}));
/** @internal */
exports.Class$inboundSchema = z
    .object({
    sourcedId: z.string(),
});
/** @internal */
exports.Class$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 Class$;
(function (Class$) {
    /** @deprecated use `Class$inboundSchema` instead. */
    Class$.inboundSchema = exports.Class$inboundSchema;
    /** @deprecated use `Class$outboundSchema` instead. */
    Class$.outboundSchema = exports.Class$outboundSchema;
})(Class$ || (exports.Class$ = Class$ = {}));
function classToJSON(value) {
    return JSON.stringify(exports.Class$outboundSchema.parse(value));
}
function classFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Class$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Class' from JSON`);
}
/** @internal */
exports.ParentAssessmentLineItem$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.ParentAssessmentLineItem$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 ParentAssessmentLineItem$;
(function (ParentAssessmentLineItem$) {
    /** @deprecated use `ParentAssessmentLineItem$inboundSchema` instead. */
    ParentAssessmentLineItem$.inboundSchema = exports.ParentAssessmentLineItem$inboundSchema;
    /** @deprecated use `ParentAssessmentLineItem$outboundSchema` instead. */
    ParentAssessmentLineItem$.outboundSchema = exports.ParentAssessmentLineItem$outboundSchema;
})(ParentAssessmentLineItem$ || (exports.ParentAssessmentLineItem$ = ParentAssessmentLineItem$ = {}));
function parentAssessmentLineItemToJSON(parentAssessmentLineItem) {
    return JSON.stringify(exports.ParentAssessmentLineItem$outboundSchema.parse(parentAssessmentLineItem));
}
function parentAssessmentLineItemFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ParentAssessmentLineItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ParentAssessmentLineItem' from JSON`);
}
/** @internal */
exports.AssessmentLineItemScoreScale$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.AssessmentLineItemScoreScale$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 AssessmentLineItemScoreScale$;
(function (AssessmentLineItemScoreScale$) {
    /** @deprecated use `AssessmentLineItemScoreScale$inboundSchema` instead. */
    AssessmentLineItemScoreScale$.inboundSchema = exports.AssessmentLineItemScoreScale$inboundSchema;
    /** @deprecated use `AssessmentLineItemScoreScale$outboundSchema` instead. */
    AssessmentLineItemScoreScale$.outboundSchema = exports.AssessmentLineItemScoreScale$outboundSchema;
})(AssessmentLineItemScoreScale$ || (exports.AssessmentLineItemScoreScale$ = AssessmentLineItemScoreScale$ = {}));
function assessmentLineItemScoreScaleToJSON(assessmentLineItemScoreScale) {
    return JSON.stringify(exports.AssessmentLineItemScoreScale$outboundSchema.parse(assessmentLineItemScoreScale));
}
function assessmentLineItemScoreScaleFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AssessmentLineItemScoreScale$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AssessmentLineItemScoreScale' from JSON`);
}
/** @internal */
exports.Component$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.Component$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 Component$;
(function (Component$) {
    /** @deprecated use `Component$inboundSchema` instead. */
    Component$.inboundSchema = exports.Component$inboundSchema;
    /** @deprecated use `Component$outboundSchema` instead. */
    Component$.outboundSchema = exports.Component$outboundSchema;
})(Component$ || (exports.Component$ = Component$ = {}));
function componentToJSON(component) {
    return JSON.stringify(exports.Component$outboundSchema.parse(component));
}
function componentFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Component$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Component' from JSON`);
}
/** @internal */
exports.AssessmentLineItemComponentResource$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.AssessmentLineItemComponentResource$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 AssessmentLineItemComponentResource$;
(function (AssessmentLineItemComponentResource$) {
    /** @deprecated use `AssessmentLineItemComponentResource$inboundSchema` instead. */
    AssessmentLineItemComponentResource$.inboundSchema = exports.AssessmentLineItemComponentResource$inboundSchema;
    /** @deprecated use `AssessmentLineItemComponentResource$outboundSchema` instead. */
    AssessmentLineItemComponentResource$.outboundSchema = exports.AssessmentLineItemComponentResource$outboundSchema;
})(AssessmentLineItemComponentResource$ || (exports.AssessmentLineItemComponentResource$ = AssessmentLineItemComponentResource$ = {}));
function assessmentLineItemComponentResourceToJSON(assessmentLineItemComponentResource) {
    return JSON.stringify(exports.AssessmentLineItemComponentResource$outboundSchema.parse(assessmentLineItemComponentResource));
}
function assessmentLineItemComponentResourceFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AssessmentLineItemComponentResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AssessmentLineItemComponentResource' from JSON`);
}
/** @internal */
exports.AssessmentLineItem$inboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: exports.AssessmentLineItemStatus$inboundSchema,
    dateLastModified: z.string().datetime({ offset: true }).transform(v => new Date(v)).optional(),
    metadata: z.nullable(z.record(z.any())).optional(),
    title: z.string(),
    description: z.nullable(z.string()).optional(),
    class: z.nullable(z.lazy(() => exports.Class$inboundSchema)).optional(),
    parentAssessmentLineItem: z.nullable(z.lazy(() => exports.ParentAssessmentLineItem$inboundSchema)).optional(),
    scoreScale: z.nullable(z.lazy(() => exports.AssessmentLineItemScoreScale$inboundSchema)).optional(),
    resultValueMin: z.nullable(z.number()).optional(),
    resultValueMax: z.nullable(z.number()).optional(),
    component: z.nullable(z.lazy(() => exports.Component$inboundSchema)).optional(),
    componentResource: z.nullable(z.lazy(() => exports.AssessmentLineItemComponentResource$inboundSchema)).optional(),
    learningObjectiveSet: z.nullable(z.array(learningobjectiveset_js_1.LearningObjectiveSet$inboundSchema))
        .optional(),
});
/** @internal */
exports.AssessmentLineItem$outboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: exports.AssessmentLineItemStatus$outboundSchema,
    dateLastModified: z.date().transform(v => v.toISOString()).optional(),
    metadata: z.nullable(z.record(z.any())).optional(),
    title: z.string(),
    description: z.nullable(z.string()).optional(),
    class: z.nullable(z.lazy(() => exports.Class$outboundSchema)).optional(),
    parentAssessmentLineItem: z.nullable(z.lazy(() => exports.ParentAssessmentLineItem$outboundSchema)).optional(),
    scoreScale: z.nullable(z.lazy(() => exports.AssessmentLineItemScoreScale$outboundSchema)).optional(),
    resultValueMin: z.nullable(z.number()).optional(),
    resultValueMax: z.nullable(z.number()).optional(),
    component: z.nullable(z.lazy(() => exports.Component$outboundSchema)).optional(),
    componentResource: z.nullable(z.lazy(() => exports.AssessmentLineItemComponentResource$outboundSchema)).optional(),
    learningObjectiveSet: z.nullable(z.array(learningobjectiveset_js_1.LearningObjectiveSet$outboundSchema))
        .optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var AssessmentLineItem$;
(function (AssessmentLineItem$) {
    /** @deprecated use `AssessmentLineItem$inboundSchema` instead. */
    AssessmentLineItem$.inboundSchema = exports.AssessmentLineItem$inboundSchema;
    /** @deprecated use `AssessmentLineItem$outboundSchema` instead. */
    AssessmentLineItem$.outboundSchema = exports.AssessmentLineItem$outboundSchema;
})(AssessmentLineItem$ || (exports.AssessmentLineItem$ = AssessmentLineItem$ = {}));
function assessmentLineItemToJSON(assessmentLineItem) {
    return JSON.stringify(exports.AssessmentLineItem$outboundSchema.parse(assessmentLineItem));
}
function assessmentLineItemFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AssessmentLineItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AssessmentLineItem' from JSON`);
}
//# sourceMappingURL=assessmentlineitem.js.map