// 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 BotClassAPI from 'cloudflaredev/resources/radar/http/locations/bot-class';
import * as DeviceTypeAPI from 'cloudflaredev/resources/radar/http/locations/device-type';
import * as HTTPMethodAPI from 'cloudflaredev/resources/radar/http/locations/http-method';
import * as HTTPProtocolAPI from 'cloudflaredev/resources/radar/http/locations/http-protocol';
import * as IPVersionAPI from 'cloudflaredev/resources/radar/http/locations/ip-version';
import * as OSAPI from 'cloudflaredev/resources/radar/http/locations/os';
import * as TLSVersionAPI from 'cloudflaredev/resources/radar/http/locations/tls-version';
export class Locations extends APIResource {
    constructor() {
        super(...arguments);
        this.botClass = new BotClassAPI.BotClass(this._client);
        this.deviceType = new DeviceTypeAPI.DeviceType(this._client);
        this.httpProtocol = new HTTPProtocolAPI.HTTPProtocol(this._client);
        this.httpMethod = new HTTPMethodAPI.HTTPMethod(this._client);
        this.ipVersion = new IPVersionAPI.IPVersion(this._client);
        this.os = new OSAPI.OS(this._client);
        this.tlsVersion = new TLSVersionAPI.TLSVersion(this._client);
    }
    get(query = {}, options) {
        if (isRequestOptions(query)) {
            return this.get({}, query);
        }
        return this._client.get('/radar/http/top/locations', { query, ...options })._thenUnwrap((obj) => obj.result);
    }
}
(function (Locations) {
    Locations.BotClass = BotClassAPI.BotClass;
    Locations.DeviceType = DeviceTypeAPI.DeviceType;
    Locations.HTTPProtocol = HTTPProtocolAPI.HTTPProtocol;
    Locations.HTTPMethod = HTTPMethodAPI.HTTPMethod;
    Locations.IPVersion = IPVersionAPI.IPVersion;
    Locations.OS = OSAPI.OS;
    Locations.TLSVersion = TLSVersionAPI.TLSVersion;
})(Locations || (Locations = {}));
//# sourceMappingURL=locations.mjs.map