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