Skip to content

Commit d20eaba

Browse files
feat(api): update via SDK Studio
1 parent b418dbe commit d20eaba

File tree

71 files changed

+5316
-5791
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+5316
-5791
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 106
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-69a0fc74a7438a8961de8a3254bdb714a3062e4c77b5e2e1fb037baafeeac9ce.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-2e9f8b8666b2fd4e346a3acbf81a2c82a6f3793e01bc146499708efaf0c250c5.yml

src/gitpod/resources/environments/environments.py

Lines changed: 118 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing_extensions import Literal
5+
from typing_extensions import Literal, overload
66

77
import httpx
88

@@ -29,6 +29,7 @@
2929
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
3030
from ..._utils import (
3131
is_given,
32+
required_args,
3233
maybe_transform,
3334
strip_not_given,
3435
async_maybe_transform,
@@ -213,10 +214,11 @@ def retrieve(
213214
cast_to=EnvironmentRetrieveResponse,
214215
)
215216

217+
@overload
216218
def update(
217219
self,
218220
*,
219-
body: environment_update_params.Body,
221+
metadata: object,
220222
connect_protocol_version: Literal[1],
221223
connect_timeout_ms: float | NotGiven = NOT_GIVEN,
222224
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -242,6 +244,55 @@ def update(
242244
243245
timeout: Override the client-level default timeout for this request, in seconds
244246
"""
247+
...
248+
249+
@overload
250+
def update(
251+
self,
252+
*,
253+
spec: environment_update_params.Variant1Spec,
254+
connect_protocol_version: Literal[1],
255+
connect_timeout_ms: float | NotGiven = NOT_GIVEN,
256+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
257+
# The extra values given here take precedence over values defined on the client or passed to this method.
258+
extra_headers: Headers | None = None,
259+
extra_query: Query | None = None,
260+
extra_body: Body | None = None,
261+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
262+
) -> object:
263+
"""
264+
UpdateEnvironment updates the environment partially.
265+
266+
Args:
267+
connect_protocol_version: Define the version of the Connect protocol
268+
269+
connect_timeout_ms: Define the timeout, in ms
270+
271+
extra_headers: Send extra headers
272+
273+
extra_query: Add additional query parameters to the request
274+
275+
extra_body: Add additional JSON properties to the request
276+
277+
timeout: Override the client-level default timeout for this request, in seconds
278+
"""
279+
...
280+
281+
@required_args(["metadata", "connect_protocol_version"], ["spec", "connect_protocol_version"])
282+
def update(
283+
self,
284+
*,
285+
metadata: object | NotGiven = NOT_GIVEN,
286+
connect_protocol_version: Literal[1],
287+
connect_timeout_ms: float | NotGiven = NOT_GIVEN,
288+
spec: environment_update_params.Variant1Spec | NotGiven = NOT_GIVEN,
289+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
290+
# The extra values given here take precedence over values defined on the client or passed to this method.
291+
extra_headers: Headers | None = None,
292+
extra_query: Query | None = None,
293+
extra_body: Body | None = None,
294+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
295+
) -> object:
245296
extra_headers = {
246297
**strip_not_given(
247298
{
@@ -253,7 +304,13 @@ def update(
253304
}
254305
return self._post(
255306
"/gitpod.v1.EnvironmentService/UpdateEnvironment",
256-
body=maybe_transform(body, environment_update_params.EnvironmentUpdateParams),
307+
body=maybe_transform(
308+
{
309+
"metadata": metadata,
310+
"spec": spec,
311+
},
312+
environment_update_params.EnvironmentUpdateParams,
313+
),
257314
options=make_request_options(
258315
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
259316
),
@@ -828,10 +885,11 @@ async def retrieve(
828885
cast_to=EnvironmentRetrieveResponse,
829886
)
830887

888+
@overload
831889
async def update(
832890
self,
833891
*,
834-
body: environment_update_params.Body,
892+
metadata: object,
835893
connect_protocol_version: Literal[1],
836894
connect_timeout_ms: float | NotGiven = NOT_GIVEN,
837895
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -857,6 +915,55 @@ async def update(
857915
858916
timeout: Override the client-level default timeout for this request, in seconds
859917
"""
918+
...
919+
920+
@overload
921+
async def update(
922+
self,
923+
*,
924+
spec: environment_update_params.Variant1Spec,
925+
connect_protocol_version: Literal[1],
926+
connect_timeout_ms: float | NotGiven = NOT_GIVEN,
927+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
928+
# The extra values given here take precedence over values defined on the client or passed to this method.
929+
extra_headers: Headers | None = None,
930+
extra_query: Query | None = None,
931+
extra_body: Body | None = None,
932+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
933+
) -> object:
934+
"""
935+
UpdateEnvironment updates the environment partially.
936+
937+
Args:
938+
connect_protocol_version: Define the version of the Connect protocol
939+
940+
connect_timeout_ms: Define the timeout, in ms
941+
942+
extra_headers: Send extra headers
943+
944+
extra_query: Add additional query parameters to the request
945+
946+
extra_body: Add additional JSON properties to the request
947+
948+
timeout: Override the client-level default timeout for this request, in seconds
949+
"""
950+
...
951+
952+
@required_args(["metadata", "connect_protocol_version"], ["spec", "connect_protocol_version"])
953+
async def update(
954+
self,
955+
*,
956+
metadata: object | NotGiven = NOT_GIVEN,
957+
connect_protocol_version: Literal[1],
958+
connect_timeout_ms: float | NotGiven = NOT_GIVEN,
959+
spec: environment_update_params.Variant1Spec | NotGiven = NOT_GIVEN,
960+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
961+
# The extra values given here take precedence over values defined on the client or passed to this method.
962+
extra_headers: Headers | None = None,
963+
extra_query: Query | None = None,
964+
extra_body: Body | None = None,
965+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
966+
) -> object:
860967
extra_headers = {
861968
**strip_not_given(
862969
{
@@ -868,7 +975,13 @@ async def update(
868975
}
869976
return await self._post(
870977
"/gitpod.v1.EnvironmentService/UpdateEnvironment",
871-
body=await async_maybe_transform(body, environment_update_params.EnvironmentUpdateParams),
978+
body=await async_maybe_transform(
979+
{
980+
"metadata": metadata,
981+
"spec": spec,
982+
},
983+
environment_update_params.EnvironmentUpdateParams,
984+
),
872985
options=make_request_options(
873986
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
874987
),

src/gitpod/resources/events.py

Lines changed: 4 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ def watch(
129129
*,
130130
environment_id: str,
131131
connect_protocol_version: Literal[1],
132-
organization: bool | NotGiven = NOT_GIVEN,
133132
connect_timeout_ms: float | NotGiven = NOT_GIVEN,
134133
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
135134
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -149,11 +148,6 @@ def watch(
149148
150149
connect_protocol_version: Define the version of the Connect protocol
151150
152-
organization: Organization scope produces events for all projects, runners and environments
153-
154-
the caller can see within their organization. No task, task execution or service
155-
events are produed.
156-
157151
connect_timeout_ms: Define the timeout, in ms
158152
159153
extra_headers: Send extra headers
@@ -172,7 +166,6 @@ def watch(
172166
*,
173167
organization: bool,
174168
connect_protocol_version: Literal[1],
175-
environment_id: str | NotGiven = NOT_GIVEN,
176169
connect_timeout_ms: float | NotGiven = NOT_GIVEN,
177170
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
178171
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -192,11 +185,6 @@ def watch(
192185
193186
connect_protocol_version: Define the version of the Connect protocol
194187
195-
environment_id: Environment scope produces events for the environment itself, all tasks, task
196-
executions,
197-
198-
and services associated with that environment.
199-
200188
connect_timeout_ms: Define the timeout, in ms
201189
202190
extra_headers: Send extra headers
@@ -209,61 +197,14 @@ def watch(
209197
"""
210198
...
211199

212-
@overload
213-
def watch(
214-
self,
215-
*,
216-
connect_protocol_version: Literal[1],
217-
environment_id: str | NotGiven = NOT_GIVEN,
218-
organization: bool | NotGiven = NOT_GIVEN,
219-
connect_timeout_ms: float | NotGiven = NOT_GIVEN,
220-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
221-
# The extra values given here take precedence over values defined on the client or passed to this method.
222-
extra_headers: Headers | None = None,
223-
extra_query: Query | None = None,
224-
extra_body: Body | None = None,
225-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
226-
) -> EventWatchResponse:
227-
"""
228-
WatchEvents streams all requests events to the client
229-
230-
Args:
231-
connect_protocol_version: Define the version of the Connect protocol
232-
233-
environment_id: Environment scope produces events for the environment itself, all tasks, task
234-
executions,
235-
236-
and services associated with that environment.
237-
238-
organization: Organization scope produces events for all projects, runners and environments
239-
240-
the caller can see within their organization. No task, task execution or service
241-
events are produed.
242-
243-
connect_timeout_ms: Define the timeout, in ms
244-
245-
extra_headers: Send extra headers
246-
247-
extra_query: Add additional query parameters to the request
248-
249-
extra_body: Add additional JSON properties to the request
250-
251-
timeout: Override the client-level default timeout for this request, in seconds
252-
"""
253-
...
254-
255-
@required_args(
256-
["environment_id", "connect_protocol_version"],
257-
["organization", "connect_protocol_version"],
258-
["connect_protocol_version"],
259-
)
200+
@required_args(["environment_id", "connect_protocol_version"], ["organization", "connect_protocol_version"])
260201
def watch(
261202
self,
262203
*,
263204
environment_id: str | NotGiven = NOT_GIVEN,
264205
connect_protocol_version: Literal[1],
265-
organization: bool | NotGiven = NOT_GIVEN,
266206
connect_timeout_ms: float | NotGiven = NOT_GIVEN,
207+
organization: bool | NotGiven = NOT_GIVEN,
267208
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
268209
# The extra values given here take precedence over values defined on the client or passed to this method.
269210
extra_headers: Headers | None = None,
@@ -396,7 +337,6 @@ async def watch(
396337
*,
397338
environment_id: str,
398339
connect_protocol_version: Literal[1],
399-
organization: bool | NotGiven = NOT_GIVEN,
400340
connect_timeout_ms: float | NotGiven = NOT_GIVEN,
401341
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
402342
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -416,11 +356,6 @@ async def watch(
416356
417357
connect_protocol_version: Define the version of the Connect protocol
418358
419-
organization: Organization scope produces events for all projects, runners and environments
420-
421-
the caller can see within their organization. No task, task execution or service
422-
events are produed.
423-
424359
connect_timeout_ms: Define the timeout, in ms
425360
426361
extra_headers: Send extra headers
@@ -439,7 +374,6 @@ async def watch(
439374
*,
440375
organization: bool,
441376
connect_protocol_version: Literal[1],
442-
environment_id: str | NotGiven = NOT_GIVEN,
443377
connect_timeout_ms: float | NotGiven = NOT_GIVEN,
444378
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
445379
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -459,11 +393,6 @@ async def watch(
459393
460394
connect_protocol_version: Define the version of the Connect protocol
461395
462-
environment_id: Environment scope produces events for the environment itself, all tasks, task
463-
executions,
464-
465-
and services associated with that environment.
466-
467396
connect_timeout_ms: Define the timeout, in ms
468397
469398
extra_headers: Send extra headers
@@ -476,61 +405,14 @@ async def watch(
476405
"""
477406
...
478407

479-
@overload
480-
async def watch(
481-
self,
482-
*,
483-
connect_protocol_version: Literal[1],
484-
environment_id: str | NotGiven = NOT_GIVEN,
485-
organization: bool | NotGiven = NOT_GIVEN,
486-
connect_timeout_ms: float | NotGiven = NOT_GIVEN,
487-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
488-
# The extra values given here take precedence over values defined on the client or passed to this method.
489-
extra_headers: Headers | None = None,
490-
extra_query: Query | None = None,
491-
extra_body: Body | None = None,
492-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
493-
) -> EventWatchResponse:
494-
"""
495-
WatchEvents streams all requests events to the client
496-
497-
Args:
498-
connect_protocol_version: Define the version of the Connect protocol
499-
500-
environment_id: Environment scope produces events for the environment itself, all tasks, task
501-
executions,
502-
503-
and services associated with that environment.
504-
505-
organization: Organization scope produces events for all projects, runners and environments
506-
507-
the caller can see within their organization. No task, task execution or service
508-
events are produed.
509-
510-
connect_timeout_ms: Define the timeout, in ms
511-
512-
extra_headers: Send extra headers
513-
514-
extra_query: Add additional query parameters to the request
515-
516-
extra_body: Add additional JSON properties to the request
517-
518-
timeout: Override the client-level default timeout for this request, in seconds
519-
"""
520-
...
521-
522-
@required_args(
523-
["environment_id", "connect_protocol_version"],
524-
["organization", "connect_protocol_version"],
525-
["connect_protocol_version"],
526-
)
408+
@required_args(["environment_id", "connect_protocol_version"], ["organization", "connect_protocol_version"])
527409
async def watch(
528410
self,
529411
*,
530412
environment_id: str | NotGiven = NOT_GIVEN,
531413
connect_protocol_version: Literal[1],
532-
organization: bool | NotGiven = NOT_GIVEN,
533414
connect_timeout_ms: float | NotGiven = NOT_GIVEN,
415+
organization: bool | NotGiven = NOT_GIVEN,
534416
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
535417
# The extra values given here take precedence over values defined on the client or passed to this method.
536418
extra_headers: Headers | None = None,

0 commit comments

Comments
 (0)