"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$streamingProfilesCreateStreamingProfile = void 0;
const streamingProfilesCreateStreamingProfile_js_1 = require("../../funcs/streamingProfilesCreateStreamingProfile.js");
const components = __importStar(require("../../models/components/index.js"));
const tools_js_1 = require("../tools.js");
const args = {
    request: components.StreamingProfileCreate$inboundSchema,
};
exports.tool$streamingProfilesCreateStreamingProfile = {
    name: "create-streaming-profile",
    description: `Purpose: Creates a new adaptive streaming profile in your Cloudinary account. You define a unique profile name and a set of video representations (each with specific transformation parameters like resolution, bitrate, codec, etc.) for adaptive bitrate streaming. This operation allows you to customize streaming profiles beyond the built-in ones by specifying exactly how videos should be encoded at various quality levels.
Usage: Use this operation when the existing built-in streaming profiles do not meet your requirements and you need a custom profile. For example, if you require different resolutions or advanced codecs (such as VP9 or H.265/HEVC for DASH streaming) that are not covered by the default profiles, you can create your own. Provide a profile name (not already in use) and an array of representation definitions. Once created, the new profile can be applied in video uploads (e.g., as an eager transformation) and for delivering videos using the \`sp_<profile>\` parameter.
When Not to Use: Do not create a new profile if an existing Cloudinary predefined profile already satisfies your needs, as that would be redundant. Also, avoid using this operation to change an existing profile's settings—if a profile exists but needs adjustments, use **update-streaming-profile** instead. Ensure the profile name you choose isn't already taken by another profile (attempting to recreate an existing name will result in an error).
Output: On success, returns the details of the newly created streaming profile. The response will include the profile's \`name\`, any \`display_name\` you set, and the list of \`representations\` (transformation specifications) for that profile, confirming that the profile was created.
`,
    scopes: ["builder"],
    args,
    tool: async (client, args, ctx) => {
        const [result, apiCall] = await (0, streamingProfilesCreateStreamingProfile_js_1.streamingProfilesCreateStreamingProfile)(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 (0, tools_js_1.formatResult)(value, apiCall);
    },
};
//# sourceMappingURL=streamingProfilesCreateStreamingProfile.js.map