Skip to content

Commit 640479a

Browse files
feat(api): manual updates
1 parent 72320f5 commit 640479a

File tree

4 files changed

+14
-8
lines changed

4 files changed

+14
-8
lines changed

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 119
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-c850a6432597255fc1b788ba21a0494162e639f41dd80c0f9d07def239d31865.yml
3-
openapi_spec_hash: fba3f62e51d3ba39eea280abe29f39f1
4-
config_hash: 8e3b8fba844b78950ad4a13b75b7fffc
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-ca9a49ac7fbb63f55611fd7cd48a22a3ff8b38a797125c8513e891d9b7345550.yml
3+
openapi_spec_hash: fd6ffbdfaefcc555e61ca1c565e05214
4+
config_hash: bb9d0a0bdadbee0985dd7c1e4f0e9e8a

src/gitpod/resources/environments/environments.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ def update(
243243
self,
244244
*,
245245
environment_id: str | NotGiven = NOT_GIVEN,
246-
metadata: Optional[object] | NotGiven = NOT_GIVEN,
246+
metadata: Optional[environment_update_params.Metadata] | NotGiven = NOT_GIVEN,
247247
spec: Optional[environment_update_params.Spec] | NotGiven = NOT_GIVEN,
248248
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
249249
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -1057,7 +1057,7 @@ async def update(
10571057
self,
10581058
*,
10591059
environment_id: str | NotGiven = NOT_GIVEN,
1060-
metadata: Optional[object] | NotGiven = NOT_GIVEN,
1060+
metadata: Optional[environment_update_params.Metadata] | NotGiven = NOT_GIVEN,
10611061
spec: Optional[environment_update_params.Spec] | NotGiven = NOT_GIVEN,
10621062
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
10631063
# The extra values given here take precedence over values defined on the client or passed to this method.

src/gitpod/types/environment_update_params.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
__all__ = [
1313
"EnvironmentUpdateParams",
14+
"Metadata",
1415
"Spec",
1516
"SpecAutomationsFile",
1617
"SpecContent",
@@ -28,11 +29,16 @@ class EnvironmentUpdateParams(TypedDict, total=False):
2829
+required
2930
"""
3031

31-
metadata: Optional[object]
32+
metadata: Optional[Metadata]
3233

3334
spec: Optional[Spec]
3435

3536

37+
class Metadata(TypedDict, total=False):
38+
name: Optional[str]
39+
"""name is the user-defined display name of the environment"""
40+
41+
3642
class SpecAutomationsFile(TypedDict, total=False):
3743
automations_file_path: Annotated[Optional[str], PropertyInfo(alias="automationsFilePath")]
3844
"""

tests/api_resources/test_environments.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def test_method_update(self, client: Gitpod) -> None:
171171
def test_method_update_with_all_params(self, client: Gitpod) -> None:
172172
environment = client.environments.update(
173173
environment_id="07e03a28-65a5-4d98-b532-8ea67b188048",
174-
metadata={},
174+
metadata={"name": "name"},
175175
spec={
176176
"automations_file": {
177177
"automations_file_path": "automationsFilePath",
@@ -794,7 +794,7 @@ async def test_method_update(self, async_client: AsyncGitpod) -> None:
794794
async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> None:
795795
environment = await async_client.environments.update(
796796
environment_id="07e03a28-65a5-4d98-b532-8ea67b188048",
797-
metadata={},
797+
metadata={"name": "name"},
798798
spec={
799799
"automations_file": {
800800
"automations_file_path": "automationsFilePath",

0 commit comments

Comments
 (0)