// File generated from our OpenAPI spec by Stainless.
import { APIResource } from 'cloudflare/resource';
import { isRequestOptions } from 'cloudflare/core';
import * as HijacksAPI from 'cloudflare/resources/radar/bgp/hijacks';
import * as LeaksAPI from 'cloudflare/resources/radar/bgp/leaks';
import * as RoutesAPI from 'cloudflare/resources/radar/bgp/routes';
import * as TopAPI from 'cloudflare/resources/radar/bgp/top/top';
export class BGP extends APIResource {
    constructor() {
        super(...arguments);
        this.leaks = new LeaksAPI.Leaks(this._client);
        this.top = new TopAPI.Top(this._client);
        this.hijacks = new HijacksAPI.Hijacks(this._client);
        this.routes = new RoutesAPI.Routes(this._client);
    }
    timeseries(query = {}, options) {
        if (isRequestOptions(query)) {
            return this.timeseries({}, query);
        }
        return this._client.get('/radar/bgp/timeseries', { query, ...options })._thenUnwrap((obj) => obj.result);
    }
}
(function (BGP) {
    BGP.Leaks = LeaksAPI.Leaks;
    BGP.Top = TopAPI.Top;
    BGP.Hijacks = HijacksAPI.Hijacks;
    BGP.Routes = RoutesAPI.Routes;
})(BGP || (BGP = {}));
//# sourceMappingURL=bgp.mjs.map