/*
 * 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 GetAllResourcesOrderBy = {
    Asc: "asc",
    Desc: "desc",
};
/** @internal */
export const GetAllResourcesOrderBy$inboundSchema = z.nativeEnum(GetAllResourcesOrderBy);
/** @internal */
export const GetAllResourcesOrderBy$outboundSchema = GetAllResourcesOrderBy$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetAllResourcesOrderBy$;
(function (GetAllResourcesOrderBy$) {
    /** @deprecated use `GetAllResourcesOrderBy$inboundSchema` instead. */
    GetAllResourcesOrderBy$.inboundSchema = GetAllResourcesOrderBy$inboundSchema;
    /** @deprecated use `GetAllResourcesOrderBy$outboundSchema` instead. */
    GetAllResourcesOrderBy$.outboundSchema = GetAllResourcesOrderBy$outboundSchema;
})(GetAllResourcesOrderBy$ || (GetAllResourcesOrderBy$ = {}));
/** @internal */
export const GetAllResourcesRequest$inboundSchema = z.object({
    fields: z.string().optional(),
    limit: z.number().int().default(100),
    offset: z.number().int().default(0),
    sort: z.string().optional(),
    orderBy: GetAllResourcesOrderBy$inboundSchema.optional(),
    filter: z.string().optional(),
    search: z.string().optional(),
});
/** @internal */
export const GetAllResourcesRequest$outboundSchema = z.object({
    fields: z.string().optional(),
    limit: z.number().int().default(100),
    offset: z.number().int().default(0),
    sort: z.string().optional(),
    orderBy: GetAllResourcesOrderBy$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 GetAllResourcesRequest$;
(function (GetAllResourcesRequest$) {
    /** @deprecated use `GetAllResourcesRequest$inboundSchema` instead. */
    GetAllResourcesRequest$.inboundSchema = GetAllResourcesRequest$inboundSchema;
    /** @deprecated use `GetAllResourcesRequest$outboundSchema` instead. */
    GetAllResourcesRequest$.outboundSchema = GetAllResourcesRequest$outboundSchema;
})(GetAllResourcesRequest$ || (GetAllResourcesRequest$ = {}));
export function getAllResourcesRequestToJSON(getAllResourcesRequest) {
    return JSON.stringify(GetAllResourcesRequest$outboundSchema.parse(getAllResourcesRequest));
}
export function getAllResourcesRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllResourcesRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllResourcesRequest' from JSON`);
}
/** @internal */
export const GetAllResourcesResponseBody$inboundSchema = z.object({
    resources: z.array(components.Resource$inboundSchema),
    totalCount: z.number(),
    pageCount: z.number(),
    pageNumber: z.number(),
    offset: z.number(),
    limit: z.number(),
});
/** @internal */
export const GetAllResourcesResponseBody$outboundSchema = z.object({
    resources: z.array(components.Resource$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 GetAllResourcesResponseBody$;
(function (GetAllResourcesResponseBody$) {
    /** @deprecated use `GetAllResourcesResponseBody$inboundSchema` instead. */
    GetAllResourcesResponseBody$.inboundSchema = GetAllResourcesResponseBody$inboundSchema;
    /** @deprecated use `GetAllResourcesResponseBody$outboundSchema` instead. */
    GetAllResourcesResponseBody$.outboundSchema = GetAllResourcesResponseBody$outboundSchema;
})(GetAllResourcesResponseBody$ || (GetAllResourcesResponseBody$ = {}));
export function getAllResourcesResponseBodyToJSON(getAllResourcesResponseBody) {
    return JSON.stringify(GetAllResourcesResponseBody$outboundSchema.parse(getAllResourcesResponseBody));
}
export function getAllResourcesResponseBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllResourcesResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllResourcesResponseBody' from JSON`);
}
/** @internal */
export const GetAllResourcesResponse$inboundSchema = z.object({
    Result: z.lazy(() => GetAllResourcesResponseBody$inboundSchema),
}).transform((v) => {
    return remap$(v, {
        "Result": "result",
    });
});
/** @internal */
export const GetAllResourcesResponse$outboundSchema = z.object({
    result: z.lazy(() => GetAllResourcesResponseBody$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 GetAllResourcesResponse$;
(function (GetAllResourcesResponse$) {
    /** @deprecated use `GetAllResourcesResponse$inboundSchema` instead. */
    GetAllResourcesResponse$.inboundSchema = GetAllResourcesResponse$inboundSchema;
    /** @deprecated use `GetAllResourcesResponse$outboundSchema` instead. */
    GetAllResourcesResponse$.outboundSchema = GetAllResourcesResponse$outboundSchema;
})(GetAllResourcesResponse$ || (GetAllResourcesResponse$ = {}));
export function getAllResourcesResponseToJSON(getAllResourcesResponse) {
    return JSON.stringify(GetAllResourcesResponse$outboundSchema.parse(getAllResourcesResponse));
}
export function getAllResourcesResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllResourcesResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllResourcesResponse' from JSON`);
}
//# sourceMappingURL=getallresources.js.map