// File generated from our OpenAPI spec by Stainless.
import { APIResource } from 'cloudflare/resource';
import * as AdvertisementsAPI from 'cloudflare/resources/magic-network-monitoring/rules/advertisements';
export class Rules extends APIResource {
    constructor() {
        super(...arguments);
        this.advertisements = new AdvertisementsAPI.Advertisements(this._client);
    }
    /**
     * Create network monitoring rules for account. Currently only supports creating a
     * single rule per API request.
     */
    create(accountIdentifier, options) {
        return this._client.post(`/accounts/${accountIdentifier}/mnm/rules`, options)._thenUnwrap((obj) => obj.result);
    }
    /**
     * Update network monitoring rules for account.
     */
    update(accountIdentifier, options) {
        return this._client.put(`/accounts/${accountIdentifier}/mnm/rules`, options)._thenUnwrap((obj) => obj.result);
    }
    /**
     * Lists network monitoring rules for account.
     */
    list(accountIdentifier, options) {
        return this._client.get(`/accounts/${accountIdentifier}/mnm/rules`, options)._thenUnwrap((obj) => obj.result);
    }
    /**
     * Delete a network monitoring rule for account.
     */
    delete(accountIdentifier, ruleIdentifier, options) {
        return this._client.delete(`/accounts/${accountIdentifier}/mnm/rules/${ruleIdentifier}`, options)._thenUnwrap((obj) => obj.result);
    }
    /**
     * Update a network monitoring rule for account.
     */
    edit(accountIdentifier, ruleIdentifier, options) {
        return this._client.patch(`/accounts/${accountIdentifier}/mnm/rules/${ruleIdentifier}`, options)._thenUnwrap((obj) => obj.result);
    }
    /**
     * List a single network monitoring rule for account.
     */
    get(accountIdentifier, ruleIdentifier, options) {
        return this._client.get(`/accounts/${accountIdentifier}/mnm/rules/${ruleIdentifier}`, options)._thenUnwrap((obj) => obj.result);
    }
}
(function (Rules) {
    Rules.Advertisements = AdvertisementsAPI.Advertisements;
})(Rules || (Rules = {}));
//# sourceMappingURL=rules.mjs.map