Skip to content

Commit 79116d0

Browse files
Generate stackitmarketplace
1 parent 7727295 commit 79116d0

34 files changed

+1419
-25
lines changed

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

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
API to manage STACKIT Marketplace.
99
1010
The version of the OpenAPI document: 1
11-
Contact: marketplace@stackit.de
11+
Contact: marketplace@stackit.cloud
1212
Generated by OpenAPI Generator (https://openapi-generator.tech)
1313
1414
Do not edit the class manually.
@@ -34,6 +34,10 @@
3434
)
3535

3636
# import models into sdk package
37+
from stackit.stackitmarketplace.models.become_vendor import BecomeVendor
38+
from stackit.stackitmarketplace.models.become_vendor_become_vendor import (
39+
BecomeVendorBecomeVendor,
40+
)
3741
from stackit.stackitmarketplace.models.catalog_pricing_option_highlight import (
3842
CatalogPricingOptionHighlight,
3943
)
@@ -61,16 +65,27 @@
6165
from stackit.stackitmarketplace.models.catalog_product_vendor_terms import (
6266
CatalogProductVendorTerms,
6367
)
68+
from stackit.stackitmarketplace.models.contact_sales import ContactSales
69+
from stackit.stackitmarketplace.models.contact_sales_contact_sales import (
70+
ContactSalesContactSales,
71+
)
6472
from stackit.stackitmarketplace.models.current_subscription_state_response import (
6573
CurrentSubscriptionStateResponse,
6674
)
6775
from stackit.stackitmarketplace.models.error_response import ErrorResponse
76+
from stackit.stackitmarketplace.models.inquiries_create_inquiry_payload import (
77+
InquiriesCreateInquiryPayload,
78+
)
6879
from stackit.stackitmarketplace.models.list_catalog_products_response import (
6980
ListCatalogProductsResponse,
7081
)
7182
from stackit.stackitmarketplace.models.list_vendor_subscriptions_response import (
7283
ListVendorSubscriptionsResponse,
7384
)
85+
from stackit.stackitmarketplace.models.register_testing import RegisterTesting
86+
from stackit.stackitmarketplace.models.register_testing_register_testing import (
87+
RegisterTestingRegisterTesting,
88+
)
7489
from stackit.stackitmarketplace.models.requested_subscription_state_response import (
7590
RequestedSubscriptionStateResponse,
7691
)
@@ -81,4 +96,8 @@
8196
SubscriptionCancelResponse,
8297
)
8398
from stackit.stackitmarketplace.models.subscription_product import SubscriptionProduct
99+
from stackit.stackitmarketplace.models.suggest_product import SuggestProduct
100+
from stackit.stackitmarketplace.models.suggest_product_suggest_product import (
101+
SuggestProductSuggestProduct,
102+
)
84103
from stackit.stackitmarketplace.models.vendor_subscription import VendorSubscription

services/stackitmarketplace/src/stackit/stackitmarketplace/api/default_api.py

Lines changed: 314 additions & 1 deletion
Large diffs are not rendered by default.

services/stackitmarketplace/src/stackit/stackitmarketplace/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
API to manage STACKIT Marketplace.
77
88
The version of the OpenAPI document: 1
9-
Contact: marketplace@stackit.de
9+
Contact: marketplace@stackit.cloud
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111
1212
Do not edit the class manually.

services/stackitmarketplace/src/stackit/stackitmarketplace/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
API to manage STACKIT Marketplace.
77
88
The version of the OpenAPI document: 1
9-
Contact: marketplace@stackit.de
9+
Contact: marketplace@stackit.cloud
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111
1212
Do not edit the class manually.

