"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.Result$ = exports.Result$outboundSchema = exports.Result$inboundSchema = exports.ResultLearningObjectiveSet$ = exports.ResultLearningObjectiveSet$outboundSchema = exports.ResultLearningObjectiveSet$inboundSchema = exports.ResultLearningObjectiveId$ = exports.ResultLearningObjectiveId$outboundSchema = exports.ResultLearningObjectiveId$inboundSchema = exports.ResultScoreStatus$ = exports.ResultScoreStatus$outboundSchema = exports.ResultScoreStatus$inboundSchema = exports.ResultScoreScale$ = exports.ResultScoreScale$outboundSchema = exports.ResultScoreScale$inboundSchema = exports.ResultClass$ = exports.ResultClass$outboundSchema = exports.ResultClass$inboundSchema = exports.ResultStudent$ = exports.ResultStudent$outboundSchema = exports.ResultStudent$inboundSchema = exports.ResultLineItem$ = exports.ResultLineItem$outboundSchema = exports.ResultLineItem$inboundSchema = exports.ResultStatus$ = exports.ResultStatus$outboundSchema = exports.ResultStatus$inboundSchema = exports.ResultScoreStatus = exports.ResultStatus = void 0;
exports.resultLineItemToJSON = resultLineItemToJSON;
exports.resultLineItemFromJSON = resultLineItemFromJSON;
exports.resultStudentToJSON = resultStudentToJSON;
exports.resultStudentFromJSON = resultStudentFromJSON;
exports.resultClassToJSON = resultClassToJSON;
exports.resultClassFromJSON = resultClassFromJSON;
exports.resultScoreScaleToJSON = resultScoreScaleToJSON;
exports.resultScoreScaleFromJSON = resultScoreScaleFromJSON;
exports.resultLearningObjectiveIdToJSON = resultLearningObjectiveIdToJSON;
exports.resultLearningObjectiveIdFromJSON = resultLearningObjectiveIdFromJSON;
exports.resultLearningObjectiveSetToJSON = resultLearningObjectiveSetToJSON;
exports.resultLearningObjectiveSetFromJSON = resultLearningObjectiveSetFromJSON;
exports.resultToJSON = resultToJSON;
exports.resultFromJSON = resultFromJSON;
const z = __importStar(require("zod"));
const schemas_js_1 = require("../../lib/schemas.js");
exports.ResultStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
exports.ResultScoreStatus = {
    Exempt: "exempt",
    FullyGraded: "fully graded",
    NotSubmitted: "not submitted",
    PartiallyGraded: "partially graded",
    Submitted: "submitted",
};
/** @internal */
exports.ResultStatus$inboundSchema = z.nativeEnum(exports.ResultStatus);
/** @internal */
exports.ResultStatus$outboundSchema = exports.ResultStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var ResultStatus$;
(function (ResultStatus$) {
    /** @deprecated use `ResultStatus$inboundSchema` instead. */
    ResultStatus$.inboundSchema = exports.ResultStatus$inboundSchema;
    /** @deprecated use `ResultStatus$outboundSchema` instead. */
    ResultStatus$.outboundSchema = exports.ResultStatus$outboundSchema;
})(ResultStatus$ || (exports.ResultStatus$ = ResultStatus$ = {}));
/** @internal */
exports.ResultLineItem$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.ResultLineItem$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 ResultLineItem$;
(function (ResultLineItem$) {
    /** @deprecated use `ResultLineItem$inboundSchema` instead. */
    ResultLineItem$.inboundSchema = exports.ResultLineItem$inboundSchema;
    /** @deprecated use `ResultLineItem$outboundSchema` instead. */
    ResultLineItem$.outboundSchema = exports.ResultLineItem$outboundSchema;
})(ResultLineItem$ || (exports.ResultLineItem$ = ResultLineItem$ = {}));
function resultLineItemToJSON(resultLineItem) {
    return JSON.stringify(exports.ResultLineItem$outboundSchema.parse(resultLineItem));
}
function resultLineItemFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ResultLineItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResultLineItem' from JSON`);
}
/** @internal */
exports.ResultStudent$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.ResultStudent$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 ResultStudent$;
(function (ResultStudent$) {
    /** @deprecated use `ResultStudent$inboundSchema` instead. */
    ResultStudent$.inboundSchema = exports.ResultStudent$inboundSchema;
    /** @deprecated use `ResultStudent$outboundSchema` instead. */
    ResultStudent$.outboundSchema = exports.ResultStudent$outboundSchema;
})(ResultStudent$ || (exports.ResultStudent$ = ResultStudent$ = {}));
function resultStudentToJSON(resultStudent) {
    return JSON.stringify(exports.ResultStudent$outboundSchema.parse(resultStudent));
}
function resultStudentFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ResultStudent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResultStudent' from JSON`);
}
/** @internal */
exports.ResultClass$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.ResultClass$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 ResultClass$;
(function (ResultClass$) {
    /** @deprecated use `ResultClass$inboundSchema` instead. */
    ResultClass$.inboundSchema = exports.ResultClass$inboundSchema;
    /** @deprecated use `ResultClass$outboundSchema` instead. */
    ResultClass$.outboundSchema = exports.ResultClass$outboundSchema;
})(ResultClass$ || (exports.ResultClass$ = ResultClass$ = {}));
function resultClassToJSON(resultClass) {
    return JSON.stringify(exports.ResultClass$outboundSchema.parse(resultClass));
}
function resultClassFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ResultClass$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResultClass' from JSON`);
}
/** @internal */
exports.ResultScoreScale$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.ResultScoreScale$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 ResultScoreScale$;
(function (ResultScoreScale$) {
    /** @deprecated use `ResultScoreScale$inboundSchema` instead. */
    ResultScoreScale$.inboundSchema = exports.ResultScoreScale$inboundSchema;
    /** @deprecated use `ResultScoreScale$outboundSchema` instead. */
    ResultScoreScale$.outboundSchema = exports.ResultScoreScale$outboundSchema;
})(ResultScoreScale$ || (exports.ResultScoreScale$ = ResultScoreScale$ = {}));
function resultScoreScaleToJSON(resultScoreScale) {
    return JSON.stringify(exports.ResultScoreScale$outboundSchema.parse(resultScoreScale));
}
function resultScoreScaleFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ResultScoreScale$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResultScoreScale' from JSON`);
}
/** @internal */
exports.ResultScoreStatus$inboundSchema = z.nativeEnum(exports.ResultScoreStatus);
/** @internal */
exports.ResultScoreStatus$outboundSchema = exports.ResultScoreStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var ResultScoreStatus$;
(function (ResultScoreStatus$) {
    /** @deprecated use `ResultScoreStatus$inboundSchema` instead. */
    ResultScoreStatus$.inboundSchema = exports.ResultScoreStatus$inboundSchema;
    /** @deprecated use `ResultScoreStatus$outboundSchema` instead. */
    ResultScoreStatus$.outboundSchema = exports.ResultScoreStatus$outboundSchema;
})(ResultScoreStatus$ || (exports.ResultScoreStatus$ = ResultScoreStatus$ = {}));
/** @internal */
exports.ResultLearningObjectiveId$inboundSchema = z.object({
    learningObjectiveId: z.string(),
    score: z.number().optional(),
    textScore: z.string().optional(),
});
/** @internal */
exports.ResultLearningObjectiveId$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 ResultLearningObjectiveId$;
(function (ResultLearningObjectiveId$) {
    /** @deprecated use `ResultLearningObjectiveId$inboundSchema` instead. */
    ResultLearningObjectiveId$.inboundSchema = exports.ResultLearningObjectiveId$inboundSchema;
    /** @deprecated use `ResultLearningObjectiveId$outboundSchema` instead. */
    ResultLearningObjectiveId$.outboundSchema = exports.ResultLearningObjectiveId$outboundSchema;
})(ResultLearningObjectiveId$ || (exports.ResultLearningObjectiveId$ = ResultLearningObjectiveId$ = {}));
function resultLearningObjectiveIdToJSON(resultLearningObjectiveId) {
    return JSON.stringify(exports.ResultLearningObjectiveId$outboundSchema.parse(resultLearningObjectiveId));
}
function resultLearningObjectiveIdFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ResultLearningObjectiveId$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResultLearningObjectiveId' from JSON`);
}
/** @internal */
exports.ResultLearningObjectiveSet$inboundSchema = z.object({
    source: z.string(),
    learningObjectiveIds: z.array(z.lazy(() => exports.ResultLearningObjectiveId$inboundSchema)),
});
/** @internal */
exports.ResultLearningObjectiveSet$outboundSchema = z.object({
    source: z.string(),
    learningObjectiveIds: z.array(z.lazy(() => exports.ResultLearningObjectiveId$outboundSchema)),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var ResultLearningObjectiveSet$;
(function (ResultLearningObjectiveSet$) {
    /** @deprecated use `ResultLearningObjectiveSet$inboundSchema` instead. */
    ResultLearningObjectiveSet$.inboundSchema = exports.ResultLearningObjectiveSet$inboundSchema;
    /** @deprecated use `ResultLearningObjectiveSet$outboundSchema` instead. */
    ResultLearningObjectiveSet$.outboundSchema = exports.ResultLearningObjectiveSet$outboundSchema;
})(ResultLearningObjectiveSet$ || (exports.ResultLearningObjectiveSet$ = ResultLearningObjectiveSet$ = {}));
function resultLearningObjectiveSetToJSON(resultLearningObjectiveSet) {
    return JSON.stringify(exports.ResultLearningObjectiveSet$outboundSchema.parse(resultLearningObjectiveSet));
}
function resultLearningObjectiveSetFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ResultLearningObjectiveSet$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResultLearningObjectiveSet' from JSON`);
}
/** @internal */
exports.Result$inboundSchema = z
    .object({
    sourcedId: z.string().optional(),
    status: exports.ResultStatus$inboundSchema,
    dateLastModified: z.string().datetime({ offset: true }).transform(v => new Date(v)).optional(),
    metadata: z.nullable(z.record(z.any())).optional(),
    lineItem: z.lazy(() => exports.ResultLineItem$inboundSchema),
    student: z.lazy(() => exports.ResultStudent$inboundSchema),
    class: z.nullable(z.lazy(() => exports.ResultClass$inboundSchema)).optional(),
    scoreScale: z.nullable(z.lazy(() => exports.ResultScoreScale$inboundSchema))
        .optional(),
    scoreStatus: exports.ResultScoreStatus$inboundSchema,
    score: z.nullable(z.number()).optional(),
    textScore: z.nullable(z.string()).optional(),
    scoreDate: z.string().datetime({ offset: true }).transform(v => new Date(v)),
    comment: z.nullable(z.string()).optional(),
    learningObjectiveSet: z.nullable(z.array(z.lazy(() => exports.ResultLearningObjectiveSet$inboundSchema))).optional(),
    inProgress: z.string().optional(),
    incomplete: z.string().optional(),
    late: z.string().optional(),
    missing: z.string().optional(),
});
/** @internal */
exports.Result$outboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: exports.ResultStatus$outboundSchema,
    dateLastModified: z.date().transform(v => v.toISOString()).optional(),
    metadata: z.nullable(z.record(z.any())).optional(),
    lineItem: z.lazy(() => exports.ResultLineItem$outboundSchema),
    student: z.lazy(() => exports.ResultStudent$outboundSchema),
    class: z.nullable(z.lazy(() => exports.ResultClass$outboundSchema)).optional(),
    scoreScale: z.nullable(z.lazy(() => exports.ResultScoreScale$outboundSchema))
        .optional(),
    scoreStatus: exports.ResultScoreStatus$outboundSchema,
    score: z.nullable(z.number()).optional(),
    textScore: z.nullable(z.string()).optional(),
    scoreDate: z.date().transform(v => v.toISOString()),
    comment: z.nullable(z.string()).optional(),
    learningObjectiveSet: z.nullable(z.array(z.lazy(() => exports.ResultLearningObjectiveSet$outboundSchema))).optional(),
    inProgress: z.string().optional(),
    incomplete: z.string().optional(),
    late: z.string().optional(),
    missing: 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 Result$;
(function (Result$) {
    /** @deprecated use `Result$inboundSchema` instead. */
    Result$.inboundSchema = exports.Result$inboundSchema;
    /** @deprecated use `Result$outboundSchema` instead. */
    Result$.outboundSchema = exports.Result$outboundSchema;
})(Result$ || (exports.Result$ = Result$ = {}));
function resultToJSON(result) {
    return JSON.stringify(exports.Result$outboundSchema.parse(result));
}
function resultFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Result$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Result' from JSON`);
}
//# sourceMappingURL=result.js.map