// @ts-nocheck
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../../core/resource.js';
import { buildHeaders } from '../../internal/headers.js';
import { path } from '../../internal/utils/path.js';
export class Snapshots extends APIResource {
    /**
     * Create a snapshot from a Docker image (async build).
     */
    create(body, options) {
        return this._client.post('/v2/sandboxes/snapshots', { body, ...options });
    }
    /**
     * Get a sandbox snapshot by ID.
     */
    retrieve(snapshotID, options) {
        return this._client.get(path `/v2/sandboxes/snapshots/${snapshotID}`, options);
    }
    /**
     * List sandbox snapshots for the authenticated tenant, with optional filtering,
     * sorting, and pagination.
     */
    list(query = {}, options) {
        return this._client.get('/v2/sandboxes/snapshots', { query, ...options });
    }
    /**
     * Delete a snapshot by ID. The underlying storage is reclaimed asynchronously.
     */
    delete(snapshotID, options) {
        return this._client.delete(path `/v2/sandboxes/snapshots/${snapshotID}`, {
            ...options,
            headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
        });
    }
}
