/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../../lib/schemas.js";
export const CreateEnrollmentStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
export const CreateEnrollmentRole = {
    Administrator: "administrator",
    Proctor: "proctor",
    Student: "student",
    Teacher: "teacher",
};
/** @internal */
export const CreateEnrollmentStatus$inboundSchema = z.nativeEnum(CreateEnrollmentStatus);
/** @internal */
export const CreateEnrollmentStatus$outboundSchema = CreateEnrollmentStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateEnrollmentStatus$;
(function (CreateEnrollmentStatus$) {
    /** @deprecated use `CreateEnrollmentStatus$inboundSchema` instead. */
    CreateEnrollmentStatus$.inboundSchema = CreateEnrollmentStatus$inboundSchema;
    /** @deprecated use `CreateEnrollmentStatus$outboundSchema` instead. */
    CreateEnrollmentStatus$.outboundSchema = CreateEnrollmentStatus$outboundSchema;
})(CreateEnrollmentStatus$ || (CreateEnrollmentStatus$ = {}));
/** @internal */
export const CreateEnrollmentRole$inboundSchema = z.nativeEnum(CreateEnrollmentRole);
/** @internal */
export const CreateEnrollmentRole$outboundSchema = CreateEnrollmentRole$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateEnrollmentRole$;
(function (CreateEnrollmentRole$) {
    /** @deprecated use `CreateEnrollmentRole$inboundSchema` instead. */
    CreateEnrollmentRole$.inboundSchema = CreateEnrollmentRole$inboundSchema;
    /** @deprecated use `CreateEnrollmentRole$outboundSchema` instead. */
    CreateEnrollmentRole$.outboundSchema = CreateEnrollmentRole$outboundSchema;
})(CreateEnrollmentRole$ || (CreateEnrollmentRole$ = {}));
/** @internal */
export const CreateEnrollmentUser$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const CreateEnrollmentUser$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 CreateEnrollmentUser$;
(function (CreateEnrollmentUser$) {
    /** @deprecated use `CreateEnrollmentUser$inboundSchema` instead. */
    CreateEnrollmentUser$.inboundSchema = CreateEnrollmentUser$inboundSchema;
    /** @deprecated use `CreateEnrollmentUser$outboundSchema` instead. */
    CreateEnrollmentUser$.outboundSchema = CreateEnrollmentUser$outboundSchema;
})(CreateEnrollmentUser$ || (CreateEnrollmentUser$ = {}));
export function createEnrollmentUserToJSON(createEnrollmentUser) {
    return JSON.stringify(CreateEnrollmentUser$outboundSchema.parse(createEnrollmentUser));
}
export function createEnrollmentUserFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateEnrollmentUser$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateEnrollmentUser' from JSON`);
}
/** @internal */
export const CreateEnrollmentClass$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const CreateEnrollmentClass$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 CreateEnrollmentClass$;
(function (CreateEnrollmentClass$) {
    /** @deprecated use `CreateEnrollmentClass$inboundSchema` instead. */
    CreateEnrollmentClass$.inboundSchema = CreateEnrollmentClass$inboundSchema;
    /** @deprecated use `CreateEnrollmentClass$outboundSchema` instead. */
    CreateEnrollmentClass$.outboundSchema = CreateEnrollmentClass$outboundSchema;
})(CreateEnrollmentClass$ || (CreateEnrollmentClass$ = {}));
export function createEnrollmentClassToJSON(createEnrollmentClass) {
    return JSON.stringify(CreateEnrollmentClass$outboundSchema.parse(createEnrollmentClass));
}
export function createEnrollmentClassFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateEnrollmentClass$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateEnrollmentClass' from JSON`);
}
/** @internal */
export const CreateEnrollmentEnrollment$inboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: CreateEnrollmentStatus$inboundSchema.default("active"),
    metadata: z.record(z.any()).optional(),
    role: CreateEnrollmentRole$inboundSchema,
    primary: z.boolean().default(false),
    beginDate: z.string().optional(),
    endDate: z.string().optional(),
    user: z.lazy(() => CreateEnrollmentUser$inboundSchema),
    class: z.lazy(() => CreateEnrollmentClass$inboundSchema),
});
/** @internal */
export const CreateEnrollmentEnrollment$outboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: CreateEnrollmentStatus$outboundSchema.default("active"),
    metadata: z.record(z.any()).optional(),
    role: CreateEnrollmentRole$outboundSchema,
    primary: z.boolean().default(false),
    beginDate: z.string().optional(),
    endDate: z.string().optional(),
    user: z.lazy(() => CreateEnrollmentUser$outboundSchema),
    class: z.lazy(() => CreateEnrollmentClass$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateEnrollmentEnrollment$;
(function (CreateEnrollmentEnrollment$) {
    /** @deprecated use `CreateEnrollmentEnrollment$inboundSchema` instead. */
    CreateEnrollmentEnrollment$.inboundSchema = CreateEnrollmentEnrollment$inboundSchema;
    /** @deprecated use `CreateEnrollmentEnrollment$outboundSchema` instead. */
    CreateEnrollmentEnrollment$.outboundSchema = CreateEnrollmentEnrollment$outboundSchema;
})(CreateEnrollmentEnrollment$ || (CreateEnrollmentEnrollment$ = {}));
export function createEnrollmentEnrollmentToJSON(createEnrollmentEnrollment) {
    return JSON.stringify(CreateEnrollmentEnrollment$outboundSchema.parse(createEnrollmentEnrollment));
}
export function createEnrollmentEnrollmentFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateEnrollmentEnrollment$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateEnrollmentEnrollment' from JSON`);
}
/** @internal */
export const CreateEnrollmentRequest$inboundSchema = z.object({
    enrollment: z.lazy(() => CreateEnrollmentEnrollment$inboundSchema),
});
/** @internal */
export const CreateEnrollmentRequest$outboundSchema = z.object({
    enrollment: z.lazy(() => CreateEnrollmentEnrollment$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateEnrollmentRequest$;
(function (CreateEnrollmentRequest$) {
    /** @deprecated use `CreateEnrollmentRequest$inboundSchema` instead. */
    CreateEnrollmentRequest$.inboundSchema = CreateEnrollmentRequest$inboundSchema;
    /** @deprecated use `CreateEnrollmentRequest$outboundSchema` instead. */
    CreateEnrollmentRequest$.outboundSchema = CreateEnrollmentRequest$outboundSchema;
})(CreateEnrollmentRequest$ || (CreateEnrollmentRequest$ = {}));
export function createEnrollmentRequestToJSON(createEnrollmentRequest) {
    return JSON.stringify(CreateEnrollmentRequest$outboundSchema.parse(createEnrollmentRequest));
}
export function createEnrollmentRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateEnrollmentRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateEnrollmentRequest' from JSON`);
}
/** @internal */
export const CreateEnrollmentSourcedIdPairs$inboundSchema = z.object({
    suppliedSourcedId: z.string(),
    allocatedSourcedId: z.string(),
});
/** @internal */
export const CreateEnrollmentSourcedIdPairs$outboundSchema = z.object({
    suppliedSourcedId: z.string(),
    allocatedSourcedId: 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 CreateEnrollmentSourcedIdPairs$;
(function (CreateEnrollmentSourcedIdPairs$) {
    /** @deprecated use `CreateEnrollmentSourcedIdPairs$inboundSchema` instead. */
    CreateEnrollmentSourcedIdPairs$.inboundSchema = CreateEnrollmentSourcedIdPairs$inboundSchema;
    /** @deprecated use `CreateEnrollmentSourcedIdPairs$outboundSchema` instead. */
    CreateEnrollmentSourcedIdPairs$.outboundSchema = CreateEnrollmentSourcedIdPairs$outboundSchema;
})(CreateEnrollmentSourcedIdPairs$ || (CreateEnrollmentSourcedIdPairs$ = {}));
export function createEnrollmentSourcedIdPairsToJSON(createEnrollmentSourcedIdPairs) {
    return JSON.stringify(CreateEnrollmentSourcedIdPairs$outboundSchema.parse(createEnrollmentSourcedIdPairs));
}
export function createEnrollmentSourcedIdPairsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateEnrollmentSourcedIdPairs$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateEnrollmentSourcedIdPairs' from JSON`);
}
/** @internal */
export const CreateEnrollmentResponse$inboundSchema = z.object({
    sourcedIdPairs: z.lazy(() => CreateEnrollmentSourcedIdPairs$inboundSchema),
});
/** @internal */
export const CreateEnrollmentResponse$outboundSchema = z.object({
    sourcedIdPairs: z.lazy(() => CreateEnrollmentSourcedIdPairs$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateEnrollmentResponse$;
(function (CreateEnrollmentResponse$) {
    /** @deprecated use `CreateEnrollmentResponse$inboundSchema` instead. */
    CreateEnrollmentResponse$.inboundSchema = CreateEnrollmentResponse$inboundSchema;
    /** @deprecated use `CreateEnrollmentResponse$outboundSchema` instead. */
    CreateEnrollmentResponse$.outboundSchema = CreateEnrollmentResponse$outboundSchema;
})(CreateEnrollmentResponse$ || (CreateEnrollmentResponse$ = {}));
export function createEnrollmentResponseToJSON(createEnrollmentResponse) {
    return JSON.stringify(CreateEnrollmentResponse$outboundSchema.parse(createEnrollmentResponse));
}
export function createEnrollmentResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateEnrollmentResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateEnrollmentResponse' from JSON`);
}
//# sourceMappingURL=createenrollment.js.map