"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.GetAttemptsResponse$ = exports.GetAttemptsResponse$outboundSchema = exports.GetAttemptsResponse$inboundSchema = exports.GetAttemptsAttempt$ = exports.GetAttemptsAttempt$outboundSchema = exports.GetAttemptsAttempt$inboundSchema = exports.GetAttemptsScoreStatus$ = exports.GetAttemptsScoreStatus$outboundSchema = exports.GetAttemptsScoreStatus$inboundSchema = exports.GetAttemptsRequest$ = exports.GetAttemptsRequest$outboundSchema = exports.GetAttemptsRequest$inboundSchema = exports.GetAttemptsScoreStatus = void 0;
exports.getAttemptsRequestToJSON = getAttemptsRequestToJSON;
exports.getAttemptsRequestFromJSON = getAttemptsRequestFromJSON;
exports.getAttemptsAttemptToJSON = getAttemptsAttemptToJSON;
exports.getAttemptsAttemptFromJSON = getAttemptsAttemptFromJSON;
exports.getAttemptsResponseToJSON = getAttemptsResponseToJSON;
exports.getAttemptsResponseFromJSON = getAttemptsResponseFromJSON;
const z = __importStar(require("zod"));
const schemas_js_1 = require("../../lib/schemas.js");
/**
 * The status of this attempt
 */
exports.GetAttemptsScoreStatus = {
    Exempt: "exempt",
    FullyGraded: "fully graded",
    NotSubmitted: "not submitted",
    PartiallyGraded: "partially graded",
    Submitted: "submitted",
};
/** @internal */
exports.GetAttemptsRequest$inboundSchema = z.object({
    student: z.string(),
    lesson: z.string(),
});
/** @internal */
exports.GetAttemptsRequest$outboundSchema = z.object({
    student: z.string(),
    lesson: z.string(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var GetAttemptsRequest$;
(function (GetAttemptsRequest$) {
    /** @deprecated use `GetAttemptsRequest$inboundSchema` instead. */
    GetAttemptsRequest$.inboundSchema = exports.GetAttemptsRequest$inboundSchema;
    /** @deprecated use `GetAttemptsRequest$outboundSchema` instead. */
    GetAttemptsRequest$.outboundSchema = exports.GetAttemptsRequest$outboundSchema;
})(GetAttemptsRequest$ || (exports.GetAttemptsRequest$ = GetAttemptsRequest$ = {}));
function getAttemptsRequestToJSON(getAttemptsRequest) {
    return JSON.stringify(exports.GetAttemptsRequest$outboundSchema.parse(getAttemptsRequest));
}
function getAttemptsRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetAttemptsRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAttemptsRequest' from JSON`);
}
/** @internal */
exports.GetAttemptsScoreStatus$inboundSchema = z.nativeEnum(exports.GetAttemptsScoreStatus);
/** @internal */
exports.GetAttemptsScoreStatus$outboundSchema = exports.GetAttemptsScoreStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var GetAttemptsScoreStatus$;
(function (GetAttemptsScoreStatus$) {
    /** @deprecated use `GetAttemptsScoreStatus$inboundSchema` instead. */
    GetAttemptsScoreStatus$.inboundSchema = exports.GetAttemptsScoreStatus$inboundSchema;
    /** @deprecated use `GetAttemptsScoreStatus$outboundSchema` instead. */
    GetAttemptsScoreStatus$.outboundSchema = exports.GetAttemptsScoreStatus$outboundSchema;
})(GetAttemptsScoreStatus$ || (exports.GetAttemptsScoreStatus$ = GetAttemptsScoreStatus$ = {}));
/** @internal */
exports.GetAttemptsAttempt$inboundSchema = z.object({
    attempt: z.nullable(z.number()),
    score: z.number(),
    scoreStatus: exports.GetAttemptsScoreStatus$inboundSchema,
    startedAt: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))),
    completedAt: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))),
});
/** @internal */
exports.GetAttemptsAttempt$outboundSchema = z.object({
    attempt: z.nullable(z.number()),
    score: z.number(),
    scoreStatus: exports.GetAttemptsScoreStatus$outboundSchema,
    startedAt: z.nullable(z.date().transform(v => v.toISOString())),
    completedAt: z.nullable(z.date().transform(v => v.toISOString())),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var GetAttemptsAttempt$;
(function (GetAttemptsAttempt$) {
    /** @deprecated use `GetAttemptsAttempt$inboundSchema` instead. */
    GetAttemptsAttempt$.inboundSchema = exports.GetAttemptsAttempt$inboundSchema;
    /** @deprecated use `GetAttemptsAttempt$outboundSchema` instead. */
    GetAttemptsAttempt$.outboundSchema = exports.GetAttemptsAttempt$outboundSchema;
})(GetAttemptsAttempt$ || (exports.GetAttemptsAttempt$ = GetAttemptsAttempt$ = {}));
function getAttemptsAttemptToJSON(getAttemptsAttempt) {
    return JSON.stringify(exports.GetAttemptsAttempt$outboundSchema.parse(getAttemptsAttempt));
}
function getAttemptsAttemptFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetAttemptsAttempt$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAttemptsAttempt' from JSON`);
}
/** @internal */
exports.GetAttemptsResponse$inboundSchema = z.object({
    attempts: z.array(z.lazy(() => exports.GetAttemptsAttempt$inboundSchema)),
});
/** @internal */
exports.GetAttemptsResponse$outboundSchema = z.object({
    attempts: z.array(z.lazy(() => exports.GetAttemptsAttempt$outboundSchema)),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var GetAttemptsResponse$;
(function (GetAttemptsResponse$) {
    /** @deprecated use `GetAttemptsResponse$inboundSchema` instead. */
    GetAttemptsResponse$.inboundSchema = exports.GetAttemptsResponse$inboundSchema;
    /** @deprecated use `GetAttemptsResponse$outboundSchema` instead. */
    GetAttemptsResponse$.outboundSchema = exports.GetAttemptsResponse$outboundSchema;
})(GetAttemptsResponse$ || (exports.GetAttemptsResponse$ = GetAttemptsResponse$ = {}));
function getAttemptsResponseToJSON(getAttemptsResponse) {
    return JSON.stringify(exports.GetAttemptsResponse$outboundSchema.parse(getAttemptsResponse));
}
function getAttemptsResponseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetAttemptsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAttemptsResponse' from JSON`);
}
//# sourceMappingURL=getattempts.js.map