Skip to content

Commit 8c4cb68

Browse files
Generate stackitmarketplace
1 parent a8e19f6 commit 8c4cb68

File tree

8 files changed

+460
-16
lines changed

8 files changed

+460
-16
lines changed

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

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@
3131
"ApiException",
3232
"ApproveSubscriptionPayload",
3333
"Assets",
34+
"AssetsEndUserLicenseAgreement",
35+
"AssetsProductDescription",
36+
"AssetsServiceCertificate",
37+
"AssetsServiceLevelAgreement",
3438
"BecomeVendor",
3539
"CatalogPricingOptionHighlight",
3640
"CatalogProductDetail",
@@ -64,7 +68,6 @@
6468
"RegisterTesting",
6569
"RequestPrivatePlan",
6670
"ResolveCustomerPayload",
67-
"ServiceCertificate",
6871
"SubscriptionLifecycleState",
6972
"SubscriptionProduct",
7073
"SuggestProduct",
@@ -92,6 +95,18 @@
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_certificate import (
105+
AssetsServiceCertificate as AssetsServiceCertificate,
106+
)
107+
from stackit.stackitmarketplace.models.assets_service_level_agreement import (
108+
AssetsServiceLevelAgreement as AssetsServiceLevelAgreement,
109+
)
95110
from stackit.stackitmarketplace.models.become_vendor import BecomeVendor as BecomeVendor
96111
from stackit.stackitmarketplace.models.catalog_pricing_option_highlight import (
97112
CatalogPricingOptionHighlight as CatalogPricingOptionHighlight,
@@ -179,9 +194,6 @@
179194
from stackit.stackitmarketplace.models.resolve_customer_payload import (
180195
ResolveCustomerPayload as ResolveCustomerPayload,
181196
)
182-
from stackit.stackitmarketplace.models.service_certificate import (
183-
ServiceCertificate as ServiceCertificate,
184-
)
185197
from stackit.stackitmarketplace.models.subscription_lifecycle_state import (
186198
SubscriptionLifecycleState as SubscriptionLifecycleState,
187199
)

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,18 @@
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_certificate import (
29+
AssetsServiceCertificate,
30+
)
31+
from stackit.stackitmarketplace.models.assets_service_level_agreement import (
32+
AssetsServiceLevelAgreement,
33+
)
2234
from stackit.stackitmarketplace.models.become_vendor import BecomeVendor
2335
from stackit.stackitmarketplace.models.catalog_pricing_option_highlight import (
2436
CatalogPricingOptionHighlight,
@@ -88,7 +100,6 @@
88100
from stackit.stackitmarketplace.models.resolve_customer_payload import (
89101
ResolveCustomerPayload,
90102
)
91-
from stackit.stackitmarketplace.models.service_certificate import ServiceCertificate
92103
from stackit.stackitmarketplace.models.subscription_lifecycle_state import (
93104
SubscriptionLifecycleState,
94105
)

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

Lines changed: 61 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,43 @@
2121
from pydantic import BaseModel, ConfigDict, Field
2222
from typing_extensions import Self
2323

24-
from stackit.stackitmarketplace.models.service_certificate import ServiceCertificate
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_certificate import (
31+
AssetsServiceCertificate,
32+
)
33+
from stackit.stackitmarketplace.models.assets_service_level_agreement import (
34+
AssetsServiceLevelAgreement,
35+
)
2536

2637

2738
class Assets(BaseModel):
2839
"""
2940
The assets associated with the product.
3041
""" # noqa: E501
3142

32-
service_certificate: Optional[ServiceCertificate] = Field(default=None, alias="serviceCertificate")
33-
__properties: ClassVar[List[str]] = ["serviceCertificate"]
43+
assets_end_user_license_agreement: Optional[AssetsEndUserLicenseAgreement] = Field(
44+
default=None, alias="assetsEndUserLicenseAgreement"
45+
)
46+
assets_product_description: Optional[AssetsProductDescription] = Field(
47+
default=None, alias="assetsProductDescription"
48+
)
49+
assets_service_certificate: Optional[AssetsServiceCertificate] = Field(
50+
default=None, alias="assetsServiceCertificate"
51+
)
52+
assets_service_level_agreement: Optional[AssetsServiceLevelAgreement] = Field(
53+
default=None, alias="assetsServiceLevelAgreement"
54+
)
55+
__properties: ClassVar[List[str]] = [
56+
"assetsEndUserLicenseAgreement",
57+
"assetsProductDescription",
58+
"assetsServiceCertificate",
59+
"assetsServiceLevelAgreement",
60+
]
3461

3562
model_config = ConfigDict(
3663
populate_by_name=True,
@@ -69,9 +96,18 @@ def to_dict(self) -> Dict[str, Any]:
6996
exclude=excluded_fields,
7097
exclude_none=True,
7198
)
72-
# override the default output from pydantic by calling `to_dict()` of service_certificate
73-
if self.service_certificate:
74-
_dict["serviceCertificate"] = self.service_certificate.to_dict()
99+
# override the default output from pydantic by calling `to_dict()` of assets_end_user_license_agreement
100+
if self.assets_end_user_license_agreement:
101+
_dict["assetsEndUserLicenseAgreement"] = self.assets_end_user_license_agreement.to_dict()
102+
# override the default output from pydantic by calling `to_dict()` of assets_product_description
103+
if self.assets_product_description:
104+
_dict["assetsProductDescription"] = self.assets_product_description.to_dict()
105+
# override the default output from pydantic by calling `to_dict()` of assets_service_certificate
106+
if self.assets_service_certificate:
107+
_dict["assetsServiceCertificate"] = self.assets_service_certificate.to_dict()
108+
# override the default output from pydantic by calling `to_dict()` of assets_service_level_agreement
109+
if self.assets_service_level_agreement:
110+
_dict["assetsServiceLevelAgreement"] = self.assets_service_level_agreement.to_dict()
75111
return _dict
76112

77113
@classmethod
@@ -85,11 +121,26 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
85121

86122
_obj = cls.model_validate(
87123
{
88-
"serviceCertificate": (
89-
ServiceCertificate.from_dict(obj["serviceCertificate"])
90-
if obj.get("serviceCertificate") is not None
124+
"assetsEndUserLicenseAgreement": (
125+
AssetsEndUserLicenseAgreement.from_dict(obj["assetsEndUserLicenseAgreement"])
126+
if obj.get("assetsEndUserLicenseAgreement") is not None
127+
else None
128+
),
129+
"assetsProductDescription": (
130+
AssetsProductDescription.from_dict(obj["assetsProductDescription"])
131+
if obj.get("assetsProductDescription") is not None
132+
else None
133+
),
134+
"assetsServiceCertificate": (
135+
AssetsServiceCertificate.from_dict(obj["assetsServiceCertificate"])
136+
if obj.get("assetsServiceCertificate") is not None
137+
else None
138+
),
139+
"assetsServiceLevelAgreement": (
140+
AssetsServiceLevelAgreement.from_dict(obj["assetsServiceLevelAgreement"])
141+
if obj.get("assetsServiceLevelAgreement") is not None
91142
else None
92-
)
143+
),
93144
}
94145
)
95146
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+
Contact: marketplace@stackit.cloud
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+
Contact: marketplace@stackit.cloud
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)