"use strict";
// File generated from our OpenAPI spec by Stainless.
Object.defineProperty(exports, "__esModule", { value: true });
exports.Webp = void 0;
const resource_1 = require("cloudflare/resource");
class Webp extends resource_1.APIResource {
    /**
     * When the client requesting the image supports the WebP image codec, and WebP
     * offers a performance advantage over the original image format, Cloudflare will
     * serve a WebP version of the original image.
     */
    edit(params, options) {
        const { zone_id, ...body } = params;
        return this._client.patch(`/zones/${zone_id}/settings/webp`, { body, ...options })._thenUnwrap((obj) => obj.result);
    }
    /**
     * When the client requesting the image supports the WebP image codec, and WebP
     * offers a performance advantage over the original image format, Cloudflare will
     * serve a WebP version of the original image.
     */
    get(params, options) {
        const { zone_id } = params;
        return this._client.get(`/zones/${zone_id}/settings/webp`, options)._thenUnwrap((obj) => obj.result);
    }
}
exports.Webp = Webp;
(function (Webp) {
})(Webp = exports.Webp || (exports.Webp = {}));
//# sourceMappingURL=webp.js.map