// File generated from our OpenAPI spec by Stainless.
import { APIResource } from 'cloudflare/resource';
export class Monitors extends APIResource {
    /**
     * Create a configured monitor.
     */
    create(body, options) {
        return this._client.post('/user/load_balancers/monitors', { body, ...options })._thenUnwrap((obj) => obj.result);
    }
    /**
     * Modify a configured monitor.
     */
    update(monitorId, body, options) {
        return this._client.put(`/user/load_balancers/monitors/${monitorId}`, {
            body,
            ...options,
        })._thenUnwrap((obj) => obj.result);
    }
    /**
     * List configured monitors for a user.
     */
    list(options) {
        return this._client.get('/user/load_balancers/monitors', options)._thenUnwrap((obj) => obj.result);
    }
    /**
     * Delete a configured monitor.
     */
    delete(monitorId, options) {
        return this._client.delete(`/user/load_balancers/monitors/${monitorId}`, options)._thenUnwrap((obj) => obj.result);
    }
    /**
     * Apply changes to an existing monitor, overwriting the supplied properties.
     */
    edit(monitorId, body, options) {
        return this._client.patch(`/user/load_balancers/monitors/${monitorId}`, {
            body,
            ...options,
        })._thenUnwrap((obj) => obj.result);
    }
    /**
     * List a single configured monitor for a user.
     */
    get(monitorId, options) {
        return this._client.get(`/user/load_balancers/monitors/${monitorId}`, options)._thenUnwrap((obj) => obj.result);
    }
    /**
     * Preview pools using the specified monitor with provided monitor details. The
     * returned preview_id can be used in the preview endpoint to retrieve the results.
     */
    preview(monitorId, body, options) {
        return this._client.post(`/user/load_balancers/monitors/${monitorId}/preview`, {
            body,
            ...options,
        })._thenUnwrap((obj) => obj.result);
    }
    /**
     * Get the list of resources that reference the provided monitor.
     */
    references(monitorId, options) {
        return this._client.get(`/user/load_balancers/monitors/${monitorId}/references`, options)._thenUnwrap((obj) => obj.result);
    }
}
(function (Monitors) {
})(Monitors || (Monitors = {}));
//# sourceMappingURL=monitors.mjs.map