stackit-stackitmarketplace 1.14.0__tar.gz → 1.15.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/PKG-INFO +1 -1
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/pyproject.toml +1 -1
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/__init__.py +12 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/models/__init__.py +9 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/models/assets.py +45 -2
- stackit_stackitmarketplace-1.15.0/src/stackit/stackitmarketplace/models/assets_end_user_license_agreement.py +89 -0
- stackit_stackitmarketplace-1.15.0/src/stackit/stackitmarketplace/models/assets_product_description.py +89 -0
- stackit_stackitmarketplace-1.15.0/src/stackit/stackitmarketplace/models/assets_service_level_agreement.py +89 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/models/error_response.py +15 -1
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/LICENSE.md +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/NOTICE.txt +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/README.md +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/api/__init__.py +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/api/default_api.py +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/api_client.py +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/api_response.py +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/configuration.py +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/exceptions.py +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/models/approve_subscription_payload.py +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/models/become_vendor.py +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/models/catalog_pricing_option_highlight.py +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/models/catalog_product_detail.py +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/models/catalog_product_details_vendor.py +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/models/catalog_product_facets_value_inner.py +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/models/catalog_product_highlight.py +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/models/catalog_product_overview.py +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/models/catalog_product_overview_vendor.py +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/models/catalog_product_pricing_option.py +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/models/catalog_product_support_resource.py +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/models/catalog_product_vendor_terms.py +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/models/contact_sales.py +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/models/delivery_method.py +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/models/free_trial.py +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/models/inquiries_create_inquiry_payload.py +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/models/inquiry_become_vendor.py +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/models/inquiry_contact_sales.py +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/models/inquiry_form_type.py +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/models/inquiry_register_testing.py +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/models/inquiry_request_private_plan.py +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/models/inquiry_suggest_product.py +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/models/list_catalog_products_response.py +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/models/list_vendor_subscriptions_response.py +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/models/localized_version.py +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/models/notice_period.py +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/models/offer_type.py +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/models/price_type.py +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/models/pricing_option_unit.py +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/models/product_lifecycle_state.py +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/models/register_testing.py +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/models/request_private_plan.py +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/models/resolve_customer_payload.py +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/models/service_certificate.py +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/models/subscription_lifecycle_state.py +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/models/subscription_product.py +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/models/suggest_product.py +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/models/vendor_subscription.py +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/py.typed +0 -0
- {stackit_stackitmarketplace-1.14.0 → stackit_stackitmarketplace-1.15.0}/src/stackit/stackitmarketplace/rest.py +0 -0
|
@@ -31,6 +31,9 @@ __all__ = [
|
|
|
31
31
|
"ApiException",
|
|
32
32
|
"ApproveSubscriptionPayload",
|
|
33
33
|
"Assets",
|
|
34
|
+
"AssetsEndUserLicenseAgreement",
|
|
35
|
+
"AssetsProductDescription",
|
|
36
|
+
"AssetsServiceLevelAgreement",
|
|
34
37
|
"BecomeVendor",
|
|
35
38
|
"CatalogPricingOptionHighlight",
|
|
36
39
|
"CatalogProductDetail",
|
|
@@ -92,6 +95,15 @@ from stackit.stackitmarketplace.models.approve_subscription_payload import (
|
|
|
92
95
|
ApproveSubscriptionPayload as ApproveSubscriptionPayload,
|
|
93
96
|
)
|
|
94
97
|
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
|
+
)
|
|
95
107
|
from stackit.stackitmarketplace.models.become_vendor import BecomeVendor as BecomeVendor
|
|
96
108
|
from stackit.stackitmarketplace.models.catalog_pricing_option_highlight import (
|
|
97
109
|
CatalogPricingOptionHighlight as CatalogPricingOptionHighlight,
|
|
@@ -19,6 +19,15 @@ from stackit.stackitmarketplace.models.approve_subscription_payload import (
|
|
|
19
19
|
ApproveSubscriptionPayload,
|
|
20
20
|
)
|
|
21
21
|
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
|
+
)
|
|
22
31
|
from stackit.stackitmarketplace.models.become_vendor import BecomeVendor
|
|
23
32
|
from stackit.stackitmarketplace.models.catalog_pricing_option_highlight import (
|
|
24
33
|
CatalogPricingOptionHighlight,
|
|
@@ -21,6 +21,15 @@ from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field
|
|
22
22
|
from typing_extensions import Self
|
|
23
23
|
|
|
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
|
+
)
|
|
24
33
|
from stackit.stackitmarketplace.models.service_certificate import ServiceCertificate
|
|
25
34
|
|
|
26
35
|
|
|
@@ -29,8 +38,18 @@ class Assets(BaseModel):
|
|
|
29
38
|
The assets associated with the product.
|
|
30
39
|
""" # noqa: E501
|
|
31
40
|
|
|
41
|
+
end_user_license_agreement: Optional[AssetsEndUserLicenseAgreement] = Field(
|
|
42
|
+
default=None, alias="endUserLicenseAgreement"
|
|
43
|
+
)
|
|
44
|
+
product_description: Optional[AssetsProductDescription] = Field(default=None, alias="productDescription")
|
|
32
45
|
service_certificate: Optional[ServiceCertificate] = Field(default=None, alias="serviceCertificate")
|
|
33
|
-
|
|
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
|
+
]
|
|
34
53
|
|
|
35
54
|
model_config = ConfigDict(
|
|
36
55
|
populate_by_name=True,
|
|
@@ -69,9 +88,18 @@ class Assets(BaseModel):
|
|
|
69
88
|
exclude=excluded_fields,
|
|
70
89
|
exclude_none=True,
|
|
71
90
|
)
|
|
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()
|
|
72
97
|
# override the default output from pydantic by calling `to_dict()` of service_certificate
|
|
73
98
|
if self.service_certificate:
|
|
74
99
|
_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()
|
|
75
103
|
return _dict
|
|
76
104
|
|
|
77
105
|
@classmethod
|
|
@@ -85,11 +113,26 @@ class Assets(BaseModel):
|
|
|
85
113
|
|
|
86
114
|
_obj = cls.model_validate(
|
|
87
115
|
{
|
|
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
|
+
),
|
|
88
126
|
"serviceCertificate": (
|
|
89
127
|
ServiceCertificate.from_dict(obj["serviceCertificate"])
|
|
90
128
|
if obj.get("serviceCertificate") is not None
|
|
91
129
|
else None
|
|
92
|
-
)
|
|
130
|
+
),
|
|
131
|
+
"serviceLevelAgreement": (
|
|
132
|
+
AssetsServiceLevelAgreement.from_dict(obj["serviceLevelAgreement"])
|
|
133
|
+
if obj.get("serviceLevelAgreement") is not None
|
|
134
|
+
else None
|
|
135
|
+
),
|
|
93
136
|
}
|
|
94
137
|
)
|
|
95
138
|
return _obj
|
|
@@ -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
|
|
@@ -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,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 AssetsServiceLevelAgreement(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
The related service level 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 AssetsServiceLevelAgreement 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 AssetsServiceLevelAgreement 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
|
|
@@ -16,10 +16,11 @@ from __future__ import annotations
|
|
|
16
16
|
|
|
17
17
|
import json
|
|
18
18
|
import pprint
|
|
19
|
+
import re # noqa: F401
|
|
19
20
|
from datetime import datetime
|
|
20
21
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
21
22
|
|
|
22
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
23
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
|
|
23
24
|
from typing_extensions import Self
|
|
24
25
|
|
|
25
26
|
|
|
@@ -35,6 +36,19 @@ class ErrorResponse(BaseModel):
|
|
|
35
36
|
time_stamp: datetime = Field(description="Timestamp at which the error occurred.", alias="timeStamp")
|
|
36
37
|
__properties: ClassVar[List[str]] = ["error", "message", "path", "status", "timeStamp"]
|
|
37
38
|
|
|
39
|
+
@field_validator("time_stamp", mode="before")
|
|
40
|
+
def time_stamp_change_year_zero_to_one(cls, value):
|
|
41
|
+
"""Workaround which prevents year 0 issue"""
|
|
42
|
+
if isinstance(value, str):
|
|
43
|
+
# Check for year "0000" at the beginning of the string
|
|
44
|
+
# This assumes common date formats like YYYY-MM-DDTHH:MM:SS+00:00 or YYYY-MM-DDTHH:MM:SSZ
|
|
45
|
+
if value.startswith("0000-01-01T") and re.match(
|
|
46
|
+
r"^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\+\d{2}:\d{2}|Z)$", value
|
|
47
|
+
):
|
|
48
|
+
# Workaround: Replace "0000" with "0001"
|
|
49
|
+
return "0001" + value[4:] # Take "0001" and append the rest of the string
|
|
50
|
+
return value
|
|
51
|
+
|
|
38
52
|
model_config = ConfigDict(
|
|
39
53
|
populate_by_name=True,
|
|
40
54
|
validate_assignment=True,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|