"use strict";
// File generated from our OpenAPI spec by Stainless.
Object.defineProperty(exports, "__esModule", { value: true });
exports.Networks = void 0;
const resource_1 = require("cloudflare/resource");
class Networks extends resource_1.APIResource {
    /**
     * Creates a new device managed network.
     */
    create(params, options) {
        const { account_id, ...body } = params;
        return this._client.post(`/accounts/${account_id}/devices/networks`, { body, ...options })._thenUnwrap((obj) => obj.result);
    }
    /**
     * Updates a configured device managed network.
     */
    update(networkId, params, options) {
        const { account_id, ...body } = params;
        return this._client.put(`/accounts/${account_id}/devices/networks/${networkId}`, {
            body,
            ...options,
        })._thenUnwrap((obj) => obj.result);
    }
    /**
     * Fetches a list of managed networks for an account.
     */
    list(params, options) {
        const { account_id } = params;
        return this._client.get(`/accounts/${account_id}/devices/networks`, options)._thenUnwrap((obj) => obj.result);
    }
    /**
     * Deletes a device managed network and fetches a list of the remaining device
     * managed networks for an account.
     */
    delete(networkId, params, options) {
        const { account_id } = params;
        return this._client.delete(`/accounts/${account_id}/devices/networks/${networkId}`, options)._thenUnwrap((obj) => obj.result);
    }
    /**
     * Fetches details for a single managed network.
     */
    get(networkId, params, options) {
        const { account_id } = params;
        return this._client.get(`/accounts/${account_id}/devices/networks/${networkId}`, options)._thenUnwrap((obj) => obj.result);
    }
}
exports.Networks = Networks;
(function (Networks) {
})(Networks = exports.Networks || (exports.Networks = {}));
//# sourceMappingURL=networks.js.map