/*
 * 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 DownloadBackupAssetGlobals$inboundSchema = z.object({
    cloud_name: z.string().optional(),
}).transform((v) => {
    return remap$(v, {
        "cloud_name": "cloudName",
    });
});
/** @internal */
export const DownloadBackupAssetGlobals$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 DownloadBackupAssetGlobals$;
(function (DownloadBackupAssetGlobals$) {
    /** @deprecated use `DownloadBackupAssetGlobals$inboundSchema` instead. */
    DownloadBackupAssetGlobals$.inboundSchema = DownloadBackupAssetGlobals$inboundSchema;
    /** @deprecated use `DownloadBackupAssetGlobals$outboundSchema` instead. */
    DownloadBackupAssetGlobals$.outboundSchema = DownloadBackupAssetGlobals$outboundSchema;
})(DownloadBackupAssetGlobals$ || (DownloadBackupAssetGlobals$ = {}));
export function downloadBackupAssetGlobalsToJSON(downloadBackupAssetGlobals) {
    return JSON.stringify(DownloadBackupAssetGlobals$outboundSchema.parse(downloadBackupAssetGlobals));
}
export function downloadBackupAssetGlobalsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => DownloadBackupAssetGlobals$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DownloadBackupAssetGlobals' from JSON`);
}
/** @internal */
export const 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 remap$(v, {
        "asset_id": "assetId",
        "version_id": "versionId",
        "api_key": "apiKey",
    });
});
/** @internal */
export const DownloadBackupAssetRequest$outboundSchema = z.object({
    assetId: z.string(),
    versionId: z.string(),
    apiKey: z.string(),
    signature: z.string(),
    timestamp: z.number().int(),
}).transform((v) => {
    return 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.
 */
export var DownloadBackupAssetRequest$;
(function (DownloadBackupAssetRequest$) {
    /** @deprecated use `DownloadBackupAssetRequest$inboundSchema` instead. */
    DownloadBackupAssetRequest$.inboundSchema = DownloadBackupAssetRequest$inboundSchema;
    /** @deprecated use `DownloadBackupAssetRequest$outboundSchema` instead. */
    DownloadBackupAssetRequest$.outboundSchema = DownloadBackupAssetRequest$outboundSchema;
})(DownloadBackupAssetRequest$ || (DownloadBackupAssetRequest$ = {}));
export function downloadBackupAssetRequestToJSON(downloadBackupAssetRequest) {
    return JSON.stringify(DownloadBackupAssetRequest$outboundSchema.parse(downloadBackupAssetRequest));
}
export function downloadBackupAssetRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => DownloadBackupAssetRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DownloadBackupAssetRequest' from JSON`);
}
/** @internal */
export const NotFoundError$inboundSchema = z.object({
    message: z.string().optional(),
});
/** @internal */
export const 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.
 */
export var NotFoundError$;
(function (NotFoundError$) {
    /** @deprecated use `NotFoundError$inboundSchema` instead. */
    NotFoundError$.inboundSchema = NotFoundError$inboundSchema;
    /** @deprecated use `NotFoundError$outboundSchema` instead. */
    NotFoundError$.outboundSchema = NotFoundError$outboundSchema;
})(NotFoundError$ || (NotFoundError$ = {}));
export function notFoundErrorToJSON(notFoundError) {
    return JSON.stringify(NotFoundError$outboundSchema.parse(notFoundError));
}
export function notFoundErrorFromJSON(jsonString) {
    return safeParse(jsonString, (x) => NotFoundError$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'NotFoundError' from JSON`);
}
/** @internal */
export const DownloadBackupAssetUnauthorizedError$inboundSchema = z.object({
    message: z.string().optional(),
    http_code: z.number().int().optional(),
}).transform((v) => {
    return remap$(v, {
        "http_code": "httpCode",
    });
});
/** @internal */
export const DownloadBackupAssetUnauthorizedError$outboundSchema = z.object({
    message: z.string().optional(),
    httpCode: z.number().int().optional(),
}).transform((v) => {
    return 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.
 */
export var DownloadBackupAssetUnauthorizedError$;
(function (DownloadBackupAssetUnauthorizedError$) {
    /** @deprecated use `DownloadBackupAssetUnauthorizedError$inboundSchema` instead. */
    DownloadBackupAssetUnauthorizedError$.inboundSchema = DownloadBackupAssetUnauthorizedError$inboundSchema;
    /** @deprecated use `DownloadBackupAssetUnauthorizedError$outboundSchema` instead. */
    DownloadBackupAssetUnauthorizedError$.outboundSchema = DownloadBackupAssetUnauthorizedError$outboundSchema;
})(DownloadBackupAssetUnauthorizedError$ || (DownloadBackupAssetUnauthorizedError$ = {}));
export function downloadBackupAssetUnauthorizedErrorToJSON(downloadBackupAssetUnauthorizedError) {
    return JSON.stringify(DownloadBackupAssetUnauthorizedError$outboundSchema.parse(downloadBackupAssetUnauthorizedError));
}
export function downloadBackupAssetUnauthorizedErrorFromJSON(jsonString) {
    return safeParse(jsonString, (x) => DownloadBackupAssetUnauthorizedError$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DownloadBackupAssetUnauthorizedError' from JSON`);
}
/** @internal */
export const BadRequestError$inboundSchema = z.object({
    message: z.string().optional(),
    http_code: z.number().int().optional(),
}).transform((v) => {
    return remap$(v, {
        "http_code": "httpCode",
    });
});
/** @internal */
export const BadRequestError$outboundSchema = z.object({
    message: z.string().optional(),
    httpCode: z.number().int().optional(),
}).transform((v) => {
    return 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.
 */
export var BadRequestError$;
(function (BadRequestError$) {
    /** @deprecated use `BadRequestError$inboundSchema` instead. */
    BadRequestError$.inboundSchema = BadRequestError$inboundSchema;
    /** @deprecated use `BadRequestError$outboundSchema` instead. */
    BadRequestError$.outboundSchema = BadRequestError$outboundSchema;
})(BadRequestError$ || (BadRequestError$ = {}));
export function badRequestErrorToJSON(badRequestError) {
    return JSON.stringify(BadRequestError$outboundSchema.parse(badRequestError));
}
export function badRequestErrorFromJSON(jsonString) {
    return safeParse(jsonString, (x) => BadRequestError$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BadRequestError' from JSON`);
}
/** @internal */
export const DownloadBackupAssetResponse$inboundSchema = z.union([
    z.instanceof((ReadableStream)),
    z.instanceof((ReadableStream)),
    z.instanceof((ReadableStream)),
    z.instanceof((ReadableStream)),
]);
/** @internal */
export const 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.
 */
export var DownloadBackupAssetResponse$;
(function (DownloadBackupAssetResponse$) {
    /** @deprecated use `DownloadBackupAssetResponse$inboundSchema` instead. */
    DownloadBackupAssetResponse$.inboundSchema = DownloadBackupAssetResponse$inboundSchema;
    /** @deprecated use `DownloadBackupAssetResponse$outboundSchema` instead. */
    DownloadBackupAssetResponse$.outboundSchema = DownloadBackupAssetResponse$outboundSchema;
})(DownloadBackupAssetResponse$ || (DownloadBackupAssetResponse$ = {}));
export function downloadBackupAssetResponseToJSON(downloadBackupAssetResponse) {
    return JSON.stringify(DownloadBackupAssetResponse$outboundSchema.parse(downloadBackupAssetResponse));
}
export function downloadBackupAssetResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => DownloadBackupAssetResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DownloadBackupAssetResponse' from JSON`);
}
//# sourceMappingURL=downloadbackupasset.js.map