/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 1a145ee6808c
 */
import * as z from "zod";
import { assetsDownloadBackupAsset } from "../../funcs/assetsDownloadBackupAsset.js";
import { formatResult } from "../tools.js";
const args = {
    asset_id: z.string().describe("The asset ID of the resource. Must be a 32-character hexadecimal string."),
    version_id: z.string().describe("The version ID of the backup to download. Must be a 32-character hexadecimal string."),
};
export const tool$assetsDownloadBackupAsset = {
    name: "download-asset-backup",
    description: `Download a backup copy of an asset`,
    annotations: {
        "title": "Download Asset Backup",
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "readOnlyHint": true,
    },
    args,
    tool: async (client, args, ctx) => {
        const [result] = await assetsDownloadBackupAsset(client, args.asset_id, args.version_id, { fetchOptions: { signal: ctx.signal } }).$inspect();
        if (!result.ok) {
            return {
                content: [{ type: "text", text: result.error.message }],
                isError: true,
            };
        }
        return formatResult(result.value);
    },
};
//# sourceMappingURL=assetsDownloadBackupAsset.js.map