"use strict";
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.WebPResource = void 0;
const resource_1 = require("cloudflaredev/resource");
class WebPResource 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.WebPResource = WebPResource;
(function (WebPResource) {
})(WebPResource = exports.WebPResource || (exports.WebPResource = {}));
//# sourceMappingURL=webp.js.map