"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.tool$streamingProfilesDeleteStreamingProfile = void 0;
const z = __importStar(require("zod"));
const streamingProfilesDeleteStreamingProfile_js_1 = require("../../funcs/streamingProfilesDeleteStreamingProfile.js");
const tools_js_1 = require("../tools.js");
const args = {
    name: z.string(),
};
exports.tool$streamingProfilesDeleteStreamingProfile = {
    name: "delete-streaming-profile",
    description: `Purpose: Removes a streaming profile or reverts a built-in profile to its default settings. If the profile is a custom one, this operation permanently deletes it from your account. If the profile is a built-in Cloudinary profile that you have modified via an update, this will undo the customizations and restore the original preset values. (Attempting to delete a built-in profile that has never been modified will result in an error rather than a deletion.)
Usage: Use this operation to clean up streaming profiles that are no longer needed or to rollback changes on a built-in profile. For a custom profile that you no longer use, deleting it frees up its name and removes clutter from your configuration. For a built-in profile that you previously customized, deleting (reverting) it will discard your overrides and return to Cloudinary's default profile settings. Be cautious to only use this on profiles you truly want to remove or reset, especially if they might be referenced in existing media delivery URLs.
When Not to Use: Avoid using this on a built-in profile that you have not altered, because the operation will not succeed in that case. If your intention is to modify a profile's settings rather than remove it entirely, use **update-streaming-profile** instead of deletion. Also, do not use this for simply disabling a profile—built-in profiles cannot be deleted from the system, so if you don't want to use a built-in profile, you can just refrain from using it without calling this operation.
Output: On success, the API returns a confirmation message indicating that the profile was deleted (for custom profiles) or reverted to defaults (for built-in profiles). No detailed profile object is returned upon deletion—just the status message. If the profile could not be deleted (for example, if it was not found or was an unmodified built-in), an error message will be returned instead indicating the reason.
`,
    scopes: ["builder"],
    args,
    tool: async (client, args, ctx) => {
        const [result, apiCall] = await (0, streamingProfilesDeleteStreamingProfile_js_1.streamingProfilesDeleteStreamingProfile)(client, args.name, { fetchOptions: { signal: ctx.signal } }).$inspect();
        if (!result.ok) {
            return {
                content: [{ type: "text", text: result.error.message }],
                isError: true,
            };
        }
        const value = result.value;
        return (0, tools_js_1.formatResult)(value, apiCall);
    },
};
//# sourceMappingURL=streamingProfilesDeleteStreamingProfile.js.map