/*
 * 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 GetAllStudentsOrderBy = {
    Asc: "asc",
    Desc: "desc",
};
export const GetAllStudentsStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
export const GetAllStudentsRoleType = {
    Primary: "primary",
    Secondary: "secondary",
};
export const GetAllStudentsRoleEnum = {
    Administrator: "administrator",
    Aide: "aide",
    Guardian: "guardian",
    Parent: "parent",
    Proctor: "proctor",
    Relative: "relative",
    Student: "student",
    Teacher: "teacher",
};
export const GetAllStudentsType = {
    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 GetAllStudentsOrderBy$inboundSchema = z.nativeEnum(GetAllStudentsOrderBy);
/** @internal */
export const GetAllStudentsOrderBy$outboundSchema = GetAllStudentsOrderBy$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetAllStudentsOrderBy$;
(function (GetAllStudentsOrderBy$) {
    /** @deprecated use `GetAllStudentsOrderBy$inboundSchema` instead. */
    GetAllStudentsOrderBy$.inboundSchema = GetAllStudentsOrderBy$inboundSchema;
    /** @deprecated use `GetAllStudentsOrderBy$outboundSchema` instead. */
    GetAllStudentsOrderBy$.outboundSchema = GetAllStudentsOrderBy$outboundSchema;
})(GetAllStudentsOrderBy$ || (GetAllStudentsOrderBy$ = {}));
/** @internal */
export const GetAllStudentsRequest$inboundSchema = z.object({
    fields: z.string().optional(),
    limit: z.number().int().default(100),
    offset: z.number().int().default(0),
    sort: z.string().optional(),
    orderBy: GetAllStudentsOrderBy$inboundSchema.optional(),
    filter: z.string().optional(),
    search: z.string().optional(),
});
/** @internal */
export const GetAllStudentsRequest$outboundSchema = z.object({
    fields: z.string().optional(),
    limit: z.number().int().default(100),
    offset: z.number().int().default(0),
    sort: z.string().optional(),
    orderBy: GetAllStudentsOrderBy$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 GetAllStudentsRequest$;
(function (GetAllStudentsRequest$) {
    /** @deprecated use `GetAllStudentsRequest$inboundSchema` instead. */
    GetAllStudentsRequest$.inboundSchema = GetAllStudentsRequest$inboundSchema;
    /** @deprecated use `GetAllStudentsRequest$outboundSchema` instead. */
    GetAllStudentsRequest$.outboundSchema = GetAllStudentsRequest$outboundSchema;
})(GetAllStudentsRequest$ || (GetAllStudentsRequest$ = {}));
export function getAllStudentsRequestToJSON(getAllStudentsRequest) {
    return JSON.stringify(GetAllStudentsRequest$outboundSchema.parse(getAllStudentsRequest));
}
export function getAllStudentsRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllStudentsRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllStudentsRequest' from JSON`);
}
/** @internal */
export const GetAllStudentsStatus$inboundSchema = z.nativeEnum(GetAllStudentsStatus);
/** @internal */
export const GetAllStudentsStatus$outboundSchema = GetAllStudentsStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetAllStudentsStatus$;
(function (GetAllStudentsStatus$) {
    /** @deprecated use `GetAllStudentsStatus$inboundSchema` instead. */
    GetAllStudentsStatus$.inboundSchema = GetAllStudentsStatus$inboundSchema;
    /** @deprecated use `GetAllStudentsStatus$outboundSchema` instead. */
    GetAllStudentsStatus$.outboundSchema = GetAllStudentsStatus$outboundSchema;
})(GetAllStudentsStatus$ || (GetAllStudentsStatus$ = {}));
/** @internal */
export const GetAllStudentsUserId$inboundSchema = z.object({
    type: z.string(),
    identifier: z.string(),
});
/** @internal */
export const GetAllStudentsUserId$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 GetAllStudentsUserId$;
(function (GetAllStudentsUserId$) {
    /** @deprecated use `GetAllStudentsUserId$inboundSchema` instead. */
    GetAllStudentsUserId$.inboundSchema = GetAllStudentsUserId$inboundSchema;
    /** @deprecated use `GetAllStudentsUserId$outboundSchema` instead. */
    GetAllStudentsUserId$.outboundSchema = GetAllStudentsUserId$outboundSchema;
})(GetAllStudentsUserId$ || (GetAllStudentsUserId$ = {}));
export function getAllStudentsUserIdToJSON(getAllStudentsUserId) {
    return JSON.stringify(GetAllStudentsUserId$outboundSchema.parse(getAllStudentsUserId));
}
export function getAllStudentsUserIdFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllStudentsUserId$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllStudentsUserId' from JSON`);
}
/** @internal */
export const GetAllStudentsRoleType$inboundSchema = z.nativeEnum(GetAllStudentsRoleType);
/** @internal */
export const GetAllStudentsRoleType$outboundSchema = GetAllStudentsRoleType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetAllStudentsRoleType$;
(function (GetAllStudentsRoleType$) {
    /** @deprecated use `GetAllStudentsRoleType$inboundSchema` instead. */
    GetAllStudentsRoleType$.inboundSchema = GetAllStudentsRoleType$inboundSchema;
    /** @deprecated use `GetAllStudentsRoleType$outboundSchema` instead. */
    GetAllStudentsRoleType$.outboundSchema = GetAllStudentsRoleType$outboundSchema;
})(GetAllStudentsRoleType$ || (GetAllStudentsRoleType$ = {}));
/** @internal */
export const GetAllStudentsRoleEnum$inboundSchema = z.nativeEnum(GetAllStudentsRoleEnum);
/** @internal */
export const GetAllStudentsRoleEnum$outboundSchema = GetAllStudentsRoleEnum$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetAllStudentsRoleEnum$;
(function (GetAllStudentsRoleEnum$) {
    /** @deprecated use `GetAllStudentsRoleEnum$inboundSchema` instead. */
    GetAllStudentsRoleEnum$.inboundSchema = GetAllStudentsRoleEnum$inboundSchema;
    /** @deprecated use `GetAllStudentsRoleEnum$outboundSchema` instead. */
    GetAllStudentsRoleEnum$.outboundSchema = GetAllStudentsRoleEnum$outboundSchema;
})(GetAllStudentsRoleEnum$ || (GetAllStudentsRoleEnum$ = {}));
/** @internal */
export const GetAllStudentsOrg$inboundSchema = z.object({
    href: z.string(),
    sourcedId: z.string(),
    type: z.string(),
});
/** @internal */
export const GetAllStudentsOrg$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 GetAllStudentsOrg$;
(function (GetAllStudentsOrg$) {
    /** @deprecated use `GetAllStudentsOrg$inboundSchema` instead. */
    GetAllStudentsOrg$.inboundSchema = GetAllStudentsOrg$inboundSchema;
    /** @deprecated use `GetAllStudentsOrg$outboundSchema` instead. */
    GetAllStudentsOrg$.outboundSchema = GetAllStudentsOrg$outboundSchema;
})(GetAllStudentsOrg$ || (GetAllStudentsOrg$ = {}));
export function getAllStudentsOrgToJSON(getAllStudentsOrg) {
    return JSON.stringify(GetAllStudentsOrg$outboundSchema.parse(getAllStudentsOrg));
}
export function getAllStudentsOrgFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllStudentsOrg$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllStudentsOrg' from JSON`);
}
/** @internal */
export const GetAllStudentsRole$inboundSchema = z.object({
    roleType: GetAllStudentsRoleType$inboundSchema,
    role: GetAllStudentsRoleEnum$inboundSchema,
    org: z.lazy(() => GetAllStudentsOrg$inboundSchema),
    userProfile: z.string().optional(),
    beginDate: z.nullable(z.string()),
    endDate: z.nullable(z.string()),
});
/** @internal */
export const GetAllStudentsRole$outboundSchema = z.object({
    roleType: GetAllStudentsRoleType$outboundSchema,
    role: GetAllStudentsRoleEnum$outboundSchema,
    org: z.lazy(() => GetAllStudentsOrg$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 GetAllStudentsRole$;
(function (GetAllStudentsRole$) {
    /** @deprecated use `GetAllStudentsRole$inboundSchema` instead. */
    GetAllStudentsRole$.inboundSchema = GetAllStudentsRole$inboundSchema;
    /** @deprecated use `GetAllStudentsRole$outboundSchema` instead. */
    GetAllStudentsRole$.outboundSchema = GetAllStudentsRole$outboundSchema;
})(GetAllStudentsRole$ || (GetAllStudentsRole$ = {}));
export function getAllStudentsRoleToJSON(getAllStudentsRole) {
    return JSON.stringify(GetAllStudentsRole$outboundSchema.parse(getAllStudentsRole));
}
export function getAllStudentsRoleFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllStudentsRole$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllStudentsRole' from JSON`);
}
/** @internal */
export const GetAllStudentsType$inboundSchema = z.nativeEnum(GetAllStudentsType);
/** @internal */
export const GetAllStudentsType$outboundSchema = GetAllStudentsType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetAllStudentsType$;
(function (GetAllStudentsType$) {
    /** @deprecated use `GetAllStudentsType$inboundSchema` instead. */
    GetAllStudentsType$.inboundSchema = GetAllStudentsType$inboundSchema;
    /** @deprecated use `GetAllStudentsType$outboundSchema` instead. */
    GetAllStudentsType$.outboundSchema = GetAllStudentsType$outboundSchema;
})(GetAllStudentsType$ || (GetAllStudentsType$ = {}));
/** @internal */
export const GetAllStudentsAgent$inboundSchema = z.object({
    href: z.string(),
    sourcedId: z.string(),
    type: GetAllStudentsType$inboundSchema,
});
/** @internal */
export const GetAllStudentsAgent$outboundSchema = z.object({
    href: z.string(),
    sourcedId: z.string(),
    type: GetAllStudentsType$outboundSchema,
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetAllStudentsAgent$;
(function (GetAllStudentsAgent$) {
    /** @deprecated use `GetAllStudentsAgent$inboundSchema` instead. */
    GetAllStudentsAgent$.inboundSchema = GetAllStudentsAgent$inboundSchema;
    /** @deprecated use `GetAllStudentsAgent$outboundSchema` instead. */
    GetAllStudentsAgent$.outboundSchema = GetAllStudentsAgent$outboundSchema;
})(GetAllStudentsAgent$ || (GetAllStudentsAgent$ = {}));
export function getAllStudentsAgentToJSON(getAllStudentsAgent) {
    return JSON.stringify(GetAllStudentsAgent$outboundSchema.parse(getAllStudentsAgent));
}
export function getAllStudentsAgentFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllStudentsAgent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllStudentsAgent' from JSON`);
}
/** @internal */
export const GetAllStudentsPrimaryOrg$inboundSchema = z.object({
    href: z.string(),
    sourcedId: z.string(),
    type: z.string(),
});
/** @internal */
export const GetAllStudentsPrimaryOrg$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 GetAllStudentsPrimaryOrg$;
(function (GetAllStudentsPrimaryOrg$) {
    /** @deprecated use `GetAllStudentsPrimaryOrg$inboundSchema` instead. */
    GetAllStudentsPrimaryOrg$.inboundSchema = GetAllStudentsPrimaryOrg$inboundSchema;
    /** @deprecated use `GetAllStudentsPrimaryOrg$outboundSchema` instead. */
    GetAllStudentsPrimaryOrg$.outboundSchema = GetAllStudentsPrimaryOrg$outboundSchema;
})(GetAllStudentsPrimaryOrg$ || (GetAllStudentsPrimaryOrg$ = {}));
export function getAllStudentsPrimaryOrgToJSON(getAllStudentsPrimaryOrg) {
    return JSON.stringify(GetAllStudentsPrimaryOrg$outboundSchema.parse(getAllStudentsPrimaryOrg));
}
export function getAllStudentsPrimaryOrgFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllStudentsPrimaryOrg$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllStudentsPrimaryOrg' from JSON`);
}
/** @internal */
export const GetAllStudentsUser$inboundSchema = z.object({
    sourcedId: z.string(),
    status: GetAllStudentsStatus$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(() => GetAllStudentsUserId$inboundSchema)).optional(),
    enabledUser: z.boolean(),
    givenName: z.string(),
    familyName: z.string(),
    middleName: z.nullable(z.string()).optional(),
    roles: z.array(z.lazy(() => GetAllStudentsRole$inboundSchema)),
    agents: z.array(z.lazy(() => GetAllStudentsAgent$inboundSchema)),
    primaryOrg: z.lazy(() => GetAllStudentsPrimaryOrg$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 GetAllStudentsUser$outboundSchema = z.object({
    sourcedId: z.string(),
    status: GetAllStudentsStatus$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(() => GetAllStudentsUserId$outboundSchema))
        .optional(),
    enabledUser: z.boolean(),
    givenName: z.string(),
    familyName: z.string(),
    middleName: z.nullable(z.string()).optional(),
    roles: z.array(z.lazy(() => GetAllStudentsRole$outboundSchema)),
    agents: z.array(z.lazy(() => GetAllStudentsAgent$outboundSchema)),
    primaryOrg: z.lazy(() => GetAllStudentsPrimaryOrg$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 GetAllStudentsUser$;
(function (GetAllStudentsUser$) {
    /** @deprecated use `GetAllStudentsUser$inboundSchema` instead. */
    GetAllStudentsUser$.inboundSchema = GetAllStudentsUser$inboundSchema;
    /** @deprecated use `GetAllStudentsUser$outboundSchema` instead. */
    GetAllStudentsUser$.outboundSchema = GetAllStudentsUser$outboundSchema;
})(GetAllStudentsUser$ || (GetAllStudentsUser$ = {}));
export function getAllStudentsUserToJSON(getAllStudentsUser) {
    return JSON.stringify(GetAllStudentsUser$outboundSchema.parse(getAllStudentsUser));
}
export function getAllStudentsUserFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllStudentsUser$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllStudentsUser' from JSON`);
}
/** @internal */
export const GetAllStudentsResponseBody$inboundSchema = z.object({
    users: z.array(z.lazy(() => GetAllStudentsUser$inboundSchema)),
    totalCount: z.number(),
    pageCount: z.number(),
    pageNumber: z.number(),
    offset: z.number(),
    limit: z.number(),
});
/** @internal */
export const GetAllStudentsResponseBody$outboundSchema = z.object({
    users: z.array(z.lazy(() => GetAllStudentsUser$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 GetAllStudentsResponseBody$;
(function (GetAllStudentsResponseBody$) {
    /** @deprecated use `GetAllStudentsResponseBody$inboundSchema` instead. */
    GetAllStudentsResponseBody$.inboundSchema = GetAllStudentsResponseBody$inboundSchema;
    /** @deprecated use `GetAllStudentsResponseBody$outboundSchema` instead. */
    GetAllStudentsResponseBody$.outboundSchema = GetAllStudentsResponseBody$outboundSchema;
})(GetAllStudentsResponseBody$ || (GetAllStudentsResponseBody$ = {}));
export function getAllStudentsResponseBodyToJSON(getAllStudentsResponseBody) {
    return JSON.stringify(GetAllStudentsResponseBody$outboundSchema.parse(getAllStudentsResponseBody));
}
export function getAllStudentsResponseBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllStudentsResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllStudentsResponseBody' from JSON`);
}
/** @internal */
export const GetAllStudentsResponse$inboundSchema = z.object({
    Result: z.lazy(() => GetAllStudentsResponseBody$inboundSchema),
}).transform((v) => {
    return remap$(v, {
        "Result": "result",
    });
});
/** @internal */
export const GetAllStudentsResponse$outboundSchema = z.object({
    result: z.lazy(() => GetAllStudentsResponseBody$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 GetAllStudentsResponse$;
(function (GetAllStudentsResponse$) {
    /** @deprecated use `GetAllStudentsResponse$inboundSchema` instead. */
    GetAllStudentsResponse$.inboundSchema = GetAllStudentsResponse$inboundSchema;
    /** @deprecated use `GetAllStudentsResponse$outboundSchema` instead. */
    GetAllStudentsResponse$.outboundSchema = GetAllStudentsResponse$outboundSchema;
})(GetAllStudentsResponse$ || (GetAllStudentsResponse$ = {}));
export function getAllStudentsResponseToJSON(getAllStudentsResponse) {
    return JSON.stringify(GetAllStudentsResponse$outboundSchema.parse(getAllStudentsResponse));
}
export function getAllStudentsResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllStudentsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllStudentsResponse' from JSON`);
}
//# sourceMappingURL=getallstudents.js.map