"use strict";
// File generated from our OpenAPI spec by Stainless.
Object.defineProperty(exports, "__esModule", { value: true });
exports.Ownerships = void 0;
const resource_1 = require("cloudflare/resource");
class Ownerships extends resource_1.APIResource {
    /**
     * Adds an AWS or GCP bucket to use with full packet captures.
     */
    create(params, options) {
        const { account_id, ...body } = params;
        return this._client.post(`/accounts/${account_id}/pcaps/ownership`, { body, ...options })._thenUnwrap((obj) => obj.result);
    }
    /**
     * Deletes buckets added to the packet captures API.
     */
    delete(ownershipId, params, options) {
        const { account_id } = params;
        return this._client.delete(`/accounts/${account_id}/pcaps/ownership/${ownershipId}`, {
            ...options,
            headers: { Accept: '*/*', ...options?.headers },
        });
    }
    /**
     * List all buckets configured for use with PCAPs API.
     */
    get(params, options) {
        const { account_id } = params;
        return this._client.get(`/accounts/${account_id}/pcaps/ownership`, options)._thenUnwrap((obj) => obj.result);
    }
    /**
     * Validates buckets added to the packet captures API.
     */
    validate(params, options) {
        const { account_id, ...body } = params;
        return this._client.post(`/accounts/${account_id}/pcaps/ownership/validate`, {
            body,
            ...options,
        })._thenUnwrap((obj) => obj.result);
    }
}
exports.Ownerships = Ownerships;
(function (Ownerships) {
})(Ownerships = exports.Ownerships || (exports.Ownerships = {}));
//# sourceMappingURL=ownerships.js.map