"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.LineItem$ = exports.LineItem$outboundSchema = exports.LineItem$inboundSchema = exports.LineItemLearningObjectiveSet$ = exports.LineItemLearningObjectiveSet$outboundSchema = exports.LineItemLearningObjectiveSet$inboundSchema = exports.LineItemLearningObjectiveId$ = exports.LineItemLearningObjectiveId$outboundSchema = exports.LineItemLearningObjectiveId$inboundSchema = exports.LineItemScoreScale$ = exports.LineItemScoreScale$outboundSchema = exports.LineItemScoreScale$inboundSchema = exports.LineItemAcademicSession$ = exports.LineItemAcademicSession$outboundSchema = exports.LineItemAcademicSession$inboundSchema = exports.GradingPeriod$ = exports.GradingPeriod$outboundSchema = exports.GradingPeriod$inboundSchema = exports.LineItemCategory$ = exports.LineItemCategory$outboundSchema = exports.LineItemCategory$inboundSchema = exports.LineItemSchool$ = exports.LineItemSchool$outboundSchema = exports.LineItemSchool$inboundSchema = exports.LineItemClass$ = exports.LineItemClass$outboundSchema = exports.LineItemClass$inboundSchema = exports.LineItemStatus$ = exports.LineItemStatus$outboundSchema = exports.LineItemStatus$inboundSchema = exports.LineItemStatus = void 0;
exports.lineItemClassToJSON = lineItemClassToJSON;
exports.lineItemClassFromJSON = lineItemClassFromJSON;
exports.lineItemSchoolToJSON = lineItemSchoolToJSON;
exports.lineItemSchoolFromJSON = lineItemSchoolFromJSON;
exports.lineItemCategoryToJSON = lineItemCategoryToJSON;
exports.lineItemCategoryFromJSON = lineItemCategoryFromJSON;
exports.gradingPeriodToJSON = gradingPeriodToJSON;
exports.gradingPeriodFromJSON = gradingPeriodFromJSON;
exports.lineItemAcademicSessionToJSON = lineItemAcademicSessionToJSON;
exports.lineItemAcademicSessionFromJSON = lineItemAcademicSessionFromJSON;
exports.lineItemScoreScaleToJSON = lineItemScoreScaleToJSON;
exports.lineItemScoreScaleFromJSON = lineItemScoreScaleFromJSON;
exports.lineItemLearningObjectiveIdToJSON = lineItemLearningObjectiveIdToJSON;
exports.lineItemLearningObjectiveIdFromJSON = lineItemLearningObjectiveIdFromJSON;
exports.lineItemLearningObjectiveSetToJSON = lineItemLearningObjectiveSetToJSON;
exports.lineItemLearningObjectiveSetFromJSON = lineItemLearningObjectiveSetFromJSON;
exports.lineItemToJSON = lineItemToJSON;
exports.lineItemFromJSON = lineItemFromJSON;
const z = __importStar(require("zod"));
const schemas_js_1 = require("../../lib/schemas.js");
exports.LineItemStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
/** @internal */
exports.LineItemStatus$inboundSchema = z.nativeEnum(exports.LineItemStatus);
/** @internal */
exports.LineItemStatus$outboundSchema = exports.LineItemStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var LineItemStatus$;
(function (LineItemStatus$) {
    /** @deprecated use `LineItemStatus$inboundSchema` instead. */
    LineItemStatus$.inboundSchema = exports.LineItemStatus$inboundSchema;
    /** @deprecated use `LineItemStatus$outboundSchema` instead. */
    LineItemStatus$.outboundSchema = exports.LineItemStatus$outboundSchema;
})(LineItemStatus$ || (exports.LineItemStatus$ = LineItemStatus$ = {}));
/** @internal */
exports.LineItemClass$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.LineItemClass$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 LineItemClass$;
(function (LineItemClass$) {
    /** @deprecated use `LineItemClass$inboundSchema` instead. */
    LineItemClass$.inboundSchema = exports.LineItemClass$inboundSchema;
    /** @deprecated use `LineItemClass$outboundSchema` instead. */
    LineItemClass$.outboundSchema = exports.LineItemClass$outboundSchema;
})(LineItemClass$ || (exports.LineItemClass$ = LineItemClass$ = {}));
function lineItemClassToJSON(lineItemClass) {
    return JSON.stringify(exports.LineItemClass$outboundSchema.parse(lineItemClass));
}
function lineItemClassFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.LineItemClass$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LineItemClass' from JSON`);
}
/** @internal */
exports.LineItemSchool$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.LineItemSchool$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 LineItemSchool$;
(function (LineItemSchool$) {
    /** @deprecated use `LineItemSchool$inboundSchema` instead. */
    LineItemSchool$.inboundSchema = exports.LineItemSchool$inboundSchema;
    /** @deprecated use `LineItemSchool$outboundSchema` instead. */
    LineItemSchool$.outboundSchema = exports.LineItemSchool$outboundSchema;
})(LineItemSchool$ || (exports.LineItemSchool$ = LineItemSchool$ = {}));
function lineItemSchoolToJSON(lineItemSchool) {
    return JSON.stringify(exports.LineItemSchool$outboundSchema.parse(lineItemSchool));
}
function lineItemSchoolFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.LineItemSchool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LineItemSchool' from JSON`);
}
/** @internal */
exports.LineItemCategory$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.LineItemCategory$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 LineItemCategory$;
(function (LineItemCategory$) {
    /** @deprecated use `LineItemCategory$inboundSchema` instead. */
    LineItemCategory$.inboundSchema = exports.LineItemCategory$inboundSchema;
    /** @deprecated use `LineItemCategory$outboundSchema` instead. */
    LineItemCategory$.outboundSchema = exports.LineItemCategory$outboundSchema;
})(LineItemCategory$ || (exports.LineItemCategory$ = LineItemCategory$ = {}));
function lineItemCategoryToJSON(lineItemCategory) {
    return JSON.stringify(exports.LineItemCategory$outboundSchema.parse(lineItemCategory));
}
function lineItemCategoryFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.LineItemCategory$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LineItemCategory' from JSON`);
}
/** @internal */
exports.GradingPeriod$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.GradingPeriod$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 GradingPeriod$;
(function (GradingPeriod$) {
    /** @deprecated use `GradingPeriod$inboundSchema` instead. */
    GradingPeriod$.inboundSchema = exports.GradingPeriod$inboundSchema;
    /** @deprecated use `GradingPeriod$outboundSchema` instead. */
    GradingPeriod$.outboundSchema = exports.GradingPeriod$outboundSchema;
})(GradingPeriod$ || (exports.GradingPeriod$ = GradingPeriod$ = {}));
function gradingPeriodToJSON(gradingPeriod) {
    return JSON.stringify(exports.GradingPeriod$outboundSchema.parse(gradingPeriod));
}
function gradingPeriodFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GradingPeriod$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GradingPeriod' from JSON`);
}
/** @internal */
exports.LineItemAcademicSession$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.LineItemAcademicSession$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 LineItemAcademicSession$;
(function (LineItemAcademicSession$) {
    /** @deprecated use `LineItemAcademicSession$inboundSchema` instead. */
    LineItemAcademicSession$.inboundSchema = exports.LineItemAcademicSession$inboundSchema;
    /** @deprecated use `LineItemAcademicSession$outboundSchema` instead. */
    LineItemAcademicSession$.outboundSchema = exports.LineItemAcademicSession$outboundSchema;
})(LineItemAcademicSession$ || (exports.LineItemAcademicSession$ = LineItemAcademicSession$ = {}));
function lineItemAcademicSessionToJSON(lineItemAcademicSession) {
    return JSON.stringify(exports.LineItemAcademicSession$outboundSchema.parse(lineItemAcademicSession));
}
function lineItemAcademicSessionFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.LineItemAcademicSession$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LineItemAcademicSession' from JSON`);
}
/** @internal */
exports.LineItemScoreScale$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.LineItemScoreScale$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 LineItemScoreScale$;
(function (LineItemScoreScale$) {
    /** @deprecated use `LineItemScoreScale$inboundSchema` instead. */
    LineItemScoreScale$.inboundSchema = exports.LineItemScoreScale$inboundSchema;
    /** @deprecated use `LineItemScoreScale$outboundSchema` instead. */
    LineItemScoreScale$.outboundSchema = exports.LineItemScoreScale$outboundSchema;
})(LineItemScoreScale$ || (exports.LineItemScoreScale$ = LineItemScoreScale$ = {}));
function lineItemScoreScaleToJSON(lineItemScoreScale) {
    return JSON.stringify(exports.LineItemScoreScale$outboundSchema.parse(lineItemScoreScale));
}
function lineItemScoreScaleFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.LineItemScoreScale$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LineItemScoreScale' from JSON`);
}
/** @internal */
exports.LineItemLearningObjectiveId$inboundSchema = z.object({
    learningObjectiveId: z.string(),
    score: z.number().optional(),
    textScore: z.string().optional(),
});
/** @internal */
exports.LineItemLearningObjectiveId$outboundSchema = z.object({
    learningObjectiveId: z.string(),
    score: z.number().optional(),
    textScore: 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 LineItemLearningObjectiveId$;
(function (LineItemLearningObjectiveId$) {
    /** @deprecated use `LineItemLearningObjectiveId$inboundSchema` instead. */
    LineItemLearningObjectiveId$.inboundSchema = exports.LineItemLearningObjectiveId$inboundSchema;
    /** @deprecated use `LineItemLearningObjectiveId$outboundSchema` instead. */
    LineItemLearningObjectiveId$.outboundSchema = exports.LineItemLearningObjectiveId$outboundSchema;
})(LineItemLearningObjectiveId$ || (exports.LineItemLearningObjectiveId$ = LineItemLearningObjectiveId$ = {}));
function lineItemLearningObjectiveIdToJSON(lineItemLearningObjectiveId) {
    return JSON.stringify(exports.LineItemLearningObjectiveId$outboundSchema.parse(lineItemLearningObjectiveId));
}
function lineItemLearningObjectiveIdFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.LineItemLearningObjectiveId$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LineItemLearningObjectiveId' from JSON`);
}
/** @internal */
exports.LineItemLearningObjectiveSet$inboundSchema = z.object({
    source: z.string(),
    learningObjectiveIds: z.array(z.lazy(() => exports.LineItemLearningObjectiveId$inboundSchema)),
});
/** @internal */
exports.LineItemLearningObjectiveSet$outboundSchema = z.object({
    source: z.string(),
    learningObjectiveIds: z.array(z.lazy(() => exports.LineItemLearningObjectiveId$outboundSchema)),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var LineItemLearningObjectiveSet$;
(function (LineItemLearningObjectiveSet$) {
    /** @deprecated use `LineItemLearningObjectiveSet$inboundSchema` instead. */
    LineItemLearningObjectiveSet$.inboundSchema = exports.LineItemLearningObjectiveSet$inboundSchema;
    /** @deprecated use `LineItemLearningObjectiveSet$outboundSchema` instead. */
    LineItemLearningObjectiveSet$.outboundSchema = exports.LineItemLearningObjectiveSet$outboundSchema;
})(LineItemLearningObjectiveSet$ || (exports.LineItemLearningObjectiveSet$ = LineItemLearningObjectiveSet$ = {}));
function lineItemLearningObjectiveSetToJSON(lineItemLearningObjectiveSet) {
    return JSON.stringify(exports.LineItemLearningObjectiveSet$outboundSchema.parse(lineItemLearningObjectiveSet));
}
function lineItemLearningObjectiveSetFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.LineItemLearningObjectiveSet$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LineItemLearningObjectiveSet' from JSON`);
}
/** @internal */
exports.LineItem$inboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: exports.LineItemStatus$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(),
    assignDate: z.string().datetime({ offset: true }).transform(v => new Date(v)),
    dueDate: z.string().datetime({ offset: true }).transform(v => new Date(v)),
    class: z.lazy(() => exports.LineItemClass$inboundSchema),
    school: z.lazy(() => exports.LineItemSchool$inboundSchema),
    category: z.lazy(() => exports.LineItemCategory$inboundSchema),
    gradingPeriod: z.nullable(z.lazy(() => exports.GradingPeriod$inboundSchema))
        .optional(),
    academicSession: z.nullable(z.lazy(() => exports.LineItemAcademicSession$inboundSchema)).optional(),
    scoreScale: z.nullable(z.lazy(() => exports.LineItemScoreScale$inboundSchema))
        .optional(),
    resultValueMin: z.nullable(z.number()).optional(),
    resultValueMax: z.nullable(z.number()).optional(),
    learningObjectiveSet: z.nullable(z.array(z.lazy(() => exports.LineItemLearningObjectiveSet$inboundSchema))).optional(),
});
/** @internal */
exports.LineItem$outboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: exports.LineItemStatus$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(),
    assignDate: z.date().transform(v => v.toISOString()),
    dueDate: z.date().transform(v => v.toISOString()),
    class: z.lazy(() => exports.LineItemClass$outboundSchema),
    school: z.lazy(() => exports.LineItemSchool$outboundSchema),
    category: z.lazy(() => exports.LineItemCategory$outboundSchema),
    gradingPeriod: z.nullable(z.lazy(() => exports.GradingPeriod$outboundSchema))
        .optional(),
    academicSession: z.nullable(z.lazy(() => exports.LineItemAcademicSession$outboundSchema)).optional(),
    scoreScale: z.nullable(z.lazy(() => exports.LineItemScoreScale$outboundSchema))
        .optional(),
    resultValueMin: z.nullable(z.number()).optional(),
    resultValueMax: z.nullable(z.number()).optional(),
    learningObjectiveSet: z.nullable(z.array(z.lazy(() => exports.LineItemLearningObjectiveSet$outboundSchema))).optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var LineItem$;
(function (LineItem$) {
    /** @deprecated use `LineItem$inboundSchema` instead. */
    LineItem$.inboundSchema = exports.LineItem$inboundSchema;
    /** @deprecated use `LineItem$outboundSchema` instead. */
    LineItem$.outboundSchema = exports.LineItem$outboundSchema;
})(LineItem$ || (exports.LineItem$ = LineItem$ = {}));
function lineItemToJSON(lineItem) {
    return JSON.stringify(exports.LineItem$outboundSchema.parse(lineItem));
}
function lineItemFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.LineItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LineItem' from JSON`);
}
//# sourceMappingURL=lineitem.js.map