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 @@ -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 @@ -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
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,7 +38,9 @@ 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"
)
Expand All @@ -63,6 +65,13 @@ class SubscriptionProduct(BaseModel):
"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 Down
Loading