// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from 'cloudflaredev/resource';
export class CfInterconnects extends APIResource {
    /**
     * Updates a specific interconnect associated with an account. Use
     * `?validate_only=true` as an optional query parameter to only run validation
     * without persisting changes.
     */
    update(tunnelIdentifier, params, options) {
        const { account_id, ...body } = params;
        return this._client.put(`/accounts/${account_id}/magic/cf_interconnects/${tunnelIdentifier}`, {
            body,
            ...options,
        })._thenUnwrap((obj) => obj.result);
    }
    /**
     * Lists interconnects associated with an account.
     */
    list(params, options) {
        const { account_id } = params;
        return this._client.get(`/accounts/${account_id}/magic/cf_interconnects`, options)._thenUnwrap((obj) => obj.result);
    }
    /**
     * Lists details for a specific interconnect.
     */
    get(tunnelIdentifier, params, options) {
        const { account_id } = params;
        return this._client.get(`/accounts/${account_id}/magic/cf_interconnects/${tunnelIdentifier}`, options)._thenUnwrap((obj) => obj.result);
    }
}
(function (CfInterconnects) {
})(CfInterconnects || (CfInterconnects = {}));
//# sourceMappingURL=cf-interconnects.mjs.map