/*
 * 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";
import * as components from "../components/index.js";
/**
 * The order to sort the response by
 */
export const GetAllOrgsOrderBy = {
    Asc: "asc",
    Desc: "desc",
};
/** @internal */
export const GetAllOrgsOrderBy$inboundSchema = z.nativeEnum(GetAllOrgsOrderBy);
/** @internal */
export const GetAllOrgsOrderBy$outboundSchema = GetAllOrgsOrderBy$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetAllOrgsOrderBy$;
(function (GetAllOrgsOrderBy$) {
    /** @deprecated use `GetAllOrgsOrderBy$inboundSchema` instead. */
    GetAllOrgsOrderBy$.inboundSchema = GetAllOrgsOrderBy$inboundSchema;
    /** @deprecated use `GetAllOrgsOrderBy$outboundSchema` instead. */
    GetAllOrgsOrderBy$.outboundSchema = GetAllOrgsOrderBy$outboundSchema;
})(GetAllOrgsOrderBy$ || (GetAllOrgsOrderBy$ = {}));
/** @internal */
export const 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: GetAllOrgsOrderBy$inboundSchema.optional(),
    filter: z.string().optional(),
    search: z.string().optional(),
});
/** @internal */
export const 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: 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.
 */
export var GetAllOrgsRequest$;
(function (GetAllOrgsRequest$) {
    /** @deprecated use `GetAllOrgsRequest$inboundSchema` instead. */
    GetAllOrgsRequest$.inboundSchema = GetAllOrgsRequest$inboundSchema;
    /** @deprecated use `GetAllOrgsRequest$outboundSchema` instead. */
    GetAllOrgsRequest$.outboundSchema = GetAllOrgsRequest$outboundSchema;
})(GetAllOrgsRequest$ || (GetAllOrgsRequest$ = {}));
export function getAllOrgsRequestToJSON(getAllOrgsRequest) {
    return JSON.stringify(GetAllOrgsRequest$outboundSchema.parse(getAllOrgsRequest));
}
export function getAllOrgsRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllOrgsRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllOrgsRequest' from JSON`);
}
/** @internal */
export const 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 */
export const 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.
 */
export var GetAllOrgsResponseBody$;
(function (GetAllOrgsResponseBody$) {
    /** @deprecated use `GetAllOrgsResponseBody$inboundSchema` instead. */
    GetAllOrgsResponseBody$.inboundSchema = GetAllOrgsResponseBody$inboundSchema;
    /** @deprecated use `GetAllOrgsResponseBody$outboundSchema` instead. */
    GetAllOrgsResponseBody$.outboundSchema = GetAllOrgsResponseBody$outboundSchema;
})(GetAllOrgsResponseBody$ || (GetAllOrgsResponseBody$ = {}));
export function getAllOrgsResponseBodyToJSON(getAllOrgsResponseBody) {
    return JSON.stringify(GetAllOrgsResponseBody$outboundSchema.parse(getAllOrgsResponseBody));
}
export function getAllOrgsResponseBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllOrgsResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllOrgsResponseBody' from JSON`);
}
/** @internal */
export const GetAllOrgsResponse$inboundSchema = z.object({
    Result: z.lazy(() => GetAllOrgsResponseBody$inboundSchema),
}).transform((v) => {
    return remap$(v, {
        "Result": "result",
    });
});
/** @internal */
export const GetAllOrgsResponse$outboundSchema = z.object({
    result: z.lazy(() => GetAllOrgsResponseBody$outboundSchema),
}).transform((v) => {
    return 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.
 */
export var GetAllOrgsResponse$;
(function (GetAllOrgsResponse$) {
    /** @deprecated use `GetAllOrgsResponse$inboundSchema` instead. */
    GetAllOrgsResponse$.inboundSchema = GetAllOrgsResponse$inboundSchema;
    /** @deprecated use `GetAllOrgsResponse$outboundSchema` instead. */
    GetAllOrgsResponse$.outboundSchema = GetAllOrgsResponse$outboundSchema;
})(GetAllOrgsResponse$ || (GetAllOrgsResponse$ = {}));
export function getAllOrgsResponseToJSON(getAllOrgsResponse) {
    return JSON.stringify(GetAllOrgsResponse$outboundSchema.parse(getAllOrgsResponse));
}
export function getAllOrgsResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllOrgsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllOrgsResponse' from JSON`);
}
//# sourceMappingURL=getallorgs.js.map