// File generated from our OpenAPI spec by Stainless.
import { APIResource } from 'cloudflare/resource';
export class Rules extends APIResource {
    /**
     * Only available for the Waiting Room Advanced subscription. Creates a rule for a
     * waiting room.
     */
    create(zoneIdentifier, waitingRoomId, body, options) {
        return this._client.post(`/zones/${zoneIdentifier}/waiting_rooms/${waitingRoomId}/rules`, {
            body,
            ...options,
        })._thenUnwrap((obj) => obj.result);
    }
    /**
     * Only available for the Waiting Room Advanced subscription. Replaces all rules
     * for a waiting room.
     */
    update(zoneIdentifier, waitingRoomId, body, options) {
        return this._client.put(`/zones/${zoneIdentifier}/waiting_rooms/${waitingRoomId}/rules`, {
            body,
            ...options,
        })._thenUnwrap((obj) => obj.result);
    }
    /**
     * Lists rules for a waiting room.
     */
    list(zoneIdentifier, waitingRoomId, options) {
        return this._client.get(`/zones/${zoneIdentifier}/waiting_rooms/${waitingRoomId}/rules`, options)._thenUnwrap((obj) => obj.result);
    }
    /**
     * Deletes a rule for a waiting room.
     */
    delete(zoneIdentifier, waitingRoomId, ruleId, options) {
        return this._client.delete(`/zones/${zoneIdentifier}/waiting_rooms/${waitingRoomId}/rules/${ruleId}`, options)._thenUnwrap((obj) => obj.result);
    }
    /**
     * Patches a rule for a waiting room.
     */
    edit(zoneIdentifier, waitingRoomId, ruleId, body, options) {
        return this._client.patch(`/zones/${zoneIdentifier}/waiting_rooms/${waitingRoomId}/rules/${ruleId}`, {
            body,
            ...options,
        })._thenUnwrap((obj) => obj.result);
    }
}
(function (Rules) {
})(Rules || (Rules = {}));
//# sourceMappingURL=rules.mjs.map