"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.ListUploadMappingsResponse$ = exports.ListUploadMappingsResponse$outboundSchema = exports.ListUploadMappingsResponse$inboundSchema = exports.ResponseBody$ = exports.ResponseBody$outboundSchema = exports.ResponseBody$inboundSchema = exports.ListUploadMappingsRequest$ = exports.ListUploadMappingsRequest$outboundSchema = exports.ListUploadMappingsRequest$inboundSchema = exports.ListUploadMappingsGlobals$ = exports.ListUploadMappingsGlobals$outboundSchema = exports.ListUploadMappingsGlobals$inboundSchema = void 0;
exports.listUploadMappingsGlobalsToJSON = listUploadMappingsGlobalsToJSON;
exports.listUploadMappingsGlobalsFromJSON = listUploadMappingsGlobalsFromJSON;
exports.listUploadMappingsRequestToJSON = listUploadMappingsRequestToJSON;
exports.listUploadMappingsRequestFromJSON = listUploadMappingsRequestFromJSON;
exports.responseBodyToJSON = responseBodyToJSON;
exports.responseBodyFromJSON = responseBodyFromJSON;
exports.listUploadMappingsResponseToJSON = listUploadMappingsResponseToJSON;
exports.listUploadMappingsResponseFromJSON = listUploadMappingsResponseFromJSON;
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"));
/** @internal */
exports.ListUploadMappingsGlobals$inboundSchema = z.object({
    cloud_name: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "cloud_name": "cloudName",
    });
});
/** @internal */
exports.ListUploadMappingsGlobals$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 ListUploadMappingsGlobals$;
(function (ListUploadMappingsGlobals$) {
    /** @deprecated use `ListUploadMappingsGlobals$inboundSchema` instead. */
    ListUploadMappingsGlobals$.inboundSchema = exports.ListUploadMappingsGlobals$inboundSchema;
    /** @deprecated use `ListUploadMappingsGlobals$outboundSchema` instead. */
    ListUploadMappingsGlobals$.outboundSchema = exports.ListUploadMappingsGlobals$outboundSchema;
})(ListUploadMappingsGlobals$ || (exports.ListUploadMappingsGlobals$ = ListUploadMappingsGlobals$ = {}));
function listUploadMappingsGlobalsToJSON(listUploadMappingsGlobals) {
    return JSON.stringify(exports.ListUploadMappingsGlobals$outboundSchema.parse(listUploadMappingsGlobals));
}
function listUploadMappingsGlobalsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListUploadMappingsGlobals$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListUploadMappingsGlobals' from JSON`);
}
/** @internal */
exports.ListUploadMappingsRequest$inboundSchema = z.object({
    folder: z.string().optional(),
    next_cursor: z.string().optional(),
    max_results: z.number().int().default(10),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "next_cursor": "nextCursor",
        "max_results": "maxResults",
    });
});
/** @internal */
exports.ListUploadMappingsRequest$outboundSchema = z.object({
    folder: z.string().optional(),
    nextCursor: z.string().optional(),
    maxResults: z.number().int().default(10),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        nextCursor: "next_cursor",
        maxResults: "max_results",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var ListUploadMappingsRequest$;
(function (ListUploadMappingsRequest$) {
    /** @deprecated use `ListUploadMappingsRequest$inboundSchema` instead. */
    ListUploadMappingsRequest$.inboundSchema = exports.ListUploadMappingsRequest$inboundSchema;
    /** @deprecated use `ListUploadMappingsRequest$outboundSchema` instead. */
    ListUploadMappingsRequest$.outboundSchema = exports.ListUploadMappingsRequest$outboundSchema;
})(ListUploadMappingsRequest$ || (exports.ListUploadMappingsRequest$ = ListUploadMappingsRequest$ = {}));
function listUploadMappingsRequestToJSON(listUploadMappingsRequest) {
    return JSON.stringify(exports.ListUploadMappingsRequest$outboundSchema.parse(listUploadMappingsRequest));
}
function listUploadMappingsRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListUploadMappingsRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListUploadMappingsRequest' from JSON`);
}
/** @internal */
exports.ResponseBody$inboundSchema = z.object({
    mappings: z.array(components.UploadMapping$inboundSchema),
    total_entries: z.number().int(),
    next_cursor: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "total_entries": "totalEntries",
        "next_cursor": "nextCursor",
    });
});
/** @internal */
exports.ResponseBody$outboundSchema = z.object({
    mappings: z.array(components.UploadMapping$outboundSchema),
    totalEntries: z.number().int(),
    nextCursor: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        totalEntries: "total_entries",
        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 ResponseBody$;
(function (ResponseBody$) {
    /** @deprecated use `ResponseBody$inboundSchema` instead. */
    ResponseBody$.inboundSchema = exports.ResponseBody$inboundSchema;
    /** @deprecated use `ResponseBody$outboundSchema` instead. */
    ResponseBody$.outboundSchema = exports.ResponseBody$outboundSchema;
})(ResponseBody$ || (exports.ResponseBody$ = ResponseBody$ = {}));
function responseBodyToJSON(responseBody) {
    return JSON.stringify(exports.ResponseBody$outboundSchema.parse(responseBody));
}
function responseBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBody' from JSON`);
}
/** @internal */
exports.ListUploadMappingsResponse$inboundSchema = z.union([
    z.lazy(() => exports.ResponseBody$inboundSchema),
    components.UploadMapping$inboundSchema,
]);
/** @internal */
exports.ListUploadMappingsResponse$outboundSchema = z.union([
    z.lazy(() => exports.ResponseBody$outboundSchema),
    components.UploadMapping$outboundSchema,
]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var ListUploadMappingsResponse$;
(function (ListUploadMappingsResponse$) {
    /** @deprecated use `ListUploadMappingsResponse$inboundSchema` instead. */
    ListUploadMappingsResponse$.inboundSchema = exports.ListUploadMappingsResponse$inboundSchema;
    /** @deprecated use `ListUploadMappingsResponse$outboundSchema` instead. */
    ListUploadMappingsResponse$.outboundSchema = exports.ListUploadMappingsResponse$outboundSchema;
})(ListUploadMappingsResponse$ || (exports.ListUploadMappingsResponse$ = ListUploadMappingsResponse$ = {}));
function listUploadMappingsResponseToJSON(listUploadMappingsResponse) {
    return JSON.stringify(exports.ListUploadMappingsResponse$outboundSchema.parse(listUploadMappingsResponse));
}
function listUploadMappingsResponseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListUploadMappingsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListUploadMappingsResponse' from JSON`);
}
//# sourceMappingURL=listuploadmappings.js.map