Skip to content

Commit b71f67a

Browse files
stackit-pipelineFyusel
authored andcommitted
Generate stackitmarketplace
1 parent 4866ad1 commit b71f67a

35 files changed

+1537
-25
lines changed

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

+23-1
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,13 @@
3434
)
3535

3636
# import models into sdk package
37+
from stackit.stackitmarketplace.models.approve_subscription_payload import (
38+
ApproveSubscriptionPayload,
39+
)
40+
from stackit.stackitmarketplace.models.become_vendor import BecomeVendor
41+
from stackit.stackitmarketplace.models.become_vendor_become_vendor import (
42+
BecomeVendorBecomeVendor,
43+
)
3744
from stackit.stackitmarketplace.models.catalog_pricing_option_highlight import (
3845
CatalogPricingOptionHighlight,
3946
)
@@ -61,16 +68,27 @@
6168
from stackit.stackitmarketplace.models.catalog_product_vendor_terms import (
6269
CatalogProductVendorTerms,
6370
)
71+
from stackit.stackitmarketplace.models.contact_sales import ContactSales
72+
from stackit.stackitmarketplace.models.contact_sales_contact_sales import (
73+
ContactSalesContactSales,
74+
)
6475
from stackit.stackitmarketplace.models.current_subscription_state_response import (
6576
CurrentSubscriptionStateResponse,
6677
)
6778
from stackit.stackitmarketplace.models.error_response import ErrorResponse
79+
from stackit.stackitmarketplace.models.inquiries_create_inquiry_payload import (
80+
InquiriesCreateInquiryPayload,
81+
)
6882
from stackit.stackitmarketplace.models.list_catalog_products_response import (
6983
ListCatalogProductsResponse,
7084
)
7185
from stackit.stackitmarketplace.models.list_vendor_subscriptions_response import (
7286
ListVendorSubscriptionsResponse,
7387
)
88+
from stackit.stackitmarketplace.models.register_testing import RegisterTesting
89+
from stackit.stackitmarketplace.models.register_testing_register_testing import (
90+
RegisterTestingRegisterTesting,
91+
)
7492
from stackit.stackitmarketplace.models.requested_subscription_state_response import (
7593
RequestedSubscriptionStateResponse,
7694
)
@@ -81,4 +99,8 @@
8199
SubscriptionCancelResponse,
82100
)
83101
from stackit.stackitmarketplace.models.subscription_product import SubscriptionProduct
102+
from stackit.stackitmarketplace.models.suggest_product import SuggestProduct
103+
from stackit.stackitmarketplace.models.suggest_product_suggest_product import (
104+
SuggestProductSuggestProduct,
105+
)
84106
from stackit.stackitmarketplace.models.vendor_subscription import VendorSubscription

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

+340-1
Large diffs are not rendered by default.

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

+1-1
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

+1-1
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

+1-1
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

+23-1
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,21 @@
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.approve_subscription_payload import (
19+
ApproveSubscriptionPayload,
20+
)
21+
from stackit.stackitmarketplace.models.become_vendor import BecomeVendor
22+
from stackit.stackitmarketplace.models.become_vendor_become_vendor import (
23+
BecomeVendorBecomeVendor,
24+
)
1825
from stackit.stackitmarketplace.models.catalog_pricing_option_highlight import (
1926
CatalogPricingOptionHighlight,
2027
)
@@ -42,16 +49,27 @@
4249
from stackit.stackitmarketplace.models.catalog_product_vendor_terms import (
4350
CatalogProductVendorTerms,
4451
)
52+
from stackit.stackitmarketplace.models.contact_sales import ContactSales
53+
from stackit.stackitmarketplace.models.contact_sales_contact_sales import (
54+
ContactSalesContactSales,
55+
)
4556
from stackit.stackitmarketplace.models.current_subscription_state_response import (
4657
CurrentSubscriptionStateResponse,
4758
)
4859
from stackit.stackitmarketplace.models.error_response import ErrorResponse
60+
from stackit.stackitmarketplace.models.inquiries_create_inquiry_payload import (
61+
InquiriesCreateInquiryPayload,
62+
)
4963
from stackit.stackitmarketplace.models.list_catalog_products_response import (
5064
ListCatalogProductsResponse,
5165
)
5266
from stackit.stackitmarketplace.models.list_vendor_subscriptions_response import (
5367
ListVendorSubscriptionsResponse,
5468
)
69+
from stackit.stackitmarketplace.models.register_testing import RegisterTesting
70+
from stackit.stackitmarketplace.models.register_testing_register_testing import (
71+
RegisterTestingRegisterTesting,
72+
)
5573
from stackit.stackitmarketplace.models.requested_subscription_state_response import (
5674
RequestedSubscriptionStateResponse,
5775
)
@@ -62,4 +80,8 @@
6280
SubscriptionCancelResponse,
6381
)
6482
from stackit.stackitmarketplace.models.subscription_product import SubscriptionProduct
83+
from stackit.stackitmarketplace.models.suggest_product import SuggestProduct
84+
from stackit.stackitmarketplace.models.suggest_product_suggest_product import (
85+
SuggestProductSuggestProduct,
86+
)
6587
from stackit.stackitmarketplace.models.vendor_subscription import VendorSubscription
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
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
22+
from typing_extensions import Self
23+
24+
25+
class ApproveSubscriptionPayload(BaseModel):
26+
"""
27+
ApproveSubscriptionPayload
28+
"""
29+
30+
instance_target: Optional[StrictStr] = Field(
31+
default=None,
32+
description="The target URL of the user instance, used to redirect the user to the instance after the subscription is active.",
33+
alias="instanceTarget",
34+
)
35+
__properties: ClassVar[List[str]] = ["instanceTarget"]
36+
37+
model_config = ConfigDict(
38+
populate_by_name=True,
39+
validate_assignment=True,
40+
protected_namespaces=(),
41+
)
42+
43+
def to_str(self) -> str:
44+
"""Returns the string representation of the model using alias"""
45+
return pprint.pformat(self.model_dump(by_alias=True))
46+
47+
def to_json(self) -> str:
48+
"""Returns the JSON representation of the model using alias"""
49+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
50+
return json.dumps(self.to_dict())
51+
52+
@classmethod
53+
def from_json(cls, json_str: str) -> Optional[Self]:
54+
"""Create an instance of ApproveSubscriptionPayload from a JSON string"""
55+
return cls.from_dict(json.loads(json_str))
56+
57+
def to_dict(self) -> Dict[str, Any]:
58+
"""Return the dictionary representation of the model using alias.
59+
60+
This has the following differences from calling pydantic's
61+
`self.model_dump(by_alias=True)`:
62+
63+
* `None` is only added to the output dict for nullable fields that
64+
were set at model initialization. Other fields with value `None`
65+
are ignored.
66+
"""
67+
excluded_fields: Set[str] = set([])
68+
69+
_dict = self.model_dump(
70+
by_alias=True,
71+
exclude=excluded_fields,
72+
exclude_none=True,
73+
)
74+
return _dict
75+
76+
@classmethod
77+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
78+
"""Create an instance of ApproveSubscriptionPayload from a dict"""
79+
if obj is None:
80+
return None
81+
82+
if not isinstance(obj, dict):
83+
return cls.model_validate(obj)
84+
85+
_obj = cls.model_validate({"instanceTarget": obj.get("instanceTarget")})
86+
return _obj
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

0 commit comments

Comments
 (0)