// File generated from our OpenAPI spec by Stainless.
import { APIResource } from 'cloudflare/resource';
import * as DownloadsAPI from 'cloudflare/resources/pcaps/downloads';
import * as OwnershipsAPI from 'cloudflare/resources/pcaps/ownerships';
export class PCAPs extends APIResource {
    constructor() {
        super(...arguments);
        this.ownerships = new OwnershipsAPI.Ownerships(this._client);
        this.downloads = new DownloadsAPI.Downloads(this._client);
    }
    /**
     * Create new PCAP request for account.
     */
    create(params, options) {
        const { account_id, ...body } = params;
        return this._client.post(`/accounts/${account_id}/pcaps`, { body, ...options })._thenUnwrap((obj) => obj.result);
    }
    /**
     * Lists all packet capture requests for an account.
     */
    list(params, options) {
        const { account_id } = params;
        return this._client.get(`/accounts/${account_id}/pcaps`, options)._thenUnwrap((obj) => obj.result);
    }
    /**
     * Get information for a PCAP request by id.
     */
    get(pcapId, params, options) {
        const { account_id } = params;
        return this._client.get(`/accounts/${account_id}/pcaps/${pcapId}`, options)._thenUnwrap((obj) => obj.result);
    }
}
(function (PCAPs) {
    PCAPs.Ownerships = OwnershipsAPI.Ownerships;
    PCAPs.Downloads = DownloadsAPI.Downloads;
})(PCAPs || (PCAPs = {}));
//# sourceMappingURL=pcaps.mjs.map