/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
export const UpdateEnrollmentStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
export const UpdateEnrollmentRole = {
    Administrator: "administrator",
    Proctor: "proctor",
    Student: "student",
    Teacher: "teacher",
};
/** @internal */
export const UpdateEnrollmentStatus$inboundSchema = z.nativeEnum(UpdateEnrollmentStatus);
/** @internal */
export const UpdateEnrollmentStatus$outboundSchema = UpdateEnrollmentStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var UpdateEnrollmentStatus$;
(function (UpdateEnrollmentStatus$) {
    /** @deprecated use `UpdateEnrollmentStatus$inboundSchema` instead. */
    UpdateEnrollmentStatus$.inboundSchema = UpdateEnrollmentStatus$inboundSchema;
    /** @deprecated use `UpdateEnrollmentStatus$outboundSchema` instead. */
    UpdateEnrollmentStatus$.outboundSchema = UpdateEnrollmentStatus$outboundSchema;
})(UpdateEnrollmentStatus$ || (UpdateEnrollmentStatus$ = {}));
/** @internal */
export const UpdateEnrollmentRole$inboundSchema = z.nativeEnum(UpdateEnrollmentRole);
/** @internal */
export const UpdateEnrollmentRole$outboundSchema = UpdateEnrollmentRole$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var UpdateEnrollmentRole$;
(function (UpdateEnrollmentRole$) {
    /** @deprecated use `UpdateEnrollmentRole$inboundSchema` instead. */
    UpdateEnrollmentRole$.inboundSchema = UpdateEnrollmentRole$inboundSchema;
    /** @deprecated use `UpdateEnrollmentRole$outboundSchema` instead. */
    UpdateEnrollmentRole$.outboundSchema = UpdateEnrollmentRole$outboundSchema;
})(UpdateEnrollmentRole$ || (UpdateEnrollmentRole$ = {}));
/** @internal */
export const UpdateEnrollmentUser$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const UpdateEnrollmentUser$outboundSchema = z.object({
    sourcedId: z.string(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var UpdateEnrollmentUser$;
(function (UpdateEnrollmentUser$) {
    /** @deprecated use `UpdateEnrollmentUser$inboundSchema` instead. */
    UpdateEnrollmentUser$.inboundSchema = UpdateEnrollmentUser$inboundSchema;
    /** @deprecated use `UpdateEnrollmentUser$outboundSchema` instead. */
    UpdateEnrollmentUser$.outboundSchema = UpdateEnrollmentUser$outboundSchema;
})(UpdateEnrollmentUser$ || (UpdateEnrollmentUser$ = {}));
export function updateEnrollmentUserToJSON(updateEnrollmentUser) {
    return JSON.stringify(UpdateEnrollmentUser$outboundSchema.parse(updateEnrollmentUser));
}
export function updateEnrollmentUserFromJSON(jsonString) {
    return safeParse(jsonString, (x) => UpdateEnrollmentUser$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateEnrollmentUser' from JSON`);
}
/** @internal */
export const UpdateEnrollmentClass$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const UpdateEnrollmentClass$outboundSchema = z.object({
    sourcedId: z.string(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var UpdateEnrollmentClass$;
(function (UpdateEnrollmentClass$) {
    /** @deprecated use `UpdateEnrollmentClass$inboundSchema` instead. */
    UpdateEnrollmentClass$.inboundSchema = UpdateEnrollmentClass$inboundSchema;
    /** @deprecated use `UpdateEnrollmentClass$outboundSchema` instead. */
    UpdateEnrollmentClass$.outboundSchema = UpdateEnrollmentClass$outboundSchema;
})(UpdateEnrollmentClass$ || (UpdateEnrollmentClass$ = {}));
export function updateEnrollmentClassToJSON(updateEnrollmentClass) {
    return JSON.stringify(UpdateEnrollmentClass$outboundSchema.parse(updateEnrollmentClass));
}
export function updateEnrollmentClassFromJSON(jsonString) {
    return safeParse(jsonString, (x) => UpdateEnrollmentClass$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateEnrollmentClass' from JSON`);
}
/** @internal */
export const UpdateEnrollmentEnrollment$inboundSchema = z.object({
    sourcedId: z.string(),
    status: UpdateEnrollmentStatus$inboundSchema,
    metadata: z.record(z.any()).optional(),
    role: UpdateEnrollmentRole$inboundSchema,
    primary: z.boolean().default(false),
    beginDate: z.string().optional(),
    endDate: z.string().optional(),
    user: z.lazy(() => UpdateEnrollmentUser$inboundSchema),
    class: z.lazy(() => UpdateEnrollmentClass$inboundSchema),
});
/** @internal */
export const UpdateEnrollmentEnrollment$outboundSchema = z.object({
    sourcedId: z.string(),
    status: UpdateEnrollmentStatus$outboundSchema,
    metadata: z.record(z.any()).optional(),
    role: UpdateEnrollmentRole$outboundSchema,
    primary: z.boolean().default(false),
    beginDate: z.string().optional(),
    endDate: z.string().optional(),
    user: z.lazy(() => UpdateEnrollmentUser$outboundSchema),
    class: z.lazy(() => UpdateEnrollmentClass$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var UpdateEnrollmentEnrollment$;
(function (UpdateEnrollmentEnrollment$) {
    /** @deprecated use `UpdateEnrollmentEnrollment$inboundSchema` instead. */
    UpdateEnrollmentEnrollment$.inboundSchema = UpdateEnrollmentEnrollment$inboundSchema;
    /** @deprecated use `UpdateEnrollmentEnrollment$outboundSchema` instead. */
    UpdateEnrollmentEnrollment$.outboundSchema = UpdateEnrollmentEnrollment$outboundSchema;
})(UpdateEnrollmentEnrollment$ || (UpdateEnrollmentEnrollment$ = {}));
export function updateEnrollmentEnrollmentToJSON(updateEnrollmentEnrollment) {
    return JSON.stringify(UpdateEnrollmentEnrollment$outboundSchema.parse(updateEnrollmentEnrollment));
}
export function updateEnrollmentEnrollmentFromJSON(jsonString) {
    return safeParse(jsonString, (x) => UpdateEnrollmentEnrollment$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateEnrollmentEnrollment' from JSON`);
}
/** @internal */
export const UpdateEnrollmentRequestBody$inboundSchema = z.object({
    enrollment: z.lazy(() => UpdateEnrollmentEnrollment$inboundSchema),
});
/** @internal */
export const UpdateEnrollmentRequestBody$outboundSchema = z.object({
    enrollment: z.lazy(() => UpdateEnrollmentEnrollment$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var UpdateEnrollmentRequestBody$;
(function (UpdateEnrollmentRequestBody$) {
    /** @deprecated use `UpdateEnrollmentRequestBody$inboundSchema` instead. */
    UpdateEnrollmentRequestBody$.inboundSchema = UpdateEnrollmentRequestBody$inboundSchema;
    /** @deprecated use `UpdateEnrollmentRequestBody$outboundSchema` instead. */
    UpdateEnrollmentRequestBody$.outboundSchema = UpdateEnrollmentRequestBody$outboundSchema;
})(UpdateEnrollmentRequestBody$ || (UpdateEnrollmentRequestBody$ = {}));
export function updateEnrollmentRequestBodyToJSON(updateEnrollmentRequestBody) {
    return JSON.stringify(UpdateEnrollmentRequestBody$outboundSchema.parse(updateEnrollmentRequestBody));
}
export function updateEnrollmentRequestBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => UpdateEnrollmentRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateEnrollmentRequestBody' from JSON`);
}
/** @internal */
export const UpdateEnrollmentRequest$inboundSchema = z.object({
    sourcedId: z.string(),
    RequestBody: z.lazy(() => UpdateEnrollmentRequestBody$inboundSchema)
        .optional(),
}).transform((v) => {
    return remap$(v, {
        "RequestBody": "requestBody",
    });
});
/** @internal */
export const UpdateEnrollmentRequest$outboundSchema = z.object({
    sourcedId: z.string(),
    requestBody: z.lazy(() => UpdateEnrollmentRequestBody$outboundSchema)
        .optional(),
}).transform((v) => {
    return remap$(v, {
        requestBody: "RequestBody",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var UpdateEnrollmentRequest$;
(function (UpdateEnrollmentRequest$) {
    /** @deprecated use `UpdateEnrollmentRequest$inboundSchema` instead. */
    UpdateEnrollmentRequest$.inboundSchema = UpdateEnrollmentRequest$inboundSchema;
    /** @deprecated use `UpdateEnrollmentRequest$outboundSchema` instead. */
    UpdateEnrollmentRequest$.outboundSchema = UpdateEnrollmentRequest$outboundSchema;
})(UpdateEnrollmentRequest$ || (UpdateEnrollmentRequest$ = {}));
export function updateEnrollmentRequestToJSON(updateEnrollmentRequest) {
    return JSON.stringify(UpdateEnrollmentRequest$outboundSchema.parse(updateEnrollmentRequest));
}
export function updateEnrollmentRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => UpdateEnrollmentRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateEnrollmentRequest' from JSON`);
}
//# sourceMappingURL=updateenrollment.js.map