"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 (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.assignmentFromJSON = exports.assignmentToJSON = exports.Assignment$ = exports.Assignment$outboundSchema = exports.Assignment$inboundSchema = exports.statusFromJSON = exports.statusToJSON = exports.Status$ = exports.Status$outboundSchema = exports.Status$inboundSchema = exports.AssignmentSchemasValue$ = exports.AssignmentSchemasValue$outboundSchema = exports.AssignmentSchemasValue$inboundSchema = exports.assignmentSchemasSourceValueFromJSON = exports.assignmentSchemasSourceValueToJSON = exports.AssignmentSchemasSourceValue$ = exports.AssignmentSchemasSourceValue$outboundSchema = exports.AssignmentSchemasSourceValue$inboundSchema = exports.assignmentSchemas4FromJSON = exports.assignmentSchemas4ToJSON = exports.AssignmentSchemas4$ = exports.AssignmentSchemas4$outboundSchema = exports.AssignmentSchemas4$inboundSchema = exports.learningObjectTypeFromJSON = exports.learningObjectTypeToJSON = exports.LearningObjectType$ = exports.LearningObjectType$outboundSchema = exports.LearningObjectType$inboundSchema = exports.AssignmentValue$ = exports.AssignmentValue$outboundSchema = exports.AssignmentValue$inboundSchema = exports.assignmentSourceValueFromJSON = exports.assignmentSourceValueToJSON = exports.AssignmentSourceValue$ = exports.AssignmentSourceValue$outboundSchema = exports.AssignmentSourceValue$inboundSchema = exports.assignment4FromJSON = exports.assignment4ToJSON = exports.Assignment4$ = exports.Assignment4$outboundSchema = exports.Assignment4$inboundSchema = exports.AssignmentSchemasValue = exports.AssignmentValue = void 0;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../../lib/primitives.js");
const schemas_js_1 = require("../../../lib/schemas.js");
const enums_js_1 = require("../../types/enums.js");
var AssignmentValue;
(function (AssignmentValue) {
    AssignmentValue["Content"] = "content";
    AssignmentValue["Course"] = "course";
    AssignmentValue["Collection"] = "collection";
    AssignmentValue["UnmappedValue"] = "unmapped_value";
})(AssignmentValue || (exports.AssignmentValue = AssignmentValue = {}));
var AssignmentSchemasValue;
(function (AssignmentSchemasValue) {
    AssignmentSchemasValue["Pending"] = "pending";
    AssignmentSchemasValue["InProgress"] = "in_progress";
    AssignmentSchemasValue["Completed"] = "completed";
    AssignmentSchemasValue["UnmappedValue"] = "unmapped_value";
})(AssignmentSchemasValue || (exports.AssignmentSchemasValue = AssignmentSchemasValue = {}));
/** @internal */
exports.Assignment4$inboundSchema = z.object({});
/** @internal */
exports.Assignment4$outboundSchema = z.object({});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var Assignment4$;
(function (Assignment4$) {
    /** @deprecated use `Assignment4$inboundSchema` instead. */
    Assignment4$.inboundSchema = exports.Assignment4$inboundSchema;
    /** @deprecated use `Assignment4$outboundSchema` instead. */
    Assignment4$.outboundSchema = exports.Assignment4$outboundSchema;
})(Assignment4$ || (exports.Assignment4$ = Assignment4$ = {}));
function assignment4ToJSON(assignment4) {
    return JSON.stringify(exports.Assignment4$outboundSchema.parse(assignment4));
}
exports.assignment4ToJSON = assignment4ToJSON;
function assignment4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Assignment4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Assignment4' from JSON`);
}
exports.assignment4FromJSON = assignment4FromJSON;
/** @internal */
exports.AssignmentSourceValue$inboundSchema = z.union([
    z.lazy(() => exports.Assignment4$inboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/** @internal */
exports.AssignmentSourceValue$outboundSchema = z.union([
    z.lazy(() => exports.Assignment4$outboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var AssignmentSourceValue$;
(function (AssignmentSourceValue$) {
    /** @deprecated use `AssignmentSourceValue$inboundSchema` instead. */
    AssignmentSourceValue$.inboundSchema = exports.AssignmentSourceValue$inboundSchema;
    /** @deprecated use `AssignmentSourceValue$outboundSchema` instead. */
    AssignmentSourceValue$.outboundSchema = exports.AssignmentSourceValue$outboundSchema;
})(AssignmentSourceValue$ || (exports.AssignmentSourceValue$ = AssignmentSourceValue$ = {}));
function assignmentSourceValueToJSON(assignmentSourceValue) {
    return JSON.stringify(exports.AssignmentSourceValue$outboundSchema.parse(assignmentSourceValue));
}
exports.assignmentSourceValueToJSON = assignmentSourceValueToJSON;
function assignmentSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AssignmentSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AssignmentSourceValue' from JSON`);
}
exports.assignmentSourceValueFromJSON = assignmentSourceValueFromJSON;
/** @internal */
exports.AssignmentValue$inboundSchema = z
    .union([
    z.nativeEnum(AssignmentValue),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.AssignmentValue$outboundSchema = z.union([
    z.nativeEnum(AssignmentValue),
    z.string().and(z.custom()),
]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var AssignmentValue$;
(function (AssignmentValue$) {
    /** @deprecated use `AssignmentValue$inboundSchema` instead. */
    AssignmentValue$.inboundSchema = exports.AssignmentValue$inboundSchema;
    /** @deprecated use `AssignmentValue$outboundSchema` instead. */
    AssignmentValue$.outboundSchema = exports.AssignmentValue$outboundSchema;
})(AssignmentValue$ || (exports.AssignmentValue$ = AssignmentValue$ = {}));
/** @internal */
exports.LearningObjectType$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.lazy(() => exports.Assignment4$inboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.AssignmentValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
/** @internal */
exports.LearningObjectType$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.lazy(() => exports.Assignment4$outboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.AssignmentValue$outboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        sourceValue: "source_value",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var LearningObjectType$;
(function (LearningObjectType$) {
    /** @deprecated use `LearningObjectType$inboundSchema` instead. */
    LearningObjectType$.inboundSchema = exports.LearningObjectType$inboundSchema;
    /** @deprecated use `LearningObjectType$outboundSchema` instead. */
    LearningObjectType$.outboundSchema = exports.LearningObjectType$outboundSchema;
})(LearningObjectType$ || (exports.LearningObjectType$ = LearningObjectType$ = {}));
function learningObjectTypeToJSON(learningObjectType) {
    return JSON.stringify(exports.LearningObjectType$outboundSchema.parse(learningObjectType));
}
exports.learningObjectTypeToJSON = learningObjectTypeToJSON;
function learningObjectTypeFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.LearningObjectType$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LearningObjectType' from JSON`);
}
exports.learningObjectTypeFromJSON = learningObjectTypeFromJSON;
/** @internal */
exports.AssignmentSchemas4$inboundSchema = z.object({});
/** @internal */
exports.AssignmentSchemas4$outboundSchema = z.object({});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var AssignmentSchemas4$;
(function (AssignmentSchemas4$) {
    /** @deprecated use `AssignmentSchemas4$inboundSchema` instead. */
    AssignmentSchemas4$.inboundSchema = exports.AssignmentSchemas4$inboundSchema;
    /** @deprecated use `AssignmentSchemas4$outboundSchema` instead. */
    AssignmentSchemas4$.outboundSchema = exports.AssignmentSchemas4$outboundSchema;
})(AssignmentSchemas4$ || (exports.AssignmentSchemas4$ = AssignmentSchemas4$ = {}));
function assignmentSchemas4ToJSON(assignmentSchemas4) {
    return JSON.stringify(exports.AssignmentSchemas4$outboundSchema.parse(assignmentSchemas4));
}
exports.assignmentSchemas4ToJSON = assignmentSchemas4ToJSON;
function assignmentSchemas4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AssignmentSchemas4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AssignmentSchemas4' from JSON`);
}
exports.assignmentSchemas4FromJSON = assignmentSchemas4FromJSON;
/** @internal */
exports.AssignmentSchemasSourceValue$inboundSchema = z.union([
    z.lazy(() => exports.AssignmentSchemas4$inboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/** @internal */
exports.AssignmentSchemasSourceValue$outboundSchema = z.union([
    z.lazy(() => exports.AssignmentSchemas4$outboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var AssignmentSchemasSourceValue$;
(function (AssignmentSchemasSourceValue$) {
    /** @deprecated use `AssignmentSchemasSourceValue$inboundSchema` instead. */
    AssignmentSchemasSourceValue$.inboundSchema = exports.AssignmentSchemasSourceValue$inboundSchema;
    /** @deprecated use `AssignmentSchemasSourceValue$outboundSchema` instead. */
    AssignmentSchemasSourceValue$.outboundSchema = exports.AssignmentSchemasSourceValue$outboundSchema;
})(AssignmentSchemasSourceValue$ || (exports.AssignmentSchemasSourceValue$ = AssignmentSchemasSourceValue$ = {}));
function assignmentSchemasSourceValueToJSON(assignmentSchemasSourceValue) {
    return JSON.stringify(exports.AssignmentSchemasSourceValue$outboundSchema.parse(assignmentSchemasSourceValue));
}
exports.assignmentSchemasSourceValueToJSON = assignmentSchemasSourceValueToJSON;
function assignmentSchemasSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AssignmentSchemasSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AssignmentSchemasSourceValue' from JSON`);
}
exports.assignmentSchemasSourceValueFromJSON = assignmentSchemasSourceValueFromJSON;
/** @internal */
exports.AssignmentSchemasValue$inboundSchema = z
    .union([
    z.nativeEnum(AssignmentSchemasValue),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.AssignmentSchemasValue$outboundSchema = z.union([
    z.nativeEnum(AssignmentSchemasValue),
    z.string().and(z.custom()),
]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var AssignmentSchemasValue$;
(function (AssignmentSchemasValue$) {
    /** @deprecated use `AssignmentSchemasValue$inboundSchema` instead. */
    AssignmentSchemasValue$.inboundSchema = exports.AssignmentSchemasValue$inboundSchema;
    /** @deprecated use `AssignmentSchemasValue$outboundSchema` instead. */
    AssignmentSchemasValue$.outboundSchema = exports.AssignmentSchemasValue$outboundSchema;
})(AssignmentSchemasValue$ || (exports.AssignmentSchemasValue$ = AssignmentSchemasValue$ = {}));
/** @internal */
exports.Status$inboundSchema = z
    .object({
    source_value: z.nullable(z.union([
        z.lazy(() => exports.AssignmentSchemas4$inboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.AssignmentSchemasValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
/** @internal */
exports.Status$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.lazy(() => exports.AssignmentSchemas4$outboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.AssignmentSchemasValue$outboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        sourceValue: "source_value",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var Status$;
(function (Status$) {
    /** @deprecated use `Status$inboundSchema` instead. */
    Status$.inboundSchema = exports.Status$inboundSchema;
    /** @deprecated use `Status$outboundSchema` instead. */
    Status$.outboundSchema = exports.Status$outboundSchema;
})(Status$ || (exports.Status$ = Status$ = {}));
function statusToJSON(status) {
    return JSON.stringify(exports.Status$outboundSchema.parse(status));
}
exports.statusToJSON = statusToJSON;
function statusFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Status$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Status' from JSON`);
}
exports.statusFromJSON = statusFromJSON;
/** @internal */
exports.Assignment$inboundSchema = z.object({
    course_id: z.nullable(z.string()).optional(),
    created_at: z.nullable(z.string()).optional(),
    due_date: z.nullable(z.string()).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(),
    status: z.nullable(z.lazy(() => exports.Status$inboundSchema)).optional(),
    unified_custom_fields: z.nullable(z.record(z.any())).optional(),
    updated_at: z.nullable(z.string()).optional(),
    user_id: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "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",
    });
});
/** @internal */
exports.Assignment$outboundSchema = z.object({
    courseId: z.nullable(z.string()).optional(),
    createdAt: z.nullable(z.string()).optional(),
    dueDate: z.nullable(z.string()).optional(),
    externalReference: z.nullable(z.string()).optional(),
    id: z.nullable(z.string()).optional(),
    learningObjectExternalReference: z.nullable(z.string()).optional(),
    learningObjectId: z.nullable(z.string()).optional(),
    learningObjectType: z.nullable(z.lazy(() => exports.LearningObjectType$outboundSchema)).optional(),
    progress: z.nullable(z.number()).optional(),
    remoteCourseId: z.nullable(z.string()).optional(),
    remoteId: z.nullable(z.string()).optional(),
    remoteLearningObjectId: z.nullable(z.string()).optional(),
    remoteUserId: z.nullable(z.string()).optional(),
    status: z.nullable(z.lazy(() => exports.Status$outboundSchema)).optional(),
    unifiedCustomFields: z.nullable(z.record(z.any())).optional(),
    updatedAt: z.nullable(z.string()).optional(),
    userId: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        courseId: "course_id",
        createdAt: "created_at",
        dueDate: "due_date",
        externalReference: "external_reference",
        learningObjectExternalReference: "learning_object_external_reference",
        learningObjectId: "learning_object_id",
        learningObjectType: "learning_object_type",
        remoteCourseId: "remote_course_id",
        remoteId: "remote_id",
        remoteLearningObjectId: "remote_learning_object_id",
        remoteUserId: "remote_user_id",
        unifiedCustomFields: "unified_custom_fields",
        updatedAt: "updated_at",
        userId: "user_id",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var Assignment$;
(function (Assignment$) {
    /** @deprecated use `Assignment$inboundSchema` instead. */
    Assignment$.inboundSchema = exports.Assignment$inboundSchema;
    /** @deprecated use `Assignment$outboundSchema` instead. */
    Assignment$.outboundSchema = exports.Assignment$outboundSchema;
})(Assignment$ || (exports.Assignment$ = Assignment$ = {}));
function assignmentToJSON(assignment) {
    return JSON.stringify(exports.Assignment$outboundSchema.parse(assignment));
}
exports.assignmentToJSON = assignmentToJSON;
function assignmentFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Assignment$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Assignment' from JSON`);
}
exports.assignmentFromJSON = assignmentFromJSON;
//# sourceMappingURL=assignment.js.map