/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import { resourcesClassesAssign } from "../../funcs/resourcesClassesAssign.js";
import * as operations from "../../models/operations/index.js";
import { formatResult } from "../tools.js";
const args = {
    request: operations.AssignResourceToClassRequest$inboundSchema,
};
export const tool$resourcesClassesAssign = {
    name: "resources-classes-assign",
    description: `Assign a resource to a class

To assign an existing resource to the specified class. The responding system must return the set of sourcedIds that have been allocated to the newly created resource records.`,
    args,
    tool: async (client, args, ctx) => {
        const [result, apiCall] = await resourcesClassesAssign(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
        if (!result.ok) {
            return {
                content: [{ type: "text", text: result.error.message }],
                isError: true,
            };
        }
        const value = result.value;
        return formatResult(value, apiCall);
    },
};
//# sourceMappingURL=resourcesClassesAssign.js.map