/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 2721ef2e5585
 */
import * as z from "zod";
import { assetsUpdateResourceByAssetId } from "../../funcs/assetsUpdateResourceByAssetId.js";
import { ResourceUpdateRequest$zodSchema } from "../../models/resourceupdaterequest.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."),
    ResourceUpdateRequest: ResourceUpdateRequest$zodSchema.describe(`The asset attributes to update.`),
};
export const tool$assetsUpdateResourceByAssetId = {
    name: "asset-update",
    description: `Updates an existing asset's metadata, tags, and other attributes using its asset ID

Updates one or more attributes of a specified resource (asset) by its asset ID. This enables you to update details of an asset by its unique and immutable identifier, regardless of public ID, display name, asset folder, resource type or delivery type. Note that you can also update attributes of an existing asset using the explicit API endpoint.
`,
    scopes: ["librarian"],
    annotations: {
        "title": "Asset Update",
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "readOnlyHint": false,
    },
    args,
    tool: async (client, args, ctx) => {
        const [result] = await assetsUpdateResourceByAssetId(client, args.asset_id, args.ResourceUpdateRequest, { fetchOptions: { signal: ctx.signal } }).$inspect();
        if (!result.ok) {
            return {
                content: [{ type: "text", text: result.error.message }],
                isError: true,
            };
        }
        return formatResult(result.value);
    },
};
//# sourceMappingURL=assetsUpdateResourceByAssetId.js.map