@@ -353,6 +353,48 @@ def list(
353353 model = ScenarioView ,
354354 )
355355
356+ def archive (
357+ self ,
358+ id : str ,
359+ * ,
360+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
361+ # The extra values given here take precedence over values defined on the client or passed to this method.
362+ extra_headers : Headers | None = None ,
363+ extra_query : Query | None = None ,
364+ extra_body : Body | None = None ,
365+ timeout : float | httpx .Timeout | None | NotGiven = not_given ,
366+ idempotency_key : str | None = None ,
367+ ) -> ScenarioView :
368+ """Archive a previously created Scenario.
369+
370+ The scenario will no longer appear in
371+ list endpoints but can still be retrieved by ID.
372+
373+ Args:
374+ extra_headers: Send extra headers
375+
376+ extra_query: Add additional query parameters to the request
377+
378+ extra_body: Add additional JSON properties to the request
379+
380+ timeout: Override the client-level default timeout for this request, in seconds
381+
382+ idempotency_key: Specify a custom idempotency key for this request
383+ """
384+ if not id :
385+ raise ValueError (f"Expected a non-empty value for `id` but received { id !r} " )
386+ return self ._post (
387+ f"/v1/scenarios/{ id } /archive" ,
388+ options = make_request_options (
389+ extra_headers = extra_headers ,
390+ extra_query = extra_query ,
391+ extra_body = extra_body ,
392+ timeout = timeout ,
393+ idempotency_key = idempotency_key ,
394+ ),
395+ cast_to = ScenarioView ,
396+ )
397+
356398 def list_public (
357399 self ,
358400 * ,
@@ -823,6 +865,48 @@ def list(
823865 model = ScenarioView ,
824866 )
825867
868+ async def archive (
869+ self ,
870+ id : str ,
871+ * ,
872+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
873+ # The extra values given here take precedence over values defined on the client or passed to this method.
874+ extra_headers : Headers | None = None ,
875+ extra_query : Query | None = None ,
876+ extra_body : Body | None = None ,
877+ timeout : float | httpx .Timeout | None | NotGiven = not_given ,
878+ idempotency_key : str | None = None ,
879+ ) -> ScenarioView :
880+ """Archive a previously created Scenario.
881+
882+ The scenario will no longer appear in
883+ list endpoints but can still be retrieved by ID.
884+
885+ Args:
886+ extra_headers: Send extra headers
887+
888+ extra_query: Add additional query parameters to the request
889+
890+ extra_body: Add additional JSON properties to the request
891+
892+ timeout: Override the client-level default timeout for this request, in seconds
893+
894+ idempotency_key: Specify a custom idempotency key for this request
895+ """
896+ if not id :
897+ raise ValueError (f"Expected a non-empty value for `id` but received { id !r} " )
898+ return await self ._post (
899+ f"/v1/scenarios/{ id } /archive" ,
900+ options = make_request_options (
901+ extra_headers = extra_headers ,
902+ extra_query = extra_query ,
903+ extra_body = extra_body ,
904+ timeout = timeout ,
905+ idempotency_key = idempotency_key ,
906+ ),
907+ cast_to = ScenarioView ,
908+ )
909+
826910 def list_public (
827911 self ,
828912 * ,
@@ -1005,6 +1089,9 @@ def __init__(self, scenarios: ScenariosResource) -> None:
10051089 self .list = to_raw_response_wrapper (
10061090 scenarios .list ,
10071091 )
1092+ self .archive = to_raw_response_wrapper (
1093+ scenarios .archive ,
1094+ )
10081095 self .list_public = to_raw_response_wrapper (
10091096 scenarios .list_public ,
10101097 )
@@ -1037,6 +1124,9 @@ def __init__(self, scenarios: AsyncScenariosResource) -> None:
10371124 self .list = async_to_raw_response_wrapper (
10381125 scenarios .list ,
10391126 )
1127+ self .archive = async_to_raw_response_wrapper (
1128+ scenarios .archive ,
1129+ )
10401130 self .list_public = async_to_raw_response_wrapper (
10411131 scenarios .list_public ,
10421132 )
@@ -1069,6 +1159,9 @@ def __init__(self, scenarios: ScenariosResource) -> None:
10691159 self .list = to_streamed_response_wrapper (
10701160 scenarios .list ,
10711161 )
1162+ self .archive = to_streamed_response_wrapper (
1163+ scenarios .archive ,
1164+ )
10721165 self .list_public = to_streamed_response_wrapper (
10731166 scenarios .list_public ,
10741167 )
@@ -1101,6 +1194,9 @@ def __init__(self, scenarios: AsyncScenariosResource) -> None:
11011194 self .list = async_to_streamed_response_wrapper (
11021195 scenarios .list ,
11031196 )
1197+ self .archive = async_to_streamed_response_wrapper (
1198+ scenarios .archive ,
1199+ )
11041200 self .list_public = async_to_streamed_response_wrapper (
11051201 scenarios .list_public ,
11061202 )
0 commit comments