Skip to content

Commit 9470f82

Browse files
Generate serverupdate (#773)
1 parent 475ed74 commit 9470f82

20 files changed

+259
-594
lines changed

services/serverupdate/src/stackit/serverupdate/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
88
API endpoints for Server Update Operations on STACKIT Servers.
99
10-
The version of the OpenAPI document: 1.0
10+
The version of the OpenAPI document: 2.0
1111
1212
Generated by OpenAPI Generator (https://openapi-generator.tech)
1313
@@ -38,10 +38,10 @@
3838
from stackit.serverupdate.models.create_update_schedule_payload import (
3939
CreateUpdateSchedulePayload,
4040
)
41-
from stackit.serverupdate.models.enable_service_payload import EnableServicePayload
4241
from stackit.serverupdate.models.enable_service_resource_payload import (
4342
EnableServiceResourcePayload,
4443
)
44+
from stackit.serverupdate.models.error_response import ErrorResponse
4545
from stackit.serverupdate.models.get_update_policies_response import (
4646
GetUpdatePoliciesResponse,
4747
)

services/serverupdate/src/stackit/serverupdate/api/default_api.py

Lines changed: 225 additions & 562 deletions
Large diffs are not rendered by default.

services/serverupdate/src/stackit/serverupdate/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
API endpoints for Server Update Operations on STACKIT Servers.
77
8-
The version of the OpenAPI document: 1.0
8+
The version of the OpenAPI document: 2.0
99
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111

services/serverupdate/src/stackit/serverupdate/configuration.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
API endpoints for Server Update Operations on STACKIT Servers.
77
8-
The version of the OpenAPI document: 1.0
8+
The version of the OpenAPI document: 2.0
99
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111
@@ -33,7 +33,7 @@ def __init__(
3333
)
3434
"""Constructor
3535
"""
36-
self._base_path = "https://server-update.api.eu01.stackit.cloud"
36+
self._base_path = "https://server-update.api.stackit.cloud"
3737
"""Default Base url
3838
"""
3939
self.server_index = 0 if server_index is None else server_index
@@ -57,13 +57,12 @@ def get_host_settings(self):
5757
"""
5858
return [
5959
{
60-
"url": "https://server-update.api.{region}stackit.cloud",
60+
"url": "https://server-update.api.stackit.cloud",
6161
"description": "No description provided",
6262
"variables": {
6363
"region": {
6464
"description": "No description provided",
65-
"default_value": "eu01.",
66-
"enum_values": ["eu01."],
65+
"default_value": "global",
6766
}
6867
},
6968
}

services/serverupdate/src/stackit/serverupdate/exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
API endpoints for Server Update Operations on STACKIT Servers.
77
8-
The version of the OpenAPI document: 1.0
8+
The version of the OpenAPI document: 2.0
99
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111

services/serverupdate/src/stackit/serverupdate/models/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
77
API endpoints for Server Update Operations on STACKIT Servers.
88
9-
The version of the OpenAPI document: 1.0
9+
The version of the OpenAPI document: 2.0
1010
1111
Generated by OpenAPI Generator (https://openapi-generator.tech)
1212
@@ -19,10 +19,10 @@
1919
from stackit.serverupdate.models.create_update_schedule_payload import (
2020
CreateUpdateSchedulePayload,
2121
)
22-
from stackit.serverupdate.models.enable_service_payload import EnableServicePayload
2322
from stackit.serverupdate.models.enable_service_resource_payload import (
2423
EnableServiceResourcePayload,
2524
)
25+
from stackit.serverupdate.models.error_response import ErrorResponse
2626
from stackit.serverupdate.models.get_update_policies_response import (
2727
GetUpdatePoliciesResponse,
2828
)

services/serverupdate/src/stackit/serverupdate/models/create_update_payload.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
API endpoints for Server Update Operations on STACKIT Servers.
77
8-
The version of the OpenAPI document: 1.0
8+
The version of the OpenAPI document: 2.0
99
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111

services/serverupdate/src/stackit/serverupdate/models/create_update_schedule_payload.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
API endpoints for Server Update Operations on STACKIT Servers.
77
8-
The version of the OpenAPI document: 1.0
8+
The version of the OpenAPI document: 2.0
99
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111

services/serverupdate/src/stackit/serverupdate/models/enable_service_resource_payload.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
API endpoints for Server Update Operations on STACKIT Servers.
77
8-
The version of the OpenAPI document: 1.0
8+
The version of the OpenAPI document: 2.0
99
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111

services/serverupdate/src/stackit/serverupdate/models/enable_service_payload.py renamed to services/serverupdate/src/stackit/serverupdate/models/error_response.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
API endpoints for Server Update Operations on STACKIT Servers.
77
8-
The version of the OpenAPI document: 1.0
8+
The version of the OpenAPI document: 2.0
99
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111
@@ -22,13 +22,16 @@
2222
from typing_extensions import Self
2323

2424

25-
class EnableServicePayload(BaseModel):
25+
class ErrorResponse(BaseModel):
2626
"""
27-
EnableServicePayload
27+
ErrorResponse
2828
"""
2929

30-
update_policy_id: Optional[StrictStr] = Field(default=None, alias="updatePolicyId")
31-
__properties: ClassVar[List[str]] = ["updatePolicyId"]
30+
message: StrictStr = Field(description="Details about the error")
31+
status: StrictStr = Field(
32+
description="The string representation of the http status code (i.e. Not Found, Bad Request, etc)"
33+
)
34+
__properties: ClassVar[List[str]] = ["message", "status"]
3235

3336
model_config = ConfigDict(
3437
populate_by_name=True,
@@ -47,7 +50,7 @@ def to_json(self) -> str:
4750

4851
@classmethod
4952
def from_json(cls, json_str: str) -> Optional[Self]:
50-
"""Create an instance of EnableServicePayload from a JSON string"""
53+
"""Create an instance of ErrorResponse from a JSON string"""
5154
return cls.from_dict(json.loads(json_str))
5255

5356
def to_dict(self) -> Dict[str, Any]:
@@ -71,12 +74,12 @@ def to_dict(self) -> Dict[str, Any]:
7174

7275
@classmethod
7376
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
74-
"""Create an instance of EnableServicePayload from a dict"""
77+
"""Create an instance of ErrorResponse from a dict"""
7578
if obj is None:
7679
return None
7780

7881
if not isinstance(obj, dict):
7982
return cls.model_validate(obj)
8083

81-
_obj = cls.model_validate({"updatePolicyId": obj.get("updatePolicyId")})
84+
_obj = cls.model_validate({"message": obj.get("message"), "status": obj.get("status")})
8285
return _obj

0 commit comments

Comments
 (0)