/*
 * 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";
export const UpdateSchoolStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
/** @internal */
export const UpdateSchoolStatus$inboundSchema = z.nativeEnum(UpdateSchoolStatus);
/** @internal */
export const UpdateSchoolStatus$outboundSchema = UpdateSchoolStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var UpdateSchoolStatus$;
(function (UpdateSchoolStatus$) {
    /** @deprecated use `UpdateSchoolStatus$inboundSchema` instead. */
    UpdateSchoolStatus$.inboundSchema = UpdateSchoolStatus$inboundSchema;
    /** @deprecated use `UpdateSchoolStatus$outboundSchema` instead. */
    UpdateSchoolStatus$.outboundSchema = UpdateSchoolStatus$outboundSchema;
})(UpdateSchoolStatus$ || (UpdateSchoolStatus$ = {}));
/** @internal */
export const UpdateSchoolParent$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const UpdateSchoolParent$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 UpdateSchoolParent$;
(function (UpdateSchoolParent$) {
    /** @deprecated use `UpdateSchoolParent$inboundSchema` instead. */
    UpdateSchoolParent$.inboundSchema = UpdateSchoolParent$inboundSchema;
    /** @deprecated use `UpdateSchoolParent$outboundSchema` instead. */
    UpdateSchoolParent$.outboundSchema = UpdateSchoolParent$outboundSchema;
})(UpdateSchoolParent$ || (UpdateSchoolParent$ = {}));
export function updateSchoolParentToJSON(updateSchoolParent) {
    return JSON.stringify(UpdateSchoolParent$outboundSchema.parse(updateSchoolParent));
}
export function updateSchoolParentFromJSON(jsonString) {
    return safeParse(jsonString, (x) => UpdateSchoolParent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateSchoolParent' from JSON`);
}
/** @internal */
export const UpdateSchoolOrg$inboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: UpdateSchoolStatus$inboundSchema.default("active"),
    metadata: z.record(z.any()).optional(),
    name: z.string(),
    type: z.literal("school").optional(),
    identifier: z.string().optional(),
    parent: z.nullable(z.lazy(() => UpdateSchoolParent$inboundSchema)).optional(),
});
/** @internal */
export const UpdateSchoolOrg$outboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: UpdateSchoolStatus$outboundSchema.default("active"),
    metadata: z.record(z.any()).optional(),
    name: z.string(),
    type: z.literal("school").default("school"),
    identifier: z.string().optional(),
    parent: z.nullable(z.lazy(() => UpdateSchoolParent$outboundSchema))
        .optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var UpdateSchoolOrg$;
(function (UpdateSchoolOrg$) {
    /** @deprecated use `UpdateSchoolOrg$inboundSchema` instead. */
    UpdateSchoolOrg$.inboundSchema = UpdateSchoolOrg$inboundSchema;
    /** @deprecated use `UpdateSchoolOrg$outboundSchema` instead. */
    UpdateSchoolOrg$.outboundSchema = UpdateSchoolOrg$outboundSchema;
})(UpdateSchoolOrg$ || (UpdateSchoolOrg$ = {}));
export function updateSchoolOrgToJSON(updateSchoolOrg) {
    return JSON.stringify(UpdateSchoolOrg$outboundSchema.parse(updateSchoolOrg));
}
export function updateSchoolOrgFromJSON(jsonString) {
    return safeParse(jsonString, (x) => UpdateSchoolOrg$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateSchoolOrg' from JSON`);
}
/** @internal */
export const UpdateSchoolRequestBody$inboundSchema = z.object({
    org: z.lazy(() => UpdateSchoolOrg$inboundSchema),
});
/** @internal */
export const UpdateSchoolRequestBody$outboundSchema = z.object({
    org: z.lazy(() => UpdateSchoolOrg$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var UpdateSchoolRequestBody$;
(function (UpdateSchoolRequestBody$) {
    /** @deprecated use `UpdateSchoolRequestBody$inboundSchema` instead. */
    UpdateSchoolRequestBody$.inboundSchema = UpdateSchoolRequestBody$inboundSchema;
    /** @deprecated use `UpdateSchoolRequestBody$outboundSchema` instead. */
    UpdateSchoolRequestBody$.outboundSchema = UpdateSchoolRequestBody$outboundSchema;
})(UpdateSchoolRequestBody$ || (UpdateSchoolRequestBody$ = {}));
export function updateSchoolRequestBodyToJSON(updateSchoolRequestBody) {
    return JSON.stringify(UpdateSchoolRequestBody$outboundSchema.parse(updateSchoolRequestBody));
}
export function updateSchoolRequestBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => UpdateSchoolRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateSchoolRequestBody' from JSON`);
}
/** @internal */
export const UpdateSchoolRequest$inboundSchema = z.object({
    sourcedId: z.string(),
    RequestBody: z.lazy(() => UpdateSchoolRequestBody$inboundSchema).optional(),
}).transform((v) => {
    return remap$(v, {
        "RequestBody": "requestBody",
    });
});
/** @internal */
export const UpdateSchoolRequest$outboundSchema = z.object({
    sourcedId: z.string(),
    requestBody: z.lazy(() => UpdateSchoolRequestBody$outboundSchema).optional(),
}).transform((v) => {
    return remap$(v, {
        requestBody: "RequestBody",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var UpdateSchoolRequest$;
(function (UpdateSchoolRequest$) {
    /** @deprecated use `UpdateSchoolRequest$inboundSchema` instead. */
    UpdateSchoolRequest$.inboundSchema = UpdateSchoolRequest$inboundSchema;
    /** @deprecated use `UpdateSchoolRequest$outboundSchema` instead. */
    UpdateSchoolRequest$.outboundSchema = UpdateSchoolRequest$outboundSchema;
})(UpdateSchoolRequest$ || (UpdateSchoolRequest$ = {}));
export function updateSchoolRequestToJSON(updateSchoolRequest) {
    return JSON.stringify(UpdateSchoolRequest$outboundSchema.parse(updateSchoolRequest));
}
export function updateSchoolRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => UpdateSchoolRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateSchoolRequest' from JSON`);
}
//# sourceMappingURL=updateschool.js.map