diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 57dc0c3da..e4e1c3ce9 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.33.0"
+ ".": "0.34.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index 637120fbb..ed111e8b5 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 79
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-589e342137de29187fec9e332ae5ca29de64e531f8b92b46b2469fdb3449a721.yml
-openapi_spec_hash: 5dbf4fe59153afb4d4c8642e05fcecdc
-config_hash: 7cef6c9fce4f9a345184516c6cde462f
+configured_endpoints: 81
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-88c3df1881ce3ca780736c14f781e2b1930abb2ceeadb5cdabeda4d67f877511.yml
+openapi_spec_hash: e47eece926740aba8272685c342a1d4b
+config_hash: e17450cd026f260f68713ad9f12bd999
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f4fb293ca..634572be1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
# Changelog
+## 0.34.0 (2025-05-27)
+
+Full Changelog: [v0.33.0...v0.34.0](https://github.com/runloopai/api-client-python/compare/v0.33.0...v0.34.0)
+
+### Features
+
+* **api:** api update ([997a8ff](https://github.com/runloopai/api-client-python/commit/997a8ffab12ffc3f3a305058456af2bebeae8482))
+
## 0.33.0 (2025-05-22)
Full Changelog: [v0.32.0...v0.33.0](https://github.com/runloopai/api-client-python/compare/v0.32.0...v0.33.0)
diff --git a/api.md b/api.md
index 8c1b856d0..3cfe5e3b4 100644
--- a/api.md
+++ b/api.md
@@ -100,6 +100,7 @@ Methods:
- client.devboxes.resume(id) -> DevboxView
- client.devboxes.shutdown(id) -> DevboxView
- client.devboxes.snapshot_disk(id, \*\*params) -> DevboxSnapshotView
+- client.devboxes.snapshot_disk_async(id, \*\*params) -> DevboxSnapshotView
- client.devboxes.suspend(id) -> DevboxView
- client.devboxes.upload_file(id, \*\*params) -> object
- client.devboxes.write_file_contents(id, \*\*params) -> DevboxExecutionDetailView
@@ -109,7 +110,10 @@ Methods:
Types:
```python
-from runloop_api_client.types.devboxes import DiskSnapshotDeleteResponse
+from runloop_api_client.types.devboxes import (
+ DevboxSnapshotAsyncStatusView,
+ DiskSnapshotDeleteResponse,
+)
```
Methods:
@@ -117,6 +121,7 @@ Methods:
- client.devboxes.disk_snapshots.update(id, \*\*params) -> DevboxSnapshotView
- client.devboxes.disk_snapshots.list(\*\*params) -> SyncDiskSnapshotsCursorIDPage[DevboxSnapshotView]
- client.devboxes.disk_snapshots.delete(id) -> object
+- client.devboxes.disk_snapshots.query_status(id) -> DevboxSnapshotAsyncStatusView
## Browsers
diff --git a/pyproject.toml b/pyproject.toml
index 7b17becbb..b101d7b20 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "runloop_api_client"
-version = "0.33.0"
+version = "0.34.0"
description = "The official Python library for the runloop API"
dynamic = ["readme"]
license = "MIT"
diff --git a/src/runloop_api_client/_version.py b/src/runloop_api_client/_version.py
index fc69d63b8..a584e44ab 100644
--- a/src/runloop_api_client/_version.py
+++ b/src/runloop_api_client/_version.py
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
__title__ = "runloop_api_client"
-__version__ = "0.33.0" # x-release-please-version
+__version__ = "0.34.0" # x-release-please-version
diff --git a/src/runloop_api_client/resources/devboxes/devboxes.py b/src/runloop_api_client/resources/devboxes/devboxes.py
index c854f7a64..79e125b10 100644
--- a/src/runloop_api_client/resources/devboxes/devboxes.py
+++ b/src/runloop_api_client/resources/devboxes/devboxes.py
@@ -36,6 +36,7 @@
devbox_snapshot_disk_params,
devbox_read_file_contents_params,
devbox_list_disk_snapshots_params,
+ devbox_snapshot_disk_async_params,
devbox_write_file_contents_params,
)
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes
@@ -1152,6 +1153,61 @@ def snapshot_disk(
cast_to=DevboxSnapshotView,
)
+ def snapshot_disk_async(
+ self,
+ id: str,
+ *,
+ metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
+ name: Optional[str] | NotGiven = NOT_GIVEN,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ idempotency_key: str | None = None,
+ ) -> DevboxSnapshotView:
+ """
+ Start an asynchronous disk snapshot of a devbox with the specified name and
+ metadata. The snapshot operation will continue in the background and can be
+ monitored using the query endpoint.
+
+ Args:
+ metadata: (Optional) Metadata used to describe the snapshot
+
+ name: (Optional) A user specified name to give the snapshot
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+
+ idempotency_key: Specify a custom idempotency key for this request
+ """
+ if not id:
+ raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
+ return self._post(
+ f"/v1/devboxes/{id}/snapshot_disk_async",
+ body=maybe_transform(
+ {
+ "metadata": metadata,
+ "name": name,
+ },
+ devbox_snapshot_disk_async_params.DevboxSnapshotDiskAsyncParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ idempotency_key=idempotency_key,
+ ),
+ cast_to=DevboxSnapshotView,
+ )
+
def suspend(
self,
id: str,
@@ -2349,6 +2405,61 @@ async def snapshot_disk(
cast_to=DevboxSnapshotView,
)
+ async def snapshot_disk_async(
+ self,
+ id: str,
+ *,
+ metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
+ name: Optional[str] | NotGiven = NOT_GIVEN,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ idempotency_key: str | None = None,
+ ) -> DevboxSnapshotView:
+ """
+ Start an asynchronous disk snapshot of a devbox with the specified name and
+ metadata. The snapshot operation will continue in the background and can be
+ monitored using the query endpoint.
+
+ Args:
+ metadata: (Optional) Metadata used to describe the snapshot
+
+ name: (Optional) A user specified name to give the snapshot
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+
+ idempotency_key: Specify a custom idempotency key for this request
+ """
+ if not id:
+ raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
+ return await self._post(
+ f"/v1/devboxes/{id}/snapshot_disk_async",
+ body=await async_maybe_transform(
+ {
+ "metadata": metadata,
+ "name": name,
+ },
+ devbox_snapshot_disk_async_params.DevboxSnapshotDiskAsyncParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ idempotency_key=idempotency_key,
+ ),
+ cast_to=DevboxSnapshotView,
+ )
+
async def suspend(
self,
id: str,
@@ -2565,6 +2676,9 @@ def __init__(self, devboxes: DevboxesResource) -> None:
self.snapshot_disk = to_raw_response_wrapper(
devboxes.snapshot_disk,
)
+ self.snapshot_disk_async = to_raw_response_wrapper(
+ devboxes.snapshot_disk_async,
+ )
self.suspend = to_raw_response_wrapper(
devboxes.suspend,
)
@@ -2656,6 +2770,9 @@ def __init__(self, devboxes: AsyncDevboxesResource) -> None:
self.snapshot_disk = async_to_raw_response_wrapper(
devboxes.snapshot_disk,
)
+ self.snapshot_disk_async = async_to_raw_response_wrapper(
+ devboxes.snapshot_disk_async,
+ )
self.suspend = async_to_raw_response_wrapper(
devboxes.suspend,
)
@@ -2747,6 +2864,9 @@ def __init__(self, devboxes: DevboxesResource) -> None:
self.snapshot_disk = to_streamed_response_wrapper(
devboxes.snapshot_disk,
)
+ self.snapshot_disk_async = to_streamed_response_wrapper(
+ devboxes.snapshot_disk_async,
+ )
self.suspend = to_streamed_response_wrapper(
devboxes.suspend,
)
@@ -2838,6 +2958,9 @@ def __init__(self, devboxes: AsyncDevboxesResource) -> None:
self.snapshot_disk = async_to_streamed_response_wrapper(
devboxes.snapshot_disk,
)
+ self.snapshot_disk_async = async_to_streamed_response_wrapper(
+ devboxes.snapshot_disk_async,
+ )
self.suspend = async_to_streamed_response_wrapper(
devboxes.suspend,
)
diff --git a/src/runloop_api_client/resources/devboxes/disk_snapshots.py b/src/runloop_api_client/resources/devboxes/disk_snapshots.py
index 7b99974e9..3b8b2313e 100644
--- a/src/runloop_api_client/resources/devboxes/disk_snapshots.py
+++ b/src/runloop_api_client/resources/devboxes/disk_snapshots.py
@@ -20,6 +20,7 @@
from ..._base_client import AsyncPaginator, make_request_options
from ...types.devboxes import disk_snapshot_list_params, disk_snapshot_update_params
from ...types.devbox_snapshot_view import DevboxSnapshotView
+from ...types.devboxes.devbox_snapshot_async_status_view import DevboxSnapshotAsyncStatusView
__all__ = ["DiskSnapshotsResource", "AsyncDiskSnapshotsResource"]
@@ -200,6 +201,40 @@ def delete(
cast_to=object,
)
+ def query_status(
+ self,
+ id: str,
+ *,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> DevboxSnapshotAsyncStatusView:
+ """
+ Get the current status of an asynchronous disk snapshot operation, including
+ whether it is still in progress and any error messages if it failed.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ if not id:
+ raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
+ return self._get(
+ f"/v1/devboxes/disk_snapshots/{id}/status",
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=DevboxSnapshotAsyncStatusView,
+ )
+
class AsyncDiskSnapshotsResource(AsyncAPIResource):
@cached_property
@@ -377,6 +412,40 @@ async def delete(
cast_to=object,
)
+ async def query_status(
+ self,
+ id: str,
+ *,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> DevboxSnapshotAsyncStatusView:
+ """
+ Get the current status of an asynchronous disk snapshot operation, including
+ whether it is still in progress and any error messages if it failed.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ if not id:
+ raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
+ return await self._get(
+ f"/v1/devboxes/disk_snapshots/{id}/status",
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=DevboxSnapshotAsyncStatusView,
+ )
+
class DiskSnapshotsResourceWithRawResponse:
def __init__(self, disk_snapshots: DiskSnapshotsResource) -> None:
@@ -391,6 +460,9 @@ def __init__(self, disk_snapshots: DiskSnapshotsResource) -> None:
self.delete = to_raw_response_wrapper(
disk_snapshots.delete,
)
+ self.query_status = to_raw_response_wrapper(
+ disk_snapshots.query_status,
+ )
class AsyncDiskSnapshotsResourceWithRawResponse:
@@ -406,6 +478,9 @@ def __init__(self, disk_snapshots: AsyncDiskSnapshotsResource) -> None:
self.delete = async_to_raw_response_wrapper(
disk_snapshots.delete,
)
+ self.query_status = async_to_raw_response_wrapper(
+ disk_snapshots.query_status,
+ )
class DiskSnapshotsResourceWithStreamingResponse:
@@ -421,6 +496,9 @@ def __init__(self, disk_snapshots: DiskSnapshotsResource) -> None:
self.delete = to_streamed_response_wrapper(
disk_snapshots.delete,
)
+ self.query_status = to_streamed_response_wrapper(
+ disk_snapshots.query_status,
+ )
class AsyncDiskSnapshotsResourceWithStreamingResponse:
@@ -436,3 +514,6 @@ def __init__(self, disk_snapshots: AsyncDiskSnapshotsResource) -> None:
self.delete = async_to_streamed_response_wrapper(
disk_snapshots.delete,
)
+ self.query_status = async_to_streamed_response_wrapper(
+ disk_snapshots.query_status,
+ )
diff --git a/src/runloop_api_client/types/__init__.py b/src/runloop_api_client/types/__init__.py
index f3dbc61d9..a0205effb 100644
--- a/src/runloop_api_client/types/__init__.py
+++ b/src/runloop_api_client/types/__init__.py
@@ -66,6 +66,7 @@
from .repository_connection_list_view import RepositoryConnectionListView as RepositoryConnectionListView
from .devbox_read_file_contents_params import DevboxReadFileContentsParams as DevboxReadFileContentsParams
from .devbox_list_disk_snapshots_params import DevboxListDiskSnapshotsParams as DevboxListDiskSnapshotsParams
+from .devbox_snapshot_disk_async_params import DevboxSnapshotDiskAsyncParams as DevboxSnapshotDiskAsyncParams
from .devbox_write_file_contents_params import DevboxWriteFileContentsParams as DevboxWriteFileContentsParams
from .devbox_async_execution_detail_view import DevboxAsyncExecutionDetailView as DevboxAsyncExecutionDetailView
from .devbox_read_file_contents_response import DevboxReadFileContentsResponse as DevboxReadFileContentsResponse
diff --git a/src/runloop_api_client/types/devbox_snapshot_disk_async_params.py b/src/runloop_api_client/types/devbox_snapshot_disk_async_params.py
new file mode 100644
index 000000000..eda38c53b
--- /dev/null
+++ b/src/runloop_api_client/types/devbox_snapshot_disk_async_params.py
@@ -0,0 +1,16 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Optional
+from typing_extensions import TypedDict
+
+__all__ = ["DevboxSnapshotDiskAsyncParams"]
+
+
+class DevboxSnapshotDiskAsyncParams(TypedDict, total=False):
+ metadata: Optional[Dict[str, str]]
+ """(Optional) Metadata used to describe the snapshot"""
+
+ name: Optional[str]
+ """(Optional) A user specified name to give the snapshot"""
diff --git a/src/runloop_api_client/types/devboxes/__init__.py b/src/runloop_api_client/types/devboxes/__init__.py
index ebfdc7800..2d5c61a93 100644
--- a/src/runloop_api_client/types/devboxes/__init__.py
+++ b/src/runloop_api_client/types/devboxes/__init__.py
@@ -78,6 +78,7 @@
from .lsp_get_code_segment_info_params import LspGetCodeSegmentInfoParams as LspGetCodeSegmentInfoParams
from .lsp_set_watch_directory_response import LspSetWatchDirectoryResponse as LspSetWatchDirectoryResponse
from .computer_mouse_interaction_params import ComputerMouseInteractionParams as ComputerMouseInteractionParams
+from .devbox_snapshot_async_status_view import DevboxSnapshotAsyncStatusView as DevboxSnapshotAsyncStatusView
from .computer_screen_interaction_params import ComputerScreenInteractionParams as ComputerScreenInteractionParams
from .computer_mouse_interaction_response import ComputerMouseInteractionResponse as ComputerMouseInteractionResponse
from .record_string_text_edit_array_param import RecordStringTextEditArrayParam as RecordStringTextEditArrayParam
diff --git a/src/runloop_api_client/types/devboxes/devbox_snapshot_async_status_view.py b/src/runloop_api_client/types/devboxes/devbox_snapshot_async_status_view.py
new file mode 100644
index 000000000..2c7ea8eee
--- /dev/null
+++ b/src/runloop_api_client/types/devboxes/devbox_snapshot_async_status_view.py
@@ -0,0 +1,20 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+from typing_extensions import Literal
+
+from ..._models import BaseModel
+from ..devbox_snapshot_view import DevboxSnapshotView
+
+__all__ = ["DevboxSnapshotAsyncStatusView"]
+
+
+class DevboxSnapshotAsyncStatusView(BaseModel):
+ status: Literal["in_progress", "error", "complete"]
+ """The current status of the snapshot operation."""
+
+ error_message: Optional[str] = None
+ """Error message if the operation failed."""
+
+ snapshot: Optional[DevboxSnapshotView] = None
+ """The snapshot details if the operation completed successfully."""
diff --git a/tests/api_resources/devboxes/test_disk_snapshots.py b/tests/api_resources/devboxes/test_disk_snapshots.py
index c7708f348..aff385ef0 100644
--- a/tests/api_resources/devboxes/test_disk_snapshots.py
+++ b/tests/api_resources/devboxes/test_disk_snapshots.py
@@ -11,6 +11,9 @@
from runloop_api_client import Runloop, AsyncRunloop
from runloop_api_client.types import DevboxSnapshotView
from runloop_api_client.pagination import SyncDiskSnapshotsCursorIDPage, AsyncDiskSnapshotsCursorIDPage
+from runloop_api_client.types.devboxes import (
+ DevboxSnapshotAsyncStatusView,
+)
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -139,6 +142,44 @@ def test_path_params_delete(self, client: Runloop) -> None:
"",
)
+ @parametrize
+ def test_method_query_status(self, client: Runloop) -> None:
+ disk_snapshot = client.devboxes.disk_snapshots.query_status(
+ "id",
+ )
+ assert_matches_type(DevboxSnapshotAsyncStatusView, disk_snapshot, path=["response"])
+
+ @parametrize
+ def test_raw_response_query_status(self, client: Runloop) -> None:
+ response = client.devboxes.disk_snapshots.with_raw_response.query_status(
+ "id",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ disk_snapshot = response.parse()
+ assert_matches_type(DevboxSnapshotAsyncStatusView, disk_snapshot, path=["response"])
+
+ @parametrize
+ def test_streaming_response_query_status(self, client: Runloop) -> None:
+ with client.devboxes.disk_snapshots.with_streaming_response.query_status(
+ "id",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ disk_snapshot = response.parse()
+ assert_matches_type(DevboxSnapshotAsyncStatusView, disk_snapshot, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_query_status(self, client: Runloop) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
+ client.devboxes.disk_snapshots.with_raw_response.query_status(
+ "",
+ )
+
class TestAsyncDiskSnapshots:
parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
@@ -263,3 +304,41 @@ async def test_path_params_delete(self, async_client: AsyncRunloop) -> None:
await async_client.devboxes.disk_snapshots.with_raw_response.delete(
"",
)
+
+ @parametrize
+ async def test_method_query_status(self, async_client: AsyncRunloop) -> None:
+ disk_snapshot = await async_client.devboxes.disk_snapshots.query_status(
+ "id",
+ )
+ assert_matches_type(DevboxSnapshotAsyncStatusView, disk_snapshot, path=["response"])
+
+ @parametrize
+ async def test_raw_response_query_status(self, async_client: AsyncRunloop) -> None:
+ response = await async_client.devboxes.disk_snapshots.with_raw_response.query_status(
+ "id",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ disk_snapshot = await response.parse()
+ assert_matches_type(DevboxSnapshotAsyncStatusView, disk_snapshot, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_query_status(self, async_client: AsyncRunloop) -> None:
+ async with async_client.devboxes.disk_snapshots.with_streaming_response.query_status(
+ "id",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ disk_snapshot = await response.parse()
+ assert_matches_type(DevboxSnapshotAsyncStatusView, disk_snapshot, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_query_status(self, async_client: AsyncRunloop) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
+ await async_client.devboxes.disk_snapshots.with_raw_response.query_status(
+ "",
+ )
diff --git a/tests/api_resources/test_devboxes.py b/tests/api_resources/test_devboxes.py
index d27e04f01..3d4983fc0 100644
--- a/tests/api_resources/test_devboxes.py
+++ b/tests/api_resources/test_devboxes.py
@@ -781,6 +781,53 @@ def test_path_params_snapshot_disk(self, client: Runloop) -> None:
id="",
)
+ @parametrize
+ def test_method_snapshot_disk_async(self, client: Runloop) -> None:
+ devbox = client.devboxes.snapshot_disk_async(
+ id="id",
+ )
+ assert_matches_type(DevboxSnapshotView, devbox, path=["response"])
+
+ @parametrize
+ def test_method_snapshot_disk_async_with_all_params(self, client: Runloop) -> None:
+ devbox = client.devboxes.snapshot_disk_async(
+ id="id",
+ metadata={"foo": "string"},
+ name="name",
+ )
+ assert_matches_type(DevboxSnapshotView, devbox, path=["response"])
+
+ @parametrize
+ def test_raw_response_snapshot_disk_async(self, client: Runloop) -> None:
+ response = client.devboxes.with_raw_response.snapshot_disk_async(
+ id="id",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ devbox = response.parse()
+ assert_matches_type(DevboxSnapshotView, devbox, path=["response"])
+
+ @parametrize
+ def test_streaming_response_snapshot_disk_async(self, client: Runloop) -> None:
+ with client.devboxes.with_streaming_response.snapshot_disk_async(
+ id="id",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ devbox = response.parse()
+ assert_matches_type(DevboxSnapshotView, devbox, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_snapshot_disk_async(self, client: Runloop) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
+ client.devboxes.with_raw_response.snapshot_disk_async(
+ id="",
+ )
+
@parametrize
def test_method_suspend(self, client: Runloop) -> None:
devbox = client.devboxes.suspend(
@@ -1663,6 +1710,53 @@ async def test_path_params_snapshot_disk(self, async_client: AsyncRunloop) -> No
id="",
)
+ @parametrize
+ async def test_method_snapshot_disk_async(self, async_client: AsyncRunloop) -> None:
+ devbox = await async_client.devboxes.snapshot_disk_async(
+ id="id",
+ )
+ assert_matches_type(DevboxSnapshotView, devbox, path=["response"])
+
+ @parametrize
+ async def test_method_snapshot_disk_async_with_all_params(self, async_client: AsyncRunloop) -> None:
+ devbox = await async_client.devboxes.snapshot_disk_async(
+ id="id",
+ metadata={"foo": "string"},
+ name="name",
+ )
+ assert_matches_type(DevboxSnapshotView, devbox, path=["response"])
+
+ @parametrize
+ async def test_raw_response_snapshot_disk_async(self, async_client: AsyncRunloop) -> None:
+ response = await async_client.devboxes.with_raw_response.snapshot_disk_async(
+ id="id",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ devbox = await response.parse()
+ assert_matches_type(DevboxSnapshotView, devbox, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_snapshot_disk_async(self, async_client: AsyncRunloop) -> None:
+ async with async_client.devboxes.with_streaming_response.snapshot_disk_async(
+ id="id",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ devbox = await response.parse()
+ assert_matches_type(DevboxSnapshotView, devbox, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_snapshot_disk_async(self, async_client: AsyncRunloop) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
+ await async_client.devboxes.with_raw_response.snapshot_disk_async(
+ id="",
+ )
+
@parametrize
async def test_method_suspend(self, async_client: AsyncRunloop) -> None:
devbox = await async_client.devboxes.suspend(