Skip to content

Generator: Update SDK /services/stackitmarketplace #1038

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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 @@ -346,7 +346,7 @@ def _approve_subscription_serialize(
@validate_call
def get_catalog_product(
self,
product_id: Annotated[str, Field(min_length=36, strict=True, max_length=36, description="The product ID.")],
product_id: Annotated[str, Field(min_length=10, strict=True, max_length=29, description="The product ID.")],
locale: Annotated[Optional[StrictStr], Field(description="The language of the response.")] = None,
_request_timeout: Union[
None,
Expand Down Expand Up @@ -414,7 +414,7 @@ def get_catalog_product(
@validate_call
def get_catalog_product_with_http_info(
self,
product_id: Annotated[str, Field(min_length=36, strict=True, max_length=36, description="The product ID.")],
product_id: Annotated[str, Field(min_length=10, strict=True, max_length=29, description="The product ID.")],
locale: Annotated[Optional[StrictStr], Field(description="The language of the response.")] = None,
_request_timeout: Union[
None,
Expand Down Expand Up @@ -482,7 +482,7 @@ def get_catalog_product_with_http_info(
@validate_call
def get_catalog_product_without_preload_content(
self,
product_id: Annotated[str, Field(min_length=36, strict=True, max_length=36, description="The product ID.")],
product_id: Annotated[str, Field(min_length=10, strict=True, max_length=29, description="The product ID.")],
locale: Annotated[Optional[StrictStr], Field(description="The language of the response.")] = None,
_request_timeout: Union[
None,
Expand Down Expand Up @@ -1132,7 +1132,7 @@ def list_catalog_products(
sort: Annotated[
Optional[StrictStr],
Field(
description="Sort the products based on attributes and order (if specified). E.g `name:asc`. The supported attributes are `name`, `price`, and `deliveryMethod`. To set the sort order, append `asc` (ascending) or `desc` (descending) to the attribute, e.g. `name:asc`. To sort by multiple attributes, separate them with a comma. E.g `name,price:desc`. The order can be ommited to sort by the default order. E.g `name`."
description="Sort the products based on attributes and order e.g. `name:asc`. Attributes with scalar types (`createdAt`, `isProductListing`) or keywords (`name`, `deliveryMethod`, `lifecycleState`, `vendor.name`) can be used as sort criteria. To set the sort order, append `asc` (ascending) or `desc` (descending) to the attribute, e.g. `name:asc`. To sort by multiple attributes, separate them with a comma. E.g `name:asc,price:desc`."
),
] = None,
_request_timeout: Union[
Expand All @@ -1157,7 +1157,7 @@ def list_catalog_products(
:type locale: str
:param filter: Filter the products based on attributes. E.g `deliveryMethod eq \"SAAS\"`. The supported attributes are `deliveryMethod`, `priceType`, `category`, `vendorId`, `vendorName`, and `name`. The supported operators are `eq`. Filters can be joined with `and` or `or`.
:type filter: str
:param sort: Sort the products based on attributes and order (if specified). E.g `name:asc`. The supported attributes are `name`, `price`, and `deliveryMethod`. To set the sort order, append `asc` (ascending) or `desc` (descending) to the attribute, e.g. `name:asc`. To sort by multiple attributes, separate them with a comma. E.g `name,price:desc`. The order can be ommited to sort by the default order. E.g `name`.
:param sort: Sort the products based on attributes and order e.g. `name:asc`. Attributes with scalar types (`createdAt`, `isProductListing`) or keywords (`name`, `deliveryMethod`, `lifecycleState`, `vendor.name`) can be used as sort criteria. To set the sort order, append `asc` (ascending) or `desc` (descending) to the attribute, e.g. `name:asc`. To sort by multiple attributes, separate them with a comma. E.g `name:asc,price:desc`.
:type sort: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
Expand Down Expand Up @@ -1235,7 +1235,7 @@ def list_catalog_products_with_http_info(
sort: Annotated[
Optional[StrictStr],
Field(
description="Sort the products based on attributes and order (if specified). E.g `name:asc`. The supported attributes are `name`, `price`, and `deliveryMethod`. To set the sort order, append `asc` (ascending) or `desc` (descending) to the attribute, e.g. `name:asc`. To sort by multiple attributes, separate them with a comma. E.g `name,price:desc`. The order can be ommited to sort by the default order. E.g `name`."
description="Sort the products based on attributes and order e.g. `name:asc`. Attributes with scalar types (`createdAt`, `isProductListing`) or keywords (`name`, `deliveryMethod`, `lifecycleState`, `vendor.name`) can be used as sort criteria. To set the sort order, append `asc` (ascending) or `desc` (descending) to the attribute, e.g. `name:asc`. To sort by multiple attributes, separate them with a comma. E.g `name:asc,price:desc`."
),
] = None,
_request_timeout: Union[
Expand All @@ -1260,7 +1260,7 @@ def list_catalog_products_with_http_info(
:type locale: str
:param filter: Filter the products based on attributes. E.g `deliveryMethod eq \"SAAS\"`. The supported attributes are `deliveryMethod`, `priceType`, `category`, `vendorId`, `vendorName`, and `name`. The supported operators are `eq`. Filters can be joined with `and` or `or`.
:type filter: str
:param sort: Sort the products based on attributes and order (if specified). E.g `name:asc`. The supported attributes are `name`, `price`, and `deliveryMethod`. To set the sort order, append `asc` (ascending) or `desc` (descending) to the attribute, e.g. `name:asc`. To sort by multiple attributes, separate them with a comma. E.g `name,price:desc`. The order can be ommited to sort by the default order. E.g `name`.
:param sort: Sort the products based on attributes and order e.g. `name:asc`. Attributes with scalar types (`createdAt`, `isProductListing`) or keywords (`name`, `deliveryMethod`, `lifecycleState`, `vendor.name`) can be used as sort criteria. To set the sort order, append `asc` (ascending) or `desc` (descending) to the attribute, e.g. `name:asc`. To sort by multiple attributes, separate them with a comma. E.g `name:asc,price:desc`.
:type sort: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
Expand Down Expand Up @@ -1338,7 +1338,7 @@ def list_catalog_products_without_preload_content(
sort: Annotated[
Optional[StrictStr],
Field(
description="Sort the products based on attributes and order (if specified). E.g `name:asc`. The supported attributes are `name`, `price`, and `deliveryMethod`. To set the sort order, append `asc` (ascending) or `desc` (descending) to the attribute, e.g. `name:asc`. To sort by multiple attributes, separate them with a comma. E.g `name,price:desc`. The order can be ommited to sort by the default order. E.g `name`."
description="Sort the products based on attributes and order e.g. `name:asc`. Attributes with scalar types (`createdAt`, `isProductListing`) or keywords (`name`, `deliveryMethod`, `lifecycleState`, `vendor.name`) can be used as sort criteria. To set the sort order, append `asc` (ascending) or `desc` (descending) to the attribute, e.g. `name:asc`. To sort by multiple attributes, separate them with a comma. E.g `name:asc,price:desc`."
),
] = None,
_request_timeout: Union[
Expand All @@ -1363,7 +1363,7 @@ def list_catalog_products_without_preload_content(
:type locale: str
:param filter: Filter the products based on attributes. E.g `deliveryMethod eq \"SAAS\"`. The supported attributes are `deliveryMethod`, `priceType`, `category`, `vendorId`, `vendorName`, and `name`. The supported operators are `eq`. Filters can be joined with `and` or `or`.
:type filter: str
:param sort: Sort the products based on attributes and order (if specified). E.g `name:asc`. The supported attributes are `name`, `price`, and `deliveryMethod`. To set the sort order, append `asc` (ascending) or `desc` (descending) to the attribute, e.g. `name:asc`. To sort by multiple attributes, separate them with a comma. E.g `name,price:desc`. The order can be ommited to sort by the default order. E.g `name`.
:param sort: Sort the products based on attributes and order e.g. `name:asc`. Attributes with scalar types (`createdAt`, `isProductListing`) or keywords (`name`, `deliveryMethod`, `lifecycleState`, `vendor.name`) can be used as sort criteria. To set the sort order, append `asc` (ascending) or `desc` (descending) to the attribute, e.g. `name:asc`. To sort by multiple attributes, separate them with a comma. E.g `name:asc,price:desc`.
:type sort: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
Expand Down Expand Up @@ -1501,7 +1501,7 @@ def list_vendor_subscriptions(
),
] = None,
product_id: Annotated[
Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]],
Optional[Annotated[str, Field(min_length=10, strict=True, max_length=29)]],
Field(description="The product ID."),
] = None,
_request_timeout: Union[
Expand Down Expand Up @@ -1593,7 +1593,7 @@ def list_vendor_subscriptions_with_http_info(
),
] = None,
product_id: Annotated[
Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]],
Optional[Annotated[str, Field(min_length=10, strict=True, max_length=29)]],
Field(description="The product ID."),
] = None,
_request_timeout: Union[
Expand Down Expand Up @@ -1685,7 +1685,7 @@ def list_vendor_subscriptions_without_preload_content(
),
] = None,
product_id: Annotated[
Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]],
Optional[Annotated[str, Field(min_length=10, strict=True, max_length=29)]],
Field(description="The product ID."),
] = None,
_request_timeout: Union[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# coding: utf-8

import sys

import os


"""
STACKIT Marketplace API

Expand All @@ -12,8 +17,6 @@
Do not edit the class manually.
""" # noqa: E501 docstring might be too long

import os


class HostConfiguration:
def __init__(
Expand All @@ -30,6 +33,7 @@ def __init__(
"as a function argument instead of being set in the client configuration.\n"
"Once all services have migrated, the methods to specify the region in the client configuration "
"will be removed.",
file=sys.stderr,
)
"""Constructor
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ class CatalogProductDetail(BaseModel):
pricing_options: List[CatalogProductPricingOption] = Field(
description="The list of pricing options.", alias="pricingOptions"
)
product_id: object = Field(alias="productId")
product_id: Annotated[str, Field(min_length=10, strict=True, max_length=29)] = Field(
description="The user-readable product ID.", alias="productId"
)
summary: StrictStr = Field(description="The short summary of the product.")
support_faq: Optional[Annotated[str, Field(strict=True, max_length=512)]] = Field(
default=None, description="The support FAQ URL.", alias="supportFaq"
Expand Down Expand Up @@ -132,6 +134,13 @@ def name_validate_regular_expression(cls, value):
raise ValueError(r"must validate the regular expression /^[a-zA-ZäüöÄÜÖ0-9,.!?()@\/:=\n\t -]+$/")
return value

@field_validator("product_id")
def product_id_validate_regular_expression(cls, value):
"""Validates the regular expression"""
if not re.match(r"^[a-z0-9-]{1,20}-[0-9a-f]{8}$", value):
raise ValueError(r"must validate the regular expression /^[a-z0-9-]{1,20}-[0-9a-f]{8}$/")
return value

@field_validator("support_faq")
def support_faq_validate_regular_expression(cls, value):
"""Validates the regular expression"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ class CatalogProductOverview(BaseModel):
lifecycle_state: ProductLifecycleState = Field(alias="lifecycleState")
logo: Optional[Union[StrictBytes, StrictStr]] = Field(default=None, description="The logo base64 encoded.")
name: Annotated[str, Field(strict=True, max_length=512)] = Field(description="The name of the product.")
product_id: object = Field(alias="productId")
product_id: Annotated[str, Field(min_length=10, strict=True, max_length=29)] = Field(
description="The user-readable product ID.", alias="productId"
)
summary: Annotated[str, Field(strict=True, max_length=512)] = Field(description="The short summary of the product.")
vendor: CatalogProductOverviewVendor
__properties: ClassVar[List[str]] = [
Expand All @@ -67,6 +69,13 @@ def name_validate_regular_expression(cls, value):
raise ValueError(r"must validate the regular expression /^[a-zA-ZäüöÄÜÖ0-9,.!?()@\/:=\n\t -]+$/")
return value

@field_validator("product_id")
def product_id_validate_regular_expression(cls, value):
"""Validates the regular expression"""
if not re.match(r"^[a-z0-9-]{1,20}-[0-9a-f]{8}$", value):
raise ValueError(r"must validate the regular expression /^[a-z0-9-]{1,20}-[0-9a-f]{8}$/")
return value

@field_validator("summary")
def summary_validate_regular_expression(cls, value):
"""Validates the regular expression"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ class InquiryContactSales(BaseModel):
description="The full name of the contact person.", alias="fullName"
)
message: Annotated[str, Field(strict=True, max_length=512)] = Field(description="A custom message.")
product_id: object = Field(alias="productId")
product_id: Annotated[str, Field(min_length=10, strict=True, max_length=29)] = Field(
description="The user-readable product ID.", alias="productId"
)
__properties: ClassVar[List[str]] = ["companyName", "contactEmail", "fullName", "message", "productId"]

@field_validator("company_name")
Expand All @@ -60,6 +62,13 @@ def message_validate_regular_expression(cls, value):
raise ValueError(r"must validate the regular expression /^[a-zA-ZäüöÄÜÖ0-9,.!?()@\/:=\n\t -]+$/")
return value

@field_validator("product_id")
def product_id_validate_regular_expression(cls, value):
"""Validates the regular expression"""
if not re.match(r"^[a-z0-9-]{1,20}-[0-9a-f]{8}$", value):
raise ValueError(r"must validate the regular expression /^[a-z0-9-]{1,20}-[0-9a-f]{8}$/")
return value

model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,18 @@ class SubscriptionProduct(BaseModel):
lifecycle_state: ProductLifecycleState = Field(alias="lifecycleState")
price_type: PriceType = Field(alias="priceType")
pricing_plan: StrictStr = Field(description="Additional price type information.", alias="pricingPlan")
product_id: object = Field(alias="productId")
product_id: Annotated[str, Field(min_length=10, strict=True, max_length=29)] = Field(
description="The user-readable product ID.", alias="productId"
)
product_name: Annotated[str, Field(strict=True, max_length=512)] = Field(
description="The name of the product.", alias="productName"
)
vendor_name: Annotated[str, Field(strict=True, max_length=512)] = Field(
description="The product's vendor name.", alias="vendorName"
)
vendor_plan_id: Optional[Annotated[str, Field(strict=True)]] = Field(
default=None, description="The vendor provided plan ID.", alias="vendorPlanId"
)
vendor_product_id: Optional[Annotated[str, Field(strict=True)]] = Field(
default=None, description="The vendor provided product ID.", alias="vendorProductId"
)
Expand All @@ -59,10 +64,18 @@ class SubscriptionProduct(BaseModel):
"productId",
"productName",
"vendorName",
"vendorPlanId",
"vendorProductId",
"vendorWebsiteUrl",
]

@field_validator("product_id")
def product_id_validate_regular_expression(cls, value):
"""Validates the regular expression"""
if not re.match(r"^[a-z0-9-]{1,20}-[0-9a-f]{8}$", value):
raise ValueError(r"must validate the regular expression /^[a-z0-9-]{1,20}-[0-9a-f]{8}$/")
return value

@field_validator("product_name")
def product_name_validate_regular_expression(cls, value):
"""Validates the regular expression"""
Expand All @@ -77,6 +90,16 @@ def vendor_name_validate_regular_expression(cls, value):
raise ValueError(r"must validate the regular expression /^[a-zA-ZäüöÄÜÖ0-9,.!?()@\/:=\n\t -]+$/")
return value

@field_validator("vendor_plan_id")
def vendor_plan_id_validate_regular_expression(cls, value):
"""Validates the regular expression"""
if value is None:
return value

if not re.match(r"^[a-zA-Z0-9](?:[a-zA-Z0-9_+&-]){0,39}$", value):
raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9](?:[a-zA-Z0-9_+&-]){0,39}$/")
return value

@field_validator("vendor_product_id")
def vendor_product_id_validate_regular_expression(cls, value):
"""Validates the regular expression"""
Expand Down Expand Up @@ -153,6 +176,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"productId": obj.get("productId"),
"productName": obj.get("productName"),
"vendorName": obj.get("vendorName"),
"vendorPlanId": obj.get("vendorPlanId"),
"vendorProductId": obj.get("vendorProductId"),
"vendorWebsiteUrl": obj.get("vendorWebsiteUrl"),
}
Expand Down
Loading