"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.UpdateOrgRequest$ = exports.UpdateOrgRequest$outboundSchema = exports.UpdateOrgRequest$inboundSchema = exports.UpdateOrgRequestBody$ = exports.UpdateOrgRequestBody$outboundSchema = exports.UpdateOrgRequestBody$inboundSchema = exports.UpdateOrgOrg$ = exports.UpdateOrgOrg$outboundSchema = exports.UpdateOrgOrg$inboundSchema = exports.UpdateOrgParent$ = exports.UpdateOrgParent$outboundSchema = exports.UpdateOrgParent$inboundSchema = exports.UpdateOrgType$ = exports.UpdateOrgType$outboundSchema = exports.UpdateOrgType$inboundSchema = exports.UpdateOrgStatus$ = exports.UpdateOrgStatus$outboundSchema = exports.UpdateOrgStatus$inboundSchema = exports.UpdateOrgType = exports.UpdateOrgStatus = void 0;
exports.updateOrgParentToJSON = updateOrgParentToJSON;
exports.updateOrgParentFromJSON = updateOrgParentFromJSON;
exports.updateOrgOrgToJSON = updateOrgOrgToJSON;
exports.updateOrgOrgFromJSON = updateOrgOrgFromJSON;
exports.updateOrgRequestBodyToJSON = updateOrgRequestBodyToJSON;
exports.updateOrgRequestBodyFromJSON = updateOrgRequestBodyFromJSON;
exports.updateOrgRequestToJSON = updateOrgRequestToJSON;
exports.updateOrgRequestFromJSON = updateOrgRequestFromJSON;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
exports.UpdateOrgStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
exports.UpdateOrgType = {
    Department: "department",
    School: "school",
    District: "district",
    Local: "local",
    State: "state",
    National: "national",
};
/** @internal */
exports.UpdateOrgStatus$inboundSchema = z.nativeEnum(exports.UpdateOrgStatus);
/** @internal */
exports.UpdateOrgStatus$outboundSchema = exports.UpdateOrgStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var UpdateOrgStatus$;
(function (UpdateOrgStatus$) {
    /** @deprecated use `UpdateOrgStatus$inboundSchema` instead. */
    UpdateOrgStatus$.inboundSchema = exports.UpdateOrgStatus$inboundSchema;
    /** @deprecated use `UpdateOrgStatus$outboundSchema` instead. */
    UpdateOrgStatus$.outboundSchema = exports.UpdateOrgStatus$outboundSchema;
})(UpdateOrgStatus$ || (exports.UpdateOrgStatus$ = UpdateOrgStatus$ = {}));
/** @internal */
exports.UpdateOrgType$inboundSchema = z.nativeEnum(exports.UpdateOrgType);
/** @internal */
exports.UpdateOrgType$outboundSchema = exports.UpdateOrgType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var UpdateOrgType$;
(function (UpdateOrgType$) {
    /** @deprecated use `UpdateOrgType$inboundSchema` instead. */
    UpdateOrgType$.inboundSchema = exports.UpdateOrgType$inboundSchema;
    /** @deprecated use `UpdateOrgType$outboundSchema` instead. */
    UpdateOrgType$.outboundSchema = exports.UpdateOrgType$outboundSchema;
})(UpdateOrgType$ || (exports.UpdateOrgType$ = UpdateOrgType$ = {}));
/** @internal */
exports.UpdateOrgParent$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
exports.UpdateOrgParent$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 UpdateOrgParent$;
(function (UpdateOrgParent$) {
    /** @deprecated use `UpdateOrgParent$inboundSchema` instead. */
    UpdateOrgParent$.inboundSchema = exports.UpdateOrgParent$inboundSchema;
    /** @deprecated use `UpdateOrgParent$outboundSchema` instead. */
    UpdateOrgParent$.outboundSchema = exports.UpdateOrgParent$outboundSchema;
})(UpdateOrgParent$ || (exports.UpdateOrgParent$ = UpdateOrgParent$ = {}));
function updateOrgParentToJSON(updateOrgParent) {
    return JSON.stringify(exports.UpdateOrgParent$outboundSchema.parse(updateOrgParent));
}
function updateOrgParentFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.UpdateOrgParent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateOrgParent' from JSON`);
}
/** @internal */
exports.UpdateOrgOrg$inboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: exports.UpdateOrgStatus$inboundSchema.default("active"),
    metadata: z.record(z.any()).optional(),
    name: z.string(),
    type: exports.UpdateOrgType$inboundSchema,
    identifier: z.string().optional(),
    parent: z.nullable(z.lazy(() => exports.UpdateOrgParent$inboundSchema)).optional(),
});
/** @internal */
exports.UpdateOrgOrg$outboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: exports.UpdateOrgStatus$outboundSchema.default("active"),
    metadata: z.record(z.any()).optional(),
    name: z.string(),
    type: exports.UpdateOrgType$outboundSchema,
    identifier: z.string().optional(),
    parent: z.nullable(z.lazy(() => exports.UpdateOrgParent$outboundSchema)).optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var UpdateOrgOrg$;
