/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../../lib/schemas.js";
export const CreateOrgStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
export const CreateOrgType = {
    Department: "department",
    School: "school",
    District: "district",
    Local: "local",
    State: "state",
    National: "national",
};
/** @internal */
export const CreateOrgStatus$inboundSchema = z.nativeEnum(CreateOrgStatus);
/** @internal */
export const CreateOrgStatus$outboundSchema = CreateOrgStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateOrgStatus$;
(function (CreateOrgStatus$) {
    /** @deprecated use `CreateOrgStatus$inboundSchema` instead. */
    CreateOrgStatus$.inboundSchema = CreateOrgStatus$inboundSchema;
    /** @deprecated use `CreateOrgStatus$outboundSchema` instead. */
    CreateOrgStatus$.outboundSchema = CreateOrgStatus$outboundSchema;
})(CreateOrgStatus$ || (CreateOrgStatus$ = {}));
/** @internal */
export const CreateOrgType$inboundSchema = z.nativeEnum(CreateOrgType);
/** @internal */
export const CreateOrgType$outboundSchema = CreateOrgType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateOrgType$;
(function (CreateOrgType$) {
    /** @deprecated use `CreateOrgType$inboundSchema` instead. */
    CreateOrgType$.inboundSchema = CreateOrgType$inboundSchema;
    /** @deprecated use `CreateOrgType$outboundSchema` instead. */
    CreateOrgType$.outboundSchema = CreateOrgType$outboundSchema;
})(CreateOrgType$ || (CreateOrgType$ = {}));
/** @internal */
export const CreateOrgParent$inboundSchema = z.object({
    sourcedId: z.string(),
});
/** @internal */
export const CreateOrgParent$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 CreateOrgParent$;
(function (CreateOrgParent$) {
    /** @deprecated use `CreateOrgParent$inboundSchema` instead. */
    CreateOrgParent$.inboundSchema = CreateOrgParent$inboundSchema;
    /** @deprecated use `CreateOrgParent$outboundSchema` instead. */
    CreateOrgParent$.outboundSchema = CreateOrgParent$outboundSchema;
})(CreateOrgParent$ || (CreateOrgParent$ = {}));
export function createOrgParentToJSON(createOrgParent) {
    return JSON.stringify(CreateOrgParent$outboundSchema.parse(createOrgParent));
}
export function createOrgParentFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateOrgParent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateOrgParent' from JSON`);
}
/** @internal */
export const CreateOrgOrg$inboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: CreateOrgStatus$inboundSchema.default("active"),
    metadata: z.record(z.any()).optional(),
    name: z.string(),
    type: CreateOrgType$inboundSchema,
    identifier: z.string().optional(),
    parent: z.nullable(z.lazy(() => CreateOrgParent$inboundSchema)).optional(),
});
/** @internal */
export const CreateOrgOrg$outboundSchema = z.object({
    sourcedId: z.string().optional(),
    status: CreateOrgStatus$outboundSchema.default("active"),
    metadata: z.record(z.any()).optional(),
    name: z.string(),
    type: CreateOrgType$outboundSchema,
    identifier: z.string().optional(),
    parent: z.nullable(z.lazy(() => CreateOrgParent$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 CreateOrgOrg$;
(function (CreateOrgOrg$) {
    /** @deprecated use `CreateOrgOrg$inboundSchema` instead. */
    CreateOrgOrg$.inboundSchema = CreateOrgOrg$inboundSchema;
    /** @deprecated use `CreateOrgOrg$outboundSchema` instead. */
    CreateOrgOrg$.outboundSchema = CreateOrgOrg$outboundSchema;
})(CreateOrgOrg$ || (CreateOrgOrg$ = {}));
export function createOrgOrgToJSON(createOrgOrg) {
    return JSON.stringify(CreateOrgOrg$outboundSchema.parse(createOrgOrg));
}
export function createOrgOrgFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateOrgOrg$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateOrgOrg' from JSON`);
}
/** @internal */
export const CreateOrgRequest$inboundSchema = z.object({
    org: z.lazy(() => CreateOrgOrg$inboundSchema),
});
/** @internal */
export const CreateOrgRequest$outboundSchema = z.object({
    org: z.lazy(() => CreateOrgOrg$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateOrgRequest$;
(function (CreateOrgRequest$) {
    /** @deprecated use `CreateOrgRequest$inboundSchema` instead. */
    CreateOrgRequest$.inboundSchema = CreateOrgRequest$inboundSchema;
    /** @deprecated use `CreateOrgRequest$outboundSchema` instead. */
    CreateOrgRequest$.outboundSchema = CreateOrgRequest$outboundSchema;
})(CreateOrgRequest$ || (CreateOrgRequest$ = {}));
export function createOrgRequestToJSON(createOrgRequest) {
    return JSON.stringify(CreateOrgRequest$outboundSchema.parse(createOrgRequest));
}
export function createOrgRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateOrgRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateOrgRequest' from JSON`);
}
/** @internal */
export const CreateOrgSourcedIdPairs$inboundSchema = z.object({
    suppliedSourcedId: z.string(),
    allocatedSourcedId: z.string(),
});
/** @internal */
export const CreateOrgSourcedIdPairs$outboundSchema = z.object({
    suppliedSourcedId: z.string(),
    allocatedSourcedId: 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 CreateOrgSourcedIdPairs$;
(function (CreateOrgSourcedIdPairs$) {
    /** @deprecated use `CreateOrgSourcedIdPairs$inboundSchema` instead. */
    CreateOrgSourcedIdPairs$.inboundSchema = CreateOrgSourcedIdPairs$inboundSchema;
    /** @deprecated use `CreateOrgSourcedIdPairs$outboundSchema` instead. */
    CreateOrgSourcedIdPairs$.outboundSchema = CreateOrgSourcedIdPairs$outboundSchema;
})(CreateOrgSourcedIdPairs$ || (CreateOrgSourcedIdPairs$ = {}));
export function createOrgSourcedIdPairsToJSON(createOrgSourcedIdPairs) {
    return JSON.stringify(CreateOrgSourcedIdPairs$outboundSchema.parse(createOrgSourcedIdPairs));
}
export function createOrgSourcedIdPairsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateOrgSourcedIdPairs$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateOrgSourcedIdPairs' from JSON`);
}
/** @internal */
export const CreateOrgResponse$inboundSchema = z.object({
    sourcedIdPairs: z.lazy(() => CreateOrgSourcedIdPairs$inboundSchema),
});
/** @internal */
export const CreateOrgResponse$outboundSchema = z.object({
    sourcedIdPairs: z.lazy(() => CreateOrgSourcedIdPairs$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateOrgResponse$;
(function (CreateOrgResponse$) {
    /** @deprecated use `CreateOrgResponse$inboundSchema` instead. */
    CreateOrgResponse$.inboundSchema = CreateOrgResponse$inboundSchema;
    /** @deprecated use `CreateOrgResponse$outboundSchema` instead. */
    CreateOrgResponse$.outboundSchema = CreateOrgResponse$outboundSchema;
})(CreateOrgResponse$ || (CreateOrgResponse$ = {}));
export function createOrgResponseToJSON(createOrgResponse) {
    return JSON.stringify(CreateOrgResponse$outboundSchema.parse(createOrgResponse));
}
export function createOrgResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateOrgResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateOrgResponse' from JSON`);
}
//# sourceMappingURL=createorg.js.map