services/stackitmarketplace/src/stackit/stackitmarketplace/exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
API to manage STACKIT Marketplace.
77
88
The version of the OpenAPI document: 1
9-
Contact: marketplace@stackit.de
9+
Contact: marketplace@stackit.cloud
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111
1212
Do not edit the class manually.

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

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,18 @@
77
API to manage STACKIT Marketplace.
88
99
The version of the OpenAPI document: 1
10-
Contact: marketplace@stackit.de
10+
Contact: marketplace@stackit.cloud
1111
Generated by OpenAPI Generator (https://openapi-generator.tech)
1212
1313
Do not edit the class manually.
1414
""" # noqa: E501 docstring might be too long
1515

1616

1717
# import models into model package
18+
from stackit.stackitmarketplace.models.become_vendor import BecomeVendor
19+
from stackit.stackitmarketplace.models.become_vendor_become_vendor import (
20+
BecomeVendorBecomeVendor,
21+
)
1822
from stackit.stackitmarketplace.models.catalog_pricing_option_highlight import (
1923
CatalogPricingOptionHighlight,
2024
)
@@ -42,16 +46,27 @@
4246
from stackit.stackitmarketplace.models.catalog_product_vendor_terms import (
4347
CatalogProductVendorTerms,
4448
)
49+
from stackit.stackitmarketplace.models.contact_sales import ContactSales
50+
from stackit.stackitmarketplace.models.contact_sales_contact_sales import (
51+
ContactSalesContactSales,
52+
)
4553
from stackit.stackitmarketplace.models.current_subscription_state_response import (
4654
CurrentSubscriptionStateResponse,
4755
)
4856
from stackit.stackitmarketplace.models.error_response import ErrorResponse
57+
from stackit.stackitmarketplace.models.inquiries_create_inquiry_payload import (
58+
InquiriesCreateInquiryPayload,
59+
)
4960
from stackit.stackitmarketplace.models.list_catalog_products_response import (
5061
ListCatalogProductsResponse,
5162
)
5263
from stackit.stackitmarketplace.models.list_vendor_subscriptions_response import (
5364
ListVendorSubscriptionsResponse,
5465
)
66+
from stackit.stackitmarketplace.models.register_testing import RegisterTesting
67+
from stackit.stackitmarketplace.models.register_testing_register_testing import (
68+
RegisterTestingRegisterTesting,
69+
)
5570
from stackit.stackitmarketplace.models.requested_subscription_state_response import (
5671
RequestedSubscriptionStateResponse,
5772
)
@@ -62,4 +77,8 @@
6277
SubscriptionCancelResponse,
6378
)
6479
from stackit.stackitmarketplace.models.subscription_product import SubscriptionProduct
80+
from stackit.stackitmarketplace.models.suggest_product import SuggestProduct
81+
from stackit.stackitmarketplace.models.suggest_product_suggest_product import (
82+
SuggestProductSuggestProduct,
83+
)
6584
from stackit.stackitmarketplace.models.vendor_subscription import VendorSubscription
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
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, StrictStr, field_validator
22+
from typing_extensions import Self
23+
24+
from stackit.stackitmarketplace.models.become_vendor_become_vendor import (
25+
BecomeVendorBecomeVendor,
26+
)
27+
28+
29+
class BecomeVendor(BaseModel):
30+
"""
31+
Become a vendor.
32+
"""
33+
34+
become_vendor: BecomeVendorBecomeVendor = Field(alias="becomeVendor")
35+
type: StrictStr = Field(description="The form type.")
36+
__properties: ClassVar[List[str]] = ["becomeVendor", "type"]
37+
38+
@field_validator("type")
39+
def type_validate_enum(cls, value):
40+
"""Validates the enum"""
41+
if value not in set(["become_vendor"]):
42+
raise ValueError("must be one of enum values ('become_vendor')")
43+
return value
44+
45+
model_config = ConfigDict(
46+
populate_by_name=True,
47+
validate_assignment=True,
48+
protected_namespaces=(),
49+
)
50+
51+
def to_str(self) -> str:
52+
"""Returns the string representation of the model using alias"""
53+
return pprint.pformat(self.model_dump(by_alias=True))
54+
55+
def to_json(self) -> str:
56+
"""Returns the JSON representation of the model using alias"""
57+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
58+
return json.dumps(self.to_dict())
59+
60+
@classmethod
61+
def from_json(cls, json_str: str) -> Optional[Self]:
62+
"""Create an instance of BecomeVendor from a JSON string"""
63+
return cls.from_dict(json.loads(json_str))
64+
65+
def to_dict(self) -> Dict[str, Any]:
66+
"""Return the dictionary representation of the model using alias.
67+
68+
This has the following differences from calling pydantic's
69+
`self.model_dump(by_alias=True)`:
70+
71+
* `None` is only added to the output dict for nullable fields that
72+
were set at model initialization. Other fields with value `None`
73+
are ignored.
74+
"""
75+
excluded_fields: Set[str] = set([])
76+
77+
_dict = self.model_dump(
78+
by_alias=True,
79+
exclude=excluded_fields,
80+
exclude_none=True,
81+
)
82+
# override the default output from pydantic by calling `to_dict()` of become_vendor
83+
if self.become_vendor:
84+
_dict["becomeVendor"] = self.become_vendor.to_dict()
85+
return _dict
86+
87+
@classmethod
88+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
89+
"""Create an instance of BecomeVendor from a dict"""
90+
if obj is None:
91+
return None
92+
93+
if not isinstance(obj, dict):
94+
return cls.model_validate(obj)
95+
96+
_obj = cls.model_validate(
97+
{
98+
"becomeVendor": (
99+
BecomeVendorBecomeVendor.from_dict(obj["becomeVendor"])
100+
if obj.get("becomeVendor") is not None
101+
else None
102+
),
103+
"type": obj.get("type"),
104+
}
105+
)
106+
return _obj
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
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, StrictStr, field_validator
23+
from typing_extensions import Annotated, Self
24+
25+
26+
class BecomeVendorBecomeVendor(BaseModel):
27+
"""
28+
BecomeVendorBecomeVendor
29+
"""
30+
31+
contact_email: StrictStr = Field(description="The contact e-mail address.", alias="contactEmail")
32+
message: Annotated[str, Field(strict=True, max_length=512)] = Field(description="The message content.")
33+
__properties: ClassVar[List[str]] = ["contactEmail", "message"]
34+
35+
@field_validator("message")
36+
def message_validate_regular_expression(cls, value):
37+
"""Validates the regular expression"""
38+
if not re.match(r"^[a-zA-ZäüöÄÜÖ0-9,.!?()@\/:=\n\t -]+$", value):
39+
raise ValueError(r"must validate the regular expression /^[a-zA-ZäüöÄÜÖ0-9,.!?()@\/:=\n\t -]+$/")
40+
return value
41+
42+
model_config = ConfigDict(
43+
populate_by_name=True,
44+
validate_assignment=True,
45+
protected_namespaces=(),
46+
)
47+
48+
def to_str(self) -> str:
49+
"""Returns the string representation of the model using alias"""
50+
return pprint.pformat(self.model_dump(by_alias=True))
51+
52+
def to_json(self) -> str:
53+
"""Returns the JSON representation of the model using alias"""
54+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
55+
return json.dumps(self.to_dict())
56+
57+
@classmethod
58+
def from_json(cls, json_str: str) -> Optional[Self]:
59+
"""Create an instance of BecomeVendorBecomeVendor from a JSON string"""
60+
return cls.from_dict(json.loads(json_str))
61+
62+
def to_dict(self) -> Dict[str, Any]:
63+
"""Return the dictionary representation of the model using alias.
64+
65+
This has the following differences from calling pydantic's
66+
`self.model_dump(by_alias=True)`:
67+
68+
* `None` is only added to the output dict for nullable fields that
69+
were set at model initialization. Other fields with value `None`
70+
are ignored.
71+
"""
72+
excluded_fields: Set[str] = set([])
73+
74+
_dict = self.model_dump(
75+
by_alias=True,
76+
exclude=excluded_fields,
77+
exclude_none=True,
78+
)
79+
return _dict
80+
81+
@classmethod
82+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
83+
"""Create an instance of BecomeVendorBecomeVendor 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({"contactEmail": obj.get("contactEmail"), "message": obj.get("message")})
91+
return _obj

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
API to manage STACKIT Marketplace.
77
88
The version of the OpenAPI document: 1
9-
Contact: marketplace@stackit.de
9+
Contact: marketplace@stackit.cloud
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111
1212
Do not edit the class manually.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
API to manage STACKIT Marketplace.
77
88
The version of the OpenAPI document: 1
9-
Contact: marketplace@stackit.de
9+
Contact: marketplace@stackit.cloud
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111
1212
Do not edit the class manually.

0 commit comments

Comments
 (0)