Skip to content

Generator: Update SDK /services/stackitmarketplace #1247

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

Closed
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 @@ -38,7 +38,9 @@ class CatalogProductDetailsVendor(BaseModel):
description: StrictStr = Field(description="The vendor description.")
logo: Union[StrictBytes, StrictStr] = Field(description="The logo base64 encoded.")
name: Annotated[str, Field(strict=True, max_length=512)] = Field(description="The product's vendor name.")
vendor_id: object = Field(alias="vendorId")
vendor_id: Annotated[str, Field(min_length=36, strict=True, max_length=36)] = Field(
description="Universally Unique Identifier (UUID).", alias="vendorId"
)
video_url: Annotated[str, Field(strict=True, max_length=512)] = Field(
description="The vendor video URL.", alias="videoUrl"
)
Expand All @@ -54,6 +56,15 @@ 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("vendor_id")
def vendor_id_validate_regular_expression(cls, value):
"""Validates the regular expression"""
if not re.match(r"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", value):
raise ValueError(
r"must validate the regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/"
)
return value

@field_validator("video_url")
def video_url_validate_regular_expression(cls, value):
"""Validates the regular expression"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ class CatalogProductOverviewVendor(BaseModel):
"""

name: Annotated[str, Field(strict=True, max_length=512)] = Field(description="The product's vendor name.")
vendor_id: object = Field(alias="vendorId")
vendor_id: Annotated[str, Field(min_length=36, strict=True, max_length=36)] = Field(
description="Universally Unique Identifier (UUID).", alias="vendorId"
)
website_url: Annotated[str, Field(strict=True, max_length=512)] = Field(
description="Uniform Resource Locator.", alias="websiteUrl"
)
Expand All @@ -42,6 +44,15 @@ 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("vendor_id")
def vendor_id_validate_regular_expression(cls, value):
"""Validates the regular expression"""
if not re.match(r"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", value):
raise ValueError(
r"must validate the regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/"
)
return value

@field_validator("website_url")
def website_url_validate_regular_expression(cls, value):
"""Validates the regular expression"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@

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

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

from stackit.stackitmarketplace.models.subscription_lifecycle_state import (
SubscriptionLifecycleState,
Expand All @@ -33,12 +34,45 @@ class VendorSubscription(BaseModel):
"""

lifecycle_state: SubscriptionLifecycleState = Field(alias="lifecycleState")
organization_id: object = Field(alias="organizationId")
organization_id: Annotated[str, Field(min_length=36, strict=True, max_length=36)] = Field(
description="Universally Unique Identifier (UUID).", alias="organizationId"
)
product: SubscriptionProduct
project_id: object = Field(alias="projectId")
subscription_id: object = Field(alias="subscriptionId")
project_id: Annotated[str, Field(min_length=36, strict=True, max_length=36)] = Field(
description="Universally Unique Identifier (UUID).", alias="projectId"
)
subscription_id: Annotated[str, Field(min_length=36, strict=True, max_length=36)] = Field(
description="Universally Unique Identifier (UUID).", alias="subscriptionId"
)
__properties: ClassVar[List[str]] = ["lifecycleState", "organizationId", "product", "projectId", "subscriptionId"]

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

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

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

model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
Expand Down
Loading