"use strict";
// File generated from our OpenAPI spec by Stainless.
Object.defineProperty(exports, "__esModule", { value: true });
exports.VirtualNetworks = void 0;
const resource_1 = require("cloudflare/resource");
class VirtualNetworks extends resource_1.APIResource {
    /**
     * Adds a new virtual network to an account.
     */
    create(params, options) {
        const { account_id, ...body } = params;
        return this._client.post(`/accounts/${account_id}/teamnet/virtual_networks`, {
            body,
            ...options,
        })._thenUnwrap((obj) => obj.result);
    }
    /**
     * Lists and filters virtual networks in an account.
     */
    list(params, options) {
        const { account_id, ...query } = params;
        return this._client.get(`/accounts/${account_id}/teamnet/virtual_networks`, {
            query,
            ...options,
        })._thenUnwrap((obj) => obj.result);
    }
    /**
     * Deletes an existing virtual network.
     */
    delete(virtualNetworkId, params, options) {
        const { account_id } = params;
        return this._client.delete(`/accounts/${account_id}/teamnet/virtual_networks/${virtualNetworkId}`, options)._thenUnwrap((obj) => obj.result);
    }
    /**
     * Updates an existing virtual network.
     */
    edit(virtualNetworkId, params, options) {
        const { account_id, ...body } = params;
        return this._client.patch(`/accounts/${account_id}/teamnet/virtual_networks/${virtualNetworkId}`, {
            body,
            ...options,
        })._thenUnwrap((obj) => obj.result);
    }
}
exports.VirtualNetworks = VirtualNetworks;
(function (VirtualNetworks) {
})(VirtualNetworks = exports.VirtualNetworks || (exports.VirtualNetworks = {}));
//# sourceMappingURL=virtual-networks.js.map