"use strict";
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.RocketLoaderResource = void 0;
const resource_1 = require("cloudflaredev/resource");
class RocketLoaderResource extends resource_1.APIResource {
    /**
     * Rocket Loader is a general-purpose asynchronous JavaScript optimisation that
     * prioritises rendering your content while loading your site's Javascript
     * asynchronously. Turning on Rocket Loader will immediately improve a web page's
     * rendering time sometimes measured as Time to First Paint (TTFP), and also the
     * `window.onload` time (assuming there is JavaScript on the page). This can have a
     * positive impact on your Google search ranking. When turned on, Rocket Loader
     * will automatically defer the loading of all Javascript referenced in your HTML,
     * with no configuration required. Refer to
     * [Understanding Rocket Loader](https://support.cloudflare.com/hc/articles/200168056)
     * for more information.
     */
    edit(params, options) {
        const { zone_id, ...body } = params;
        return this._client.patch(`/zones/${zone_id}/settings/rocket_loader`, {
            body,
            ...options,
        })._thenUnwrap((obj) => obj.result);
    }
    /**
     * Rocket Loader is a general-purpose asynchronous JavaScript optimisation that
     * prioritises rendering your content while loading your site's Javascript
     * asynchronously. Turning on Rocket Loader will immediately improve a web page's
     * rendering time sometimes measured as Time to First Paint (TTFP), and also the
     * `window.onload` time (assuming there is JavaScript on the page). This can have a
     * positive impact on your Google search ranking. When turned on, Rocket Loader
     * will automatically defer the loading of all Javascript referenced in your HTML,
     * with no configuration required. Refer to
     * [Understanding Rocket Loader](https://support.cloudflare.com/hc/articles/200168056)
     * for more information.
     */
    get(params, options) {
        const { zone_id } = params;
        return this._client.get(`/zones/${zone_id}/settings/rocket_loader`, options)._thenUnwrap((obj) => obj.result);
    }
}
exports.RocketLoaderResource = RocketLoaderResource;
(function (RocketLoaderResource) {
})(RocketLoaderResource = exports.RocketLoaderResource || (exports.RocketLoaderResource = {}));
//# sourceMappingURL=rocket-loader.js.map