diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/__init__.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/__init__.py index a2c31bc1..58516779 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/__init__.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/__init__.py @@ -12,100 +12,175 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 __version__ = "1.0.0" +# Define package exports +__all__ = [ + "DefaultApi", + "ApiResponse", + "ApiClient", + "HostConfiguration", + "OpenApiException", + "ApiTypeError", + "ApiValueError", + "ApiKeyError", + "ApiAttributeError", + "ApiException", + "ApproveSubscriptionPayload", + "Assets", + "BecomeVendor", + "CatalogPricingOptionHighlight", + "CatalogProductDetail", + "CatalogProductDetailsVendor", + "CatalogProductFacetsValueInner", + "CatalogProductHighlight", + "CatalogProductOverview", + "CatalogProductOverviewVendor", + "CatalogProductPricingOption", + "CatalogProductSupportResource", + "CatalogProductVendorTerms", + "ContactSales", + "DeliveryMethod", + "ErrorResponse", + "InquiriesCreateInquiryPayload", + "InquiryBecomeVendor", + "InquiryContactSales", + "InquiryFormType", + "InquiryRegisterTesting", + "InquirySuggestProduct", + "ListCatalogProductsResponse", + "ListVendorSubscriptionsResponse", + "LocalizedVersion", + "NoticePeriod", + "OfferType", + "PriceType", + "PricingOptionUnit", + "ProductLifecycleState", + "RegisterTesting", + "ResolveCustomerPayload", + "ServiceCertificate", + "SubscriptionLifecycleState", + "SubscriptionProduct", + "SuggestProduct", + "VendorSubscription", +] + # import apis into sdk package -from stackit.stackitmarketplace.api.default_api import DefaultApi -from stackit.stackitmarketplace.api_client import ApiClient +from stackit.stackitmarketplace.api.default_api import DefaultApi as DefaultApi +from stackit.stackitmarketplace.api_client import ApiClient as ApiClient # import ApiClient -from stackit.stackitmarketplace.api_response import ApiResponse -from stackit.stackitmarketplace.configuration import HostConfiguration -from stackit.stackitmarketplace.exceptions import ( - ApiAttributeError, - ApiException, - ApiKeyError, - ApiTypeError, - ApiValueError, - OpenApiException, -) +from stackit.stackitmarketplace.api_response import ApiResponse as ApiResponse +from stackit.stackitmarketplace.configuration import ( + HostConfiguration as HostConfiguration, +) +from stackit.stackitmarketplace.exceptions import ApiAttributeError as ApiAttributeError +from stackit.stackitmarketplace.exceptions import ApiException as ApiException +from stackit.stackitmarketplace.exceptions import ApiKeyError as ApiKeyError +from stackit.stackitmarketplace.exceptions import ApiTypeError as ApiTypeError +from stackit.stackitmarketplace.exceptions import ApiValueError as ApiValueError +from stackit.stackitmarketplace.exceptions import OpenApiException as OpenApiException # import models into sdk package from stackit.stackitmarketplace.models.approve_subscription_payload import ( - ApproveSubscriptionPayload, + ApproveSubscriptionPayload as ApproveSubscriptionPayload, ) -from stackit.stackitmarketplace.models.assets import Assets -from stackit.stackitmarketplace.models.become_vendor import BecomeVendor +from stackit.stackitmarketplace.models.assets import Assets as Assets +from stackit.stackitmarketplace.models.become_vendor import BecomeVendor as BecomeVendor from stackit.stackitmarketplace.models.catalog_pricing_option_highlight import ( - CatalogPricingOptionHighlight, + CatalogPricingOptionHighlight as CatalogPricingOptionHighlight, ) from stackit.stackitmarketplace.models.catalog_product_detail import ( - CatalogProductDetail, + CatalogProductDetail as CatalogProductDetail, ) from stackit.stackitmarketplace.models.catalog_product_details_vendor import ( - CatalogProductDetailsVendor, + CatalogProductDetailsVendor as CatalogProductDetailsVendor, ) from stackit.stackitmarketplace.models.catalog_product_facets_value_inner import ( - CatalogProductFacetsValueInner, + CatalogProductFacetsValueInner as CatalogProductFacetsValueInner, ) from stackit.stackitmarketplace.models.catalog_product_highlight import ( - CatalogProductHighlight, + CatalogProductHighlight as CatalogProductHighlight, ) from stackit.stackitmarketplace.models.catalog_product_overview import ( - CatalogProductOverview, + CatalogProductOverview as CatalogProductOverview, ) from stackit.stackitmarketplace.models.catalog_product_overview_vendor import ( - CatalogProductOverviewVendor, + CatalogProductOverviewVendor as CatalogProductOverviewVendor, ) from stackit.stackitmarketplace.models.catalog_product_pricing_option import ( - CatalogProductPricingOption, + CatalogProductPricingOption as CatalogProductPricingOption, ) from stackit.stackitmarketplace.models.catalog_product_support_resource import ( - CatalogProductSupportResource, + CatalogProductSupportResource as CatalogProductSupportResource, ) from stackit.stackitmarketplace.models.catalog_product_vendor_terms import ( - CatalogProductVendorTerms, + CatalogProductVendorTerms as CatalogProductVendorTerms, +) +from stackit.stackitmarketplace.models.contact_sales import ContactSales as ContactSales +from stackit.stackitmarketplace.models.delivery_method import ( + DeliveryMethod as DeliveryMethod, +) +from stackit.stackitmarketplace.models.error_response import ( + ErrorResponse as ErrorResponse, ) -from stackit.stackitmarketplace.models.contact_sales import ContactSales -from stackit.stackitmarketplace.models.delivery_method import DeliveryMethod -from stackit.stackitmarketplace.models.error_response import ErrorResponse from stackit.stackitmarketplace.models.inquiries_create_inquiry_payload import ( - InquiriesCreateInquiryPayload, + InquiriesCreateInquiryPayload as InquiriesCreateInquiryPayload, +) +from stackit.stackitmarketplace.models.inquiry_become_vendor import ( + InquiryBecomeVendor as InquiryBecomeVendor, +) +from stackit.stackitmarketplace.models.inquiry_contact_sales import ( + InquiryContactSales as InquiryContactSales, +) +from stackit.stackitmarketplace.models.inquiry_form_type import ( + InquiryFormType as InquiryFormType, ) -from stackit.stackitmarketplace.models.inquiry_become_vendor import InquiryBecomeVendor -from stackit.stackitmarketplace.models.inquiry_contact_sales import InquiryContactSales -from stackit.stackitmarketplace.models.inquiry_form_type import InquiryFormType from stackit.stackitmarketplace.models.inquiry_register_testing import ( - InquiryRegisterTesting, + InquiryRegisterTesting as InquiryRegisterTesting, ) from stackit.stackitmarketplace.models.inquiry_suggest_product import ( - InquirySuggestProduct, + InquirySuggestProduct as InquirySuggestProduct, ) from stackit.stackitmarketplace.models.list_catalog_products_response import ( - ListCatalogProductsResponse, + ListCatalogProductsResponse as ListCatalogProductsResponse, ) from stackit.stackitmarketplace.models.list_vendor_subscriptions_response import ( - ListVendorSubscriptionsResponse, + ListVendorSubscriptionsResponse as ListVendorSubscriptionsResponse, +) +from stackit.stackitmarketplace.models.localized_version import ( + LocalizedVersion as LocalizedVersion, +) +from stackit.stackitmarketplace.models.notice_period import NoticePeriod as NoticePeriod +from stackit.stackitmarketplace.models.offer_type import OfferType as OfferType +from stackit.stackitmarketplace.models.price_type import PriceType as PriceType +from stackit.stackitmarketplace.models.pricing_option_unit import ( + PricingOptionUnit as PricingOptionUnit, ) -from stackit.stackitmarketplace.models.localized_version import LocalizedVersion -from stackit.stackitmarketplace.models.notice_period import NoticePeriod -from stackit.stackitmarketplace.models.offer_type import OfferType -from stackit.stackitmarketplace.models.price_type import PriceType -from stackit.stackitmarketplace.models.pricing_option_unit import PricingOptionUnit from stackit.stackitmarketplace.models.product_lifecycle_state import ( - ProductLifecycleState, + ProductLifecycleState as ProductLifecycleState, +) +from stackit.stackitmarketplace.models.register_testing import ( + RegisterTesting as RegisterTesting, ) -from stackit.stackitmarketplace.models.register_testing import RegisterTesting from stackit.stackitmarketplace.models.resolve_customer_payload import ( - ResolveCustomerPayload, + ResolveCustomerPayload as ResolveCustomerPayload, +) +from stackit.stackitmarketplace.models.service_certificate import ( + ServiceCertificate as ServiceCertificate, ) -from stackit.stackitmarketplace.models.service_certificate import ServiceCertificate from stackit.stackitmarketplace.models.subscription_lifecycle_state import ( - SubscriptionLifecycleState, + SubscriptionLifecycleState as SubscriptionLifecycleState, +) +from stackit.stackitmarketplace.models.subscription_product import ( + SubscriptionProduct as SubscriptionProduct, +) +from stackit.stackitmarketplace.models.suggest_product import ( + SuggestProduct as SuggestProduct, +) +from stackit.stackitmarketplace.models.vendor_subscription import ( + VendorSubscription as VendorSubscription, ) -from stackit.stackitmarketplace.models.subscription_product import SubscriptionProduct -from stackit.stackitmarketplace.models.suggest_product import SuggestProduct -from stackit.stackitmarketplace.models.vendor_subscription import VendorSubscription diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/api/default_api.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/api/default_api.py index 96f28c39..037ebfb0 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/api/default_api.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/api/default_api.py @@ -10,7 +10,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from typing import Any, Dict, List, Optional, Tuple, Union @@ -109,7 +109,7 @@ def approve_subscription( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._approve_subscription_serialize( project_id=project_id, @@ -183,7 +183,7 @@ def approve_subscription_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._approve_subscription_serialize( project_id=project_id, @@ -257,7 +257,7 @@ def approve_subscription_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._approve_subscription_serialize( project_id=project_id, @@ -298,7 +298,7 @@ def _approve_subscription_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -386,7 +386,7 @@ def get_catalog_product( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._get_catalog_product_serialize( product_id=product_id, @@ -454,7 +454,7 @@ def get_catalog_product_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._get_catalog_product_serialize( product_id=product_id, @@ -522,7 +522,7 @@ def get_catalog_product_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._get_catalog_product_serialize( product_id=product_id, @@ -561,7 +561,7 @@ def _get_catalog_product_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -643,7 +643,7 @@ def get_vendor_subscription( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._get_vendor_subscription_serialize( project_id=project_id, @@ -713,7 +713,7 @@ def get_vendor_subscription_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._get_vendor_subscription_serialize( project_id=project_id, @@ -783,7 +783,7 @@ def get_vendor_subscription_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._get_vendor_subscription_serialize( project_id=project_id, @@ -822,7 +822,7 @@ def _get_vendor_subscription_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -897,7 +897,7 @@ def inquiries_create_inquiry( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._inquiries_create_inquiry_serialize( inquiries_create_inquiry_payload=inquiries_create_inquiry_payload, @@ -961,7 +961,7 @@ def inquiries_create_inquiry_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._inquiries_create_inquiry_serialize( inquiries_create_inquiry_payload=inquiries_create_inquiry_payload, @@ -1025,7 +1025,7 @@ def inquiries_create_inquiry_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._inquiries_create_inquiry_serialize( inquiries_create_inquiry_payload=inquiries_create_inquiry_payload, @@ -1062,7 +1062,7 @@ def _inquiries_create_inquiry_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1179,7 +1179,7 @@ def list_catalog_products( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_catalog_products_serialize( cursor=cursor, @@ -1282,7 +1282,7 @@ def list_catalog_products_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_catalog_products_serialize( cursor=cursor, @@ -1385,7 +1385,7 @@ def list_catalog_products_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_catalog_products_serialize( cursor=cursor, @@ -1429,7 +1429,7 @@ def _list_catalog_products_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1546,7 +1546,7 @@ def list_vendor_subscriptions( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_vendor_subscriptions_serialize( project_id=project_id, @@ -1638,7 +1638,7 @@ def list_vendor_subscriptions_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_vendor_subscriptions_serialize( project_id=project_id, @@ -1730,7 +1730,7 @@ def list_vendor_subscriptions_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_vendor_subscriptions_serialize( project_id=project_id, @@ -1772,7 +1772,7 @@ def _list_vendor_subscriptions_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1860,7 +1860,7 @@ def resolve_customer( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._resolve_customer_serialize( project_id=project_id, @@ -1928,7 +1928,7 @@ def resolve_customer_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._resolve_customer_serialize( project_id=project_id, @@ -1996,7 +1996,7 @@ def resolve_customer_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._resolve_customer_serialize( project_id=project_id, @@ -2035,7 +2035,7 @@ def _resolve_customer_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2123,7 +2123,7 @@ def vendors_subscriptions_reject( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._vendors_subscriptions_reject_serialize( project_id=project_id, @@ -2193,7 +2193,7 @@ def vendors_subscriptions_reject_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._vendors_subscriptions_reject_serialize( project_id=project_id, @@ -2263,7 +2263,7 @@ def vendors_subscriptions_reject_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._vendors_subscriptions_reject_serialize( project_id=project_id, @@ -2302,7 +2302,7 @@ def _vendors_subscriptions_reject_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/api_client.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/api_client.py index fcae85d1..a60f352b 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/api_client.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/api_client.py @@ -10,7 +10,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 import datetime import json @@ -332,6 +332,10 @@ def sanitize_for_serialization(self, obj): else: obj_dict = obj.__dict__ + if isinstance(obj_dict, list): + # here we handle instances that can either be a list or something else, and only became a real list by calling to_dict() + return self.sanitize_for_serialization(obj_dict) + return {key: self.sanitize_for_serialization(val) for key, val in obj_dict.items()} def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): @@ -351,12 +355,12 @@ def deserialize(self, response_text: str, response_type: str, content_type: Opti data = json.loads(response_text) except ValueError: data = response_text - elif content_type.startswith("application/json"): + elif re.match(r"^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)", content_type, re.IGNORECASE): if response_text == "": data = "" else: data = json.loads(response_text) - elif content_type.startswith("text/plain"): + elif re.match(r"^text\/[a-z.+-]+\s*(;|$)", content_type, re.IGNORECASE): data = response_text else: raise ApiException(status=0, reason="Unsupported content type: {0}".format(content_type)) @@ -458,7 +462,7 @@ def parameters_to_url_query(self, params, collection_formats): if k in collection_formats: collection_format = collection_formats[k] if collection_format == "multi": - new_params.extend((k, str(value)) for value in v) + new_params.extend((k, quote(str(value))) for value in v) else: if collection_format == "ssv": delimiter = " " @@ -474,7 +478,10 @@ def parameters_to_url_query(self, params, collection_formats): return "&".join(["=".join(map(str, item)) for item in new_params]) - def files_parameters(self, files: Dict[str, Union[str, bytes]]): + def files_parameters( + self, + files: Dict[str, Union[str, bytes, List[str], List[bytes], Tuple[str, bytes]]], + ): """Builds form parameters. :param files: File parameters. @@ -489,6 +496,12 @@ def files_parameters(self, files: Dict[str, Union[str, bytes]]): elif isinstance(v, bytes): filename = k filedata = v + elif isinstance(v, tuple): + filename, filedata = v + elif isinstance(v, list): + for file_param in v: + params.extend(self.files_parameters({k: file_param})) + continue else: raise ValueError("Unsupported file value") mimetype = mimetypes.guess_type(filename)[0] or "application/octet-stream" diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/configuration.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/configuration.py index eaa1facc..32c8472d 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/configuration.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/configuration.py @@ -1,10 +1,5 @@ # coding: utf-8 -import sys - -import os - - """ STACKIT Marketplace API @@ -15,7 +10,29 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 + +import sys +from typing import Dict, List, Optional, TypedDict + +from typing_extensions import NotRequired + +import os + + +ServerVariablesT = Dict[str, str] + + +class HostSettingVariable(TypedDict): + description: str + default_value: str + enum_values: List[str] + + +class HostSetting(TypedDict): + url: str + description: str + variables: NotRequired[Dict[str, HostSettingVariable]] class HostConfiguration: @@ -54,7 +71,7 @@ def __init__( """Ignore operation servers """ - def get_host_settings(self): + def get_host_settings(self) -> List[HostSetting]: """Gets an array of host settings :return: An array of host settings @@ -72,7 +89,12 @@ def get_host_settings(self): } ] - def get_host_from_settings(self, index, variables=None, servers=None): + def get_host_from_settings( + self, + index: Optional[int], + variables: Optional[ServerVariablesT] = None, + servers: Optional[List[HostSetting]] = None, + ) -> str: """Gets host URL based on the index and variables :param index: array index of the host settings :param variables: hash of variable and the corresponding value @@ -112,7 +134,7 @@ def get_host_from_settings(self, index, variables=None, servers=None): and variables.get(variable_name) is not None ): raise ValueError( - "this API does not support setting a region in the the client configuration, " + "this API does not support setting a region in the client configuration, " "please check if the region can be specified as a function parameter" ) used_value = variables.get(variable_name, variable["default_value"]) @@ -131,12 +153,12 @@ def get_host_from_settings(self, index, variables=None, servers=None): return url @property - def host(self): + def host(self) -> str: """Return generated host.""" return self.get_host_from_settings(self.server_index, variables=self.server_variables) @host.setter - def host(self, value): + def host(self, value: str) -> None: """Fix base path.""" self._base_path = value self.server_index = None diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/exceptions.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/exceptions.py index d3bf0cf8..3c7a56d8 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/exceptions.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/exceptions.py @@ -10,7 +10,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from typing import Any, Optional @@ -128,7 +128,7 @@ def __init__( if self.body is None: try: self.body = http_resp.data.decode("utf-8") - except Exception: # noqa: S110 + except Exception: pass self.headers = http_resp.getheaders() @@ -152,6 +152,13 @@ def from_response( if http_resp.status == 404: raise NotFoundException(http_resp=http_resp, body=body, data=data) + # Added new conditions for 409 and 422 + if http_resp.status == 409: + raise ConflictException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 422: + raise UnprocessableEntityException(http_resp=http_resp, body=body, data=data) + if 500 <= http_resp.status <= 599: raise ServiceException(http_resp=http_resp, body=body, data=data) raise ApiException(http_resp=http_resp, body=body, data=data) @@ -188,6 +195,18 @@ class ServiceException(ApiException): pass +class ConflictException(ApiException): + """Exception for HTTP 409 Conflict.""" + + pass + + +class UnprocessableEntityException(ApiException): + """Exception for HTTP 422 Unprocessable Entity.""" + + pass + + def render_path(path_to_item): """Returns a string representation of a path""" result = "" diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/__init__.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/__init__.py index e078b229..cd1d92d2 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/__init__.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/__init__.py @@ -11,7 +11,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 # import models into model package diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/approve_subscription_payload.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/approve_subscription_payload.py index 3a487162..1745229e 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/approve_subscription_payload.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/approve_subscription_payload.py @@ -10,13 +10,13 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations import json import pprint -import re +import re # noqa: F401 from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, field_validator @@ -26,7 +26,7 @@ class ApproveSubscriptionPayload(BaseModel): """ ApproveSubscriptionPayload - """ + """ # noqa: E501 instance_target: Optional[Annotated[str, Field(strict=True, max_length=512)]] = Field( default=None, diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/assets.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/assets.py index a8bdafd5..594ec205 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/assets.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/assets.py @@ -10,7 +10,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -27,7 +27,7 @@ class Assets(BaseModel): """ The assets associated with the product. - """ + """ # noqa: E501 service_certificate: Optional[ServiceCertificate] = Field(default=None, alias="serviceCertificate") __properties: ClassVar[List[str]] = ["serviceCertificate"] diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/become_vendor.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/become_vendor.py index 3f3025fe..f6bda797 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/become_vendor.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/become_vendor.py @@ -10,7 +10,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -28,7 +28,7 @@ class BecomeVendor(BaseModel): """ Become a Vendor. - """ + """ # noqa: E501 become_vendor: InquiryBecomeVendor = Field(alias="becomeVendor") type: InquiryFormType diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/catalog_pricing_option_highlight.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/catalog_pricing_option_highlight.py index ab658310..85016fb2 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/catalog_pricing_option_highlight.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/catalog_pricing_option_highlight.py @@ -10,7 +10,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -25,7 +25,7 @@ class CatalogPricingOptionHighlight(BaseModel): """ CatalogPricingOptionHighlight - """ + """ # noqa: E501 highlight_content: Optional[StrictStr] = Field( default=None, description="The highlight content.", alias="highlightContent" diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/catalog_product_detail.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/catalog_product_detail.py index 90985f3a..cf1b5317 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/catalog_product_detail.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/catalog_product_detail.py @@ -10,13 +10,13 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations import json import pprint -import re +import re # noqa: F401 from typing import Any, ClassVar, Dict, List, Optional, Set, Union from pydantic import ( @@ -56,7 +56,7 @@ class CatalogProductDetail(BaseModel): """ CatalogProductDetail - """ + """ # noqa: E501 assets: Optional[Assets] = None categories: Optional[List[StrictStr]] = Field( diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/catalog_product_details_vendor.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/catalog_product_details_vendor.py index f110cbf7..f09574b5 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/catalog_product_details_vendor.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/catalog_product_details_vendor.py @@ -10,13 +10,13 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations import json import pprint -import re +import re # noqa: F401 from typing import Any, ClassVar, Dict, List, Optional, Set, Union from pydantic import ( @@ -33,7 +33,7 @@ class CatalogProductDetailsVendor(BaseModel): """ CatalogProductDetailsVendor - """ + """ # noqa: E501 description: StrictStr = Field(description="The vendor description.") logo: Union[StrictBytes, StrictStr] = Field(description="The logo base64 encoded.") diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/catalog_product_facets_value_inner.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/catalog_product_facets_value_inner.py index 4f43790a..d3f5ad78 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/catalog_product_facets_value_inner.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/catalog_product_facets_value_inner.py @@ -10,7 +10,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -25,7 +25,7 @@ class CatalogProductFacetsValueInner(BaseModel): """ CatalogProductFacetsValueInner - """ + """ # noqa: E501 count: StrictInt = Field(description="The number of items associated with this facet value.") value: StrictStr = Field(description="The value of the facet.") diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/catalog_product_highlight.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/catalog_product_highlight.py index 3c7dc923..da37abb7 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/catalog_product_highlight.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/catalog_product_highlight.py @@ -10,7 +10,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -25,7 +25,7 @@ class CatalogProductHighlight(BaseModel): """ CatalogProductHighlight - """ + """ # noqa: E501 highlight_content: Optional[StrictStr] = Field( default=None, description="The highlight content.", alias="highlightContent" diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/catalog_product_overview.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/catalog_product_overview.py index 4bd2629a..9f9461de 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/catalog_product_overview.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/catalog_product_overview.py @@ -10,13 +10,13 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations import json import pprint -import re +import re # noqa: F401 from typing import Any, ClassVar, Dict, List, Optional, Set, Union from pydantic import ( @@ -41,7 +41,7 @@ class CatalogProductOverview(BaseModel): """ CatalogProductOverview - """ + """ # noqa: E501 delivery_method: DeliveryMethod = Field(alias="deliveryMethod") lifecycle_state: ProductLifecycleState = Field(alias="lifecycleState") diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/catalog_product_overview_vendor.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/catalog_product_overview_vendor.py index e6a26e6c..0a2eeb48 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/catalog_product_overview_vendor.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/catalog_product_overview_vendor.py @@ -10,13 +10,13 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations import json import pprint -import re +import re # noqa: F401 from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, field_validator @@ -26,7 +26,7 @@ class CatalogProductOverviewVendor(BaseModel): """ CatalogProductOverviewVendor - """ + """ # noqa: E501 name: Annotated[str, Field(strict=True, max_length=512)] = Field(description="The product's vendor name.") vendor_id: Annotated[str, Field(min_length=36, strict=True, max_length=36)] = Field( diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/catalog_product_pricing_option.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/catalog_product_pricing_option.py index b8916f21..26d751c3 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/catalog_product_pricing_option.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/catalog_product_pricing_option.py @@ -10,7 +10,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -32,7 +32,7 @@ class CatalogProductPricingOption(BaseModel): """ CatalogProductPricingOption - """ + """ # noqa: E501 description: StrictStr = Field(description="The pricing option description.") highlights: List[CatalogPricingOptionHighlight] = Field(description="The list of highlights.") diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/catalog_product_support_resource.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/catalog_product_support_resource.py index 3760ce6a..c6d41fe0 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/catalog_product_support_resource.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/catalog_product_support_resource.py @@ -10,13 +10,13 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations import json import pprint -import re +import re # noqa: F401 from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator @@ -26,7 +26,7 @@ class CatalogProductSupportResource(BaseModel): """ CatalogProductSupportResource - """ + """ # noqa: E501 support_link: Optional[Annotated[str, Field(strict=True, max_length=512)]] = Field( default=None, description="The support resource link.", alias="supportLink" diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/catalog_product_vendor_terms.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/catalog_product_vendor_terms.py index 67bb19c4..4ce8c6ba 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/catalog_product_vendor_terms.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/catalog_product_vendor_terms.py @@ -10,13 +10,13 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations import json import pprint -import re +import re # noqa: F401 from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator @@ -26,7 +26,7 @@ class CatalogProductVendorTerms(BaseModel): """ CatalogProductVendorTerms - """ + """ # noqa: E501 description: StrictStr = Field(description="The terms of service description.") title: StrictStr = Field(description="The terms of service title.") diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/contact_sales.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/contact_sales.py index beb4f3d0..4fdc2c65 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/contact_sales.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/contact_sales.py @@ -10,7 +10,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -28,7 +28,7 @@ class ContactSales(BaseModel): """ Contact sales. - """ + """ # noqa: E501 contact_sales: InquiryContactSales = Field(alias="contactSales") type: InquiryFormType diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/delivery_method.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/delivery_method.py index 4a0ac914..4b594f3d 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/delivery_method.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/delivery_method.py @@ -10,7 +10,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/error_response.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/error_response.py index 40f579d4..007e6ffd 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/error_response.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/error_response.py @@ -10,7 +10,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -26,7 +26,7 @@ class ErrorResponse(BaseModel): """ ErrorResponse - """ + """ # noqa: E501 error: StrictStr = Field(description="Reason phrase of the status code.") message: StrictStr = Field(description="Description of the error.") diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/inquiries_create_inquiry_payload.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/inquiries_create_inquiry_payload.py index 3cf3a6c5..d06e4a20 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/inquiries_create_inquiry_payload.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/inquiries_create_inquiry_payload.py @@ -10,7 +10,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/inquiry_become_vendor.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/inquiry_become_vendor.py index d5193bbc..e7a6ca2f 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/inquiry_become_vendor.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/inquiry_become_vendor.py @@ -10,13 +10,13 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations import json import pprint -import re +import re # noqa: F401 from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator @@ -26,7 +26,7 @@ class InquiryBecomeVendor(BaseModel): """ Become a vendor. - """ + """ # noqa: E501 contact_email: StrictStr = Field(description="A e-mail address.", alias="contactEmail") message: Annotated[str, Field(strict=True, max_length=512)] = Field(description="A custom message.") diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/inquiry_contact_sales.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/inquiry_contact_sales.py index 955395c9..0b8ed7e2 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/inquiry_contact_sales.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/inquiry_contact_sales.py @@ -10,13 +10,13 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations import json import pprint -import re +import re # noqa: F401 from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator @@ -26,7 +26,7 @@ class InquiryContactSales(BaseModel): """ Contact sales. - """ + """ # noqa: E501 company_name: Annotated[str, Field(strict=True, max_length=512)] = Field( description="The company name.", alias="companyName" diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/inquiry_form_type.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/inquiry_form_type.py index b87dfe6f..1f65eb17 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/inquiry_form_type.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/inquiry_form_type.py @@ -10,7 +10,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/inquiry_register_testing.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/inquiry_register_testing.py index 5ffdc85f..eb69fc2d 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/inquiry_register_testing.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/inquiry_register_testing.py @@ -10,13 +10,13 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations import json import pprint -import re +import re # noqa: F401 from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator @@ -26,7 +26,7 @@ class InquiryRegisterTesting(BaseModel): """ Register for testing. - """ + """ # noqa: E501 contact_email: StrictStr = Field(description="A e-mail address.", alias="contactEmail") full_name: Annotated[str, Field(strict=True, max_length=512)] = Field( diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/inquiry_suggest_product.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/inquiry_suggest_product.py index c979e6d2..e24bed89 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/inquiry_suggest_product.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/inquiry_suggest_product.py @@ -10,13 +10,13 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations import json import pprint -import re +import re # noqa: F401 from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, field_validator @@ -26,7 +26,7 @@ class InquirySuggestProduct(BaseModel): """ Suggest a product. - """ + """ # noqa: E501 company_name: Annotated[str, Field(strict=True, max_length=512)] = Field( description="The suggested product's company name.", alias="companyName" diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/list_catalog_products_response.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/list_catalog_products_response.py index 68c6af11..4d2f4af3 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/list_catalog_products_response.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/list_catalog_products_response.py @@ -10,7 +10,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -32,7 +32,7 @@ class ListCatalogProductsResponse(BaseModel): """ ListCatalogProductsResponse - """ + """ # noqa: E501 cursor: StrictStr = Field( description="A pagination cursor that represents a position in the dataset. If given, results will be returned from the item after the cursor. If not given, results will be returned from the beginning." diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/list_vendor_subscriptions_response.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/list_vendor_subscriptions_response.py index cfbaada8..940b4bca 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/list_vendor_subscriptions_response.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/list_vendor_subscriptions_response.py @@ -10,7 +10,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -27,7 +27,7 @@ class ListVendorSubscriptionsResponse(BaseModel): """ ListVendorSubscriptionsResponse - """ + """ # noqa: E501 cursor: StrictStr = Field( description="A pagination cursor that represents a position in the dataset. If given, results will be returned from the item after the cursor. If not given, results will be returned from the beginning." diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/localized_version.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/localized_version.py index 6c669ed9..abd4fc52 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/localized_version.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/localized_version.py @@ -10,13 +10,13 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations import json import pprint -import re +import re # noqa: F401 from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, field_validator @@ -26,7 +26,7 @@ class LocalizedVersion(BaseModel): """ The localized version (file name) of a file. - """ + """ # noqa: E501 de: Optional[Annotated[str, Field(strict=True)]] = Field( default=None, description="The file version matching the file name (localized)." diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/notice_period.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/notice_period.py index 7b0e1b45..3c998941 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/notice_period.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/notice_period.py @@ -10,7 +10,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -25,7 +25,7 @@ class NoticePeriod(BaseModel): """ The notice period for a product and plan. - """ + """ # noqa: E501 type: Optional[StrictStr] = Field(default=None, description="The notice period type.") value: Optional[StrictInt] = Field( diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/offer_type.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/offer_type.py index d55aae71..aff8a29d 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/offer_type.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/offer_type.py @@ -10,7 +10,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/price_type.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/price_type.py index cdda7080..6cfe9117 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/price_type.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/price_type.py @@ -10,7 +10,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/pricing_option_unit.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/pricing_option_unit.py index e707e333..dcc9b2ec 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/pricing_option_unit.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/pricing_option_unit.py @@ -10,7 +10,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/product_lifecycle_state.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/product_lifecycle_state.py index 5e829c29..3f14671e 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/product_lifecycle_state.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/product_lifecycle_state.py @@ -10,7 +10,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/register_testing.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/register_testing.py index 63061206..4bc59deb 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/register_testing.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/register_testing.py @@ -10,7 +10,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -30,7 +30,7 @@ class RegisterTesting(BaseModel): """ Register for testing. - """ + """ # noqa: E501 register_testing: InquiryRegisterTesting = Field(alias="registerTesting") type: InquiryFormType diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/resolve_customer_payload.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/resolve_customer_payload.py index bbddc462..4ca7ceda 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/resolve_customer_payload.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/resolve_customer_payload.py @@ -10,7 +10,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -25,7 +25,7 @@ class ResolveCustomerPayload(BaseModel): """ ResolveCustomerPayload - """ + """ # noqa: E501 token: StrictStr = Field(description="Opaque token exchangeable for subscription details.") __properties: ClassVar[List[str]] = ["token"] diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/service_certificate.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/service_certificate.py index d2f00b8c..8ab713d2 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/service_certificate.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/service_certificate.py @@ -10,7 +10,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -27,7 +27,7 @@ class ServiceCertificate(BaseModel): """ The related service certificate of the (subscription) product. - """ + """ # noqa: E501 version: Optional[LocalizedVersion] = None __properties: ClassVar[List[str]] = ["version"] diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/subscription_lifecycle_state.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/subscription_lifecycle_state.py index e5b835af..2de1988d 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/subscription_lifecycle_state.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/subscription_lifecycle_state.py @@ -10,7 +10,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/subscription_product.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/subscription_product.py index b27a03c8..c3825758 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/subscription_product.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/subscription_product.py @@ -10,13 +10,13 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations import json import pprint -import re +import re # noqa: F401 from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator @@ -33,7 +33,7 @@ class SubscriptionProduct(BaseModel): """ The product of a subscription - """ + """ # noqa: E501 assets: Optional[Assets] = None delivery_method: DeliveryMethod = Field(alias="deliveryMethod") diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/suggest_product.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/suggest_product.py index 8d052cf9..eded1983 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/suggest_product.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/suggest_product.py @@ -10,7 +10,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -30,7 +30,7 @@ class SuggestProduct(BaseModel): """ Suggest a product. - """ + """ # noqa: E501 suggest_product: InquirySuggestProduct = Field(alias="suggestProduct") type: InquiryFormType diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/vendor_subscription.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/vendor_subscription.py index 1bbfef6e..e8ed999d 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/models/vendor_subscription.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/models/vendor_subscription.py @@ -10,13 +10,13 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations import json import pprint -import re +import re # noqa: F401 from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, field_validator @@ -31,7 +31,7 @@ class VendorSubscription(BaseModel): """ VendorSubscription - """ + """ # noqa: E501 lifecycle_state: SubscriptionLifecycleState = Field(alias="lifecycleState") organization_id: Annotated[str, Field(min_length=36, strict=True, max_length=36)] = Field( diff --git a/services/stackitmarketplace/src/stackit/stackitmarketplace/rest.py b/services/stackitmarketplace/src/stackit/stackitmarketplace/rest.py index 931dbe73..fe03dba8 100644 --- a/services/stackitmarketplace/src/stackit/stackitmarketplace/rest.py +++ b/services/stackitmarketplace/src/stackit/stackitmarketplace/rest.py @@ -10,7 +10,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 import io import json @@ -125,7 +125,7 @@ def request(self, method, url, headers=None, body=None, post_params=None, _reque data=body, headers=headers, ) - elif headers["Content-Type"] == "text/plain" and isinstance(body, bool): + elif headers["Content-Type"].startswith("text/") and isinstance(body, bool): request_body = "true" if body else "false" r = self.session.request(method, url, data=request_body, headers=headers) else: