/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../../lib/schemas.js";
export const GetUserStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
export const GetUserRoleType = {
    Primary: "primary",
    Secondary: "secondary",
};
export const GetUserRoleEnum = {
    Administrator: "administrator",
    Aide: "aide",
    Guardian: "guardian",
    Parent: "parent",
    Proctor: "proctor",
    Relative: "relative",
    Student: "student",
    Teacher: "teacher",
};
export const GetUserType = {
    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 GetUserRequest$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const GetUserRequest$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 GetUserRequest$;
(function (GetUserRequest$) {
    /** @deprecated use `GetUserRequest$inboundSchema` instead. */
    GetUserRequest$.inboundSchema = GetUserRequest$inboundSchema;
    /** @deprecated use `GetUserRequest$outboundSchema` instead. */
    GetUserRequest$.outboundSchema = GetUserRequest$outboundSchema;
})(GetUserRequest$ || (GetUserRequest$ = {}));
export function getUserRequestToJSON(getUserRequest) {
    return JSON.stringify(GetUserRequest$outboundSchema.parse(getUserRequest));
}
export function getUserRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetUserRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetUserRequest' from JSON`);
}
/** @internal */
export const GetUserStatus$inboundSchema = z.nativeEnum(GetUserStatus);
/** @internal */
export const GetUserStatus$outboundSchema = GetUserStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetUserStatus$;
(function (GetUserStatus$) {
    /** @deprecated use `GetUserStatus$inboundSchema` instead. */
    GetUserStatus$.inboundSchema = GetUserStatus$inboundSchema;
    /** @deprecated use `GetUserStatus$outboundSchema` instead. */
    GetUserStatus$.outboundSchema = GetUserStatus$outboundSchema;
})(GetUserStatus$ || (GetUserStatus$ = {}));
/** @internal */
export const GetUserUserId$inboundSchema = z.object({
    type: z.string(),
    identifier: z.string(),
});
/** @internal */
export const GetUserUserId$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 GetUserUserId$;
(function (GetUserUserId$) {
    /** @deprecated use `GetUserUserId$inboundSchema` instead. */
    GetUserUserId$.inboundSchema = GetUserUserId$inboundSchema;
    /** @deprecated use `GetUserUserId$outboundSchema` instead. */
    GetUserUserId$.outboundSchema = GetUserUserId$outboundSchema;
})(GetUserUserId$ || (GetUserUserId$ = {}));
export function getUserUserIdToJSON(getUserUserId) {
    return JSON.stringify(GetUserUserId$outboundSchema.parse(getUserUserId));
}
export function getUserUserIdFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetUserUserId$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetUserUserId' from JSON`);
}
/** @internal */
export const GetUserRoleType$inboundSchema = z.nativeEnum(GetUserRoleType);
/** @internal */
export const GetUserRoleType$outboundSchema = GetUserRoleType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetUserRoleType$;
(function (GetUserRoleType$) {
    /** @deprecated use `GetUserRoleType$inboundSchema` instead. */
    GetUserRoleType$.inboundSchema = GetUserRoleType$inboundSchema;
    /** @deprecated use `GetUserRoleType$outboundSchema` instead. */
    GetUserRoleType$.outboundSchema = GetUserRoleType$outboundSchema;
})(GetUserRoleType$ || (GetUserRoleType$ = {}));
/** @internal */
export const GetUserRoleEnum$inboundSchema = z.nativeEnum(GetUserRoleEnum);
/** @internal */
export const GetUserRoleEnum$outboundSchema = GetUserRoleEnum$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetUserRoleEnum$;
(function (GetUserRoleEnum$) {
    /** @deprecated use `GetUserRoleEnum$inboundSchema` instead. */
    GetUserRoleEnum$.inboundSchema = GetUserRoleEnum$inboundSchema;
    /** @deprecated use `GetUserRoleEnum$outboundSchema` instead. */
    GetUserRoleEnum$.outboundSchema = GetUserRoleEnum$outboundSchema;
})(GetUserRoleEnum$ || (GetUserRoleEnum$ = {}));
/** @internal */
export const GetUserOrg$inboundSchema = z.object({
    href: z.string(),
    sourcedId: z.string(),
    type: z.string(),
});
/** @internal */
export const GetUserOrg$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 GetUserOrg$;
(function (GetUserOrg$) {
    /** @deprecated use `GetUserOrg$inboundSchema` instead. */
    GetUserOrg$.inboundSchema = GetUserOrg$inboundSchema;
    /** @deprecated use `GetUserOrg$outboundSchema` instead. */
    GetUserOrg$.outboundSchema = GetUserOrg$outboundSchema;
})(GetUserOrg$ || (GetUserOrg$ = {}));
export function getUserOrgToJSON(getUserOrg) {
    return JSON.stringify(GetUserOrg$outboundSchema.parse(getUserOrg));
}
export function getUserOrgFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetUserOrg$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetUserOrg' from JSON`);
}
/** @internal */
export const GetUserRole$inboundSchema = z.object({
    roleType: GetUserRoleType$inboundSchema,
    role: GetUserRoleEnum$inboundSchema,
    org: z.lazy(() => GetUserOrg$inboundSchema),
    userProfile: z.string().optional(),
    beginDate: z.nullable(z.string()),
    endDate: z.nullable(z.string()),
});
/** @internal */
export const GetUserRole$outboundSchema = z.object({
    roleType: GetUserRoleType$outboundSchema,
    role: GetUserRoleEnum$outboundSchema,
    org: z.lazy(() => GetUserOrg$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 GetUserRole$;
(function (GetUserRole$) {
    /** @deprecated use `GetUserRole$inboundSchema` instead. */
    GetUserRole$.inboundSchema = GetUserRole$inboundSchema;
    /** @deprecated use `GetUserRole$outboundSchema` instead. */
    GetUserRole$.outboundSchema = GetUserRole$outboundSchema;
})(GetUserRole$ || (GetUserRole$ = {}));
export function getUserRoleToJSON(getUserRole) {
    return JSON.stringify(GetUserRole$outboundSchema.parse(getUserRole));
}
export function getUserRoleFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetUserRole$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetUserRole' from JSON`);
}
/** @internal */
export const GetUserType$inboundSchema = z
    .nativeEnum(GetUserType);
/** @internal */
export const GetUserType$outboundSchema = GetUserType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetUserType$;
(function (GetUserType$) {
    /** @deprecated use `GetUserType$inboundSchema` instead. */
    GetUserType$.inboundSchema = GetUserType$inboundSchema;
    /** @deprecated use `GetUserType$outboundSchema` instead. */
    GetUserType$.outboundSchema = GetUserType$outboundSchema;
})(GetUserType$ || (GetUserType$ = {}));
/** @internal */
export const GetUserAgent$inboundSchema = z.object({
    href: z.string(),
    sourcedId: z.string(),
    type: GetUserType$inboundSchema,
});
/** @internal */
export const GetUserAgent$outboundSchema = z.object({
    href: z.string(),
    sourcedId: z.string(),
    type: GetUserType$outboundSchema,
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetUserAgent$;
(function (GetUserAgent$) {
    /** @deprecated use `GetUserAgent$inboundSchema` instead. */
    GetUserAgent$.inboundSchema = GetUserAgent$inboundSchema;
    /** @deprecated use `GetUserAgent$outboundSchema` instead. */
    GetUserAgent$.outboundSchema = GetUserAgent$outboundSchema;
})(GetUserAgent$ || (GetUserAgent$ = {}));
export function getUserAgentToJSON(getUserAgent) {
    return JSON.stringify(GetUserAgent$outboundSchema.parse(getUserAgent));
}
export function getUserAgentFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetUserAgent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetUserAgent' from JSON`);
}
/** @internal */
export const GetUserPrimaryOrg$inboundSchema = z.object({
    href: z.string(),
    sourcedId: z.string(),
    type: z.string(),
});
/** @internal */
export const GetUserPrimaryOrg$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 GetUserPrimaryOrg$;
(function (GetUserPrimaryOrg$) {
    /** @deprecated use `GetUserPrimaryOrg$inboundSchema` instead. */
    GetUserPrimaryOrg$.inboundSchema = GetUserPrimaryOrg$inboundSchema;
    /** @deprecated use `GetUserPrimaryOrg$outboundSchema` instead. */
    GetUserPrimaryOrg$.outboundSchema = GetUserPrimaryOrg$outboundSchema;
})(GetUserPrimaryOrg$ || (GetUserPrimaryOrg$ = {}));
export function getUserPrimaryOrgToJSON(getUserPrimaryOrg) {
    return JSON.stringify(GetUserPrimaryOrg$outboundSchema.parse(getUserPrimaryOrg));
}
export function getUserPrimaryOrgFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetUserPrimaryOrg$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetUserPrimaryOrg' from JSON`);
}
/** @internal */
export const GetUserUser$inboundSchema = z.object({
    sourcedId: z.string(),
    status: GetUserStatus$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(() => GetUserUserId$inboundSchema)).optional(),
    enabledUser: z.boolean(),
    givenName: z.string(),
    familyName: z.string(),
    middleName: z.nullable(z.string()).optional(),
    roles: z.array(z.lazy(() => GetUserRole$inboundSchema)),
    agents: z.array(z.lazy(() => GetUserAgent$inboundSchema)),
    primaryOrg: z.lazy(() => GetUserPrimaryOrg$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 GetUserUser$outboundSchema = z.object({
    sourcedId: z.string(),
    status: GetUserStatus$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(() => GetUserUserId$outboundSchema)).optional(),
    enabledUser: z.boolean(),
    givenName: z.string(),
    familyName: z.string(),
    middleName: z.nullable(z.string()).optional(),
    roles: z.array(z.lazy(() => GetUserRole$outboundSchema)),
    agents: z.array(z.lazy(() => GetUserAgent$outboundSchema)),
    primaryOrg: z.lazy(() => GetUserPrimaryOrg$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 GetUserUser$;
(function (GetUserUser$) {
    /** @deprecated use `GetUserUser$inboundSchema` instead. */
    GetUserUser$.inboundSchema = GetUserUser$inboundSchema;
    /** @deprecated use `GetUserUser$outboundSchema` instead. */
    GetUserUser$.outboundSchema = GetUserUser$outboundSchema;
})(GetUserUser$ || (GetUserUser$ = {}));
export function getUserUserToJSON(getUserUser) {
    return JSON.stringify(GetUserUser$outboundSchema.parse(getUserUser));
}
export function getUserUserFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetUserUser$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetUserUser' from JSON`);
}
/** @internal */
export const GetUserResponse$inboundSchema = z.object({
    user: z.lazy(() => GetUserUser$inboundSchema),
});
/** @internal */
export const GetUserResponse$outboundSchema = z.object({
    user: z.lazy(() => GetUserUser$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetUserResponse$;
(function (GetUserResponse$) {
    /** @deprecated use `GetUserResponse$inboundSchema` instead. */
    GetUserResponse$.inboundSchema = GetUserResponse$inboundSchema;
    /** @deprecated use `GetUserResponse$outboundSchema` instead. */
    GetUserResponse$.outboundSchema = GetUserResponse$outboundSchema;
})(GetUserResponse$ || (GetUserResponse$ = {}));
export function getUserResponseToJSON(getUserResponse) {
    return JSON.stringify(GetUserResponse$outboundSchema.parse(getUserResponse));
}
export function getUserResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetUserResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetUserResponse' from JSON`);
}
//# sourceMappingURL=getuser.js.map