/*
 * 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";
/** @internal */
export const SearchFoldersGlobals$inboundSchema = z.object({
    cloud_name: z.string().optional(),
}).transform((v) => {
    return remap$(v, {
        "cloud_name": "cloudName",
    });
});
/** @internal */
export const SearchFoldersGlobals$outboundSchema = z.object({
    cloudName: z.string().optional(),
}).transform((v) => {
    return remap$(v, {
        cloudName: "cloud_name",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var SearchFoldersGlobals$;
(function (SearchFoldersGlobals$) {
    /** @deprecated use `SearchFoldersGlobals$inboundSchema` instead. */
    SearchFoldersGlobals$.inboundSchema = SearchFoldersGlobals$inboundSchema;
    /** @deprecated use `SearchFoldersGlobals$outboundSchema` instead. */
    SearchFoldersGlobals$.outboundSchema = SearchFoldersGlobals$outboundSchema;
})(SearchFoldersGlobals$ || (SearchFoldersGlobals$ = {}));
export function searchFoldersGlobalsToJSON(searchFoldersGlobals) {
    return JSON.stringify(SearchFoldersGlobals$outboundSchema.parse(searchFoldersGlobals));
}
export function searchFoldersGlobalsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => SearchFoldersGlobals$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchFoldersGlobals' from JSON`);
}
/** @internal */
export const Expression$inboundSchema = z.object({});
/** @internal */
export const Expression$outboundSchema = z.object({});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var Expression$;
(function (Expression$) {
    /** @deprecated use `Expression$inboundSchema` instead. */
    Expression$.inboundSchema = Expression$inboundSchema;
    /** @deprecated use `Expression$outboundSchema` instead. */
    Expression$.outboundSchema = Expression$outboundSchema;
})(Expression$ || (Expression$ = {}));
export function expressionToJSON(expression) {
    return JSON.stringify(Expression$outboundSchema.parse(expression));
}
export function expressionFromJSON(jsonString) {
    return safeParse(jsonString, (x) => Expression$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Expression' from JSON`);
}
/** @internal */
export const ExpressionUnion$inboundSchema = z.union([z.lazy(() => Expression$inboundSchema), z.string()]);
/** @internal */
export const ExpressionUnion$outboundSchema = z.union([z.lazy(() => Expression$outboundSchema), 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 ExpressionUnion$;
(function (ExpressionUnion$) {
    /** @deprecated use `ExpressionUnion$inboundSchema` instead. */
    ExpressionUnion$.inboundSchema = ExpressionUnion$inboundSchema;
    /** @deprecated use `ExpressionUnion$outboundSchema` instead. */
    ExpressionUnion$.outboundSchema = ExpressionUnion$outboundSchema;
})(ExpressionUnion$ || (ExpressionUnion$ = {}));
export function expressionUnionToJSON(expressionUnion) {
    return JSON.stringify(ExpressionUnion$outboundSchema.parse(expressionUnion));
}
export function expressionUnionFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ExpressionUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ExpressionUnion' from JSON`);
}
/** @internal */
export const SearchFoldersRequest$inboundSchema = z.object({
    expression: z.union([z.lazy(() => Expression$inboundSchema), z.string()])
        .optional(),
    sort_by: z.array(z.string()).optional(),
    max_results: z.number().int().default(50),
    next_cursor: z.string().optional(),
}).transform((v) => {
    return remap$(v, {
        "sort_by": "sortBy",
        "max_results": "maxResults",
        "next_cursor": "nextCursor",
    });
});
/** @internal */
export const SearchFoldersRequest$outboundSchema = z.object({
    expression: z.union([z.lazy(() => Expression$outboundSchema), z.string()])
        .optional(),
    sortBy: z.array(z.string()).optional(),
    maxResults: z.number().int().default(50),
    nextCursor: z.string().optional(),
}).transform((v) => {
    return remap$(v, {
        sortBy: "sort_by",
        maxResults: "max_results",
        nextCursor: "next_cursor",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var SearchFoldersRequest$;
(function (SearchFoldersRequest$) {
    /** @deprecated use `SearchFoldersRequest$inboundSchema` instead. */
    SearchFoldersRequest$.inboundSchema = SearchFoldersRequest$inboundSchema;
    /** @deprecated use `SearchFoldersRequest$outboundSchema` instead. */
    SearchFoldersRequest$.outboundSchema = SearchFoldersRequest$outboundSchema;
})(SearchFoldersRequest$ || (SearchFoldersRequest$ = {}));
export function searchFoldersRequestToJSON(searchFoldersRequest) {
    return JSON.stringify(SearchFoldersRequest$outboundSchema.parse(searchFoldersRequest));
}
export function searchFoldersRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => SearchFoldersRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchFoldersRequest' from JSON`);
}
//# sourceMappingURL=searchfolders.js.map