(function (UpdateOrgOrg$) {
    /** @deprecated use `UpdateOrgOrg$inboundSchema` instead. */
    UpdateOrgOrg$.inboundSchema = exports.UpdateOrgOrg$inboundSchema;
    /** @deprecated use `UpdateOrgOrg$outboundSchema` instead. */
    UpdateOrgOrg$.outboundSchema = exports.UpdateOrgOrg$outboundSchema;
})(UpdateOrgOrg$ || (exports.UpdateOrgOrg$ = UpdateOrgOrg$ = {}));
function updateOrgOrgToJSON(updateOrgOrg) {
    return JSON.stringify(exports.UpdateOrgOrg$outboundSchema.parse(updateOrgOrg));
}
function updateOrgOrgFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.UpdateOrgOrg$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateOrgOrg' from JSON`);
}
/** @internal */
exports.UpdateOrgRequestBody$inboundSchema = z.object({
    org: z.lazy(() => exports.UpdateOrgOrg$inboundSchema),
});
/** @internal */
exports.UpdateOrgRequestBody$outboundSchema = z.object({
    org: z.lazy(() => exports.UpdateOrgOrg$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var UpdateOrgRequestBody$;
(function (UpdateOrgRequestBody$) {
    /** @deprecated use `UpdateOrgRequestBody$inboundSchema` instead. */
    UpdateOrgRequestBody$.inboundSchema = exports.UpdateOrgRequestBody$inboundSchema;
    /** @deprecated use `UpdateOrgRequestBody$outboundSchema` instead. */
    UpdateOrgRequestBody$.outboundSchema = exports.UpdateOrgRequestBody$outboundSchema;
})(UpdateOrgRequestBody$ || (exports.UpdateOrgRequestBody$ = UpdateOrgRequestBody$ = {}));
function updateOrgRequestBodyToJSON(updateOrgRequestBody) {
    return JSON.stringify(exports.UpdateOrgRequestBody$outboundSchema.parse(updateOrgRequestBody));
}
function updateOrgRequestBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.UpdateOrgRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateOrgRequestBody' from JSON`);
}
/** @internal */
exports.UpdateOrgRequest$inboundSchema = z.object({
    sourcedId: z.string(),
    RequestBody: z.lazy(() => exports.UpdateOrgRequestBody$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "RequestBody": "requestBody",
    });
});
/** @internal */
exports.UpdateOrgRequest$outboundSchema = z.object({
    sourcedId: z.string(),
    requestBody: z.lazy(() => exports.UpdateOrgRequestBody$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 UpdateOrgRequest$;
(function (UpdateOrgRequest$) {
    /** @deprecated use `UpdateOrgRequest$inboundSchema` instead. */
    UpdateOrgRequest$.inboundSchema = exports.UpdateOrgRequest$inboundSchema;
    /** @deprecated use `UpdateOrgRequest$outboundSchema` instead. */
    UpdateOrgRequest$.outboundSchema = exports.UpdateOrgRequest$outboundSchema;
})(UpdateOrgRequest$ || (exports.UpdateOrgRequest$ = UpdateOrgRequest$ = {}));
function updateOrgRequestToJSON(updateOrgRequest) {
    return JSON.stringify(exports.UpdateOrgRequest$outboundSchema.parse(updateOrgRequest));
}
function updateOrgRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.UpdateOrgRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateOrgRequest' from JSON`);
}
//# sourceMappingURL=updateorg.js.map