"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.Assignment$inboundSchema = exports.AssignmentStatus$inboundSchema = exports.AssignmentSchemasStatusValue$inboundSchema = exports.AssignmentSchemasStatusSourceValue$inboundSchema = exports.AssignmentSchemasStatus4$inboundSchema = exports.Result$inboundSchema = exports.AssignmentSchemasValue$inboundSchema = exports.AssignmentSchemasSourceValue$inboundSchema = exports.AssignmentSchemas4$inboundSchema = exports.LearningObjectType$inboundSchema = exports.AssignmentValue$inboundSchema = exports.AssignmentSourceValue$inboundSchema = exports.Assignment4$inboundSchema = exports.AssignmentSchemasStatusValue = exports.AssignmentSchemasValue = exports.AssignmentValue = void 0;
exports.assignment4FromJSON = assignment4FromJSON;
exports.assignmentSourceValueFromJSON = assignmentSourceValueFromJSON;
exports.learningObjectTypeFromJSON = learningObjectTypeFromJSON;
exports.assignmentSchemas4FromJSON = assignmentSchemas4FromJSON;
exports.assignmentSchemasSourceValueFromJSON = assignmentSchemasSourceValueFromJSON;
exports.resultFromJSON = resultFromJSON;
exports.assignmentSchemasStatus4FromJSON = assignmentSchemasStatus4FromJSON;
exports.assignmentSchemasStatusSourceValueFromJSON = assignmentSchemasStatusSourceValueFromJSON;
exports.assignmentStatusFromJSON = assignmentStatusFromJSON;
exports.assignmentFromJSON = assignmentFromJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../../lib/primitives.js");
const schemas_js_1 = require("../../../lib/schemas.js");
const openEnums = __importStar(require("../../types/enums.js"));
/**
 * The StackOne unified learning object type.
 */
var AssignmentValue;
(function (AssignmentValue) {
    AssignmentValue["Content"] = "content";
    AssignmentValue["Course"] = "course";
    AssignmentValue["Collection"] = "collection";
    AssignmentValue["UnmappedValue"] = "unmapped_value";
})(AssignmentValue || (exports.AssignmentValue = AssignmentValue = {}));
/**
 * The StackOne unified result status.
 */
var AssignmentSchemasValue;
(function (AssignmentSchemasValue) {
    AssignmentSchemasValue["Pass"] = "Pass";
    AssignmentSchemasValue["Fail"] = "Fail";
    AssignmentSchemasValue["UnmappedValue"] = "unmapped_value";
})(AssignmentSchemasValue || (exports.AssignmentSchemasValue = AssignmentSchemasValue = {}));
/**
 * The StackOne unified assignment status.
 */
var AssignmentSchemasStatusValue;
(function (AssignmentSchemasStatusValue) {
    AssignmentSchemasStatusValue["Pending"] = "pending";
    AssignmentSchemasStatusValue["InProgress"] = "in_progress";
    AssignmentSchemasStatusValue["Completed"] = "completed";
    AssignmentSchemasStatusValue["UnmappedValue"] = "unmapped_value";
})(AssignmentSchemasStatusValue || (exports.AssignmentSchemasStatusValue = AssignmentSchemasStatusValue = {}));
/** @internal */
exports.Assignment4$inboundSchema = z.object({});
function assignment4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Assignment4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Assignment4' from JSON`);
}
/** @internal */
exports.AssignmentSourceValue$inboundSchema = z.union([
    z.string(),
    z.number(),
    z.boolean(),
    z.lazy(() => exports.Assignment4$inboundSchema),
    z.array(z.any()),
]);
function assignmentSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AssignmentSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AssignmentSourceValue' from JSON`);
}
/** @internal */
exports.AssignmentValue$inboundSchema = openEnums.inboundSchema(AssignmentValue);
/** @internal */
exports.LearningObjectType$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.string(),
        z.number(),
        z.boolean(),
        z.lazy(() => exports.Assignment4$inboundSchema),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.AssignmentValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
function learningObjectTypeFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.LearningObjectType$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LearningObjectType' from JSON`);
}
/** @internal */
exports.AssignmentSchemas4$inboundSchema = z.object({});
function assignmentSchemas4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AssignmentSchemas4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AssignmentSchemas4' from JSON`);
}
/** @internal */
exports.AssignmentSchemasSourceValue$inboundSchema = z.union([
    z.string(),
    z.number(),
    z.boolean(),
    z.lazy(() => exports.AssignmentSchemas4$inboundSchema),
    z.array(z.any()),
]);
function assignmentSchemasSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AssignmentSchemasSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AssignmentSchemasSourceValue' from JSON`);
}
/** @internal */
exports.AssignmentSchemasValue$inboundSchema = openEnums.inboundSchema(AssignmentSchemasValue);
/** @internal */
exports.Result$inboundSchema = z
    .object({
    source_value: z.nullable(z.union([
        z.string(),
        z.number(),
        z.boolean(),
        z.lazy(() => exports.AssignmentSchemas4$inboundSchema),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.AssignmentSchemasValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
function resultFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Result$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Result' from JSON`);
}
/** @internal */
exports.AssignmentSchemasStatus4$inboundSchema = z.object({});
function assignmentSchemasStatus4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AssignmentSchemasStatus4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AssignmentSchemasStatus4' from JSON`);
}
/** @internal */
exports.AssignmentSchemasStatusSourceValue$inboundSchema = z.union([
    z.string(),
    z.number(),
    z.boolean(),
    z.lazy(() => exports.AssignmentSchemasStatus4$inboundSchema),
    z.array(z.any()),
]);
function assignmentSchemasStatusSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AssignmentSchemasStatusSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AssignmentSchemasStatusSourceValue' from JSON`);
}
/** @internal */
exports.AssignmentSchemasStatusValue$inboundSchema = openEnums.inboundSchema(AssignmentSchemasStatusValue);
/** @internal */
exports.AssignmentStatus$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.string(),
        z.number(),
        z.boolean(),
        z.lazy(() => exports.AssignmentSchemasStatus4$inboundSchema),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.AssignmentSchemasStatusValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
function assignmentStatusFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AssignmentStatus$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AssignmentStatus' from JSON`);
}
/** @internal */
exports.Assignment$inboundSchema = z.object({
    certificate_url: z.nullable(z.string()).optional(),
    completed_at: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
    course_id: z.nullable(z.string()).optional(),
    created_at: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
    due_date: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
    external_reference: z.nullable(z.string()).optional(),
    id: z.nullable(z.string()).optional(),
    learning_object_external_reference: z.nullable(z.string()).optional(),
    learning_object_id: z.nullable(z.string()).optional(),
    learning_object_type: z.nullable(z.lazy(() => exports.LearningObjectType$inboundSchema)).optional(),
    progress: z.nullable(z.number()).optional(),
    remote_course_id: z.nullable(z.string()).optional(),
    remote_id: z.nullable(z.string()).optional(),
    remote_learning_object_id: z.nullable(z.string()).optional(),
    remote_user_id: z.nullable(z.string()).optional(),
    result: z.nullable(z.lazy(() => exports.Result$inboundSchema)).optional(),
    status: z.nullable(z.lazy(() => exports.AssignmentStatus$inboundSchema)).optional(),
    unified_custom_fields: z.nullable(z.record(z.any())).optional(),
    updated_at: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
    user_id: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "certificate_url": "certificateUrl",
        "completed_at": "completedAt",
        "course_id": "courseId",
        "created_at": "createdAt",
        "due_date": "dueDate",
        "external_reference": "externalReference",
        "learning_object_external_reference": "learningObjectExternalReference",
        "learning_object_id": "learningObjectId",
        "learning_object_type": "learningObjectType",
        "remote_course_id": "remoteCourseId",
        "remote_id": "remoteId",
        "remote_learning_object_id": "remoteLearningObjectId",
        "remote_user_id": "remoteUserId",
        "unified_custom_fields": "unifiedCustomFields",
        "updated_at": "updatedAt",
        "user_id": "userId",
    });
});
function assignmentFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Assignment$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Assignment' from JSON`);
}
//# sourceMappingURL=assignment.js.map