Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
API to manage STACKIT Marketplace.

The version of the OpenAPI document: 1
Contact: marketplace@stackit.de
Contact: marketplace@stackit.cloud
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
Expand All @@ -34,6 +34,10 @@
)

# import models into sdk package
from stackit.stackitmarketplace.models.become_vendor import BecomeVendor
from stackit.stackitmarketplace.models.become_vendor_become_vendor import (
BecomeVendorBecomeVendor,
)
from stackit.stackitmarketplace.models.catalog_pricing_option_highlight import (
CatalogPricingOptionHighlight,
)
Expand Down Expand Up @@ -61,16 +65,27 @@
from stackit.stackitmarketplace.models.catalog_product_vendor_terms import (
CatalogProductVendorTerms,
)
from stackit.stackitmarketplace.models.contact_sales import ContactSales
from stackit.stackitmarketplace.models.contact_sales_contact_sales import (
ContactSalesContactSales,
)
from stackit.stackitmarketplace.models.current_subscription_state_response import (
CurrentSubscriptionStateResponse,
)
from stackit.stackitmarketplace.models.error_response import ErrorResponse
from stackit.stackitmarketplace.models.inquiries_create_inquiry_payload import (
InquiriesCreateInquiryPayload,
)
from stackit.stackitmarketplace.models.list_catalog_products_response import (
ListCatalogProductsResponse,
)
from stackit.stackitmarketplace.models.list_vendor_subscriptions_response import (
ListVendorSubscriptionsResponse,
)
from stackit.stackitmarketplace.models.register_testing import RegisterTesting
from stackit.stackitmarketplace.models.register_testing_register_testing import (
RegisterTestingRegisterTesting,
)
from stackit.stackitmarketplace.models.requested_subscription_state_response import (
RequestedSubscriptionStateResponse,
)
Expand All @@ -81,4 +96,8 @@
SubscriptionCancelResponse,
)
from stackit.stackitmarketplace.models.subscription_product import SubscriptionProduct
from stackit.stackitmarketplace.models.suggest_product import SuggestProduct
from stackit.stackitmarketplace.models.suggest_product_suggest_product import (
SuggestProductSuggestProduct,
)
from stackit.stackitmarketplace.models.vendor_subscription import VendorSubscription

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
API to manage STACKIT Marketplace.
The version of the OpenAPI document: 1
Contact: marketplace@stackit.de
Contact: marketplace@stackit.cloud
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
API to manage STACKIT Marketplace.
The version of the OpenAPI document: 1
Contact: marketplace@stackit.de
Contact: marketplace@stackit.cloud
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
API to manage STACKIT Marketplace.

The version of the OpenAPI document: 1
Contact: marketplace@stackit.de
Contact: marketplace@stackit.cloud
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,18 @@
API to manage STACKIT Marketplace.

The version of the OpenAPI document: 1
Contact: marketplace@stackit.de
Contact: marketplace@stackit.cloud
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
""" # noqa: E501 docstring might be too long


# import models into model package
from stackit.stackitmarketplace.models.become_vendor import BecomeVendor
from stackit.stackitmarketplace.models.become_vendor_become_vendor import (
BecomeVendorBecomeVendor,
)
from stackit.stackitmarketplace.models.catalog_pricing_option_highlight import (
CatalogPricingOptionHighlight,
)
Expand Down Expand Up @@ -42,16 +46,27 @@
from stackit.stackitmarketplace.models.catalog_product_vendor_terms import (
CatalogProductVendorTerms,
)
from stackit.stackitmarketplace.models.contact_sales import ContactSales
from stackit.stackitmarketplace.models.contact_sales_contact_sales import (
ContactSalesContactSales,
)
from stackit.stackitmarketplace.models.current_subscription_state_response import (
CurrentSubscriptionStateResponse,
)
from stackit.stackitmarketplace.models.error_response import ErrorResponse
from stackit.stackitmarketplace.models.inquiries_create_inquiry_payload import (
InquiriesCreateInquiryPayload,
)
from stackit.stackitmarketplace.models.list_catalog_products_response import (
ListCatalogProductsResponse,
)
from stackit.stackitmarketplace.models.list_vendor_subscriptions_response import (
ListVendorSubscriptionsResponse,
)
from stackit.stackitmarketplace.models.register_testing import RegisterTesting
from stackit.stackitmarketplace.models.register_testing_register_testing import (
RegisterTestingRegisterTesting,
)
from stackit.stackitmarketplace.models.requested_subscription_state_response import (
RequestedSubscriptionStateResponse,
)
Expand All @@ -62,4 +77,8 @@
SubscriptionCancelResponse,
)
from stackit.stackitmarketplace.models.subscription_product import SubscriptionProduct
from stackit.stackitmarketplace.models.suggest_product import SuggestProduct
from stackit.stackitmarketplace.models.suggest_product_suggest_product import (
SuggestProductSuggestProduct,
)
from stackit.stackitmarketplace.models.vendor_subscription import VendorSubscription
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# coding: utf-8

"""
STACKIT Marketplace API

