"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.UpdateSchoolRequest$ = exports.UpdateSchoolRequest$outboundSchema = exports.UpdateSchoolRequest$inboundSchema = exports.UpdateSchoolRequestBody$ = exports.UpdateSchoolRequestBody$outboundSchema = exports.UpdateSchoolRequestBody$inboundSchema = exports.UpdateSchoolOrg$ = exports.UpdateSchoolOrg$outboundSchema = exports.UpdateSchoolOrg$inboundSchema = exports.UpdateSchoolParent$ = exports.UpdateSchoolParent$outboundSchema = exports.UpdateSchoolParent$inboundSchema = exports.UpdateSchoolStatus$ = exports.UpdateSchoolStatus$outboundSchema = exports.UpdateSchoolStatus$inboundSchema = exports.UpdateSchoolStatus = void 0;
exports.updateSchoolParentToJSON = updateSchoolParentToJSON;
exports.updateSchoolParentFromJSON = updateSchoolParentFromJSON;
exports.updateSchoolOrgToJSON = updateSchoolOrgToJSON;
exports.updateSchoolOrgFromJSON = updateSchoolOrgFromJSON;
exports.updateSchoolRequestBodyToJSON = updateSchoolRequestBodyToJSON;
exports.updateSchoolRequestBodyFromJSON = updateSchoolRequestBodyFromJSON;
exports.updateSchoolRequestToJSON = updateSchoolRequestToJSON;
exports.updateSchoolRequestFromJSON = updateSchoolRequestFromJSON;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
exports.UpdateSchoolStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
/** @internal */
exports.UpdateSchoolStatus$inboundSchema = z.nativeEnum(exports.UpdateSchoolStatus);
/** @internal */
exports.UpdateSchoolStatus$outboundSchema = exports.UpdateSchoolStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var UpdateSchoolStatus$;
(function (UpdateSchoolStatus$) {
    /** @deprecated use `UpdateSchoolStatus$inboundSchema` instead. */
    UpdateSchoolStatus$.inboundSchema = exports.UpdateSchoolStatus$inboundSchema;
    /** @deprecated use `UpdateSchoolStatus$outboundSchema` instead. */
    UpdateSchoolStatus$.outboundSchema = exports.UpdateSchoolStatus$outboundSchema;
})(UpdateSchoolStatus$ || (exports.UpdateSchoolStatus$ = UpdateSchoolStatus$ = {}));
/** @internal */
exports.UpdateSchoolParent$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.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.
 */
var UpdateSchoolParent$;
(function (UpdateSchoolParent$) {
    /** @deprecated use `UpdateSchoolParent$inboundSchema` instead. */
    UpdateSchoolParent$.inboundSchema = exports.UpdateSchoolParent$inboundSchema;
    /** @deprecated use `UpdateSchoolParent$outboundSchema` instead. */
    UpdateSchoolParent$.outboundSchema = exports.UpdateSchoolParent$outboundSchema;
})(UpdateSchoolParent$ || (exports.UpdateSchoolParent$ = UpdateSchoolParent$ = {}));
function updateSchoolParentToJSON(updateSchoolParent) {
    return JSON.stringify(exports.UpdateSchoolParent$outboundSchema.parse(updateSchoolParent));
}
function updateSchoolParentFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.UpdateSchoolParent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateSchoolParent' from JSON`);
}
/** @internal */
exports.UpdateSchoolOrg$inboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: exports.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(() => exports.UpdateSchoolParent$inboundSchema)).optional(),
});
/** @internal */
exports.UpdateSchoolOrg$outboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: exports.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(() => exports.UpdateSchoolParent$outboundSchema))
        .optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var UpdateSchoolOrg$;
(function (UpdateSchoolOrg$) {
    /** @deprecated use `UpdateSchoolOrg$inboundSchema` instead. */
    UpdateSchoolOrg$.inboundSchema = exports.UpdateSchoolOrg$inboundSchema;
    /** @deprecated use `UpdateSchoolOrg$outboundSchema` instead. */
    UpdateSchoolOrg$.outboundSchema = exports.UpdateSchoolOrg$outboundSchema;
})(UpdateSchoolOrg$ || (exports.UpdateSchoolOrg$ = UpdateSchoolOrg$ = {}));
function updateSchoolOrgToJSON(updateSchoolOrg) {
    return JSON.stringify(exports.UpdateSchoolOrg$outboundSchema.parse(updateSchoolOrg));
}
function updateSchoolOrgFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.UpdateSchoolOrg$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateSchoolOrg' from JSON`);
}
/** @internal */
exports.UpdateSchoolRequestBody$inboundSchema = z.object({
    org: z.lazy(() => exports.UpdateSchoolOrg$inboundSchema),
});
/** @internal */
exports.UpdateSchoolRequestBody$outboundSchema = z.object({
    org: z.lazy(() => exports.UpdateSchoolOrg$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var UpdateSchoolRequestBody$;
(function (UpdateSchoolRequestBody$) {
    /** @deprecated use `UpdateSchoolRequestBody$inboundSchema` instead. */
    UpdateSchoolRequestBody$.inboundSchema = exports.UpdateSchoolRequestBody$inboundSchema;
    /** @deprecated use `UpdateSchoolRequestBody$outboundSchema` instead. */
    UpdateSchoolRequestBody$.outboundSchema = exports.UpdateSchoolRequestBody$outboundSchema;
})(UpdateSchoolRequestBody$ || (exports.UpdateSchoolRequestBody$ = UpdateSchoolRequestBody$ = {}));
function updateSchoolRequestBodyToJSON(updateSchoolRequestBody) {
    return JSON.stringify(exports.UpdateSchoolRequestBody$outboundSchema.parse(updateSchoolRequestBody));
}
function updateSchoolRequestBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.UpdateSchoolRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateSchoolRequestBody' from JSON`);
}
/** @internal */
exports.UpdateSchoolRequest$inboundSchema = z.object({
    sourcedId: z.string(),
    RequestBody: z.lazy(() => exports.UpdateSchoolRequestBody$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "RequestBody": "requestBody",
    });
});
/** @internal */
exports.UpdateSchoolRequest$outboundSchema = z.object({
    sourcedId: z.string(),
    requestBody: z.lazy(() => exports.UpdateSchoolRequestBody$outboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.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.
 */
var UpdateSchoolRequest$;
(function (UpdateSchoolRequest$) {
    /** @deprecated use `UpdateSchoolRequest$inboundSchema` instead. */
    UpdateSchoolRequest$.inboundSchema = exports.UpdateSchoolRequest$inboundSchema;
    /** @deprecated use `UpdateSchoolRequest$outboundSchema` instead. */
    UpdateSchoolRequest$.outboundSchema = exports.UpdateSchoolRequest$outboundSchema;
})(UpdateSchoolRequest$ || (exports.UpdateSchoolRequest$ = UpdateSchoolRequest$ = {}));
function updateSchoolRequestToJSON(updateSchoolRequest) {
    return JSON.stringify(exports.UpdateSchoolRequest$outboundSchema.parse(updateSchoolRequest));
}
function updateSchoolRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.UpdateSchoolRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateSchoolRequest' from JSON`);
}
//# sourceMappingURL=updateschool.js.map