// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from 'cloudflaredev/resource';
import { isRequestOptions } from 'cloudflaredev/core';
import * as RoutesAPI from 'cloudflaredev/resources/radar/bgp/routes';
import * as HijacksAPI from 'cloudflaredev/resources/radar/bgp/hijacks/hijacks';
import * as LeaksAPI from 'cloudflaredev/resources/radar/bgp/leaks/leaks';
import * as TopAPI from 'cloudflaredev/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