|
2 | 2 |
|
3 | 3 | from __future__ import annotations |
4 | 4 |
|
5 | | -from typing import Dict, Optional |
6 | 5 | from typing_extensions import Unpack, override |
7 | 6 |
|
8 | 7 | from ..types import ScenarioView |
9 | | -from ._types import BaseRequestOptions, LongRequestOptions, SDKScenarioRunAsyncParams, SDKScenarioRunParams |
| 8 | +from ._types import BaseRequestOptions, SDKScenarioRunParams, SDKScenarioUpdateParams, SDKScenarioRunAsyncParams |
10 | 9 | from .._client import AsyncRunloop |
11 | 10 | from .async_scenario_run import AsyncScenarioRun |
12 | 11 |
|
@@ -65,28 +64,19 @@ async def get_info( |
65 | 64 |
|
66 | 65 | async def update( |
67 | 66 | self, |
68 | | - *, |
69 | | - name: Optional[str] = None, |
70 | | - metadata: Optional[Dict[str, str]] = None, |
71 | | - **options: Unpack[LongRequestOptions], |
| 67 | + **params: Unpack[SDKScenarioUpdateParams], |
72 | 68 | ) -> ScenarioView: |
73 | 69 | """Update the scenario. |
74 | 70 |
|
75 | 71 | Only provided fields will be updated. |
76 | 72 |
|
77 | | - :param name: New name for the scenario |
78 | | - :type name: Optional[str] |
79 | | - :param metadata: New metadata for the scenario |
80 | | - :type metadata: Optional[Dict[str, str]] |
81 | | - :param options: Optional long-running request configuration |
| 73 | + :param params: See SDKScenarioUpdateParams for available parameters |
82 | 74 | :return: Updated scenario info |
83 | 75 | :rtype: ScenarioView |
84 | 76 | """ |
85 | 77 | return await self._client.scenarios.update( |
86 | 78 | self._id, |
87 | | - name=name, |
88 | | - metadata=metadata, |
89 | | - **options, |
| 79 | + **params, |
90 | 80 | ) |
91 | 81 |
|
92 | 82 | async def run_async( |
|
0 commit comments