stackit-stackitmarketplace 1.7.0__tar.gz → 1.9.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.7.0 → stackit_stackitmarketplace-1.9.0}/PKG-INFO +1 -1
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/pyproject.toml +1 -1
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/__init__.py +10 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/api/default_api.py +3 -3
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/models/__init__.py +5 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/models/catalog_product_overview.py +7 -0
- stackit_stackitmarketplace-1.9.0/src/stackit/stackitmarketplace/models/free_trial.py +82 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/models/inquiries_create_inquiry_payload.py +40 -8
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/models/inquiry_form_type.py +1 -0
- stackit_stackitmarketplace-1.9.0/src/stackit/stackitmarketplace/models/inquiry_request_private_plan.py +129 -0
- stackit_stackitmarketplace-1.9.0/src/stackit/stackitmarketplace/models/request_private_plan.py +100 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/LICENSE.md +0 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/NOTICE.txt +0 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/README.md +0 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/api/__init__.py +0 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/api_client.py +0 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/api_response.py +0 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/configuration.py +0 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/exceptions.py +0 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/models/approve_subscription_payload.py +0 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/models/assets.py +0 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/models/become_vendor.py +0 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/models/catalog_pricing_option_highlight.py +0 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/models/catalog_product_detail.py +0 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/models/catalog_product_details_vendor.py +0 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/models/catalog_product_facets_value_inner.py +0 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/models/catalog_product_highlight.py +0 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/models/catalog_product_overview_vendor.py +0 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/models/catalog_product_pricing_option.py +0 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/models/catalog_product_support_resource.py +0 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/models/catalog_product_vendor_terms.py +0 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/models/contact_sales.py +0 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/models/delivery_method.py +0 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/models/error_response.py +0 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/models/inquiry_become_vendor.py +0 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/models/inquiry_contact_sales.py +0 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/models/inquiry_register_testing.py +0 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/models/inquiry_suggest_product.py +0 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/models/list_catalog_products_response.py +0 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/models/list_vendor_subscriptions_response.py +0 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/models/localized_version.py +0 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/models/notice_period.py +0 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/models/offer_type.py +0 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/models/price_type.py +0 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/models/pricing_option_unit.py +0 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/models/product_lifecycle_state.py +0 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/models/register_testing.py +0 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/models/resolve_customer_payload.py +0 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/models/service_certificate.py +0 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/models/subscription_lifecycle_state.py +0 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/models/subscription_product.py +0 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/models/suggest_product.py +0 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/models/vendor_subscription.py +0 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/py.typed +0 -0
- {stackit_stackitmarketplace-1.7.0 → stackit_stackitmarketplace-1.9.0}/src/stackit/stackitmarketplace/rest.py +0 -0
|
@@ -45,11 +45,13 @@ __all__ = [
|
|
|
45
45
|
"ContactSales",
|
|
46
46
|
"DeliveryMethod",
|
|
47
47
|
"ErrorResponse",
|
|
48
|
+
"FreeTrial",
|
|
48
49
|
"InquiriesCreateInquiryPayload",
|
|
49
50
|
"InquiryBecomeVendor",
|
|
50
51
|
"InquiryContactSales",
|
|
51
52
|
"InquiryFormType",
|
|
52
53
|
"InquiryRegisterTesting",
|
|
54
|
+
"InquiryRequestPrivatePlan",
|
|
53
55
|
"InquirySuggestProduct",
|
|
54
56
|
"ListCatalogProductsResponse",
|
|
55
57
|
"ListVendorSubscriptionsResponse",
|
|
@@ -60,6 +62,7 @@ __all__ = [
|
|
|
60
62
|
"PricingOptionUnit",
|
|
61
63
|
"ProductLifecycleState",
|
|
62
64
|
"RegisterTesting",
|
|
65
|
+
"RequestPrivatePlan",
|
|
63
66
|
"ResolveCustomerPayload",
|
|
64
67
|
"ServiceCertificate",
|
|
65
68
|
"SubscriptionLifecycleState",
|
|
@@ -127,6 +130,7 @@ from stackit.stackitmarketplace.models.delivery_method import (
|
|
|
127
130
|
from stackit.stackitmarketplace.models.error_response import (
|
|
128
131
|
ErrorResponse as ErrorResponse,
|
|
129
132
|
)
|
|
133
|
+
from stackit.stackitmarketplace.models.free_trial import FreeTrial as FreeTrial
|
|
130
134
|
from stackit.stackitmarketplace.models.inquiries_create_inquiry_payload import (
|
|
131
135
|
InquiriesCreateInquiryPayload as InquiriesCreateInquiryPayload,
|
|
132
136
|
)
|
|
@@ -142,6 +146,9 @@ from stackit.stackitmarketplace.models.inquiry_form_type import (
|
|
|
142
146
|
from stackit.stackitmarketplace.models.inquiry_register_testing import (
|
|
143
147
|
InquiryRegisterTesting as InquiryRegisterTesting,
|
|
144
148
|
)
|
|
149
|
+
from stackit.stackitmarketplace.models.inquiry_request_private_plan import (
|
|
150
|
+
InquiryRequestPrivatePlan as InquiryRequestPrivatePlan,
|
|
151
|
+
)
|
|
145
152
|
from stackit.stackitmarketplace.models.inquiry_suggest_product import (
|
|
146
153
|
InquirySuggestProduct as InquirySuggestProduct,
|
|
147
154
|
)
|
|
@@ -166,6 +173,9 @@ from stackit.stackitmarketplace.models.product_lifecycle_state import (
|
|
|
166
173
|
from stackit.stackitmarketplace.models.register_testing import (
|
|
167
174
|
RegisterTesting as RegisterTesting,
|
|
168
175
|
)
|
|
176
|
+
from stackit.stackitmarketplace.models.request_private_plan import (
|
|
177
|
+
RequestPrivatePlan as RequestPrivatePlan,
|
|
178
|
+
)
|
|
169
179
|
from stackit.stackitmarketplace.models.resolve_customer_payload import (
|
|
170
180
|
ResolveCustomerPayload as ResolveCustomerPayload,
|
|
171
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
|
|
@@ -53,6 +53,7 @@ from stackit.stackitmarketplace.models.catalog_product_vendor_terms import (
|
|
|
53
53
|
from stackit.stackitmarketplace.models.contact_sales import ContactSales
|
|
54
54
|
from stackit.stackitmarketplace.models.delivery_method import DeliveryMethod
|
|
55
55
|
from stackit.stackitmarketplace.models.error_response import ErrorResponse
|
|
56
|
+
from stackit.stackitmarketplace.models.free_trial import FreeTrial
|
|
56
57
|
from stackit.stackitmarketplace.models.inquiries_create_inquiry_payload import (
|
|
57
58
|
InquiriesCreateInquiryPayload,
|
|
58
59
|
)
|
|
@@ -62,6 +63,9 @@ from stackit.stackitmarketplace.models.inquiry_form_type import InquiryFormType
|
|
|
62
63
|
from stackit.stackitmarketplace.models.inquiry_register_testing import (
|
|
63
64
|
InquiryRegisterTesting,
|
|
64
65
|
)
|
|
66
|
+
from stackit.stackitmarketplace.models.inquiry_request_private_plan import (
|
|
67
|
+
InquiryRequestPrivatePlan,
|
|
68
|
+
)
|
|
65
69
|
from stackit.stackitmarketplace.models.inquiry_suggest_product import (
|
|
66
70
|
InquirySuggestProduct,
|
|
67
71
|
)
|
|
@@ -80,6 +84,7 @@ from stackit.stackitmarketplace.models.product_lifecycle_state import (
|
|
|
80
84
|
ProductLifecycleState,
|
|
81
85
|
)
|
|
82
86
|
from stackit.stackitmarketplace.models.register_testing import RegisterTesting
|
|
87
|
+
from stackit.stackitmarketplace.models.request_private_plan import RequestPrivatePlan
|
|
83
88
|
from stackit.stackitmarketplace.models.resolve_customer_payload import (
|
|
84
89
|
ResolveCustomerPayload,
|
|
85
90
|
)
|
|
@@ -33,6 +33,7 @@ from stackit.stackitmarketplace.models.catalog_product_overview_vendor import (
|
|
|
33
33
|
CatalogProductOverviewVendor,
|
|
34
34
|
)
|
|
35
35
|
from stackit.stackitmarketplace.models.delivery_method import DeliveryMethod
|
|
36
|
+
from stackit.stackitmarketplace.models.free_trial import FreeTrial
|
|
36
37
|
from stackit.stackitmarketplace.models.product_lifecycle_state import (
|
|
37
38
|
ProductLifecycleState,
|
|
38
39
|
)
|
|
@@ -44,6 +45,7 @@ class CatalogProductOverview(BaseModel):
|
|
|
44
45
|
""" # noqa: E501
|
|
45
46
|
|
|
46
47
|
delivery_method: DeliveryMethod = Field(alias="deliveryMethod")
|
|
48
|
+
free_trial: Optional[FreeTrial] = Field(default=None, alias="freeTrial")
|
|
47
49
|
lifecycle_state: ProductLifecycleState = Field(alias="lifecycleState")
|
|
48
50
|
logo: Optional[Union[StrictBytes, StrictStr]] = Field(default=None, description="The logo base64 encoded.")
|
|
49
51
|
name: Annotated[str, Field(strict=True, max_length=512)] = Field(description="The name of the product.")
|
|
@@ -54,6 +56,7 @@ class CatalogProductOverview(BaseModel):
|
|
|
54
56
|
vendor: CatalogProductOverviewVendor
|
|
55
57
|
__properties: ClassVar[List[str]] = [
|
|
56
58
|
"deliveryMethod",
|
|
59
|
+
"freeTrial",
|
|
57
60
|
"lifecycleState",
|
|
58
61
|
"logo",
|
|
59
62
|
"name",
|
|
@@ -120,6 +123,9 @@ class CatalogProductOverview(BaseModel):
|
|
|
120
123
|
exclude=excluded_fields,
|
|
121
124
|
exclude_none=True,
|
|
122
125
|
)
|
|
126
|
+
# override the default output from pydantic by calling `to_dict()` of free_trial
|
|
127
|
+
if self.free_trial:
|
|
128
|
+
_dict["freeTrial"] = self.free_trial.to_dict()
|
|
123
129
|
# override the default output from pydantic by calling `to_dict()` of vendor
|
|
124
130
|
if self.vendor:
|
|
125
131
|
_dict["vendor"] = self.vendor.to_dict()
|
|
@@ -137,6 +143,7 @@ class CatalogProductOverview(BaseModel):
|
|
|
137
143
|
_obj = cls.model_validate(
|
|
138
144
|
{
|
|
139
145
|
"deliveryMethod": obj.get("deliveryMethod"),
|
|
146
|
+
"freeTrial": FreeTrial.from_dict(obj["freeTrial"]) if obj.get("freeTrial") is not None else None,
|
|
140
147
|
"lifecycleState": obj.get("lifecycleState"),
|
|
141
148
|
"logo": obj.get("logo"),
|
|
142
149
|
"name": obj.get("name"),
|
|
@@ -0,0 +1,82 @@
|
|
|
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, StrictInt
|
|
22
|
+
from typing_extensions import Self
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class FreeTrial(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
The amount of days of free trial highlighted in the product card.
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
|
|
30
|
+
value: Optional[StrictInt] = None
|
|
31
|
+
__properties: ClassVar[List[str]] = ["value"]
|
|
32
|
+
|
|
33
|
+
model_config = ConfigDict(
|
|
34
|
+
populate_by_name=True,
|
|
35
|
+
validate_assignment=True,
|
|
36
|
+
protected_namespaces=(),
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
def to_str(self) -> str:
|
|
40
|
+
"""Returns the string representation of the model using alias"""
|
|
41
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
42
|
+
|
|
43
|
+
def to_json(self) -> str:
|
|
44
|
+
"""Returns the JSON representation of the model using alias"""
|
|
45
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
46
|
+
return json.dumps(self.to_dict())
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
50
|
+
"""Create an instance of FreeTrial from a JSON string"""
|
|
51
|
+
return cls.from_dict(json.loads(json_str))
|
|
52
|
+
|
|
53
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
54
|
+
"""Return the dictionary representation of the model using alias.
|
|
55
|
+
|
|
56
|
+
This has the following differences from calling pydantic's
|
|
57
|
+
`self.model_dump(by_alias=True)`:
|
|
58
|
+
|
|
59
|
+
* `None` is only added to the output dict for nullable fields that
|
|
60
|
+
were set at model initialization. Other fields with value `None`
|
|
61
|
+
are ignored.
|
|
62
|
+
"""
|
|
63
|
+
excluded_fields: Set[str] = set([])
|
|
64
|
+
|
|
65
|
+
_dict = self.model_dump(
|
|
66
|
+
by_alias=True,
|
|
67
|
+
exclude=excluded_fields,
|
|
68
|
+
exclude_none=True,
|
|
69
|
+
)
|
|
70
|
+
return _dict
|
|
71
|
+
|
|
72
|
+
@classmethod
|
|
73
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
74
|
+
"""Create an instance of FreeTrial from a dict"""
|
|
75
|
+
if obj is None:
|
|
76
|
+
return None
|
|
77
|
+
|
|
78
|
+
if not isinstance(obj, dict):
|
|
79
|
+
return cls.model_validate(obj)
|
|
80
|
+
|
|
81
|
+
_obj = cls.model_validate({"value": obj.get("value")})
|
|
82
|
+
return _obj
|
|
@@ -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.9.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
|
|
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
|