"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.CreateNewAttemptResponse$ = exports.CreateNewAttemptResponse$outboundSchema = exports.CreateNewAttemptResponse$inboundSchema = exports.CreateNewAttemptAttempt$ = exports.CreateNewAttemptAttempt$outboundSchema = exports.CreateNewAttemptAttempt$inboundSchema = exports.CreateNewAttemptScoreStatus$ = exports.CreateNewAttemptScoreStatus$outboundSchema = exports.CreateNewAttemptScoreStatus$inboundSchema = exports.CreateNewAttemptRequest$ = exports.CreateNewAttemptRequest$outboundSchema = exports.CreateNewAttemptRequest$inboundSchema = exports.CreateNewAttemptScoreStatus = void 0;
exports.createNewAttemptRequestToJSON = createNewAttemptRequestToJSON;
exports.createNewAttemptRequestFromJSON = createNewAttemptRequestFromJSON;
exports.createNewAttemptAttemptToJSON = createNewAttemptAttemptToJSON;
exports.createNewAttemptAttemptFromJSON = createNewAttemptAttemptFromJSON;
exports.createNewAttemptResponseToJSON = createNewAttemptResponseToJSON;
exports.createNewAttemptResponseFromJSON = createNewAttemptResponseFromJSON;
const z = __importStar(require("zod"));
const schemas_js_1 = require("../../lib/schemas.js");
/**
 * The status of this attempt
 */
exports.CreateNewAttemptScoreStatus = {
    Exempt: "exempt",
    FullyGraded: "fully graded",
    NotSubmitted: "not submitted",
    PartiallyGraded: "partially graded",
    Submitted: "submitted",
};
/** @internal */
exports.CreateNewAttemptRequest$inboundSchema = z.object({
    student: z.string(),
    lesson: z.string(),
});
/** @internal */
exports.CreateNewAttemptRequest$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 CreateNewAttemptRequest$;
(function (CreateNewAttemptRequest$) {
    /** @deprecated use `CreateNewAttemptRequest$inboundSchema` instead. */
    CreateNewAttemptRequest$.inboundSchema = exports.CreateNewAttemptRequest$inboundSchema;
    /** @deprecated use `CreateNewAttemptRequest$outboundSchema` instead. */
    CreateNewAttemptRequest$.outboundSchema = exports.CreateNewAttemptRequest$outboundSchema;
})(CreateNewAttemptRequest$ || (exports.CreateNewAttemptRequest$ = CreateNewAttemptRequest$ = {}));
function createNewAttemptRequestToJSON(createNewAttemptRequest) {
    return JSON.stringify(exports.CreateNewAttemptRequest$outboundSchema.parse(createNewAttemptRequest));
}
function createNewAttemptRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateNewAttemptRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateNewAttemptRequest' from JSON`);
}
/** @internal */
exports.CreateNewAttemptScoreStatus$inboundSchema = z.nativeEnum(exports.CreateNewAttemptScoreStatus);
/** @internal */
exports.CreateNewAttemptScoreStatus$outboundSchema = exports.CreateNewAttemptScoreStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CreateNewAttemptScoreStatus$;
(function (CreateNewAttemptScoreStatus$) {
    /** @deprecated use `CreateNewAttemptScoreStatus$inboundSchema` instead. */
    CreateNewAttemptScoreStatus$.inboundSchema = exports.CreateNewAttemptScoreStatus$inboundSchema;
    /** @deprecated use `CreateNewAttemptScoreStatus$outboundSchema` instead. */
    CreateNewAttemptScoreStatus$.outboundSchema = exports.CreateNewAttemptScoreStatus$outboundSchema;
})(CreateNewAttemptScoreStatus$ || (exports.CreateNewAttemptScoreStatus$ = CreateNewAttemptScoreStatus$ = {}));
/** @internal */
exports.CreateNewAttemptAttempt$inboundSchema = z.object({
    attempt: z.nullable(z.number()),
    score: z.number(),
    scoreStatus: exports.CreateNewAttemptScoreStatus$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.CreateNewAttemptAttempt$outboundSchema = z.object({
    attempt: z.nullable(z.number()),
    score: z.number(),
    scoreStatus: exports.CreateNewAttemptScoreStatus$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 CreateNewAttemptAttempt$;
(function (CreateNewAttemptAttempt$) {
    /** @deprecated use `CreateNewAttemptAttempt$inboundSchema` instead. */
    CreateNewAttemptAttempt$.inboundSchema = exports.CreateNewAttemptAttempt$inboundSchema;
    /** @deprecated use `CreateNewAttemptAttempt$outboundSchema` instead. */
    CreateNewAttemptAttempt$.outboundSchema = exports.CreateNewAttemptAttempt$outboundSchema;
})(CreateNewAttemptAttempt$ || (exports.CreateNewAttemptAttempt$ = CreateNewAttemptAttempt$ = {}));
function createNewAttemptAttemptToJSON(createNewAttemptAttempt) {
    return JSON.stringify(exports.CreateNewAttemptAttempt$outboundSchema.parse(createNewAttemptAttempt));
}
function createNewAttemptAttemptFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateNewAttemptAttempt$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateNewAttemptAttempt' from JSON`);
}
/** @internal */
exports.CreateNewAttemptResponse$inboundSchema = z.object({
    attempt: z.lazy(() => exports.CreateNewAttemptAttempt$inboundSchema),
});
/** @internal */
exports.CreateNewAttemptResponse$outboundSchema = z.object({
    attempt: z.lazy(() => exports.CreateNewAttemptAttempt$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CreateNewAttemptResponse$;
(function (CreateNewAttemptResponse$) {
    /** @deprecated use `CreateNewAttemptResponse$inboundSchema` instead. */
    CreateNewAttemptResponse$.inboundSchema = exports.CreateNewAttemptResponse$inboundSchema;
    /** @deprecated use `CreateNewAttemptResponse$outboundSchema` instead. */
    CreateNewAttemptResponse$.outboundSchema = exports.CreateNewAttemptResponse$outboundSchema;
})(CreateNewAttemptResponse$ || (exports.CreateNewAttemptResponse$ = CreateNewAttemptResponse$ = {}));
function createNewAttemptResponseToJSON(createNewAttemptResponse) {
    return JSON.stringify(exports.CreateNewAttemptResponse$outboundSchema.parse(createNewAttemptResponse));
}
function createNewAttemptResponseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateNewAttemptResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateNewAttemptResponse' from JSON`);
}
//# sourceMappingURL=createnewattempt.js.map