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