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