stackit-stackitmarketplace 1.8.0__tar.gz → 1.10.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.8.0 → stackit_stackitmarketplace-1.10.0}/PKG-INFO +1 -1
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/pyproject.toml +1 -1
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/__init__.py +8 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/api/default_api.py +3 -3
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/models/__init__.py +4 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/models/catalog_product_pricing_option.py +15 -2
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/models/inquiries_create_inquiry_payload.py +40 -8
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/models/inquiry_form_type.py +1 -0
- stackit_stackitmarketplace-1.10.0/src/stackit/stackitmarketplace/models/inquiry_request_private_plan.py +129 -0
- stackit_stackitmarketplace-1.10.0/src/stackit/stackitmarketplace/models/request_private_plan.py +100 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/models/subscription_product.py +12 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/LICENSE.md +0 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/NOTICE.txt +0 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/README.md +0 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/api/__init__.py +0 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/api_client.py +0 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/api_response.py +0 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/configuration.py +0 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/exceptions.py +0 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/models/approve_subscription_payload.py +0 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/models/assets.py +0 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/models/become_vendor.py +0 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/models/catalog_pricing_option_highlight.py +0 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/models/catalog_product_detail.py +0 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/models/catalog_product_details_vendor.py +0 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/models/catalog_product_facets_value_inner.py +0 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/models/catalog_product_highlight.py +0 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/models/catalog_product_overview.py +0 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/models/catalog_product_overview_vendor.py +0 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/models/catalog_product_support_resource.py +0 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/models/catalog_product_vendor_terms.py +0 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/models/contact_sales.py +0 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/models/delivery_method.py +0 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/models/error_response.py +0 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/models/free_trial.py +0 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/models/inquiry_become_vendor.py +0 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/models/inquiry_contact_sales.py +0 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/models/inquiry_register_testing.py +0 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/models/inquiry_suggest_product.py +0 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/models/list_catalog_products_response.py +0 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/models/list_vendor_subscriptions_response.py +0 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/models/localized_version.py +0 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/models/notice_period.py +0 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/models/offer_type.py +0 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/models/price_type.py +0 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/models/pricing_option_unit.py +0 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/models/product_lifecycle_state.py +0 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/models/register_testing.py +0 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/models/resolve_customer_payload.py +0 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/models/service_certificate.py +0 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/models/subscription_lifecycle_state.py +0 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/models/suggest_product.py +0 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/models/vendor_subscription.py +0 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/py.typed +0 -0
- {stackit_stackitmarketplace-1.8.0 → stackit_stackitmarketplace-1.10.0}/src/stackit/stackitmarketplace/rest.py +0 -0
|
@@ -51,6 +51,7 @@ __all__ = [
|
|
|
51
51
|
"InquiryContactSales",
|
|
52
52
|
"InquiryFormType",
|
|
53
53
|
"InquiryRegisterTesting",
|
|
54
|
+
"InquiryRequestPrivatePlan",
|
|
54
55
|
"InquirySuggestProduct",
|
|
55
56
|
"ListCatalogProductsResponse",
|
|
56
57
|
"ListVendorSubscriptionsResponse",
|
|
@@ -61,6 +62,7 @@ __all__ = [
|
|
|
61
62
|
"PricingOptionUnit",
|
|
62
63
|
"ProductLifecycleState",
|
|
63
64
|
"RegisterTesting",
|
|
65
|
+
"RequestPrivatePlan",
|
|
64
66
|
"ResolveCustomerPayload",
|
|
65
67
|
"ServiceCertificate",
|
|
66
68
|
"SubscriptionLifecycleState",
|
|
@@ -144,6 +146,9 @@ from stackit.stackitmarketplace.models.inquiry_form_type import (
|
|
|
144
146
|
from stackit.stackitmarketplace.models.inquiry_register_testing import (
|
|
145
147
|
InquiryRegisterTesting as InquiryRegisterTesting,
|
|
146
148
|
)
|
|
149
|
+
from stackit.stackitmarketplace.models.inquiry_request_private_plan import (
|
|
150
|
+
InquiryRequestPrivatePlan as InquiryRequestPrivatePlan,
|
|
151
|
+
)
|
|
147
152
|
from stackit.stackitmarketplace.models.inquiry_suggest_product import (
|
|
148
153
|
InquirySuggestProduct as InquirySuggestProduct,
|
|
149
154
|
)
|
|
@@ -168,6 +173,9 @@ from stackit.stackitmarketplace.models.product_lifecycle_state import (
|
|
|
168
173
|
from stackit.stackitmarketplace.models.register_testing import (
|
|
169
174
|
RegisterTesting as RegisterTesting,
|
|
170
175
|
)
|
|
176
|
+
from stackit.stackitmarketplace.models.request_private_plan import (
|
|
177
|
+
RequestPrivatePlan as RequestPrivatePlan,
|
|
178
|
+
)
|
|
171
179
|
from stackit.stackitmarketplace.models.resolve_customer_payload import (
|
|
172
180
|
ResolveCustomerPayload as ResolveCustomerPayload,
|
|
173
181
|
)
|
|
@@ -873,7 +873,7 @@ class DefaultApi:
|
|
|
873
873
|
) -> None:
|
|
874
874
|
"""Create inquiry
|
|
875
875
|
|
|
876
|
-
Create an inquiry to contact sales, become a vendor, or suggest a product. Requests are limited to 10 per 5 minutes.
|
|
876
|
+
Create an inquiry to contact sales, become a vendor, request a private plan, register for testing, or suggest a product. Requests are limited to 10 per 5 minutes.
|
|
877
877
|
|
|
878
878
|
:param inquiries_create_inquiry_payload: (required)
|
|
879
879
|
:type inquiries_create_inquiry_payload: InquiriesCreateInquiryPayload
|
|
@@ -937,7 +937,7 @@ class DefaultApi:
|
|
|
937
937
|
) -> ApiResponse[None]:
|
|
938
938
|
"""Create inquiry
|
|
939
939
|
|
|
940
|
-
Create an inquiry to contact sales, become a vendor, or suggest a product. Requests are limited to 10 per 5 minutes.
|
|
940
|
+
Create an inquiry to contact sales, become a vendor, request a private plan, register for testing, or suggest a product. Requests are limited to 10 per 5 minutes.
|
|
941
941
|
|
|
942
942
|
:param inquiries_create_inquiry_payload: (required)
|
|
943
943
|
:type inquiries_create_inquiry_payload: InquiriesCreateInquiryPayload
|
|
@@ -1001,7 +1001,7 @@ class DefaultApi:
|
|
|
1001
1001
|
) -> RESTResponseType:
|
|
1002
1002
|
"""Create inquiry
|
|
1003
1003
|
|
|
1004
|
-
Create an inquiry to contact sales, become a vendor, or suggest a product. Requests are limited to 10 per 5 minutes.
|
|
1004
|
+
Create an inquiry to contact sales, become a vendor, request a private plan, register for testing, or suggest a product. Requests are limited to 10 per 5 minutes.
|
|
1005
1005
|
|
|
1006
1006
|
:param inquiries_create_inquiry_payload: (required)
|
|
1007
1007
|
:type inquiries_create_inquiry_payload: InquiriesCreateInquiryPayload
|
|
@@ -63,6 +63,9 @@ from stackit.stackitmarketplace.models.inquiry_form_type import InquiryFormType
|
|
|
63
63
|
from stackit.stackitmarketplace.models.inquiry_register_testing import (
|
|
64
64
|
InquiryRegisterTesting,
|
|
65
65
|
)
|
|
66
|
+
from stackit.stackitmarketplace.models.inquiry_request_private_plan import (
|
|
67
|
+
InquiryRequestPrivatePlan,
|
|
68
|
+
)
|
|
66
69
|
from stackit.stackitmarketplace.models.inquiry_suggest_product import (
|
|
67
70
|
InquirySuggestProduct,
|
|
68
71
|
)
|
|
@@ -81,6 +84,7 @@ from stackit.stackitmarketplace.models.product_lifecycle_state import (
|
|
|
81
84
|
ProductLifecycleState,
|
|
82
85
|
)
|
|
83
86
|
from stackit.stackitmarketplace.models.register_testing import RegisterTesting
|
|
87
|
+
from stackit.stackitmarketplace.models.request_private_plan import RequestPrivatePlan
|
|
84
88
|
from stackit.stackitmarketplace.models.resolve_customer_payload import (
|
|
85
89
|
ResolveCustomerPayload,
|
|
86
90
|
)
|
|
@@ -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 typing import Any, ClassVar, Dict, List, Optional, Set
|
|
20
21
|
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
|
-
from typing_extensions import Self
|
|
22
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
23
|
+
from typing_extensions import Annotated, Self
|
|
23
24
|
|
|
24
25
|
from stackit.stackitmarketplace.models.catalog_pricing_option_highlight import (
|
|
25
26
|
CatalogPricingOptionHighlight,
|
|
@@ -38,6 +39,9 @@ class CatalogProductPricingOption(BaseModel):
|
|
|
38
39
|
highlights: List[CatalogPricingOptionHighlight] = Field(description="The list of highlights.")
|
|
39
40
|
name: StrictStr = Field(description="The pricing option name.")
|
|
40
41
|
notice_period: Optional[NoticePeriod] = Field(default=None, alias="noticePeriod")
|
|
42
|
+
plan_id: Annotated[str, Field(min_length=10, strict=True, max_length=29)] = Field(
|
|
43
|
+
description="The user-readable plan ID of a pricing option.", alias="planId"
|
|
44
|
+
)
|
|
41
45
|
price_type: Optional[PriceType] = Field(default=None, alias="priceType")
|
|
42
46
|
pricing_plan: Optional[StrictStr] = Field(
|
|
43
47
|
default=None, description="Additional price type information.", alias="pricingPlan"
|
|
@@ -54,6 +58,7 @@ class CatalogProductPricingOption(BaseModel):
|
|
|
54
58
|
"highlights",
|
|
55
59
|
"name",
|
|
56
60
|
"noticePeriod",
|
|
61
|
+
"planId",
|
|
57
62
|
"priceType",
|
|
58
63
|
"pricingPlan",
|
|
59
64
|
"rate",
|
|
@@ -63,6 +68,13 @@ class CatalogProductPricingOption(BaseModel):
|
|
|
63
68
|
"unit",
|
|
64
69
|
]
|
|
65
70
|
|
|
71
|
+
@field_validator("plan_id")
|
|
72
|
+
def plan_id_validate_regular_expression(cls, value):
|
|
73
|
+
"""Validates the regular expression"""
|
|
74
|
+
if not re.match(r"^[a-z0-9-]{1,20}-[0-9a-f]{8}$", value):
|
|
75
|
+
raise ValueError(r"must validate the regular expression /^[a-z0-9-]{1,20}-[0-9a-f]{8}$/")
|
|
76
|
+
return value
|
|
77
|
+
|
|
66
78
|
model_config = ConfigDict(
|
|
67
79
|
populate_by_name=True,
|
|
68
80
|
validate_assignment=True,
|
|
@@ -133,6 +145,7 @@ class CatalogProductPricingOption(BaseModel):
|
|
|
133
145
|
"noticePeriod": (
|
|
134
146
|
NoticePeriod.from_dict(obj["noticePeriod"]) if obj.get("noticePeriod") is not None else None
|
|
135
147
|
),
|
|
148
|
+
"planId": obj.get("planId"),
|
|
136
149
|
"priceType": obj.get("priceType"),
|
|
137
150
|
"pricingPlan": obj.get("pricingPlan"),
|
|
138
151
|
"rate": obj.get("rate"),
|
|
@@ -29,10 +29,17 @@ from typing_extensions import Self
|
|
|
29
29
|
from stackit.stackitmarketplace.models.become_vendor import BecomeVendor
|
|
30
30
|
from stackit.stackitmarketplace.models.contact_sales import ContactSales
|
|
31
31
|
from stackit.stackitmarketplace.models.register_testing import RegisterTesting
|
|
32
|
+
from stackit.stackitmarketplace.models.request_private_plan import RequestPrivatePlan
|
|
32
33
|
from stackit.stackitmarketplace.models.suggest_product import SuggestProduct
|
|
33
34
|
|
|
34
35
|
|
|
35
|
-
INQUIRIESCREATEINQUIRYPAYLOAD_ONE_OF_SCHEMAS = [
|
|
36
|
+
INQUIRIESCREATEINQUIRYPAYLOAD_ONE_OF_SCHEMAS = [
|
|
37
|
+
"BecomeVendor",
|
|
38
|
+
"ContactSales",
|
|
39
|
+
"RegisterTesting",
|
|
40
|
+
"RequestPrivatePlan",
|
|
41
|
+
"SuggestProduct",
|
|
42
|
+
]
|
|
36
43
|
|
|
37
44
|
|
|
38
45
|
class InquiriesCreateInquiryPayload(BaseModel):
|
|
@@ -46,10 +53,20 @@ class InquiriesCreateInquiryPayload(BaseModel):
|
|
|
46
53
|
oneof_schema_2_validator: Optional[ContactSales] = None
|
|
47
54
|
# data type: BecomeVendor
|
|
48
55
|
oneof_schema_3_validator: Optional[BecomeVendor] = None
|
|
56
|
+
# data type: RequestPrivatePlan
|
|
57
|
+
oneof_schema_4_validator: Optional[RequestPrivatePlan] = None
|
|
49
58
|
# data type: RegisterTesting
|
|
50
|
-
|
|
51
|
-
actual_instance: Optional[
|
|
52
|
-
|
|
59
|
+
oneof_schema_5_validator: Optional[RegisterTesting] = None
|
|
60
|
+
actual_instance: Optional[
|
|
61
|
+
Union[BecomeVendor, ContactSales, RegisterTesting, RequestPrivatePlan, SuggestProduct]
|
|
62
|
+
] = None
|
|
63
|
+
one_of_schemas: Set[str] = {
|
|
64
|
+
"BecomeVendor",
|
|
65
|
+
"ContactSales",
|
|
66
|
+
"RegisterTesting",
|
|
67
|
+
"RequestPrivatePlan",
|
|
68
|
+
"SuggestProduct",
|
|
69
|
+
}
|
|
53
70
|
|
|
54
71
|
model_config = ConfigDict(
|
|
55
72
|
validate_assignment=True,
|
|
@@ -86,6 +103,11 @@ class InquiriesCreateInquiryPayload(BaseModel):
|
|
|
86
103
|
error_messages.append(f"Error! Input type `{type(v)}` is not `BecomeVendor`")
|
|
87
104
|
else:
|
|
88
105
|
match += 1
|
|
106
|
+
# validate data type: RequestPrivatePlan
|
|
107
|
+
if not isinstance(v, RequestPrivatePlan):
|
|
108
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `RequestPrivatePlan`")
|
|
109
|
+
else:
|
|
110
|
+
match += 1
|
|
89
111
|
# validate data type: RegisterTesting
|
|
90
112
|
if not isinstance(v, RegisterTesting):
|
|
91
113
|
error_messages.append(f"Error! Input type `{type(v)}` is not `RegisterTesting`")
|
|
@@ -94,7 +116,7 @@ class InquiriesCreateInquiryPayload(BaseModel):
|
|
|
94
116
|
if match == 0:
|
|
95
117
|
# no match
|
|
96
118
|
raise ValueError(
|
|
97
|
-
"No match found when setting `actual_instance` in InquiriesCreateInquiryPayload with oneOf schemas: BecomeVendor, ContactSales, RegisterTesting, SuggestProduct. Details: "
|
|
119
|
+
"No match found when setting `actual_instance` in InquiriesCreateInquiryPayload with oneOf schemas: BecomeVendor, ContactSales, RegisterTesting, RequestPrivatePlan, SuggestProduct. Details: "
|
|
98
120
|
+ ", ".join(error_messages)
|
|
99
121
|
)
|
|
100
122
|
else:
|
|
@@ -129,6 +151,12 @@ class InquiriesCreateInquiryPayload(BaseModel):
|
|
|
129
151
|
match += 1
|
|
130
152
|
except (ValidationError, ValueError) as e:
|
|
131
153
|
error_messages.append(str(e))
|
|
154
|
+
# deserialize data into RequestPrivatePlan
|
|
155
|
+
try:
|
|
156
|
+
instance.actual_instance = RequestPrivatePlan.from_json(json_str)
|
|
157
|
+
match += 1
|
|
158
|
+
except (ValidationError, ValueError) as e:
|
|
159
|
+
error_messages.append(str(e))
|
|
132
160
|
# deserialize data into RegisterTesting
|
|
133
161
|
try:
|
|
134
162
|
instance.actual_instance = RegisterTesting.from_json(json_str)
|
|
@@ -139,13 +167,13 @@ class InquiriesCreateInquiryPayload(BaseModel):
|
|
|
139
167
|
if match > 1:
|
|
140
168
|
# more than 1 match
|
|
141
169
|
raise ValueError(
|
|
142
|
-
"Multiple matches found when deserializing the JSON string into InquiriesCreateInquiryPayload with oneOf schemas: BecomeVendor, ContactSales, RegisterTesting, SuggestProduct. Details: "
|
|
170
|
+
"Multiple matches found when deserializing the JSON string into InquiriesCreateInquiryPayload with oneOf schemas: BecomeVendor, ContactSales, RegisterTesting, RequestPrivatePlan, SuggestProduct. Details: "
|
|
143
171
|
+ ", ".join(error_messages)
|
|
144
172
|
)
|
|
145
173
|
elif match == 0:
|
|
146
174
|
# no match
|
|
147
175
|
raise ValueError(
|
|
148
|
-
"No match found when deserializing the JSON string into InquiriesCreateInquiryPayload with oneOf schemas: BecomeVendor, ContactSales, RegisterTesting, SuggestProduct. Details: "
|
|
176
|
+
"No match found when deserializing the JSON string into InquiriesCreateInquiryPayload with oneOf schemas: BecomeVendor, ContactSales, RegisterTesting, RequestPrivatePlan, SuggestProduct. Details: "
|
|
149
177
|
+ ", ".join(error_messages)
|
|
150
178
|
)
|
|
151
179
|
else:
|
|
@@ -161,7 +189,11 @@ class InquiriesCreateInquiryPayload(BaseModel):
|
|
|
161
189
|
else:
|
|
162
190
|
return json.dumps(self.actual_instance)
|
|
163
191
|
|
|
164
|
-
def to_dict(
|
|
192
|
+
def to_dict(
|
|
193
|
+
self,
|
|
194
|
+
) -> Optional[
|
|
195
|
+
Union[Dict[str, Any], BecomeVendor, ContactSales, RegisterTesting, RequestPrivatePlan, SuggestProduct]
|
|
196
|
+
]:
|
|
165
197
|
"""Returns the dict representation of the actual instance"""
|
|
166
198
|
if self.actual_instance is None:
|
|
167
199
|
return None
|
|
@@ -0,0 +1,129 @@
|
|
|
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
|
+
import re # noqa: F401
|
|
20
|
+
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
21
|
+
|
|
22
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
23
|
+
from typing_extensions import Annotated, Self
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class InquiryRequestPrivatePlan(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
Request a private plan.
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
|
|
31
|
+
company_name: Annotated[str, Field(strict=True, max_length=512)] = Field(
|
|
32
|
+
description="The company name.", alias="companyName"
|
|
33
|
+
)
|
|
34
|
+
contact_email: StrictStr = Field(description="A e-mail address.", alias="contactEmail")
|
|
35
|
+
full_name: Annotated[str, Field(strict=True, max_length=512)] = Field(
|
|
36
|
+
description="The full name of the contact person.", alias="fullName"
|
|
37
|
+
)
|
|
38
|
+
message: Annotated[str, Field(strict=True, max_length=512)] = Field(description="A custom message.")
|
|
39
|
+
product_id: Annotated[str, Field(min_length=10, strict=True, max_length=29)] = Field(
|
|
40
|
+
description="The user-readable product ID.", alias="productId"
|
|
41
|
+
)
|
|
42
|
+
__properties: ClassVar[List[str]] = ["companyName", "contactEmail", "fullName", "message", "productId"]
|
|
43
|
+
|
|
44
|
+
@field_validator("company_name")
|
|
45
|
+
def company_name_validate_regular_expression(cls, value):
|
|
46
|
+
"""Validates the regular expression"""
|
|
47
|
+
if not re.match(r"^[a-zA-ZäüöÄÜÖ0-9,.!?()@\/:=\n\t -]+$", value):
|
|
48
|
+
raise ValueError(r"must validate the regular expression /^[a-zA-ZäüöÄÜÖ0-9,.!?()@\/:=\n\t -]+$/")
|
|
49
|
+
return value
|
|
50
|
+
|
|
51
|
+
@field_validator("full_name")
|
|
52
|
+
def full_name_validate_regular_expression(cls, value):
|
|
53
|
+
"""Validates the regular expression"""
|
|
54
|
+
if not re.match(r"^[a-zA-ZäüöÄÜÖ0-9,.!?()@\/:=\n\t -]+$", value):
|
|
55
|
+
raise ValueError(r"must validate the regular expression /^[a-zA-ZäüöÄÜÖ0-9,.!?()@\/:=\n\t -]+$/")
|
|
56
|
+
return value
|
|
57
|
+
|
|
58
|
+
@field_validator("message")
|
|
59
|
+
def message_validate_regular_expression(cls, value):
|
|
60
|
+
"""Validates the regular expression"""
|
|
61
|
+
if not re.match(r"^[a-zA-ZäüöÄÜÖ0-9,.!?()@\/:=\n\t -]+$", value):
|
|
62
|
+
raise ValueError(r"must validate the regular expression /^[a-zA-ZäüöÄÜÖ0-9,.!?()@\/:=\n\t -]+$/")
|
|
63
|
+
return value
|
|
64
|
+
|
|
65
|
+
@field_validator("product_id")
|
|
66
|
+
def product_id_validate_regular_expression(cls, value):
|
|
67
|
+
"""Validates the regular expression"""
|
|
68
|
+
if not re.match(r"^[a-z0-9-]{1,20}-[0-9a-f]{8}$", value):
|
|
69
|
+
raise ValueError(r"must validate the regular expression /^[a-z0-9-]{1,20}-[0-9a-f]{8}$/")
|
|
70
|
+
return value
|
|
71
|
+
|
|
72
|
+
model_config = ConfigDict(
|
|
73
|
+
populate_by_name=True,
|
|
74
|
+
validate_assignment=True,
|
|
75
|
+
protected_namespaces=(),
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
def to_str(self) -> str:
|
|
79
|
+
"""Returns the string representation of the model using alias"""
|
|
80
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
81
|
+
|
|
82
|
+
def to_json(self) -> str:
|
|
83
|
+
"""Returns the JSON representation of the model using alias"""
|
|
84
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
85
|
+
return json.dumps(self.to_dict())
|
|
86
|
+
|
|
87
|
+
@classmethod
|
|
88
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
89
|
+
"""Create an instance of InquiryRequestPrivatePlan from a JSON string"""
|
|
90
|
+
return cls.from_dict(json.loads(json_str))
|
|
91
|
+
|
|
92
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
93
|
+
"""Return the dictionary representation of the model using alias.
|
|
94
|
+
|
|
95
|
+
This has the following differences from calling pydantic's
|
|
96
|
+
`self.model_dump(by_alias=True)`:
|
|
97
|
+
|
|
98
|
+
* `None` is only added to the output dict for nullable fields that
|
|
99
|
+
were set at model initialization. Other fields with value `None`
|
|
100
|
+
are ignored.
|
|
101
|
+
"""
|
|
102
|
+
excluded_fields: Set[str] = set([])
|
|
103
|
+
|
|
104
|
+
_dict = self.model_dump(
|
|
105
|
+
by_alias=True,
|
|
106
|
+
exclude=excluded_fields,
|
|
107
|
+
exclude_none=True,
|
|
108
|
+
)
|
|
109
|
+
return _dict
|
|
110
|
+
|
|
111
|
+
@classmethod
|
|
112
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
113
|
+
"""Create an instance of InquiryRequestPrivatePlan from a dict"""
|
|
114
|
+
if obj is None:
|
|
115
|
+
return None
|
|
116
|
+
|
|
117
|
+
if not isinstance(obj, dict):
|
|
118
|
+
return cls.model_validate(obj)
|
|
119
|
+
|
|
120
|
+
_obj = cls.model_validate(
|
|
121
|
+
{
|
|
122
|
+
"companyName": obj.get("companyName"),
|
|
123
|
+
"contactEmail": obj.get("contactEmail"),
|
|
124
|
+
"fullName": obj.get("fullName"),
|
|
125
|
+
"message": obj.get("message"),
|
|
126
|
+
"productId": obj.get("productId"),
|
|
127
|
+
}
|
|
128
|
+
)
|
|
129
|
+
return _obj
|
stackit_stackitmarketplace-1.10.0/src/stackit/stackitmarketplace/models/request_private_plan.py
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
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, Field
|
|
22
|
+
from typing_extensions import Self
|
|
23
|
+
|
|
24
|
+
from stackit.stackitmarketplace.models.inquiry_form_type import InquiryFormType
|
|
25
|
+
from stackit.stackitmarketplace.models.inquiry_request_private_plan import (
|
|
26
|
+
InquiryRequestPrivatePlan,
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class RequestPrivatePlan(BaseModel):
|
|
31
|
+
"""
|
|
32
|
+
Request a private plan.
|
|
33
|
+
""" # noqa: E501
|
|
34
|
+
|
|
35
|
+
request_private_plan: InquiryRequestPrivatePlan = Field(alias="requestPrivatePlan")
|
|
36
|
+
type: InquiryFormType
|
|
37
|
+
__properties: ClassVar[List[str]] = ["requestPrivatePlan", "type"]
|
|
38
|
+
|
|
39
|
+
model_config = ConfigDict(
|
|
40
|
+
populate_by_name=True,
|
|
41
|
+
validate_assignment=True,
|
|
42
|
+
protected_namespaces=(),
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
def to_str(self) -> str:
|
|
46
|
+
"""Returns the string representation of the model using alias"""
|
|
47
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
48
|
+
|
|
49
|
+
def to_json(self) -> str:
|
|
50
|
+
"""Returns the JSON representation of the model using alias"""
|
|
51
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
52
|
+
return json.dumps(self.to_dict())
|
|
53
|
+
|
|
54
|
+
@classmethod
|
|
55
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
56
|
+
"""Create an instance of RequestPrivatePlan from a JSON string"""
|
|
57
|
+
return cls.from_dict(json.loads(json_str))
|
|
58
|
+
|
|
59
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
60
|
+
"""Return the dictionary representation of the model using alias.
|
|
61
|
+
|
|
62
|
+
This has the following differences from calling pydantic's
|
|
63
|
+
`self.model_dump(by_alias=True)`:
|
|
64
|
+
|
|
65
|
+
* `None` is only added to the output dict for nullable fields that
|
|
66
|
+
were set at model initialization. Other fields with value `None`
|
|
67
|
+
are ignored.
|
|
68
|
+
"""
|
|
69
|
+
excluded_fields: Set[str] = set([])
|
|
70
|
+
|
|
71
|
+
_dict = self.model_dump(
|
|
72
|
+
by_alias=True,
|
|
73
|
+
exclude=excluded_fields,
|
|
74
|
+
exclude_none=True,
|
|
75
|
+
)
|
|
76
|
+
# override the default output from pydantic by calling `to_dict()` of request_private_plan
|
|
77
|
+
if self.request_private_plan:
|
|
78
|
+
_dict["requestPrivatePlan"] = self.request_private_plan.to_dict()
|
|
79
|
+
return _dict
|
|
80
|
+
|
|
81
|
+
@classmethod
|
|
82
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
83
|
+
"""Create an instance of RequestPrivatePlan from a dict"""
|
|
84
|
+
if obj is None:
|
|
85
|
+
return None
|
|
86
|
+
|
|
87
|
+
if not isinstance(obj, dict):
|
|
88
|
+
return cls.model_validate(obj)
|
|
89
|
+
|
|
90
|
+
_obj = cls.model_validate(
|
|
91
|
+
{
|
|
92
|
+
"requestPrivatePlan": (
|
|
93
|
+
InquiryRequestPrivatePlan.from_dict(obj["requestPrivatePlan"])
|
|
94
|
+
if obj.get("requestPrivatePlan") is not None
|
|
95
|
+
else None
|
|
96
|
+
),
|
|
97
|
+
"type": obj.get("type"),
|
|
98
|
+
}
|
|
99
|
+
)
|
|
100
|
+
return _obj
|
|
@@ -38,6 +38,9 @@ class SubscriptionProduct(BaseModel):
|
|
|
38
38
|
assets: Optional[Assets] = None
|
|
39
39
|
delivery_method: DeliveryMethod = Field(alias="deliveryMethod")
|
|
40
40
|
lifecycle_state: ProductLifecycleState = Field(alias="lifecycleState")
|
|
41
|
+
plan_id: Annotated[str, Field(min_length=10, strict=True, max_length=29)] = Field(
|
|
42
|
+
description="The user-readable plan ID of a pricing option.", alias="planId"
|
|
43
|
+
)
|
|
41
44
|
price_type: PriceType = Field(alias="priceType")
|
|
42
45
|
pricing_plan: StrictStr = Field(description="Additional price type information.", alias="pricingPlan")
|
|
43
46
|
product_id: Annotated[str, Field(min_length=10, strict=True, max_length=29)] = Field(
|
|
@@ -62,6 +65,7 @@ class SubscriptionProduct(BaseModel):
|
|
|
62
65
|
"assets",
|
|
63
66
|
"deliveryMethod",
|
|
64
67
|
"lifecycleState",
|
|
68
|
+
"planId",
|
|
65
69
|
"priceType",
|
|
66
70
|
"pricingPlan",
|
|
67
71
|
"productId",
|
|
@@ -72,6 +76,13 @@ class SubscriptionProduct(BaseModel):
|
|
|
72
76
|
"vendorWebsiteUrl",
|
|
73
77
|
]
|
|
74
78
|
|
|
79
|
+
@field_validator("plan_id")
|
|
80
|
+
def plan_id_validate_regular_expression(cls, value):
|
|
81
|
+
"""Validates the regular expression"""
|
|
82
|
+
if not re.match(r"^[a-z0-9-]{1,20}-[0-9a-f]{8}$", value):
|
|
83
|
+
raise ValueError(r"must validate the regular expression /^[a-z0-9-]{1,20}-[0-9a-f]{8}$/")
|
|
84
|
+
return value
|
|
85
|
+
|
|
75
86
|
@field_validator("product_id")
|
|
76
87
|
def product_id_validate_regular_expression(cls, value):
|
|
77
88
|
"""Validates the regular expression"""
|
|
@@ -178,6 +189,7 @@ class SubscriptionProduct(BaseModel):
|
|
|
178
189
|
"assets": Assets.from_dict(obj["assets"]) if obj.get("assets") is not None else None,
|
|
179
190
|
"deliveryMethod": obj.get("deliveryMethod"),
|
|
180
191
|
"lifecycleState": obj.get("lifecycleState"),
|
|
192
|
+
"planId": obj.get("planId"),
|
|
181
193
|
"priceType": obj.get("priceType"),
|
|
182
194
|
"pricingPlan": obj.get("pricingPlan"),
|
|
183
195
|
"productId": obj.get("productId"),
|
|
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
|