"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.GetAllOrgsResponse$ = exports.GetAllOrgsResponse$outboundSchema = exports.GetAllOrgsResponse$inboundSchema = exports.GetAllOrgsResponseBody$ = exports.GetAllOrgsResponseBody$outboundSchema = exports.GetAllOrgsResponseBody$inboundSchema = exports.GetAllOrgsRequest$ = exports.GetAllOrgsRequest$outboundSchema = exports.GetAllOrgsRequest$inboundSchema = exports.GetAllOrgsOrderBy$ = exports.GetAllOrgsOrderBy$outboundSchema = exports.GetAllOrgsOrderBy$inboundSchema = exports.GetAllOrgsOrderBy = void 0;
exports.getAllOrgsRequestToJSON = getAllOrgsRequestToJSON;
exports.getAllOrgsRequestFromJSON = getAllOrgsRequestFromJSON;
exports.getAllOrgsResponseBodyToJSON = getAllOrgsResponseBodyToJSON;
exports.getAllOrgsResponseBodyFromJSON = getAllOrgsResponseBodyFromJSON;
exports.getAllOrgsResponseToJSON = getAllOrgsResponseToJSON;
exports.getAllOrgsResponseFromJSON = getAllOrgsResponseFromJSON;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
const components = __importStar(require("../components/index.js"));
/**
 * The order to sort the response by
 */
exports.GetAllOrgsOrderBy = {
    Asc: "asc",
    Desc: "desc",
};
/** @internal */
exports.GetAllOrgsOrderBy$inboundSchema = z.nativeEnum(exports.GetAllOrgsOrderBy);
/** @internal */
exports.GetAllOrgsOrderBy$outboundSchema = exports.GetAllOrgsOrderBy$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var GetAllOrgsOrderBy$;
(function (GetAllOrgsOrderBy$) {
    /** @deprecated use `GetAllOrgsOrderBy$inboundSchema` instead. */
    GetAllOrgsOrderBy$.inboundSchema = exports.GetAllOrgsOrderBy$inboundSchema;
    /** @deprecated use `GetAllOrgsOrderBy$outboundSchema` instead. */
    GetAllOrgsOrderBy$.outboundSchema = exports.GetAllOrgsOrderBy$outboundSchema;
})(GetAllOrgsOrderBy$ || (exports.GetAllOrgsOrderBy$ = GetAllOrgsOrderBy$ = {}));
/** @internal */
exports.GetAllOrgsRequest$inboundSchema = z.object({
    fields: z.string().optional(),
    limit: z.number().int().default(100),
    offset: z.number().int().default(0),
    sort: z.string().optional(),
    orderBy: exports.GetAllOrgsOrderBy$inboundSchema.optional(),
    filter: z.string().optional(),
    search: z.string().optional(),
});
/** @internal */
exports.GetAllOrgsRequest$outboundSchema = z.object({
    fields: z.string().optional(),
    limit: z.number().int().default(100),
    offset: z.number().int().default(0),
    sort: z.string().optional(),
    orderBy: exports.GetAllOrgsOrderBy$outboundSchema.optional(),
    filter: z.string().optional(),
    search: z.string().optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var GetAllOrgsRequest$;
(function (GetAllOrgsRequest$) {
    /** @deprecated use `GetAllOrgsRequest$inboundSchema` instead. */
    GetAllOrgsRequest$.inboundSchema = exports.GetAllOrgsRequest$inboundSchema;
    /** @deprecated use `GetAllOrgsRequest$outboundSchema` instead. */
    GetAllOrgsRequest$.outboundSchema = exports.GetAllOrgsRequest$outboundSchema;
})(GetAllOrgsRequest$ || (exports.GetAllOrgsRequest$ = GetAllOrgsRequest$ = {}));
function getAllOrgsRequestToJSON(getAllOrgsRequest) {
    return JSON.stringify(exports.GetAllOrgsRequest$outboundSchema.parse(getAllOrgsRequest));
}
function getAllOrgsRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetAllOrgsRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllOrgsRequest' from JSON`);
}
/** @internal */
exports.GetAllOrgsResponseBody$inboundSchema = z.object({
    orgs: z.array(components.Org$inboundSchema),
    totalCount: z.number(),
    pageCount: z.number(),
    pageNumber: z.number(),
    offset: z.number(),
    limit: z.number(),
});
/** @internal */
exports.GetAllOrgsResponseBody$outboundSchema = z.object({
    orgs: z.array(components.Org$outboundSchema),
    totalCount: z.number(),
    pageCount: z.number(),
    pageNumber: z.number(),
    offset: z.number(),
    limit: z.number(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var GetAllOrgsResponseBody$;
(function (GetAllOrgsResponseBody$) {
    /** @deprecated use `GetAllOrgsResponseBody$inboundSchema` instead. */
    GetAllOrgsResponseBody$.inboundSchema = exports.GetAllOrgsResponseBody$inboundSchema;
    /** @deprecated use `GetAllOrgsResponseBody$outboundSchema` instead. */
    GetAllOrgsResponseBody$.outboundSchema = exports.GetAllOrgsResponseBody$outboundSchema;
})(GetAllOrgsResponseBody$ || (exports.GetAllOrgsResponseBody$ = GetAllOrgsResponseBody$ = {}));
function getAllOrgsResponseBodyToJSON(getAllOrgsResponseBody) {
    return JSON.stringify(exports.GetAllOrgsResponseBody$outboundSchema.parse(getAllOrgsResponseBody));
}
function getAllOrgsResponseBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetAllOrgsResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllOrgsResponseBody' from JSON`);
}
/** @internal */
exports.GetAllOrgsResponse$inboundSchema = z.object({
    Result: z.lazy(() => exports.GetAllOrgsResponseBody$inboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "Result": "result",
    });
});
/** @internal */
exports.GetAllOrgsResponse$outboundSchema = z.object({
    result: z.lazy(() => exports.GetAllOrgsResponseBody$outboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        result: "Result",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var GetAllOrgsResponse$;
(function (GetAllOrgsResponse$) {
    /** @deprecated use `GetAllOrgsResponse$inboundSchema` instead. */
    GetAllOrgsResponse$.inboundSchema = exports.GetAllOrgsResponse$inboundSchema;
    /** @deprecated use `GetAllOrgsResponse$outboundSchema` instead. */
    GetAllOrgsResponse$.outboundSchema = exports.GetAllOrgsResponse$outboundSchema;
})(GetAllOrgsResponse$ || (exports.GetAllOrgsResponse$ = GetAllOrgsResponse$ = {}));
function getAllOrgsResponseToJSON(getAllOrgsResponse) {
    return JSON.stringify(exports.GetAllOrgsResponse$outboundSchema.parse(getAllOrgsResponse));
}
function getAllOrgsResponseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetAllOrgsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllOrgsResponse' from JSON`);
}
//# sourceMappingURL=getallorgs.js.map