/*
 * 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 GetAllUsersOrderBy = {
    Asc: "asc",
    Desc: "desc",
};
export const GetAllUsersStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
export const GetAllUsersRoleType = {
    Primary: "primary",
    Secondary: "secondary",
};
export const GetAllUsersRoleEnum = {
    Administrator: "administrator",
    Aide: "aide",
    Guardian: "guardian",
    Parent: "parent",
    Proctor: "proctor",
    Relative: "relative",
    Student: "student",
    Teacher: "teacher",
};
export const GetAllUsersType = {
    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 GetAllUsersOrderBy$inboundSchema = z.nativeEnum(GetAllUsersOrderBy);
/** @internal */
export const GetAllUsersOrderBy$outboundSchema = GetAllUsersOrderBy$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetAllUsersOrderBy$;
(function (GetAllUsersOrderBy$) {
    /** @deprecated use `GetAllUsersOrderBy$inboundSchema` instead. */
    GetAllUsersOrderBy$.inboundSchema = GetAllUsersOrderBy$inboundSchema;
    /** @deprecated use `GetAllUsersOrderBy$outboundSchema` instead. */
    GetAllUsersOrderBy$.outboundSchema = GetAllUsersOrderBy$outboundSchema;
})(GetAllUsersOrderBy$ || (GetAllUsersOrderBy$ = {}));
/** @internal */
export const GetAllUsersRequest$inboundSchema = z.object({
    fields: z.string().optional(),
    limit: z.number().int().default(100),
    offset: z.number().int().default(0),
    sort: z.string().optional(),
    orderBy: GetAllUsersOrderBy$inboundSchema.optional(),
    filter: z.string().optional(),
    search: z.string().optional(),
});
/** @internal */
export const GetAllUsersRequest$outboundSchema = z.object({
    fields: z.string().optional(),
    limit: z.number().int().default(100),
    offset: z.number().int().default(0),
    sort: z.string().optional(),
    orderBy: GetAllUsersOrderBy$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 GetAllUsersRequest$;
(function (GetAllUsersRequest$) {
    /** @deprecated use `GetAllUsersRequest$inboundSchema` instead. */
    GetAllUsersRequest$.inboundSchema = GetAllUsersRequest$inboundSchema;
    /** @deprecated use `GetAllUsersRequest$outboundSchema` instead. */
    GetAllUsersRequest$.outboundSchema = GetAllUsersRequest$outboundSchema;
})(GetAllUsersRequest$ || (GetAllUsersRequest$ = {}));
export function getAllUsersRequestToJSON(getAllUsersRequest) {
    return JSON.stringify(GetAllUsersRequest$outboundSchema.parse(getAllUsersRequest));
}
export function getAllUsersRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllUsersRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllUsersRequest' from JSON`);
}
/** @internal */
export const GetAllUsersStatus$inboundSchema = z.nativeEnum(GetAllUsersStatus);
/** @internal */
export const GetAllUsersStatus$outboundSchema = GetAllUsersStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetAllUsersStatus$;
(function (GetAllUsersStatus$) {
    /** @deprecated use `GetAllUsersStatus$inboundSchema` instead. */
    GetAllUsersStatus$.inboundSchema = GetAllUsersStatus$inboundSchema;
    /** @deprecated use `GetAllUsersStatus$outboundSchema` instead. */
    GetAllUsersStatus$.outboundSchema = GetAllUsersStatus$outboundSchema;
})(GetAllUsersStatus$ || (GetAllUsersStatus$ = {}));
/** @internal */
export const GetAllUsersUserId$inboundSchema = z.object({
    type: z.string(),
    identifier: z.string(),
});
/** @internal */
export const GetAllUsersUserId$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 GetAllUsersUserId$;
(function (GetAllUsersUserId$) {
    /** @deprecated use `GetAllUsersUserId$inboundSchema` instead. */
    GetAllUsersUserId$.inboundSchema = GetAllUsersUserId$inboundSchema;
    /** @deprecated use `GetAllUsersUserId$outboundSchema` instead. */
    GetAllUsersUserId$.outboundSchema = GetAllUsersUserId$outboundSchema;
})(GetAllUsersUserId$ || (GetAllUsersUserId$ = {}));
export function getAllUsersUserIdToJSON(getAllUsersUserId) {
    return JSON.stringify(GetAllUsersUserId$outboundSchema.parse(getAllUsersUserId));
}
export function getAllUsersUserIdFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllUsersUserId$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllUsersUserId' from JSON`);
}
/** @internal */
export const GetAllUsersRoleType$inboundSchema = z.nativeEnum(GetAllUsersRoleType);
/** @internal */
export const GetAllUsersRoleType$outboundSchema = GetAllUsersRoleType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetAllUsersRoleType$;
(function (GetAllUsersRoleType$) {
    /** @deprecated use `GetAllUsersRoleType$inboundSchema` instead. */
    GetAllUsersRoleType$.inboundSchema = GetAllUsersRoleType$inboundSchema;
    /** @deprecated use `GetAllUsersRoleType$outboundSchema` instead. */
    GetAllUsersRoleType$.outboundSchema = GetAllUsersRoleType$outboundSchema;
})(GetAllUsersRoleType$ || (GetAllUsersRoleType$ = {}));
/** @internal */
export const GetAllUsersRoleEnum$inboundSchema = z.nativeEnum(GetAllUsersRoleEnum);
/** @internal */
export const GetAllUsersRoleEnum$outboundSchema = GetAllUsersRoleEnum$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetAllUsersRoleEnum$;
(function (GetAllUsersRoleEnum$) {
    /** @deprecated use `GetAllUsersRoleEnum$inboundSchema` instead. */
    GetAllUsersRoleEnum$.inboundSchema = GetAllUsersRoleEnum$inboundSchema;
    /** @deprecated use `GetAllUsersRoleEnum$outboundSchema` instead. */
    GetAllUsersRoleEnum$.outboundSchema = GetAllUsersRoleEnum$outboundSchema;
})(GetAllUsersRoleEnum$ || (GetAllUsersRoleEnum$ = {}));
/** @internal */
export const GetAllUsersOrg$inboundSchema = z.object({
    href: z.string(),
    sourcedId: z.string(),
    type: z.string(),
});
/** @internal */
export const GetAllUsersOrg$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 GetAllUsersOrg$;
(function (GetAllUsersOrg$) {
    /** @deprecated use `GetAllUsersOrg$inboundSchema` instead. */
    GetAllUsersOrg$.inboundSchema = GetAllUsersOrg$inboundSchema;
    /** @deprecated use `GetAllUsersOrg$outboundSchema` instead. */
    GetAllUsersOrg$.outboundSchema = GetAllUsersOrg$outboundSchema;
})(GetAllUsersOrg$ || (GetAllUsersOrg$ = {}));
export function getAllUsersOrgToJSON(getAllUsersOrg) {
    return JSON.stringify(GetAllUsersOrg$outboundSchema.parse(getAllUsersOrg));
}
export function getAllUsersOrgFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllUsersOrg$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllUsersOrg' from JSON`);
}
/** @internal */
export const GetAllUsersRole$inboundSchema = z.object({
    roleType: GetAllUsersRoleType$inboundSchema,
    role: GetAllUsersRoleEnum$inboundSchema,
    org: z.lazy(() => GetAllUsersOrg$inboundSchema),
    userProfile: z.string().optional(),
    beginDate: z.nullable(z.string()),
    endDate: z.nullable(z.string()),
});
/** @internal */
export const GetAllUsersRole$outboundSchema = z.object({
    roleType: GetAllUsersRoleType$outboundSchema,
    role: GetAllUsersRoleEnum$outboundSchema,
    org: z.lazy(() => GetAllUsersOrg$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 GetAllUsersRole$;
(function (GetAllUsersRole$) {
    /** @deprecated use `GetAllUsersRole$inboundSchema` instead. */
    GetAllUsersRole$.inboundSchema = GetAllUsersRole$inboundSchema;
    /** @deprecated use `GetAllUsersRole$outboundSchema` instead. */
    GetAllUsersRole$.outboundSchema = GetAllUsersRole$outboundSchema;
})(GetAllUsersRole$ || (GetAllUsersRole$ = {}));
export function getAllUsersRoleToJSON(getAllUsersRole) {
    return JSON.stringify(GetAllUsersRole$outboundSchema.parse(getAllUsersRole));
}
export function getAllUsersRoleFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllUsersRole$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllUsersRole' from JSON`);
}
/** @internal */
export const GetAllUsersType$inboundSchema = z.nativeEnum(GetAllUsersType);
/** @internal */
export const GetAllUsersType$outboundSchema = GetAllUsersType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetAllUsersType$;
(function (GetAllUsersType$) {
    /** @deprecated use `GetAllUsersType$inboundSchema` instead. */
    GetAllUsersType$.inboundSchema = GetAllUsersType$inboundSchema;
    /** @deprecated use `GetAllUsersType$outboundSchema` instead. */
    GetAllUsersType$.outboundSchema = GetAllUsersType$outboundSchema;
})(GetAllUsersType$ || (GetAllUsersType$ = {}));
/** @internal */
export const GetAllUsersAgent$inboundSchema = z.object({
    href: z.string(),
    sourcedId: z.string(),
    type: GetAllUsersType$inboundSchema,
});
/** @internal */
export const GetAllUsersAgent$outboundSchema = z.object({
    href: z.string(),
    sourcedId: z.string(),
    type: GetAllUsersType$outboundSchema,
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetAllUsersAgent$;
(function (GetAllUsersAgent$) {
    /** @deprecated use `GetAllUsersAgent$inboundSchema` instead. */
    GetAllUsersAgent$.inboundSchema = GetAllUsersAgent$inboundSchema;
    /** @deprecated use `GetAllUsersAgent$outboundSchema` instead. */
    GetAllUsersAgent$.outboundSchema = GetAllUsersAgent$outboundSchema;
})(GetAllUsersAgent$ || (GetAllUsersAgent$ = {}));
export function getAllUsersAgentToJSON(getAllUsersAgent) {
    return JSON.stringify(GetAllUsersAgent$outboundSchema.parse(getAllUsersAgent));
}
export function getAllUsersAgentFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllUsersAgent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllUsersAgent' from JSON`);
}
/** @internal */
export const GetAllUsersPrimaryOrg$inboundSchema = z.object({
    href: z.string(),
    sourcedId: z.string(),
    type: z.string(),
});
/** @internal */
export const GetAllUsersPrimaryOrg$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 GetAllUsersPrimaryOrg$;
(function (GetAllUsersPrimaryOrg$) {
    /** @deprecated use `GetAllUsersPrimaryOrg$inboundSchema` instead. */
    GetAllUsersPrimaryOrg$.inboundSchema = GetAllUsersPrimaryOrg$inboundSchema;
    /** @deprecated use `GetAllUsersPrimaryOrg$outboundSchema` instead. */
    GetAllUsersPrimaryOrg$.outboundSchema = GetAllUsersPrimaryOrg$outboundSchema;
})(GetAllUsersPrimaryOrg$ || (GetAllUsersPrimaryOrg$ = {}));
export function getAllUsersPrimaryOrgToJSON(getAllUsersPrimaryOrg) {
    return JSON.stringify(GetAllUsersPrimaryOrg$outboundSchema.parse(getAllUsersPrimaryOrg));
}
export function getAllUsersPrimaryOrgFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllUsersPrimaryOrg$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllUsersPrimaryOrg' from JSON`);
}
/** @internal */
export const GetAllUsersUser$inboundSchema = z.object({
    sourcedId: z.string(),
    status: GetAllUsersStatus$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(() => GetAllUsersUserId$inboundSchema)).optional(),
    enabledUser: z.boolean(),
    givenName: z.string(),
    familyName: z.string(),
    middleName: z.nullable(z.string()).optional(),
    roles: z.array(z.lazy(() => GetAllUsersRole$inboundSchema)),
    agents: z.array(z.lazy(() => GetAllUsersAgent$inboundSchema)),
    primaryOrg: z.lazy(() => GetAllUsersPrimaryOrg$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 GetAllUsersUser$outboundSchema = z.object({
    sourcedId: z.string(),
    status: GetAllUsersStatus$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(() => GetAllUsersUserId$outboundSchema)).optional(),
    enabledUser: z.boolean(),
    givenName: z.string(),
    familyName: z.string(),
    middleName: z.nullable(z.string()).optional(),
    roles: z.array(z.lazy(() => GetAllUsersRole$outboundSchema)),
    agents: z.array(z.lazy(() => GetAllUsersAgent$outboundSchema)),
    primaryOrg: z.lazy(() => GetAllUsersPrimaryOrg$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 GetAllUsersUser$;
(function (GetAllUsersUser$) {
    /** @deprecated use `GetAllUsersUser$inboundSchema` instead. */
    GetAllUsersUser$.inboundSchema = GetAllUsersUser$inboundSchema;
    /** @deprecated use `GetAllUsersUser$outboundSchema` instead. */
    GetAllUsersUser$.outboundSchema = GetAllUsersUser$outboundSchema;
})(GetAllUsersUser$ || (GetAllUsersUser$ = {}));
export function getAllUsersUserToJSON(getAllUsersUser) {
    return JSON.stringify(GetAllUsersUser$outboundSchema.parse(getAllUsersUser));
}
export function getAllUsersUserFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllUsersUser$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllUsersUser' from JSON`);
}
/** @internal */
export const GetAllUsersResponseBody$inboundSchema = z.object({
    users: z.array(z.lazy(() => GetAllUsersUser$inboundSchema)),
    totalCount: z.number(),
    pageCount: z.number(),
    pageNumber: z.number(),
    offset: z.number(),
    limit: z.number(),
});
/** @internal */
export const GetAllUsersResponseBody$outboundSchema = z.object({
    users: z.array(z.lazy(() => GetAllUsersUser$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 GetAllUsersResponseBody$;
(function (GetAllUsersResponseBody$) {
    /** @deprecated use `GetAllUsersResponseBody$inboundSchema` instead. */
    GetAllUsersResponseBody$.inboundSchema = GetAllUsersResponseBody$inboundSchema;
    /** @deprecated use `GetAllUsersResponseBody$outboundSchema` instead. */
    GetAllUsersResponseBody$.outboundSchema = GetAllUsersResponseBody$outboundSchema;
})(GetAllUsersResponseBody$ || (GetAllUsersResponseBody$ = {}));
export function getAllUsersResponseBodyToJSON(getAllUsersResponseBody) {
    return JSON.stringify(GetAllUsersResponseBody$outboundSchema.parse(getAllUsersResponseBody));
}
export function getAllUsersResponseBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllUsersResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllUsersResponseBody' from JSON`);
}
/** @internal */
export const GetAllUsersResponse$inboundSchema = z.object({
    Result: z.lazy(() => GetAllUsersResponseBody$inboundSchema),
}).transform((v) => {
    return remap$(v, {
        "Result": "result",
    });
});
/** @internal */
export const GetAllUsersResponse$outboundSchema = z.object({
    result: z.lazy(() => GetAllUsersResponseBody$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 GetAllUsersResponse$;
(function (GetAllUsersResponse$) {
    /** @deprecated use `GetAllUsersResponse$inboundSchema` instead. */
    GetAllUsersResponse$.inboundSchema = GetAllUsersResponse$inboundSchema;
    /** @deprecated use `GetAllUsersResponse$outboundSchema` instead. */
    GetAllUsersResponse$.outboundSchema = GetAllUsersResponse$outboundSchema;
})(GetAllUsersResponse$ || (GetAllUsersResponse$ = {}));
export function getAllUsersResponseToJSON(getAllUsersResponse) {
    return JSON.stringify(GetAllUsersResponse$outboundSchema.parse(getAllUsersResponse));
}
export function getAllUsersResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllUsersResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllUsersResponse' from JSON`);
}
//# sourceMappingURL=getallusers.js.map