"use strict";
// File generated from our OpenAPI spec by Stainless.
Object.defineProperty(exports, "__esModule", { value: true });
exports.OpportunisticOnion = void 0;
const resource_1 = require("cloudflare/resource");
class OpportunisticOnion extends resource_1.APIResource {
    /**
     * Add an Alt-Svc header to all legitimate requests from Tor, allowing the
     * connection to use our onion services instead of exit nodes.
     */
    edit(params, options) {
        const { zone_id, ...body } = params;
        return this._client.patch(`/zones/${zone_id}/settings/opportunistic_onion`, {
            body,
            ...options,
        })._thenUnwrap((obj) => obj.result);
    }
    /**
     * Add an Alt-Svc header to all legitimate requests from Tor, allowing the
     * connection to use our onion services instead of exit nodes.
     */
    get(params, options) {
        const { zone_id } = params;
        return this._client.get(`/zones/${zone_id}/settings/opportunistic_onion`, options)._thenUnwrap((obj) => obj.result);
    }
}
exports.OpportunisticOnion = OpportunisticOnion;
(function (OpportunisticOnion) {
})(OpportunisticOnion = exports.OpportunisticOnion || (exports.OpportunisticOnion = {}));
//# sourceMappingURL=opportunistic-onion.js.map