Skip to content

Commit 23b3304

Browse files
Generator: Update SDK /services/stackitmarketplace (#2437)
* Generate stackitmarketplace * Add changelogs Signed-off-by: Alexander Dahmen <[email protected]> --------- Signed-off-by: Alexander Dahmen <[email protected]> Co-authored-by: Alexander Dahmen <[email protected]>
1 parent b4aa19e commit 23b3304

File tree

10 files changed

+354
-4
lines changed

10 files changed

+354
-4
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
## Release (2025-xx-xx)
2+
- `stackitmarketplace`: [v1.15.0](services/stackitmarketplace/CHANGELOG.md#v1150)
3+
- **Feature:** Add `EndUserLicenseAgreement`, `ProductDescription` and `ServiceLevelAgreement` attributes and add them to `Assets` struct
24
- `postgresflex`: [v1.2.0](services/postgresflex/CHANGELOG.md#v120)
35
- **Breaking Change:** The attribute type for `PartialUpdateInstancePayload` and `UpdateInstancePayload` changed from `Storage` to `StorageUpdate`.
46
- **Deprecation:** `StorageUpdate`: updating the performance class field is not possible.

services/stackitmarketplace/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## v1.15.0
2+
- **Feature:** Add `EndUserLicenseAgreement`, `ProductDescription` and `ServiceLevelAgreement` attributes and add them to `Assets` struct
3+
14
## v1.14.0
25
- **Feature:** Add `has_private_plan_option` attribute to `CatalogProductDetail` model class
36

services/stackitmarketplace/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "stackit-stackitmarketplace"
33

44
[tool.poetry]
55
name = "stackit-stackitmarketplace"
6-
version = "v1.14.0"
6+
version = "v1.15.0"
77
authors = [
88
"STACKIT Developer Tools <[email protected]>",
99
]

services/stackitmarketplace/src/stackit/stackitmarketplace/__init__.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
"ApiException",
3232
"ApproveSubscriptionPayload",
3333
"Assets",
34+
"AssetsEndUserLicenseAgreement",
35+
"AssetsProductDescription",
36+
"AssetsServiceLevelAgreement",
3437
"BecomeVendor",
3538
"CatalogPricingOptionHighlight",
3639
"CatalogProductDetail",
@@ -92,6 +95,15 @@
9295
ApproveSubscriptionPayload as ApproveSubscriptionPayload,
9396
)
9497
from stackit.stackitmarketplace.models.assets import Assets as Assets
98+
from stackit.stackitmarketplace.models.assets_end_user_license_agreement import (
99+
AssetsEndUserLicenseAgreement as AssetsEndUserLicenseAgreement,
100+
)
101+
from stackit.stackitmarketplace.models.assets_product_description import (
102+
AssetsProductDescription as AssetsProductDescription,
103+
)
104+
from stackit.stackitmarketplace.models.assets_service_level_agreement import (
105+
AssetsServiceLevelAgreement as AssetsServiceLevelAgreement,
106+
)
95107
from stackit.stackitmarketplace.models.become_vendor import BecomeVendor as BecomeVendor
96108
from stackit.stackitmarketplace.models.catalog_pricing_option_highlight import (
97109
CatalogPricingOptionHighlight as CatalogPricingOptionHighlight,

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@
1919
ApproveSubscriptionPayload,
2020
)
2121
from stackit.stackitmarketplace.models.assets import Assets
22+
from stackit.stackitmarketplace.models.assets_end_user_license_agreement import (
23+
AssetsEndUserLicenseAgreement,
24+
)
25+
from stackit.stackitmarketplace.models.assets_product_description import (
26+
AssetsProductDescription,
27+
)
28+
from stackit.stackitmarketplace.models.assets_service_level_agreement import (
29+
AssetsServiceLevelAgreement,
30+
)
2231
from stackit.stackitmarketplace.models.become_vendor import BecomeVendor
2332
from stackit.stackitmarketplace.models.catalog_pricing_option_highlight import (
2433
CatalogPricingOptionHighlight,

services/stackitmarketplace/src/stackit/stackitmarketplace/models/assets.py

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@
2121
from pydantic import BaseModel, ConfigDict, Field
2222
from typing_extensions import Self
2323

24+
from stackit.stackitmarketplace.models.assets_end_user_license_agreement import (
25+
AssetsEndUserLicenseAgreement,
26+
)
27+
from stackit.stackitmarketplace.models.assets_product_description import (
28+
AssetsProductDescription,
29+
)
30+
from stackit.stackitmarketplace.models.assets_service_level_agreement import (
31+
AssetsServiceLevelAgreement,
32+
)
2433
from stackit.stackitmarketplace.models.service_certificate import ServiceCertificate
2534

2635

@@ -29,8 +38,18 @@ class Assets(BaseModel):
2938
The assets associated with the product.
3039
""" # noqa: E501
3140

41+
end_user_license_agreement: Optional[AssetsEndUserLicenseAgreement] = Field(
42+
default=None, alias="endUserLicenseAgreement"
43+
)
44+
product_description: Optional[AssetsProductDescription] = Field(default=None, alias="productDescription")
3245
service_certificate: Optional[ServiceCertificate] = Field(default=None, alias="serviceCertificate")
33-
__properties: ClassVar[List[str]] = ["serviceCertificate"]
46+
service_level_agreement: Optional[AssetsServiceLevelAgreement] = Field(default=None, alias="serviceLevelAgreement")
47+
__properties: ClassVar[List[str]] = [
48+
"endUserLicenseAgreement",
49+
"productDescription",
50+
"serviceCertificate",
51+
"serviceLevelAgreement",
52+
]
3453

3554
model_config = ConfigDict(
3655
populate_by_name=True,
@@ -69,9 +88,18 @@ def to_dict(self) -> Dict[str, Any]:
6988
exclude=excluded_fields,
7089
exclude_none=True,
7190
)
91+
# override the default output from pydantic by calling `to_dict()` of end_user_license_agreement
92+
if self.end_user_license_agreement:
93+
_dict["endUserLicenseAgreement"] = self.end_user_license_agreement.to_dict()
94+
# override the default output from pydantic by calling `to_dict()` of product_description
95+
if self.product_description:
96+
_dict["productDescription"] = self.product_description.to_dict()
7297
# override the default output from pydantic by calling `to_dict()` of service_certificate
7398
if self.service_certificate:
7499
_dict["serviceCertificate"] = self.service_certificate.to_dict()
100+
# override the default output from pydantic by calling `to_dict()` of service_level_agreement
101+
if self.service_level_agreement:
102+
_dict["serviceLevelAgreement"] = self.service_level_agreement.to_dict()
75103
return _dict
76104

77105
@classmethod
@@ -85,11 +113,26 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
85113

86114
_obj = cls.model_validate(
87115
{
116+
"endUserLicenseAgreement": (
117+
AssetsEndUserLicenseAgreement.from_dict(obj["endUserLicenseAgreement"])
118+
if obj.get("endUserLicenseAgreement") is not None
119+
else None
120+
),
121+
"productDescription": (
122+
AssetsProductDescription.from_dict(obj["productDescription"])
123+
if obj.get("productDescription") is not None
124+
else None
125+
),
88126
"serviceCertificate": (
89127
ServiceCertificate.from_dict(obj["serviceCertificate"])
90128
if obj.get("serviceCertificate") is not None
91129
else None
92-
)
130+
),
131+
"serviceLevelAgreement": (
132+
AssetsServiceLevelAgreement.from_dict(obj["serviceLevelAgreement"])
133+
if obj.get("serviceLevelAgreement") is not None
134+
else None
135+
),
93136
}
94137
)
95138
return _obj
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# coding: utf-8
2+
3+
"""
4+
STACKIT Marketplace API
5+
6+
API to manage STACKIT Marketplace.
7+
8+
The version of the OpenAPI document: 1
9+
10+
Generated by OpenAPI Generator (https://openapi-generator.tech)
11+
12+
Do not edit the class manually.
13+
""" # noqa: E501
14+
15+
from __future__ import annotations
16+
17+
import json
18+
import pprint
19+
from typing import Any, ClassVar, Dict, List, Optional, Set
20+
21+
from pydantic import BaseModel, ConfigDict
22+
from typing_extensions import Self
23+
24+
from stackit.stackitmarketplace.models.localized_version import LocalizedVersion
25+
26+
27+
class AssetsEndUserLicenseAgreement(BaseModel):
28+
"""
29+
The related end user license agreement of the (subscription) product.
30+
""" # noqa: E501
31+
32+
version: Optional[LocalizedVersion] = None
33+
__properties: ClassVar[List[str]] = ["version"]
34+
35+
model_config = ConfigDict(
36+
populate_by_name=True,
37+
validate_assignment=True,
38+
protected_namespaces=(),
39+
)
40+
41+
def to_str(self) -> str:
42+
"""Returns the string representation of the model using alias"""
43+
return pprint.pformat(self.model_dump(by_alias=True))
44+
45+
def to_json(self) -> str:
46+
"""Returns the JSON representation of the model using alias"""
47+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
48+
return json.dumps(self.to_dict())
49+
50+
@classmethod
51+
def from_json(cls, json_str: str) -> Optional[Self]:
52+
"""Create an instance of AssetsEndUserLicenseAgreement from a JSON string"""
53+
return cls.from_dict(json.loads(json_str))
54+
55+
def to_dict(self) -> Dict[str, Any]:
56+
"""Return the dictionary representation of the model using alias.
57+
58+
This has the following differences from calling pydantic's
59+
`self.model_dump(by_alias=True)`:
60+
61+
* `None` is only added to the output dict for nullable fields that
62+
were set at model initialization. Other fields with value `None`
63+
are ignored.
64+
"""
65+
excluded_fields: Set[str] = set([])
66+
67+
_dict = self.model_dump(
68+
by_alias=True,
69+
exclude=excluded_fields,
70+
exclude_none=True,
71+
)
72+
# override the default output from pydantic by calling `to_dict()` of version
73+
if self.version:
74+
_dict["version"] = self.version.to_dict()
75+
return _dict
76+
77+
@classmethod
78+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
79+
"""Create an instance of AssetsEndUserLicenseAgreement from a dict"""
80+
if obj is None:
81+
return None
82+
83+
if not isinstance(obj, dict):
84+
return cls.model_validate(obj)
85+
86+
_obj = cls.model_validate(
87+
{"version": LocalizedVersion.from_dict(obj["version"]) if obj.get("version") is not None else None}
88+
)
89+
return _obj
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# coding: utf-8
2+
3+
"""
4+
STACKIT Marketplace API
5+
6+
API to manage STACKIT Marketplace.
7+
8+
The version of the OpenAPI document: 1
9+
10+
Generated by OpenAPI Generator (https://openapi-generator.tech)
11+
12+
Do not edit the class manually.
13+
""" # noqa: E501
14+
15+
from __future__ import annotations
16+
17+
import json
18+
import pprint
19+
from typing import Any, ClassVar, Dict, List, Optional, Set
20+
21+
from pydantic import BaseModel, ConfigDict
22+
from typing_extensions import Self
23+
24+
from stackit.stackitmarketplace.models.localized_version import LocalizedVersion
25+
26+
27+
class AssetsProductDescription(BaseModel):
28+
"""
29+
The related product description of the (subscription) product.
30+
""" # noqa: E501
31+
32+
version: Optional[LocalizedVersion] = None
33+
__properties: ClassVar[List[str]] = ["version"]
34+
35+
model_config = ConfigDict(
36+
populate_by_name=True,
37+
validate_assignment=True,
38+
protected_namespaces=(),
39+
)
40+
41+
def to_str(self) -> str:
42+
"""Returns the string representation of the model using alias"""
43+
return pprint.pformat(self.model_dump(by_alias=True))
44+
45+
def to_json(self) -> str:
46+
"""Returns the JSON representation of the model using alias"""
47+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
48+
return json.dumps(self.to_dict())
49+
50+
@classmethod
51+
def from_json(cls, json_str: str) -> Optional[Self]:
52+
"""Create an instance of AssetsProductDescription from a JSON string"""
53+
return cls.from_dict(json.loads(json_str))
54+
55+
def to_dict(self) -> Dict[str, Any]:
56+
"""Return the dictionary representation of the model using alias.
57+
58+
This has the following differences from calling pydantic's
59+
`self.model_dump(by_alias=True)`:
60+
61+
* `None` is only added to the output dict for nullable fields that
62+
were set at model initialization. Other fields with value `None`
63+
are ignored.
64+
"""
65+
excluded_fields: Set[str] = set([])
66+
67+
_dict = self.model_dump(
68+
by_alias=True,
69+
exclude=excluded_fields,
70+
exclude_none=True,
71+
)
72+
# override the default output from pydantic by calling `to_dict()` of version
73+
if self.version:
74+
_dict["version"] = self.version.to_dict()
75+
return _dict
76+
77+
@classmethod
78+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
79+
"""Create an instance of AssetsProductDescription from a dict"""
80+
if obj is None:
81+
return None
82+
83+
if not isinstance(obj, dict):
84+
return cls.model_validate(obj)
85+
86+
_obj = cls.model_validate(
87+
{"version": LocalizedVersion.from_dict(obj["version"]) if obj.get("version") is not None else None}
88+
)
89+
return _obj

0 commit comments

Comments
 (0)