"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.DownloadBackupAssetResponse$ = exports.DownloadBackupAssetResponse$outboundSchema = exports.DownloadBackupAssetResponse$inboundSchema = exports.BadRequestError$ = exports.BadRequestError$outboundSchema = exports.BadRequestError$inboundSchema = exports.DownloadBackupAssetUnauthorizedError$ = exports.DownloadBackupAssetUnauthorizedError$outboundSchema = exports.DownloadBackupAssetUnauthorizedError$inboundSchema = exports.NotFoundError$ = exports.NotFoundError$outboundSchema = exports.NotFoundError$inboundSchema = exports.DownloadBackupAssetRequest$ = exports.DownloadBackupAssetRequest$outboundSchema = exports.DownloadBackupAssetRequest$inboundSchema = exports.DownloadBackupAssetGlobals$ = exports.DownloadBackupAssetGlobals$outboundSchema = exports.DownloadBackupAssetGlobals$inboundSchema = void 0;
exports.downloadBackupAssetGlobalsToJSON = downloadBackupAssetGlobalsToJSON;
exports.downloadBackupAssetGlobalsFromJSON = downloadBackupAssetGlobalsFromJSON;
exports.downloadBackupAssetRequestToJSON = downloadBackupAssetRequestToJSON;
exports.downloadBackupAssetRequestFromJSON = downloadBackupAssetRequestFromJSON;
exports.notFoundErrorToJSON = notFoundErrorToJSON;
exports.notFoundErrorFromJSON = notFoundErrorFromJSON;
exports.downloadBackupAssetUnauthorizedErrorToJSON = downloadBackupAssetUnauthorizedErrorToJSON;
exports.downloadBackupAssetUnauthorizedErrorFromJSON = downloadBackupAssetUnauthorizedErrorFromJSON;
exports.badRequestErrorToJSON = badRequestErrorToJSON;
exports.badRequestErrorFromJSON = badRequestErrorFromJSON;
exports.downloadBackupAssetResponseToJSON = downloadBackupAssetResponseToJSON;
exports.downloadBackupAssetResponseFromJSON = downloadBackupAssetResponseFromJSON;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
/** @internal */
exports.DownloadBackupAssetGlobals$inboundSchema = z.object({
    cloud_name: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "cloud_name": "cloudName",
    });
});
/** @internal */
exports.DownloadBackupAssetGlobals$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 DownloadBackupAssetGlobals$;
(function (DownloadBackupAssetGlobals$) {
    /** @deprecated use `DownloadBackupAssetGlobals$inboundSchema` instead. */
    DownloadBackupAssetGlobals$.inboundSchema = exports.DownloadBackupAssetGlobals$inboundSchema;
    /** @deprecated use `DownloadBackupAssetGlobals$outboundSchema` instead. */
    DownloadBackupAssetGlobals$.outboundSchema = exports.DownloadBackupAssetGlobals$outboundSchema;
})(DownloadBackupAssetGlobals$ || (exports.DownloadBackupAssetGlobals$ = DownloadBackupAssetGlobals$ = {}));
function downloadBackupAssetGlobalsToJSON(downloadBackupAssetGlobals) {
    return JSON.stringify(exports.DownloadBackupAssetGlobals$outboundSchema.parse(downloadBackupAssetGlobals));
}
function downloadBackupAssetGlobalsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.DownloadBackupAssetGlobals$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DownloadBackupAssetGlobals' from JSON`);
}
/** @internal */
exports.DownloadBackupAssetRequest$inboundSchema = z.object({
    asset_id: z.string(),
    version_id: z.string(),
    api_key: z.string(),
    signature: z.string(),
    timestamp: z.number().int(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "asset_id": "assetId",
        "version_id": "versionId",
        "api_key": "apiKey",
    });
});
/** @internal */
exports.DownloadBackupAssetRequest$outboundSchema = z.object({
    assetId: z.string(),
    versionId: z.string(),
    apiKey: z.string(),
    signature: z.string(),
    timestamp: z.number().int(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        assetId: "asset_id",
        versionId: "version_id",
        apiKey: "api_key",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var DownloadBackupAssetRequest$;
(function (DownloadBackupAssetRequest$) {
    /** @deprecated use `DownloadBackupAssetRequest$inboundSchema` instead. */
    DownloadBackupAssetRequest$.inboundSchema = exports.DownloadBackupAssetRequest$inboundSchema;
    /** @deprecated use `DownloadBackupAssetRequest$outboundSchema` instead. */
    DownloadBackupAssetRequest$.outboundSchema = exports.DownloadBackupAssetRequest$outboundSchema;
})(DownloadBackupAssetRequest$ || (exports.DownloadBackupAssetRequest$ = DownloadBackupAssetRequest$ = {}));
function downloadBackupAssetRequestToJSON(downloadBackupAssetRequest) {
    return JSON.stringify(exports.DownloadBackupAssetRequest$outboundSchema.parse(downloadBackupAssetRequest));
}
function downloadBackupAssetRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.DownloadBackupAssetRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DownloadBackupAssetRequest' from JSON`);
}
/** @internal */
exports.NotFoundError$inboundSchema = z.object({
    message: z.string().optional(),
});
/** @internal */
exports.NotFoundError$outboundSchema = z.object({
    message: z.string().optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var NotFoundError$;
(function (NotFoundError$) {
    /** @deprecated use `NotFoundError$inboundSchema` instead. */
    NotFoundError$.inboundSchema = exports.NotFoundError$inboundSchema;
    /** @deprecated use `NotFoundError$outboundSchema` instead. */
    NotFoundError$.outboundSchema = exports.NotFoundError$outboundSchema;
})(NotFoundError$ || (exports.NotFoundError$ = NotFoundError$ = {}));
function notFoundErrorToJSON(notFoundError) {
    return JSON.stringify(exports.NotFoundError$outboundSchema.parse(notFoundError));
}
function notFoundErrorFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.NotFoundError$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'NotFoundError' from JSON`);
}
/** @internal */
exports.DownloadBackupAssetUnauthorizedError$inboundSchema = z.object({
    message: z.string().optional(),
    http_code: z.number().int().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "http_code": "httpCode",
    });
});
/** @internal */
exports.DownloadBackupAssetUnauthorizedError$outboundSchema = z.object({
    message: z.string().optional(),
    httpCode: z.number().int().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        httpCode: "http_code",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var DownloadBackupAssetUnauthorizedError$;
(function (DownloadBackupAssetUnauthorizedError$) {
    /** @deprecated use `DownloadBackupAssetUnauthorizedError$inboundSchema` instead. */
    DownloadBackupAssetUnauthorizedError$.inboundSchema = exports.DownloadBackupAssetUnauthorizedError$inboundSchema;
    /** @deprecated use `DownloadBackupAssetUnauthorizedError$outboundSchema` instead. */
    DownloadBackupAssetUnauthorizedError$.outboundSchema = exports.DownloadBackupAssetUnauthorizedError$outboundSchema;
})(DownloadBackupAssetUnauthorizedError$ || (exports.DownloadBackupAssetUnauthorizedError$ = DownloadBackupAssetUnauthorizedError$ = {}));
function downloadBackupAssetUnauthorizedErrorToJSON(downloadBackupAssetUnauthorizedError) {
    return JSON.stringify(exports.DownloadBackupAssetUnauthorizedError$outboundSchema.parse(downloadBackupAssetUnauthorizedError));
}
function downloadBackupAssetUnauthorizedErrorFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.DownloadBackupAssetUnauthorizedError$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DownloadBackupAssetUnauthorizedError' from JSON`);
}
/** @internal */
exports.BadRequestError$inboundSchema = z.object({
    message: z.string().optional(),
    http_code: z.number().int().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "http_code": "httpCode",
    });
});
/** @internal */
exports.BadRequestError$outboundSchema = z.object({
    message: z.string().optional(),
    httpCode: z.number().int().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        httpCode: "http_code",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var BadRequestError$;
(function (BadRequestError$) {
    /** @deprecated use `BadRequestError$inboundSchema` instead. */
    BadRequestError$.inboundSchema = exports.BadRequestError$inboundSchema;
    /** @deprecated use `BadRequestError$outboundSchema` instead. */
    BadRequestError$.outboundSchema = exports.BadRequestError$outboundSchema;
})(BadRequestError$ || (exports.BadRequestError$ = BadRequestError$ = {}));
function badRequestErrorToJSON(badRequestError) {
    return JSON.stringify(exports.BadRequestError$outboundSchema.parse(badRequestError));
}
function badRequestErrorFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.BadRequestError$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BadRequestError' from JSON`);
}
/** @internal */
exports.DownloadBackupAssetResponse$inboundSchema = z.union([
    z.instanceof((ReadableStream)),
    z.instanceof((ReadableStream)),
    z.instanceof((ReadableStream)),
    z.instanceof((ReadableStream)),
]);
/** @internal */
exports.DownloadBackupAssetResponse$outboundSchema = z.union([
    z.instanceof((ReadableStream)),
    z.instanceof((ReadableStream)),
    z.instanceof((ReadableStream)),
    z.instanceof((ReadableStream)),
]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var DownloadBackupAssetResponse$;
(function (DownloadBackupAssetResponse$) {
    /** @deprecated use `DownloadBackupAssetResponse$inboundSchema` instead. */
    DownloadBackupAssetResponse$.inboundSchema = exports.DownloadBackupAssetResponse$inboundSchema;
    /** @deprecated use `DownloadBackupAssetResponse$outboundSchema` instead. */
    DownloadBackupAssetResponse$.outboundSchema = exports.DownloadBackupAssetResponse$outboundSchema;
})(DownloadBackupAssetResponse$ || (exports.DownloadBackupAssetResponse$ = DownloadBackupAssetResponse$ = {}));
function downloadBackupAssetResponseToJSON(downloadBackupAssetResponse) {
    return JSON.stringify(exports.DownloadBackupAssetResponse$outboundSchema.parse(downloadBackupAssetResponse));
}
function downloadBackupAssetResponseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.DownloadBackupAssetResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DownloadBackupAssetResponse' from JSON`);
}
//# sourceMappingURL=downloadbackupasset.js.map