/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 7820dd7568d4
 */
import { assetsRenameAsset } from "../../funcs/assetsRenameAsset.js";
import { RenameAssetRequestBody$zodSchema } from "../../models/renameassetop.js";
import { ResourceType$zodSchema } from "../../models/resourcetype.js";
import { formatResult } from "../tools.js";
const args = {
    resource_type: ResourceType$zodSchema.describe(`The type of resource (image, video, or raw).`),
    RequestBody: RenameAssetRequestBody$zodSchema.describe(`The rename request parameters.`),
};
export const tool$assetsRenameAsset = {
    name: "asset-rename",
    description: `Updates an existing asset's identifier (public ID) and optionally other metadata in your Cloudinary account`,
    scopes: ["librarian"],
    annotations: {
        "title": "Asset Rename",
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "readOnlyHint": false,
    },
    args,
    tool: async (client, args, ctx) => {
        const [result] = await assetsRenameAsset(client, args.resource_type, args.RequestBody, { fetchOptions: { signal: ctx.signal } }).$inspect();
        if (!result.ok) {
            return {
                content: [{ type: "text", text: result.error.message }],
                isError: true,
            };
        }
        return formatResult(result.value);
    },
};
//# sourceMappingURL=assetsRenameAsset.js.map