/*
 * 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";
export const OrderBy = {
    Name: "name",
    Id: "id",
    UpdatedAt: "updated_at",
};
export const Direction = {
    Asc: "asc",
    Desc: "desc",
};
/** @internal */
export const ListUploadPresetsGlobals$inboundSchema = z.object({
    cloud_name: z.string().optional(),
}).transform((v) => {
    return remap$(v, {
        "cloud_name": "cloudName",
    });
});
/** @internal */
export const ListUploadPresetsGlobals$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 ListUploadPresetsGlobals$;
(function (ListUploadPresetsGlobals$) {
    /** @deprecated use `ListUploadPresetsGlobals$inboundSchema` instead. */
    ListUploadPresetsGlobals$.inboundSchema = ListUploadPresetsGlobals$inboundSchema;
    /** @deprecated use `ListUploadPresetsGlobals$outboundSchema` instead. */
    ListUploadPresetsGlobals$.outboundSchema = ListUploadPresetsGlobals$outboundSchema;
})(ListUploadPresetsGlobals$ || (ListUploadPresetsGlobals$ = {}));
export function listUploadPresetsGlobalsToJSON(listUploadPresetsGlobals) {
    return JSON.stringify(ListUploadPresetsGlobals$outboundSchema.parse(listUploadPresetsGlobals));
}
export function listUploadPresetsGlobalsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ListUploadPresetsGlobals$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListUploadPresetsGlobals' from JSON`);
}
/** @internal */
export const OrderBy$inboundSchema = z
    .nativeEnum(OrderBy);
/** @internal */
export const OrderBy$outboundSchema = OrderBy$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var OrderBy$;
(function (OrderBy$) {
    /** @deprecated use `OrderBy$inboundSchema` instead. */
    OrderBy$.inboundSchema = OrderBy$inboundSchema;
    /** @deprecated use `OrderBy$outboundSchema` instead. */
    OrderBy$.outboundSchema = OrderBy$outboundSchema;
})(OrderBy$ || (OrderBy$ = {}));
/** @internal */
export const Direction$inboundSchema = z
    .nativeEnum(Direction);
/** @internal */
export const Direction$outboundSchema = Direction$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var Direction$;
(function (Direction$) {
    /** @deprecated use `Direction$inboundSchema` instead. */
    Direction$.inboundSchema = Direction$inboundSchema;
    /** @deprecated use `Direction$outboundSchema` instead. */
    Direction$.outboundSchema = Direction$outboundSchema;
})(Direction$ || (Direction$ = {}));
/** @internal */
export const ListUploadPresetsRequest$inboundSchema = z.object({
    order_by: OrderBy$inboundSchema.optional(),
    direction: Direction$inboundSchema.optional(),
    next_cursor: z.number().int().optional(),
}).transform((v) => {
    return remap$(v, {
        "order_by": "orderBy",
        "next_cursor": "nextCursor",
    });
});
/** @internal */
export const ListUploadPresetsRequest$outboundSchema = z.object({
    orderBy: OrderBy$outboundSchema.optional(),
    direction: Direction$outboundSchema.optional(),
    nextCursor: z.number().int().optional(),
}).transform((v) => {
    return remap$(v, {
        orderBy: "order_by",
        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 ListUploadPresetsRequest$;
(function (ListUploadPresetsRequest$) {
    /** @deprecated use `ListUploadPresetsRequest$inboundSchema` instead. */
    ListUploadPresetsRequest$.inboundSchema = ListUploadPresetsRequest$inboundSchema;
    /** @deprecated use `ListUploadPresetsRequest$outboundSchema` instead. */
    ListUploadPresetsRequest$.outboundSchema = ListUploadPresetsRequest$outboundSchema;
})(ListUploadPresetsRequest$ || (ListUploadPresetsRequest$ = {}));
export function listUploadPresetsRequestToJSON(listUploadPresetsRequest) {
    return JSON.stringify(ListUploadPresetsRequest$outboundSchema.parse(listUploadPresetsRequest));
}
export function listUploadPresetsRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ListUploadPresetsRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListUploadPresetsRequest' from JSON`);
}
/** @internal */
export const ListUploadPresetsResponse$inboundSchema = z.object({
    presets: z.array(components.UploadPreset$inboundSchema),
});
/** @internal */
export const ListUploadPresetsResponse$outboundSchema = z.object({
    presets: z.array(components.UploadPreset$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ListUploadPresetsResponse$;
(function (ListUploadPresetsResponse$) {
    /** @deprecated use `ListUploadPresetsResponse$inboundSchema` instead. */
    ListUploadPresetsResponse$.inboundSchema = ListUploadPresetsResponse$inboundSchema;
    /** @deprecated use `ListUploadPresetsResponse$outboundSchema` instead. */
    ListUploadPresetsResponse$.outboundSchema = ListUploadPresetsResponse$outboundSchema;
})(ListUploadPresetsResponse$ || (ListUploadPresetsResponse$ = {}));
export function listUploadPresetsResponseToJSON(listUploadPresetsResponse) {
    return JSON.stringify(ListUploadPresetsResponse$outboundSchema.parse(listUploadPresetsResponse));
}
export function listUploadPresetsResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ListUploadPresetsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListUploadPresetsResponse' from JSON`);
}
//# sourceMappingURL=listuploadpresets.js.map