// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from 'cloudflaredev/resource';
import * as LogsAPI from 'cloudflaredev/resources/ai-gateway/logs';
import { V4PagePaginationArray } from 'cloudflaredev/pagination';
export class AIGateway extends APIResource {
    constructor() {
        super(...arguments);
        this.logs = new LogsAPI.Logs(this._client);
    }
    /**
     * Create a new Gateway
     */
    create(params, options) {
        const { account_id, ...body } = params;
        return this._client.post(`/accounts/${account_id}/ai-gateway/gateways`, {
            body,
            ...options,
        })._thenUnwrap((obj) => obj.result);
    }
    /**
     * Update a Gateway
     */
    update(id, params, options) {
        const { account_id, ...body } = params;
        return this._client.put(`/accounts/${account_id}/ai-gateway/gateways/${id}`, {
            body,
            ...options,
        })._thenUnwrap((obj) => obj.result);
    }
    /**
     * List Gateway's
     */
    list(params, options) {
        const { account_id, ...query } = params;
        return this._client.getAPIList(`/accounts/${account_id}/ai-gateway/gateways`, AIGatewayListResponsesV4PagePaginationArray, { query, ...options });
    }
    /**
     * Delete a Gateway
     */
    delete(id, params, options) {
        const { account_id } = params;
        return this._client.delete(`/accounts/${account_id}/ai-gateway/gateways/${id}`, options)._thenUnwrap((obj) => obj.result);
    }
    /**
     * Fetch a Gateway
     */
    get(id, params, options) {
        const { account_id } = params;
        return this._client.get(`/accounts/${account_id}/ai-gateway/gateways/${id}`, options)._thenUnwrap((obj) => obj.result);
    }
}
export class AIGatewayListResponsesV4PagePaginationArray extends V4PagePaginationArray {
}
(function (AIGateway) {
    AIGateway.Logs = LogsAPI.Logs;
})(AIGateway || (AIGateway = {}));
//# sourceMappingURL=ai-gateway.mjs.map