/*
 * 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";
/**
 * The order to sort the response by
 */
export const GetStudentsForClassOrderBy = {
    Asc: "asc",
    Desc: "desc",
};
export const GetStudentsForClassStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
export const GetStudentsForClassRoleType = {
    Primary: "primary",
    Secondary: "secondary",
};
export const GetStudentsForClassRoleEnum = {
    Administrator: "administrator",
    Aide: "aide",
    Guardian: "guardian",
    Parent: "parent",
    Proctor: "proctor",
    Relative: "relative",
    Student: "student",
    Teacher: "teacher",
};
export const GetStudentsForClassType = {
    AcademicSession: "academicSession",
    AssessmentLineItem: "assessmentLineItem",
    Category: "category",
    Class: "class",
    Course: "course",
    Demographics: "demographics",
    Enrollment: "enrollment",
    GradingPeriod: "gradingPeriod",
    LineItem: "lineItem",
    Org: "org",
    Resource: "resource",
    Result: "result",
    ScoreScale: "scoreScale",
    Student: "student",
    Teacher: "teacher",
    Term: "term",
    User: "user",
    ComponentResource: "componentResource",
    CourseComponent: "courseComponent",
};
/** @internal */
export const GetStudentsForClassOrderBy$inboundSchema = z.nativeEnum(GetStudentsForClassOrderBy);
/** @internal */
export const GetStudentsForClassOrderBy$outboundSchema = GetStudentsForClassOrderBy$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetStudentsForClassOrderBy$;
(function (GetStudentsForClassOrderBy$) {
    /** @deprecated use `GetStudentsForClassOrderBy$inboundSchema` instead. */
    GetStudentsForClassOrderBy$.inboundSchema = GetStudentsForClassOrderBy$inboundSchema;
    /** @deprecated use `GetStudentsForClassOrderBy$outboundSchema` instead. */
    GetStudentsForClassOrderBy$.outboundSchema = GetStudentsForClassOrderBy$outboundSchema;
})(GetStudentsForClassOrderBy$ || (GetStudentsForClassOrderBy$ = {}));
/** @internal */
export const GetStudentsForClassRequest$inboundSchema = z.object({
    classSourcedId: z.string(),
    fields: z.string().optional(),
    limit: z.number().int().default(100),
    offset: z.number().int().default(0),
    sort: z.string().optional(),
    orderBy: GetStudentsForClassOrderBy$inboundSchema.optional(),
    filter: z.string().optional(),
    search: z.string().optional(),
});
/** @internal */
export const GetStudentsForClassRequest$outboundSchema = z.object({
    classSourcedId: z.string(),
    fields: z.string().optional(),
    limit: z.number().int().default(100),
    offset: z.number().int().default(0),
    sort: z.string().optional(),
    orderBy: GetStudentsForClassOrderBy$outboundSchema.optional(),
    filter: z.string().optional(),
    search: z.string().optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetStudentsForClassRequest$;
(function (GetStudentsForClassRequest$) {
    /** @deprecated use `GetStudentsForClassRequest$inboundSchema` instead. */
    GetStudentsForClassRequest$.inboundSchema = GetStudentsForClassRequest$inboundSchema;
    /** @deprecated use `GetStudentsForClassRequest$outboundSchema` instead. */
    GetStudentsForClassRequest$.outboundSchema = GetStudentsForClassRequest$outboundSchema;
})(GetStudentsForClassRequest$ || (GetStudentsForClassRequest$ = {}));
export function getStudentsForClassRequestToJSON(getStudentsForClassRequest) {
    return JSON.stringify(GetStudentsForClassRequest$outboundSchema.parse(getStudentsForClassRequest));
}
export function getStudentsForClassRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetStudentsForClassRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetStudentsForClassRequest' from JSON`);
}
/** @internal */
export const GetStudentsForClassStatus$inboundSchema = z.nativeEnum(GetStudentsForClassStatus);
/** @internal */
export const GetStudentsForClassStatus$outboundSchema = GetStudentsForClassStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetStudentsForClassStatus$;
(function (GetStudentsForClassStatus$) {
    /** @deprecated use `GetStudentsForClassStatus$inboundSchema` instead. */
    GetStudentsForClassStatus$.inboundSchema = GetStudentsForClassStatus$inboundSchema;
    /** @deprecated use `GetStudentsForClassStatus$outboundSchema` instead. */
    GetStudentsForClassStatus$.outboundSchema = GetStudentsForClassStatus$outboundSchema;
})(GetStudentsForClassStatus$ || (GetStudentsForClassStatus$ = {}));
/** @internal */
export const GetStudentsForClassUserId$inboundSchema = z.object({
    type: z.string(),
    identifier: z.string(),
});
/** @internal */
export const GetStudentsForClassUserId$outboundSchema = z.object({
    type: z.string(),
    identifier: 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 GetStudentsForClassUserId$;
(function (GetStudentsForClassUserId$) {
    /** @deprecated use `GetStudentsForClassUserId$inboundSchema` instead. */
    GetStudentsForClassUserId$.inboundSchema = GetStudentsForClassUserId$inboundSchema;
    /** @deprecated use `GetStudentsForClassUserId$outboundSchema` instead. */
    GetStudentsForClassUserId$.outboundSchema = GetStudentsForClassUserId$outboundSchema;
})(GetStudentsForClassUserId$ || (GetStudentsForClassUserId$ = {}));
export function getStudentsForClassUserIdToJSON(getStudentsForClassUserId) {
    return JSON.stringify(GetStudentsForClassUserId$outboundSchema.parse(getStudentsForClassUserId));
}
export function getStudentsForClassUserIdFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetStudentsForClassUserId$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetStudentsForClassUserId' from JSON`);
}
/** @internal */
export const GetStudentsForClassRoleType$inboundSchema = z.nativeEnum(GetStudentsForClassRoleType);
/** @internal */
export const GetStudentsForClassRoleType$outboundSchema = GetStudentsForClassRoleType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetStudentsForClassRoleType$;
(function (GetStudentsForClassRoleType$) {
    /** @deprecated use `GetStudentsForClassRoleType$inboundSchema` instead. */
    GetStudentsForClassRoleType$.inboundSchema = GetStudentsForClassRoleType$inboundSchema;
    /** @deprecated use `GetStudentsForClassRoleType$outboundSchema` instead. */
    GetStudentsForClassRoleType$.outboundSchema = GetStudentsForClassRoleType$outboundSchema;
})(GetStudentsForClassRoleType$ || (GetStudentsForClassRoleType$ = {}));
/** @internal */
export const GetStudentsForClassRoleEnum$inboundSchema = z.nativeEnum(GetStudentsForClassRoleEnum);
/** @internal */
export const GetStudentsForClassRoleEnum$outboundSchema = GetStudentsForClassRoleEnum$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetStudentsForClassRoleEnum$;
(function (GetStudentsForClassRoleEnum$) {
    /** @deprecated use `GetStudentsForClassRoleEnum$inboundSchema` instead. */
    GetStudentsForClassRoleEnum$.inboundSchema = GetStudentsForClassRoleEnum$inboundSchema;
    /** @deprecated use `GetStudentsForClassRoleEnum$outboundSchema` instead. */
    GetStudentsForClassRoleEnum$.outboundSchema = GetStudentsForClassRoleEnum$outboundSchema;
})(GetStudentsForClassRoleEnum$ || (GetStudentsForClassRoleEnum$ = {}));
/** @internal */
export const GetStudentsForClassOrg$inboundSchema = z.object({
    href: z.string(),
    sourcedId: z.string(),
    type: z.string(),
});
/** @internal */
export const GetStudentsForClassOrg$outboundSchema = z.object({
    href: z.string(),
    sourcedId: z.string(),
    type: 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 GetStudentsForClassOrg$;
(function (GetStudentsForClassOrg$) {
    /** @deprecated use `GetStudentsForClassOrg$inboundSchema` instead. */
    GetStudentsForClassOrg$.inboundSchema = GetStudentsForClassOrg$inboundSchema;
    /** @deprecated use `GetStudentsForClassOrg$outboundSchema` instead. */
    GetStudentsForClassOrg$.outboundSchema = GetStudentsForClassOrg$outboundSchema;
})(GetStudentsForClassOrg$ || (GetStudentsForClassOrg$ = {}));
export function getStudentsForClassOrgToJSON(getStudentsForClassOrg) {
    return JSON.stringify(GetStudentsForClassOrg$outboundSchema.parse(getStudentsForClassOrg));
}
export function getStudentsForClassOrgFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetStudentsForClassOrg$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetStudentsForClassOrg' from JSON`);
}
/** @internal */
export const GetStudentsForClassRole$inboundSchema = z.object({
    roleType: GetStudentsForClassRoleType$inboundSchema,
    role: GetStudentsForClassRoleEnum$inboundSchema,
    org: z.lazy(() => GetStudentsForClassOrg$inboundSchema),
    userProfile: z.string().optional(),
    beginDate: z.nullable(z.string()),
    endDate: z.nullable(z.string()),
});
/** @internal */
export const GetStudentsForClassRole$outboundSchema = z.object({
    roleType: GetStudentsForClassRoleType$outboundSchema,
    role: GetStudentsForClassRoleEnum$outboundSchema,
    org: z.lazy(() => GetStudentsForClassOrg$outboundSchema),
    userProfile: z.string().optional(),
    beginDate: z.nullable(z.string()),
    endDate: z.nullable(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 GetStudentsForClassRole$;
(function (GetStudentsForClassRole$) {
    /** @deprecated use `GetStudentsForClassRole$inboundSchema` instead. */
    GetStudentsForClassRole$.inboundSchema = GetStudentsForClassRole$inboundSchema;
    /** @deprecated use `GetStudentsForClassRole$outboundSchema` instead. */
    GetStudentsForClassRole$.outboundSchema = GetStudentsForClassRole$outboundSchema;
})(GetStudentsForClassRole$ || (GetStudentsForClassRole$ = {}));
export function getStudentsForClassRoleToJSON(getStudentsForClassRole) {
    return JSON.stringify(GetStudentsForClassRole$outboundSchema.parse(getStudentsForClassRole));
}
export function getStudentsForClassRoleFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetStudentsForClassRole$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetStudentsForClassRole' from JSON`);
}
/** @internal */
export const GetStudentsForClassType$inboundSchema = z.nativeEnum(GetStudentsForClassType);
/** @internal */
export const GetStudentsForClassType$outboundSchema = GetStudentsForClassType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetStudentsForClassType$;
(function (GetStudentsForClassType$) {
    /** @deprecated use `GetStudentsForClassType$inboundSchema` instead. */
    GetStudentsForClassType$.inboundSchema = GetStudentsForClassType$inboundSchema;
    /** @deprecated use `GetStudentsForClassType$outboundSchema` instead. */
    GetStudentsForClassType$.outboundSchema = GetStudentsForClassType$outboundSchema;
})(GetStudentsForClassType$ || (GetStudentsForClassType$ = {}));
/** @internal */
export const GetStudentsForClassAgent$inboundSchema = z.object({
    href: z.string(),
    sourcedId: z.string(),
    type: GetStudentsForClassType$inboundSchema,
});
/** @internal */
export const GetStudentsForClassAgent$outboundSchema = z.object({
    href: z.string(),
    sourcedId: z.string(),
    type: GetStudentsForClassType$outboundSchema,
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetStudentsForClassAgent$;
(function (GetStudentsForClassAgent$) {
    /** @deprecated use `GetStudentsForClassAgent$inboundSchema` instead. */
    GetStudentsForClassAgent$.inboundSchema = GetStudentsForClassAgent$inboundSchema;
    /** @deprecated use `GetStudentsForClassAgent$outboundSchema` instead. */
    GetStudentsForClassAgent$.outboundSchema = GetStudentsForClassAgent$outboundSchema;
})(GetStudentsForClassAgent$ || (GetStudentsForClassAgent$ = {}));
export function getStudentsForClassAgentToJSON(getStudentsForClassAgent) {
    return JSON.stringify(GetStudentsForClassAgent$outboundSchema.parse(getStudentsForClassAgent));
}
export function getStudentsForClassAgentFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetStudentsForClassAgent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetStudentsForClassAgent' from JSON`);
}
/** @internal */
export const GetStudentsForClassPrimaryOrg$inboundSchema = z.object({
    href: z.string(),
    sourcedId: z.string(),
    type: z.string(),
});
/** @internal */
export const GetStudentsForClassPrimaryOrg$outboundSchema = z.object({
    href: z.string(),
    sourcedId: z.string(),
    type: 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 GetStudentsForClassPrimaryOrg$;
(function (GetStudentsForClassPrimaryOrg$) {
    /** @deprecated use `GetStudentsForClassPrimaryOrg$inboundSchema` instead. */
    GetStudentsForClassPrimaryOrg$.inboundSchema = GetStudentsForClassPrimaryOrg$inboundSchema;
    /** @deprecated use `GetStudentsForClassPrimaryOrg$outboundSchema` instead. */
    GetStudentsForClassPrimaryOrg$.outboundSchema = GetStudentsForClassPrimaryOrg$outboundSchema;
})(GetStudentsForClassPrimaryOrg$ || (GetStudentsForClassPrimaryOrg$ = {}));
export function getStudentsForClassPrimaryOrgToJSON(getStudentsForClassPrimaryOrg) {
    return JSON.stringify(GetStudentsForClassPrimaryOrg$outboundSchema.parse(getStudentsForClassPrimaryOrg));
}
export function getStudentsForClassPrimaryOrgFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetStudentsForClassPrimaryOrg$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetStudentsForClassPrimaryOrg' from JSON`);
}
/** @internal */
export const Student$inboundSchema = z.object({
    sourcedId: z.string(),
    status: GetStudentsForClassStatus$inboundSchema,
    dateLastModified: z.string().datetime({ offset: true }).transform(v => new Date(v)).optional(),
    metadata: z.nullable(z.record(z.any())).optional(),
    userMasterIdentifier: z.nullable(z.string()).optional(),
    username: z.nullable(z.string()).optional(),
    userIds: z.array(z.lazy(() => GetStudentsForClassUserId$inboundSchema))
        .optional(),
    enabledUser: z.boolean(),
    givenName: z.string(),
    familyName: z.string(),
    middleName: z.nullable(z.string()).optional(),
    roles: z.array(z.lazy(() => GetStudentsForClassRole$inboundSchema)),
    agents: z.array(z.lazy(() => GetStudentsForClassAgent$inboundSchema)),
    primaryOrg: z.lazy(() => GetStudentsForClassPrimaryOrg$inboundSchema)
        .optional(),
    email: z.nullable(z.string()).optional(),
    preferredFirstName: z.nullable(z.string()).optional(),
    preferredMiddleName: z.nullable(z.string()).optional(),
    preferredLastName: z.nullable(z.string()).optional(),
    pronouns: z.nullable(z.string()).optional(),
    grades: z.array(z.string()).optional(),
    password: z.nullable(z.string()).optional(),
    sms: z.nullable(z.string()).optional(),
    phone: z.nullable(z.string()).optional(),
});
/** @internal */
export const Student$outboundSchema = z.object({
    sourcedId: z.string(),
    status: GetStudentsForClassStatus$outboundSchema,
    dateLastModified: z.date().transform(v => v.toISOString()).optional(),
    metadata: z.nullable(z.record(z.any())).optional(),
    userMasterIdentifier: z.nullable(z.string()).optional(),
    username: z.nullable(z.string()).optional(),
    userIds: z.array(z.lazy(() => GetStudentsForClassUserId$outboundSchema))
        .optional(),
    enabledUser: z.boolean(),
    givenName: z.string(),
    familyName: z.string(),
    middleName: z.nullable(z.string()).optional(),
    roles: z.array(z.lazy(() => GetStudentsForClassRole$outboundSchema)),
    agents: z.array(z.lazy(() => GetStudentsForClassAgent$outboundSchema)),
    primaryOrg: z.lazy(() => GetStudentsForClassPrimaryOrg$outboundSchema)
        .optional(),
    email: z.nullable(z.string()).optional(),
    preferredFirstName: z.nullable(z.string()).optional(),
    preferredMiddleName: z.nullable(z.string()).optional(),
    preferredLastName: z.nullable(z.string()).optional(),
    pronouns: z.nullable(z.string()).optional(),
    grades: z.array(z.string()).optional(),
    password: z.nullable(z.string()).optional(),
    sms: z.nullable(z.string()).optional(),
    phone: z.nullable(z.string()).optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var Student$;
(function (Student$) {
    /** @deprecated use `Student$inboundSchema` instead. */
    Student$.inboundSchema = Student$inboundSchema;
    /** @deprecated use `Student$outboundSchema` instead. */
    Student$.outboundSchema = Student$outboundSchema;
})(Student$ || (Student$ = {}));
export function studentToJSON(student) {
    return JSON.stringify(Student$outboundSchema.parse(student));
}
export function studentFromJSON(jsonString) {
    return safeParse(jsonString, (x) => Student$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Student' from JSON`);
}
/** @internal */
export const GetStudentsForClassResponseBody$inboundSchema = z.object({
    students: z.array(z.lazy(() => Student$inboundSchema)),
    totalCount: z.number(),
    pageCount: z.number(),
    pageNumber: z.number(),
    offset: z.number(),
    limit: z.number(),
});
/** @internal */
export const GetStudentsForClassResponseBody$outboundSchema = z.object({
    students: z.array(z.lazy(() => Student$outboundSchema)),
    totalCount: z.number(),
    pageCount: z.number(),
    pageNumber: z.number(),
    offset: z.number(),
    limit: z.number(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetStudentsForClassResponseBody$;
(function (GetStudentsForClassResponseBody$) {
    /** @deprecated use `GetStudentsForClassResponseBody$inboundSchema` instead. */
    GetStudentsForClassResponseBody$.inboundSchema = GetStudentsForClassResponseBody$inboundSchema;
    /** @deprecated use `GetStudentsForClassResponseBody$outboundSchema` instead. */
    GetStudentsForClassResponseBody$.outboundSchema = GetStudentsForClassResponseBody$outboundSchema;
})(GetStudentsForClassResponseBody$ || (GetStudentsForClassResponseBody$ = {}));
export function getStudentsForClassResponseBodyToJSON(getStudentsForClassResponseBody) {
    return JSON.stringify(GetStudentsForClassResponseBody$outboundSchema.parse(getStudentsForClassResponseBody));
}
export function getStudentsForClassResponseBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetStudentsForClassResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetStudentsForClassResponseBody' from JSON`);
}
/** @internal */
export const GetStudentsForClassResponse$inboundSchema = z.object({
    Result: z.lazy(() => GetStudentsForClassResponseBody$inboundSchema),
}).transform((v) => {
    return remap$(v, {
        "Result": "result",
    });
});
/** @internal */
export const GetStudentsForClassResponse$outboundSchema = z.object({
    result: z.lazy(() => GetStudentsForClassResponseBody$outboundSchema),
}).transform((v) => {
    return remap$(v, {
        result: "Result",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetStudentsForClassResponse$;
(function (GetStudentsForClassResponse$) {
    /** @deprecated use `GetStudentsForClassResponse$inboundSchema` instead. */
    GetStudentsForClassResponse$.inboundSchema = GetStudentsForClassResponse$inboundSchema;
    /** @deprecated use `GetStudentsForClassResponse$outboundSchema` instead. */
    GetStudentsForClassResponse$.outboundSchema = GetStudentsForClassResponse$outboundSchema;
})(GetStudentsForClassResponse$ || (GetStudentsForClassResponse$ = {}));
export function getStudentsForClassResponseToJSON(getStudentsForClassResponse) {
    return JSON.stringify(GetStudentsForClassResponse$outboundSchema.parse(getStudentsForClassResponse));
}
export function getStudentsForClassResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetStudentsForClassResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetStudentsForClassResponse' from JSON`);
}
//# sourceMappingURL=getstudentsforclass.js.map