API to manage STACKIT Marketplace.

The version of the OpenAPI document: 1
Contact: marketplace@stackit.cloud
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
""" # noqa: E501 docstring might be too long

from __future__ import annotations

import json
import pprint
from typing import Any, ClassVar, Dict, List, Optional, Set

from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
from typing_extensions import Self

from stackit.stackitmarketplace.models.become_vendor_become_vendor import (
BecomeVendorBecomeVendor,
)


class BecomeVendor(BaseModel):
"""
Become a vendor.
"""

become_vendor: BecomeVendorBecomeVendor = Field(alias="becomeVendor")
type: StrictStr = Field(description="The form type.")
__properties: ClassVar[List[str]] = ["becomeVendor", "type"]

@field_validator("type")
def type_validate_enum(cls, value):
"""Validates the enum"""
if value not in set(["become_vendor"]):
raise ValueError("must be one of enum values ('become_vendor')")
return value

model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)

def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())

@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of BecomeVendor from a JSON string"""
return cls.from_dict(json.loads(json_str))

def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:

* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([])

_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of become_vendor
if self.become_vendor:
_dict["becomeVendor"] = self.become_vendor.to_dict()
return _dict

@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of BecomeVendor from a dict"""
if obj is None:
return None

if not isinstance(obj, dict):
return cls.model_validate(obj)

_obj = cls.model_validate(
{
"becomeVendor": (
BecomeVendorBecomeVendor.from_dict(obj["becomeVendor"])
if obj.get("becomeVendor") is not None
else None
),
"type": obj.get("type"),
}
)
return _obj
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# coding: utf-8

"""
STACKIT Marketplace API

API to manage STACKIT Marketplace.

The version of the OpenAPI document: 1
Contact: marketplace@stackit.cloud
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
""" # noqa: E501 docstring might be too long

from __future__ import annotations

import json
import pprint
import re
from typing import Any, ClassVar, Dict, List, Optional, Set

from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
from typing_extensions import Annotated, Self


class BecomeVendorBecomeVendor(BaseModel):
"""
BecomeVendorBecomeVendor
"""

contact_email: StrictStr = Field(description="The contact e-mail address.", alias="contactEmail")
message: Annotated[str, Field(strict=True, max_length=512)] = Field(description="The message content.")
__properties: ClassVar[List[str]] = ["contactEmail", "message"]

@field_validator("message")
def message_validate_regular_expression(cls, value):
"""Validates the regular expression"""
if not re.match(r"^[a-zA-ZäüöÄÜÖ0-9,.!?()@\/:=\n\t -]+$", value):
raise ValueError(r"must validate the regular expression /^[a-zA-ZäüöÄÜÖ0-9,.!?()@\/:=\n\t -]+$/")
return value

model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)

def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())

@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of BecomeVendorBecomeVendor from a JSON string"""
return cls.from_dict(json.loads(json_str))

def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:

* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([])

_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict

@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of BecomeVendorBecomeVendor from a dict"""
if obj is None:
return None

if not isinstance(obj, dict):
return cls.model_validate(obj)

_obj = cls.model_validate({"contactEmail": obj.get("contactEmail"), "message": obj.get("message")})
return _obj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
API to manage STACKIT Marketplace.
The version of the OpenAPI document: 1
Contact: marketplace@stackit.de
Contact: marketplace@stackit.cloud
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
API to manage STACKIT Marketplace.
The version of the OpenAPI document: 1
Contact: marketplace@stackit.de
Contact: marketplace@stackit.cloud
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
API to manage STACKIT Marketplace.
The version of the OpenAPI document: 1
Contact: marketplace@stackit.de
Contact: marketplace@stackit.cloud
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
API to manage STACKIT Marketplace.
The version of the OpenAPI document: 1
Contact: marketplace@stackit.de
Contact: marketplace@stackit.cloud
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
API to manage STACKIT Marketplace.
The version of the OpenAPI document: 1
Contact: marketplace@stackit.de
Contact: marketplace@stackit.cloud
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
API to manage STACKIT Marketplace.
The version of the OpenAPI document: 1
Contact: marketplace@stackit.de
Contact: marketplace@stackit.cloud
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
Expand Down
Loading
Loading