stackit-stackitmarketplace 1.4.0__tar.gz → 1.5.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.4.0 → stackit_stackitmarketplace-1.5.0}/PKG-INFO +1 -1
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/pyproject.toml +1 -1
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/src/stackit/stackitmarketplace/__init__.py +4 -0
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/src/stackit/stackitmarketplace/models/__init__.py +4 -0
- stackit_stackitmarketplace-1.5.0/src/stackit/stackitmarketplace/models/assets.py +95 -0
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/src/stackit/stackitmarketplace/models/catalog_product_detail.py +7 -0
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/src/stackit/stackitmarketplace/models/catalog_product_pricing_option.py +9 -0
- stackit_stackitmarketplace-1.5.0/src/stackit/stackitmarketplace/models/localized_version.py +112 -0
- stackit_stackitmarketplace-1.5.0/src/stackit/stackitmarketplace/models/notice_period.py +95 -0
- stackit_stackitmarketplace-1.5.0/src/stackit/stackitmarketplace/models/service_certificate.py +89 -0
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/src/stackit/stackitmarketplace/models/subscription_product.py +7 -0
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/LICENSE.md +0 -0
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/NOTICE.txt +0 -0
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/README.md +0 -0
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/src/stackit/stackitmarketplace/api/__init__.py +0 -0
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/src/stackit/stackitmarketplace/api/default_api.py +0 -0
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/src/stackit/stackitmarketplace/api_client.py +0 -0
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/src/stackit/stackitmarketplace/api_response.py +0 -0
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/src/stackit/stackitmarketplace/configuration.py +0 -0
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/src/stackit/stackitmarketplace/exceptions.py +0 -0
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/src/stackit/stackitmarketplace/models/approve_subscription_payload.py +0 -0
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/src/stackit/stackitmarketplace/models/become_vendor.py +0 -0
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/src/stackit/stackitmarketplace/models/catalog_pricing_option_highlight.py +0 -0
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/src/stackit/stackitmarketplace/models/catalog_product_details_vendor.py +0 -0
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/src/stackit/stackitmarketplace/models/catalog_product_facets_value_inner.py +0 -0
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/src/stackit/stackitmarketplace/models/catalog_product_highlight.py +0 -0
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/src/stackit/stackitmarketplace/models/catalog_product_overview.py +0 -0
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/src/stackit/stackitmarketplace/models/catalog_product_overview_vendor.py +0 -0
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/src/stackit/stackitmarketplace/models/catalog_product_support_resource.py +0 -0
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/src/stackit/stackitmarketplace/models/catalog_product_vendor_terms.py +0 -0
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/src/stackit/stackitmarketplace/models/contact_sales.py +0 -0
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/src/stackit/stackitmarketplace/models/delivery_method.py +0 -0
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/src/stackit/stackitmarketplace/models/error_response.py +0 -0
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/src/stackit/stackitmarketplace/models/inquiries_create_inquiry_payload.py +0 -0
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/src/stackit/stackitmarketplace/models/inquiry_become_vendor.py +0 -0
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/src/stackit/stackitmarketplace/models/inquiry_contact_sales.py +0 -0
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/src/stackit/stackitmarketplace/models/inquiry_form_type.py +0 -0
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/src/stackit/stackitmarketplace/models/inquiry_register_testing.py +0 -0
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/src/stackit/stackitmarketplace/models/inquiry_suggest_product.py +0 -0
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/src/stackit/stackitmarketplace/models/list_catalog_products_response.py +0 -0
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/src/stackit/stackitmarketplace/models/list_vendor_subscriptions_response.py +0 -0
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/src/stackit/stackitmarketplace/models/offer_type.py +0 -0
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/src/stackit/stackitmarketplace/models/price_type.py +0 -0
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/src/stackit/stackitmarketplace/models/pricing_option_unit.py +0 -0
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/src/stackit/stackitmarketplace/models/product_lifecycle_state.py +0 -0
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/src/stackit/stackitmarketplace/models/register_testing.py +0 -0
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/src/stackit/stackitmarketplace/models/resolve_customer_payload.py +0 -0
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/src/stackit/stackitmarketplace/models/subscription_lifecycle_state.py +0 -0
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/src/stackit/stackitmarketplace/models/suggest_product.py +0 -0
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/src/stackit/stackitmarketplace/models/vendor_subscription.py +0 -0
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/src/stackit/stackitmarketplace/py.typed +0 -0
- {stackit_stackitmarketplace-1.4.0 → stackit_stackitmarketplace-1.5.0}/src/stackit/stackitmarketplace/rest.py +0 -0
|
@@ -37,6 +37,7 @@ from stackit.stackitmarketplace.exceptions import (
|
|
|
37
37
|
from stackit.stackitmarketplace.models.approve_subscription_payload import (
|
|
38
38
|
ApproveSubscriptionPayload,
|
|
39
39
|
)
|
|
40
|
+
from stackit.stackitmarketplace.models.assets import Assets
|
|
40
41
|
from stackit.stackitmarketplace.models.become_vendor import BecomeVendor
|
|
41
42
|
from stackit.stackitmarketplace.models.catalog_pricing_option_highlight import (
|
|
42
43
|
CatalogPricingOptionHighlight,
|
|
@@ -89,6 +90,8 @@ from stackit.stackitmarketplace.models.list_catalog_products_response import (
|
|
|
89
90
|
from stackit.stackitmarketplace.models.list_vendor_subscriptions_response import (
|
|
90
91
|
ListVendorSubscriptionsResponse,
|
|
91
92
|
)
|
|
93
|
+
from stackit.stackitmarketplace.models.localized_version import LocalizedVersion
|
|
94
|
+
from stackit.stackitmarketplace.models.notice_period import NoticePeriod
|
|
92
95
|
from stackit.stackitmarketplace.models.offer_type import OfferType
|
|
93
96
|
from stackit.stackitmarketplace.models.price_type import PriceType
|
|
94
97
|
from stackit.stackitmarketplace.models.pricing_option_unit import PricingOptionUnit
|
|
@@ -99,6 +102,7 @@ from stackit.stackitmarketplace.models.register_testing import RegisterTesting
|
|
|
99
102
|
from stackit.stackitmarketplace.models.resolve_customer_payload import (
|
|
100
103
|
ResolveCustomerPayload,
|
|
101
104
|
)
|
|
105
|
+
from stackit.stackitmarketplace.models.service_certificate import ServiceCertificate
|
|
102
106
|
from stackit.stackitmarketplace.models.subscription_lifecycle_state import (
|
|
103
107
|
SubscriptionLifecycleState,
|
|
104
108
|
)
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
from stackit.stackitmarketplace.models.approve_subscription_payload import (
|
|
19
19
|
ApproveSubscriptionPayload,
|
|
20
20
|
)
|
|
21
|
+
from stackit.stackitmarketplace.models.assets import Assets
|
|
21
22
|
from stackit.stackitmarketplace.models.become_vendor import BecomeVendor
|
|
22
23
|
from stackit.stackitmarketplace.models.catalog_pricing_option_highlight import (
|
|
23
24
|
CatalogPricingOptionHighlight,
|
|
@@ -70,6 +71,8 @@ from stackit.stackitmarketplace.models.list_catalog_products_response import (
|
|
|
70
71
|
from stackit.stackitmarketplace.models.list_vendor_subscriptions_response import (
|
|
71
72
|
ListVendorSubscriptionsResponse,
|
|
72
73
|
)
|
|
74
|
+
from stackit.stackitmarketplace.models.localized_version import LocalizedVersion
|
|
75
|
+
from stackit.stackitmarketplace.models.notice_period import NoticePeriod
|
|
73
76
|
from stackit.stackitmarketplace.models.offer_type import OfferType
|
|
74
77
|
from stackit.stackitmarketplace.models.price_type import PriceType
|
|
75
78
|
from stackit.stackitmarketplace.models.pricing_option_unit import PricingOptionUnit
|
|
@@ -80,6 +83,7 @@ from stackit.stackitmarketplace.models.register_testing import RegisterTesting
|
|
|
80
83
|
from stackit.stackitmarketplace.models.resolve_customer_payload import (
|
|
81
84
|
ResolveCustomerPayload,
|
|
82
85
|
)
|
|
86
|
+
from stackit.stackitmarketplace.models.service_certificate import ServiceCertificate
|
|
83
87
|
from stackit.stackitmarketplace.models.subscription_lifecycle_state import (
|
|
84
88
|
SubscriptionLifecycleState,
|
|
85
89
|
)
|
|
@@ -0,0 +1,95 @@
|
|
|
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 docstring might be too long
|
|
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, Field
|
|
22
|
+
from typing_extensions import Self
|
|
23
|
+
|
|
24
|
+
from stackit.stackitmarketplace.models.service_certificate import ServiceCertificate
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class Assets(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
The assets associated with the product.
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
service_certificate: Optional[ServiceCertificate] = Field(default=None, alias="serviceCertificate")
|
|
33
|
+
__properties: ClassVar[List[str]] = ["serviceCertificate"]
|
|
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 Assets 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 service_certificate
|
|
73
|
+
if self.service_certificate:
|
|
74
|
+
_dict["serviceCertificate"] = self.service_certificate.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 Assets 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
|
+
{
|
|
88
|
+
"serviceCertificate": (
|
|
89
|
+
ServiceCertificate.from_dict(obj["serviceCertificate"])
|
|
90
|
+
if obj.get("serviceCertificate") is not None
|
|
91
|
+
else None
|
|
92
|
+
)
|
|
93
|
+
}
|
|
94
|
+
)
|
|
95
|
+
return _obj
|
|
@@ -30,6 +30,7 @@ from pydantic import (
|
|
|
30
30
|
)
|
|
31
31
|
from typing_extensions import Annotated, Self
|
|
32
32
|
|
|
33
|
+
from stackit.stackitmarketplace.models.assets import Assets
|
|
33
34
|
from stackit.stackitmarketplace.models.catalog_product_details_vendor import (
|
|
34
35
|
CatalogProductDetailsVendor,
|
|
35
36
|
)
|
|
@@ -57,6 +58,7 @@ class CatalogProductDetail(BaseModel):
|
|
|
57
58
|
CatalogProductDetail
|
|
58
59
|
"""
|
|
59
60
|
|
|
61
|
+
assets: Optional[Assets] = None
|
|
60
62
|
categories: Optional[List[StrictStr]] = Field(
|
|
61
63
|
default=None, description="The list of categories associated to the product."
|
|
62
64
|
)
|
|
@@ -103,6 +105,7 @@ class CatalogProductDetail(BaseModel):
|
|
|
103
105
|
description="The video URL.", alias="videoUrl"
|
|
104
106
|
)
|
|
105
107
|
__properties: ClassVar[List[str]] = [
|
|
108
|
+
"assets",
|
|
106
109
|
"categories",
|
|
107
110
|
"deliveryMethod",
|
|
108
111
|
"description",
|
|
@@ -207,6 +210,9 @@ class CatalogProductDetail(BaseModel):
|
|
|
207
210
|
exclude=excluded_fields,
|
|
208
211
|
exclude_none=True,
|
|
209
212
|
)
|
|
213
|
+
# override the default output from pydantic by calling `to_dict()` of assets
|
|
214
|
+
if self.assets:
|
|
215
|
+
_dict["assets"] = self.assets.to_dict()
|
|
210
216
|
# override the default output from pydantic by calling `to_dict()` of each item in highlights (list)
|
|
211
217
|
_items = []
|
|
212
218
|
if self.highlights:
|
|
@@ -251,6 +257,7 @@ class CatalogProductDetail(BaseModel):
|
|
|
251
257
|
|
|
252
258
|
_obj = cls.model_validate(
|
|
253
259
|
{
|
|
260
|
+
"assets": Assets.from_dict(obj["assets"]) if obj.get("assets") is not None else None,
|
|
254
261
|
"categories": obj.get("categories"),
|
|
255
262
|
"deliveryMethod": obj.get("deliveryMethod"),
|
|
256
263
|
"description": obj.get("description"),
|
|
@@ -24,6 +24,7 @@ from typing_extensions import Self
|
|
|
24
24
|
from stackit.stackitmarketplace.models.catalog_pricing_option_highlight import (
|
|
25
25
|
CatalogPricingOptionHighlight,
|
|
26
26
|
)
|
|
27
|
+
from stackit.stackitmarketplace.models.notice_period import NoticePeriod
|
|
27
28
|
from stackit.stackitmarketplace.models.price_type import PriceType
|
|
28
29
|
from stackit.stackitmarketplace.models.pricing_option_unit import PricingOptionUnit
|
|
29
30
|
|
|
@@ -36,6 +37,7 @@ class CatalogProductPricingOption(BaseModel):
|
|
|
36
37
|
description: StrictStr = Field(description="The pricing option description.")
|
|
37
38
|
highlights: List[CatalogPricingOptionHighlight] = Field(description="The list of highlights.")
|
|
38
39
|
name: StrictStr = Field(description="The pricing option name.")
|
|
40
|
+
notice_period: Optional[NoticePeriod] = Field(default=None, alias="noticePeriod")
|
|
39
41
|
price_type: Optional[PriceType] = Field(default=None, alias="priceType")
|
|
40
42
|
pricing_plan: Optional[StrictStr] = Field(
|
|
41
43
|
default=None, description="Additional price type information.", alias="pricingPlan"
|
|
@@ -51,6 +53,7 @@ class CatalogProductPricingOption(BaseModel):
|
|
|
51
53
|
"description",
|
|
52
54
|
"highlights",
|
|
53
55
|
"name",
|
|
56
|
+
"noticePeriod",
|
|
54
57
|
"priceType",
|
|
55
58
|
"pricingPlan",
|
|
56
59
|
"rate",
|
|
@@ -104,6 +107,9 @@ class CatalogProductPricingOption(BaseModel):
|
|
|
104
107
|
if _item:
|
|
105
108
|
_items.append(_item.to_dict())
|
|
106
109
|
_dict["highlights"] = _items
|
|
110
|
+
# override the default output from pydantic by calling `to_dict()` of notice_period
|
|
111
|
+
if self.notice_period:
|
|
112
|
+
_dict["noticePeriod"] = self.notice_period.to_dict()
|
|
107
113
|
return _dict
|
|
108
114
|
|
|
109
115
|
@classmethod
|
|
@@ -124,6 +130,9 @@ class CatalogProductPricingOption(BaseModel):
|
|
|
124
130
|
else None
|
|
125
131
|
),
|
|
126
132
|
"name": obj.get("name"),
|
|
133
|
+
"noticePeriod": (
|
|
134
|
+
NoticePeriod.from_dict(obj["noticePeriod"]) if obj.get("noticePeriod") is not None else None
|
|
135
|
+
),
|
|
127
136
|
"priceType": obj.get("priceType"),
|
|
128
137
|
"pricingPlan": obj.get("pricingPlan"),
|
|
129
138
|
"rate": obj.get("rate"),
|
|
@@ -0,0 +1,112 @@
|
|
|
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 docstring might be too long
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
|
|
17
|
+
import json
|
|
18
|
+
import pprint
|
|
19
|
+
import re
|
|
20
|
+
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
21
|
+
|
|
22
|
+
from pydantic import BaseModel, ConfigDict, Field, field_validator
|
|
23
|
+
from typing_extensions import Annotated, Self
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class LocalizedVersion(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
The localized version (file name) of a file.
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
de: Optional[Annotated[str, Field(strict=True)]] = Field(
|
|
32
|
+
default=None, description="The file version matching the file name (localized)."
|
|
33
|
+
)
|
|
34
|
+
en: Optional[Annotated[str, Field(strict=True)]] = Field(
|
|
35
|
+
default=None, description="The file version matching the file name (localized)."
|
|
36
|
+
)
|
|
37
|
+
__properties: ClassVar[List[str]] = ["de", "en"]
|
|
38
|
+
|
|
39
|
+
@field_validator("de")
|
|
40
|
+
def de_validate_regular_expression(cls, value):
|
|
41
|
+
"""Validates the regular expression"""
|
|
42
|
+
if value is None:
|
|
43
|
+
return value
|
|
44
|
+
|
|
45
|
+
if not re.match(r"^\d{4}_\d{2}_\d{2}_\d{3}_[a-zA-Z0-9_-]+_(DE|EN)\.$", value):
|
|
46
|
+
raise ValueError(
|
|
47
|
+
r"must validate the regular expression /^\d{4}_\d{2}_\d{2}_\d{3}_[a-zA-Z0-9_-]+_(DE|EN)\.$/"
|
|
48
|
+
)
|
|
49
|
+
return value
|
|
50
|
+
|
|
51
|
+
@field_validator("en")
|
|
52
|
+
def en_validate_regular_expression(cls, value):
|
|
53
|
+
"""Validates the regular expression"""
|
|
54
|
+
if value is None:
|
|
55
|
+
return value
|
|
56
|
+
|
|
57
|
+
if not re.match(r"^\d{4}_\d{2}_\d{2}_\d{3}_[a-zA-Z0-9_-]+_(DE|EN)\.$", value):
|
|
58
|
+
raise ValueError(
|
|
59
|
+
r"must validate the regular expression /^\d{4}_\d{2}_\d{2}_\d{3}_[a-zA-Z0-9_-]+_(DE|EN)\.$/"
|
|
60
|
+
)
|
|
61
|
+
return value
|
|
62
|
+
|
|
63
|
+
model_config = ConfigDict(
|
|
64
|
+
populate_by_name=True,
|
|
65
|
+
validate_assignment=True,
|
|
66
|
+
protected_namespaces=(),
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
def to_str(self) -> str:
|
|
70
|
+
"""Returns the string representation of the model using alias"""
|
|
71
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
72
|
+
|
|
73
|
+
def to_json(self) -> str:
|
|
74
|
+
"""Returns the JSON representation of the model using alias"""
|
|
75
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
76
|
+
return json.dumps(self.to_dict())
|
|
77
|
+
|
|
78
|
+
@classmethod
|
|
79
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
80
|
+
"""Create an instance of LocalizedVersion from a JSON string"""
|
|
81
|
+
return cls.from_dict(json.loads(json_str))
|
|
82
|
+
|
|
83
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
84
|
+
"""Return the dictionary representation of the model using alias.
|
|
85
|
+
|
|
86
|
+
This has the following differences from calling pydantic's
|
|
87
|
+
`self.model_dump(by_alias=True)`:
|
|
88
|
+
|
|
89
|
+
* `None` is only added to the output dict for nullable fields that
|
|
90
|
+
were set at model initialization. Other fields with value `None`
|
|
91
|
+
are ignored.
|
|
92
|
+
"""
|
|
93
|
+
excluded_fields: Set[str] = set([])
|
|
94
|
+
|
|
95
|
+
_dict = self.model_dump(
|
|
96
|
+
by_alias=True,
|
|
97
|
+
exclude=excluded_fields,
|
|
98
|
+
exclude_none=True,
|
|
99
|
+
)
|
|
100
|
+
return _dict
|
|
101
|
+
|
|
102
|
+
@classmethod
|
|
103
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
104
|
+
"""Create an instance of LocalizedVersion from a dict"""
|
|
105
|
+
if obj is None:
|
|
106
|
+
return None
|
|
107
|
+
|
|
108
|
+
if not isinstance(obj, dict):
|
|
109
|
+
return cls.model_validate(obj)
|
|
110
|
+
|
|
111
|
+
_obj = cls.model_validate({"de": obj.get("de"), "en": obj.get("en")})
|
|
112
|
+
return _obj
|
|
@@ -0,0 +1,95 @@
|
|
|
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 docstring might be too long
|
|
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, Field, StrictInt, StrictStr, field_validator
|
|
22
|
+
from typing_extensions import Self
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class NoticePeriod(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
The notice period for a product and plan.
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
type: Optional[StrictStr] = Field(default=None, description="The notice period type.")
|
|
31
|
+
value: Optional[StrictInt] = Field(
|
|
32
|
+
default=None, description="The value of the corresponding type. Omitted for _SAME_DAY_."
|
|
33
|
+
)
|
|
34
|
+
__properties: ClassVar[List[str]] = ["type", "value"]
|
|
35
|
+
|
|
36
|
+
@field_validator("type")
|
|
37
|
+
def type_validate_enum(cls, value):
|
|
38
|
+
"""Validates the enum"""
|
|
39
|
+
if value is None:
|
|
40
|
+
return value
|
|
41
|
+
|
|
42
|
+
if value not in set(["SAME_DAY", "DAYS", "MONTHS"]):
|
|
43
|
+
raise ValueError("must be one of enum values ('SAME_DAY', 'DAYS', 'MONTHS')")
|
|
44
|
+
return value
|
|
45
|
+
|
|
46
|
+
model_config = ConfigDict(
|
|
47
|
+
populate_by_name=True,
|
|
48
|
+
validate_assignment=True,
|
|
49
|
+
protected_namespaces=(),
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
def to_str(self) -> str:
|
|
53
|
+
"""Returns the string representation of the model using alias"""
|
|
54
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
55
|
+
|
|
56
|
+
def to_json(self) -> str:
|
|
57
|
+
"""Returns the JSON representation of the model using alias"""
|
|
58
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
59
|
+
return json.dumps(self.to_dict())
|
|
60
|
+
|
|
61
|
+
@classmethod
|
|
62
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
63
|
+
"""Create an instance of NoticePeriod from a JSON string"""
|
|
64
|
+
return cls.from_dict(json.loads(json_str))
|
|
65
|
+
|
|
66
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
67
|
+
"""Return the dictionary representation of the model using alias.
|
|
68
|
+
|
|
69
|
+
This has the following differences from calling pydantic's
|
|
70
|
+
`self.model_dump(by_alias=True)`:
|
|
71
|
+
|
|
72
|
+
* `None` is only added to the output dict for nullable fields that
|
|
73
|
+
were set at model initialization. Other fields with value `None`
|
|
74
|
+
are ignored.
|
|
75
|
+
"""
|
|
76
|
+
excluded_fields: Set[str] = set([])
|
|
77
|
+
|
|
78
|
+
_dict = self.model_dump(
|
|
79
|
+
by_alias=True,
|
|
80
|
+
exclude=excluded_fields,
|
|
81
|
+
exclude_none=True,
|
|
82
|
+
)
|
|
83
|
+
return _dict
|
|
84
|
+
|
|
85
|
+
@classmethod
|
|
86
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
87
|
+
"""Create an instance of NoticePeriod from a dict"""
|
|
88
|
+
if obj is None:
|
|
89
|
+
return None
|
|
90
|
+
|
|
91
|
+
if not isinstance(obj, dict):
|
|
92
|
+
return cls.model_validate(obj)
|
|
93
|
+
|
|
94
|
+
_obj = cls.model_validate({"type": obj.get("type"), "value": obj.get("value")})
|
|
95
|
+
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 docstring might be too long
|
|
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 ServiceCertificate(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
The related service certificate of the (subscription) product.
|
|
30
|
+
"""
|
|
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 ServiceCertificate 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 ServiceCertificate 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
|
|
@@ -22,6 +22,7 @@ from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
|
22
22
|
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
23
23
|
from typing_extensions import Annotated, Self
|
|
24
24
|
|
|
25
|
+
from stackit.stackitmarketplace.models.assets import Assets
|
|
25
26
|
from stackit.stackitmarketplace.models.delivery_method import DeliveryMethod
|
|
26
27
|
from stackit.stackitmarketplace.models.price_type import PriceType
|
|
27
28
|
from stackit.stackitmarketplace.models.product_lifecycle_state import (
|
|
@@ -34,6 +35,7 @@ class SubscriptionProduct(BaseModel):
|
|
|
34
35
|
The product of a subscription
|
|
35
36
|
"""
|
|
36
37
|
|
|
38
|
+
assets: Optional[Assets] = None
|
|
37
39
|
delivery_method: DeliveryMethod = Field(alias="deliveryMethod")
|
|
38
40
|
lifecycle_state: ProductLifecycleState = Field(alias="lifecycleState")
|
|
39
41
|
price_type: PriceType = Field(alias="priceType")
|
|
@@ -57,6 +59,7 @@ class SubscriptionProduct(BaseModel):
|
|
|
57
59
|
description="The vendor's website.", alias="vendorWebsiteUrl"
|
|
58
60
|
)
|
|
59
61
|
__properties: ClassVar[List[str]] = [
|
|
62
|
+
"assets",
|
|
60
63
|
"deliveryMethod",
|
|
61
64
|
"lifecycleState",
|
|
62
65
|
"priceType",
|
|
@@ -156,6 +159,9 @@ class SubscriptionProduct(BaseModel):
|
|
|
156
159
|
exclude=excluded_fields,
|
|
157
160
|
exclude_none=True,
|
|
158
161
|
)
|
|
162
|
+
# override the default output from pydantic by calling `to_dict()` of assets
|
|
163
|
+
if self.assets:
|
|
164
|
+
_dict["assets"] = self.assets.to_dict()
|
|
159
165
|
return _dict
|
|
160
166
|
|
|
161
167
|
@classmethod
|
|
@@ -169,6 +175,7 @@ class SubscriptionProduct(BaseModel):
|
|
|
169
175
|
|
|
170
176
|
_obj = cls.model_validate(
|
|
171
177
|
{
|
|
178
|
+
"assets": Assets.from_dict(obj["assets"]) if obj.get("assets") is not None else None,
|
|
172
179
|
"deliveryMethod": obj.get("deliveryMethod"),
|
|
173
180
|
"lifecycleState": obj.get("lifecycleState"),
|
|
174
181
|
"priceType": obj.get("priceType"),
|
|
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
|