2
2
3
3
from __future__ import annotations
4
4
5
- from typing_extensions import overload
5
+ from typing import Optional
6
6
7
7
import httpx
8
8
28
28
)
29
29
from ..._types import NOT_GIVEN , Body , Query , Headers , NotGiven
30
30
from ..._utils import (
31
- required_args ,
32
31
maybe_transform ,
33
32
async_maybe_transform ,
34
33
)
@@ -161,11 +160,12 @@ def retrieve(
161
160
cast_to = EnvironmentRetrieveResponse ,
162
161
)
163
162
164
- @overload
165
163
def update (
166
164
self ,
167
165
* ,
168
- metadata : object ,
166
+ environment_id : str | NotGiven = NOT_GIVEN ,
167
+ metadata : Optional [object ] | NotGiven = NOT_GIVEN ,
168
+ spec : Optional [environment_update_params .Spec ] | NotGiven = NOT_GIVEN ,
169
169
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
170
170
# The extra values given here take precedence over values defined on the client or passed to this method.
171
171
extra_headers : Headers | None = None ,
@@ -177,32 +177,10 @@ def update(
177
177
UpdateEnvironment updates the environment partially.
178
178
179
179
Args:
180
- extra_headers: Send extra headers
181
-
182
- extra_query: Add additional query parameters to the request
183
-
184
- extra_body: Add additional JSON properties to the request
185
-
186
- timeout: Override the client-level default timeout for this request, in seconds
187
- """
188
- ...
180
+ environment_id: environment_id specifies which environment should be updated.
189
181
190
- @overload
191
- def update (
192
- self ,
193
- * ,
194
- spec : environment_update_params .Variant1Spec ,
195
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
196
- # The extra values given here take precedence over values defined on the client or passed to this method.
197
- extra_headers : Headers | None = None ,
198
- extra_query : Query | None = None ,
199
- extra_body : Body | None = None ,
200
- timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
201
- ) -> object :
202
- """
203
- UpdateEnvironment updates the environment partially.
182
+ +required
204
183
205
- Args:
206
184
extra_headers: Send extra headers
207
185
208
186
extra_query: Add additional query parameters to the request
@@ -211,25 +189,11 @@ def update(
211
189
212
190
timeout: Override the client-level default timeout for this request, in seconds
213
191
"""
214
- ...
215
-
216
- @required_args (["metadata" ], ["spec" ])
217
- def update (
218
- self ,
219
- * ,
220
- metadata : object | NotGiven = NOT_GIVEN ,
221
- spec : environment_update_params .Variant1Spec | NotGiven = NOT_GIVEN ,
222
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
223
- # The extra values given here take precedence over values defined on the client or passed to this method.
224
- extra_headers : Headers | None = None ,
225
- extra_query : Query | None = None ,
226
- extra_body : Body | None = None ,
227
- timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
228
- ) -> object :
229
192
return self ._post (
230
193
"/gitpod.v1.EnvironmentService/UpdateEnvironment" ,
231
194
body = maybe_transform (
232
195
{
196
+ "environment_id" : environment_id ,
233
197
"metadata" : metadata ,
234
198
"spec" : spec ,
235
199
},
@@ -652,11 +616,12 @@ async def retrieve(
652
616
cast_to = EnvironmentRetrieveResponse ,
653
617
)
654
618
655
- @overload
656
619
async def update (
657
620
self ,
658
621
* ,
659
- metadata : object ,
622
+ environment_id : str | NotGiven = NOT_GIVEN ,
623
+ metadata : Optional [object ] | NotGiven = NOT_GIVEN ,
624
+ spec : Optional [environment_update_params .Spec ] | NotGiven = NOT_GIVEN ,
660
625
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
661
626
# The extra values given here take precedence over values defined on the client or passed to this method.
662
627
extra_headers : Headers | None = None ,
@@ -668,32 +633,10 @@ async def update(
668
633
UpdateEnvironment updates the environment partially.
669
634
670
635
Args:
671
- extra_headers: Send extra headers
672
-
673
- extra_query: Add additional query parameters to the request
674
-
675
- extra_body: Add additional JSON properties to the request
676
-
677
- timeout: Override the client-level default timeout for this request, in seconds
678
- """
679
- ...
636
+ environment_id: environment_id specifies which environment should be updated.
680
637
681
- @overload
682
- async def update (
683
- self ,
684
- * ,
685
- spec : environment_update_params .Variant1Spec ,
686
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
687
- # The extra values given here take precedence over values defined on the client or passed to this method.
688
- extra_headers : Headers | None = None ,
689
- extra_query : Query | None = None ,
690
- extra_body : Body | None = None ,
691
- timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
692
- ) -> object :
693
- """
694
- UpdateEnvironment updates the environment partially.
638
+ +required
695
639
696
- Args:
697
640
extra_headers: Send extra headers
698
641
699
642
extra_query: Add additional query parameters to the request
@@ -702,25 +645,11 @@ async def update(
702
645
703
646
timeout: Override the client-level default timeout for this request, in seconds
704
647
"""
705
- ...
706
-
707
- @required_args (["metadata" ], ["spec" ])
708
- async def update (
709
- self ,
710
- * ,
711
- metadata : object | NotGiven = NOT_GIVEN ,
712
- spec : environment_update_params .Variant1Spec | NotGiven = NOT_GIVEN ,
713
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
714
- # The extra values given here take precedence over values defined on the client or passed to this method.
715
- extra_headers : Headers | None = None ,
716
- extra_query : Query | None = None ,
717
- extra_body : Body | None = None ,
718
- timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
719
- ) -> object :
720
648
return await self ._post (
721
649
"/gitpod.v1.EnvironmentService/UpdateEnvironment" ,
722
650
body = await async_maybe_transform (
723
651
{
652
+ "environment_id" : environment_id ,
724
653
"metadata" : metadata ,
725
654
"spec" : spec ,
726
655
},
0 commit comments