/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../../lib/schemas.js";
export const CreateSchoolStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
/** @internal */
export const CreateSchoolStatus$inboundSchema = z.nativeEnum(CreateSchoolStatus);
/** @internal */
export const CreateSchoolStatus$outboundSchema = CreateSchoolStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateSchoolStatus$;
(function (CreateSchoolStatus$) {
    /** @deprecated use `CreateSchoolStatus$inboundSchema` instead. */
    CreateSchoolStatus$.inboundSchema = CreateSchoolStatus$inboundSchema;
    /** @deprecated use `CreateSchoolStatus$outboundSchema` instead. */
    CreateSchoolStatus$.outboundSchema = CreateSchoolStatus$outboundSchema;
})(CreateSchoolStatus$ || (CreateSchoolStatus$ = {}));
/** @internal */
export const CreateSchoolParent$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const CreateSchoolParent$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 CreateSchoolParent$;
(function (CreateSchoolParent$) {
    /** @deprecated use `CreateSchoolParent$inboundSchema` instead. */
    CreateSchoolParent$.inboundSchema = CreateSchoolParent$inboundSchema;
    /** @deprecated use `CreateSchoolParent$outboundSchema` instead. */
    CreateSchoolParent$.outboundSchema = CreateSchoolParent$outboundSchema;
})(CreateSchoolParent$ || (CreateSchoolParent$ = {}));
export function createSchoolParentToJSON(createSchoolParent) {
    return JSON.stringify(CreateSchoolParent$outboundSchema.parse(createSchoolParent));
}
export function createSchoolParentFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateSchoolParent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateSchoolParent' from JSON`);
}
/** @internal */
export const CreateSchoolOrg$inboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: CreateSchoolStatus$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(() => CreateSchoolParent$inboundSchema)).optional(),
});
/** @internal */
export const CreateSchoolOrg$outboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: CreateSchoolStatus$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(() => CreateSchoolParent$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 CreateSchoolOrg$;
(function (CreateSchoolOrg$) {
    /** @deprecated use `CreateSchoolOrg$inboundSchema` instead. */
    CreateSchoolOrg$.inboundSchema = CreateSchoolOrg$inboundSchema;
    /** @deprecated use `CreateSchoolOrg$outboundSchema` instead. */
    CreateSchoolOrg$.outboundSchema = CreateSchoolOrg$outboundSchema;
})(CreateSchoolOrg$ || (CreateSchoolOrg$ = {}));
export function createSchoolOrgToJSON(createSchoolOrg) {
    return JSON.stringify(CreateSchoolOrg$outboundSchema.parse(createSchoolOrg));
}
export function createSchoolOrgFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateSchoolOrg$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateSchoolOrg' from JSON`);
}
/** @internal */
export const CreateSchoolRequest$inboundSchema = z.object({
    org: z.lazy(() => CreateSchoolOrg$inboundSchema),
});
/** @internal */
export const CreateSchoolRequest$outboundSchema = z.object({
    org: z.lazy(() => CreateSchoolOrg$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateSchoolRequest$;
(function (CreateSchoolRequest$) {
    /** @deprecated use `CreateSchoolRequest$inboundSchema` instead. */
    CreateSchoolRequest$.inboundSchema = CreateSchoolRequest$inboundSchema;
    /** @deprecated use `CreateSchoolRequest$outboundSchema` instead. */
    CreateSchoolRequest$.outboundSchema = CreateSchoolRequest$outboundSchema;
})(CreateSchoolRequest$ || (CreateSchoolRequest$ = {}));
export function createSchoolRequestToJSON(createSchoolRequest) {
    return JSON.stringify(CreateSchoolRequest$outboundSchema.parse(createSchoolRequest));
}
export function createSchoolRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateSchoolRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateSchoolRequest' from JSON`);
}
//# sourceMappingURL=createschool.js.map