"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.TestOutResult$ = exports.TestOutResult$outboundSchema = exports.TestOutResult$inboundSchema = exports.Credentials$ = exports.Credentials$outboundSchema = exports.Credentials$inboundSchema = void 0;
exports.credentialsToJSON = credentialsToJSON;
exports.credentialsFromJSON = credentialsFromJSON;
exports.testOutResultToJSON = testOutResultToJSON;
exports.testOutResultFromJSON = testOutResultFromJSON;
const z = __importStar(require("zod"));
const schemas_js_1 = require("../../lib/schemas.js");
/** @internal */
exports.Credentials$inboundSchema = z.object({
    email: z.string(),
    password: z.string(),
});
/** @internal */
exports.Credentials$outboundSchema = z.object({
    email: z.string(),
    password: z.string(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var Credentials$;
(function (Credentials$) {
    /** @deprecated use `Credentials$inboundSchema` instead. */
    Credentials$.inboundSchema = exports.Credentials$inboundSchema;
    /** @deprecated use `Credentials$outboundSchema` instead. */
    Credentials$.outboundSchema = exports.Credentials$outboundSchema;
})(Credentials$ || (exports.Credentials$ = Credentials$ = {}));
function credentialsToJSON(credentials) {
    return JSON.stringify(exports.Credentials$outboundSchema.parse(credentials));
}
function credentialsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Credentials$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Credentials' from JSON`);
}
/** @internal */
exports.TestOutResult$inboundSchema = z.object({
    lessonType: z.literal("test-out").default("test-out").optional(),
    lessonId: z.nullable(z.string()),
    finalized: z.boolean(),
    toolProvider: z.nullable(z.string()),
    attempt: z.number().optional(),
    credentials: z.lazy(() => exports.Credentials$inboundSchema).optional(),
    assignmentId: z.string().optional(),
    classId: z.string().optional(),
    testUrl: z.string().optional(),
    testId: z.string().optional(),
});
/** @internal */
exports.TestOutResult$outboundSchema = z.object({
    lessonType: z.literal("test-out").default("test-out"),
    lessonId: z.nullable(z.string()),
    finalized: z.boolean(),
    toolProvider: z.nullable(z.string()),
    attempt: z.number().optional(),
    credentials: z.lazy(() => exports.Credentials$outboundSchema).optional(),
    assignmentId: z.string().optional(),
    classId: z.string().optional(),
    testUrl: z.string().optional(),
    testId: 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 TestOutResult$;
(function (TestOutResult$) {
    /** @deprecated use `TestOutResult$inboundSchema` instead. */
    TestOutResult$.inboundSchema = exports.TestOutResult$inboundSchema;
    /** @deprecated use `TestOutResult$outboundSchema` instead. */
    TestOutResult$.outboundSchema = exports.TestOutResult$outboundSchema;
})(TestOutResult$ || (exports.TestOutResult$ = TestOutResult$ = {}));
function testOutResultToJSON(testOutResult) {
    return JSON.stringify(exports.TestOutResult$outboundSchema.parse(testOutResult));
}
function testOutResultFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TestOutResult$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TestOutResult' from JSON`);
}
//# sourceMappingURL=testoutresult.js.map