"use strict";
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.OriginErrorPagePassThruResource = void 0;
const resource_1 = require("cloudflaredev/resource");
class OriginErrorPagePassThruResource extends resource_1.APIResource {
    /**
     * Cloudflare will proxy customer error pages on any 502,504 errors on origin
     * server instead of showing a default Cloudflare error page. This does not apply
     * to 522 errors and is limited to Enterprise Zones.
     */
    edit(params, options) {
        const { zone_id, ...body } = params;
        return this._client.patch(`/zones/${zone_id}/settings/origin_error_page_pass_thru`, {
            body,
            ...options,
        })._thenUnwrap((obj) => obj.result);
    }
    /**
     * Cloudflare will proxy customer error pages on any 502,504 errors on origin
     * server instead of showing a default Cloudflare error page. This does not apply
     * to 522 errors and is limited to Enterprise Zones.
     */
    get(params, options) {
        const { zone_id } = params;
        return this._client.get(`/zones/${zone_id}/settings/origin_error_page_pass_thru`, options)._thenUnwrap((obj) => obj.result);
    }
}
exports.OriginErrorPagePassThruResource = OriginErrorPagePassThruResource;
(function (OriginErrorPagePassThruResource) {
})(OriginErrorPagePassThruResource = exports.OriginErrorPagePassThruResource || (exports.OriginErrorPagePassThruResource = {}));
//# sourceMappingURL=origin-error-page-pass-thru.js.map