Skip to content

Generator: Update SDK /services/iaas #1303

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
12 changes: 6 additions & 6 deletions services/iaas/src/stackit/iaas/api/default_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -13378,7 +13378,7 @@ def get_machine_type(
str,
Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."),
],
machine_type: Annotated[str, Field(strict=True, max_length=63, description="STACKIT machine type Name.")],
machine_type: Annotated[str, Field(strict=True, max_length=127, description="STACKIT machine type Name.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand Down Expand Up @@ -13450,7 +13450,7 @@ def get_machine_type_with_http_info(
str,
Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."),
],
machine_type: Annotated[str, Field(strict=True, max_length=63, description="STACKIT machine type Name.")],
machine_type: Annotated[str, Field(strict=True, max_length=127, description="STACKIT machine type Name.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand Down Expand Up @@ -13522,7 +13522,7 @@ def get_machine_type_without_preload_content(
str,
Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."),
],
machine_type: Annotated[str, Field(strict=True, max_length=63, description="STACKIT machine type Name.")],
machine_type: Annotated[str, Field(strict=True, max_length=127, description="STACKIT machine type Name.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand Down Expand Up @@ -18260,7 +18260,7 @@ def get_volume_performance_class(
Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."),
],
volume_performance_class: Annotated[
str, Field(strict=True, max_length=63, description="The name of a STACKIT Volume performance class.")
str, Field(strict=True, max_length=127, description="The name of a STACKIT Volume performance class.")
],
_request_timeout: Union[
None,
Expand Down Expand Up @@ -18334,7 +18334,7 @@ def get_volume_performance_class_with_http_info(
Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."),
],
volume_performance_class: Annotated[
str, Field(strict=True, max_length=63, description="The name of a STACKIT Volume performance class.")
str, Field(strict=True, max_length=127, description="The name of a STACKIT Volume performance class.")
],
_request_timeout: Union[
None,
Expand Down Expand Up @@ -18408,7 +18408,7 @@ def get_volume_performance_class_without_preload_content(
Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."),
],
volume_performance_class: Annotated[
str, Field(strict=True, max_length=63, description="The name of a STACKIT Volume performance class.")
str, Field(strict=True, max_length=127, description="The name of a STACKIT Volume performance class.")
],
_request_timeout: Union[
None,
Expand Down
6 changes: 3 additions & 3 deletions services/iaas/src/stackit/iaas/models/affinity_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class AffinityGroup(BaseModel):
members: Optional[List[Annotated[str, Field(min_length=36, strict=True, max_length=36)]]] = Field(
default=None, description="The servers that are part of the affinity group."
)
name: Annotated[str, Field(strict=True, max_length=63)] = Field(
name: Annotated[str, Field(strict=True, max_length=127)] = Field(
description="The name for a General Object. Matches Names and also UUIDs."
)
policy: StrictStr = Field(
Expand All @@ -57,8 +57,8 @@ def id_validate_regular_expression(cls, value):
@field_validator("name")
def name_validate_regular_expression(cls, value):
"""Validates the regular expression"""
if not re.match(r"^[A-Za-z0-9]+((-|_|\s|\.)[A-Za-z0-9]+)*$", value):
raise ValueError(r"must validate the regular expression /^[A-Za-z0-9]+((-|_|\s|\.)[A-Za-z0-9]+)*$/")
if not re.match(r"^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$", value):
raise ValueError(r"must validate the regular expression /^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$/")
return value

model_config = ConfigDict(
Expand Down
6 changes: 3 additions & 3 deletions services/iaas/src/stackit/iaas/models/backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Backup(BaseModel):
default=None,
description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`.",
)
name: Optional[Annotated[str, Field(strict=True, max_length=63)]] = Field(
name: Optional[Annotated[str, Field(strict=True, max_length=127)]] = Field(
default=None, description="The name for a General Object. Matches Names and also UUIDs."
)
size: Optional[StrictInt] = Field(default=None, description="Size in Gigabyte.")
Expand Down Expand Up @@ -90,8 +90,8 @@ def name_validate_regular_expression(cls, value):
if value is None:
return value

if not re.match(r"^[A-Za-z0-9]+((-|_|\s|\.)[A-Za-z0-9]+)*$", value):
raise ValueError(r"must validate the regular expression /^[A-Za-z0-9]+((-|_|\s|\.)[A-Za-z0-9]+)*$/")
if not re.match(r"^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$", value):
raise ValueError(r"must validate the regular expression /^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$/")
return value

@field_validator("snapshot_id")
Expand Down
6 changes: 3 additions & 3 deletions services/iaas/src/stackit/iaas/models/boot_volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class BootVolume(BaseModel):
id: Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]] = Field(
default=None, description="Universally Unique Identifier (UUID)."
)
performance_class: Optional[Annotated[str, Field(strict=True, max_length=63)]] = Field(
performance_class: Optional[Annotated[str, Field(strict=True, max_length=127)]] = Field(
default=None,
description="The name for a General Object. Matches Names and also UUIDs.",
alias="performanceClass",
Expand All @@ -72,8 +72,8 @@ def performance_class_validate_regular_expression(cls, value):
if value is None:
return value

if not re.match(r"^[A-Za-z0-9]+((-|_|\s|\.)[A-Za-z0-9]+)*$", value):
raise ValueError(r"must validate the regular expression /^[A-Za-z0-9]+((-|_|\s|\.)[A-Za-z0-9]+)*$/")
if not re.match(r"^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$", value):
raise ValueError(r"must validate the regular expression /^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$/")
return value

model_config = ConfigDict(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class CreateAffinityGroupPayload(BaseModel):
members: Optional[List[Annotated[str, Field(min_length=36, strict=True, max_length=36)]]] = Field(
default=None, description="The servers that are part of the affinity group."
)
name: Annotated[str, Field(strict=True, max_length=63)] = Field(
name: Annotated[str, Field(strict=True, max_length=127)] = Field(
description="The name for a General Object. Matches Names and also UUIDs."
)
policy: StrictStr = Field(
Expand All @@ -57,8 +57,8 @@ def id_validate_regular_expression(cls, value):
@field_validator("name")
def name_validate_regular_expression(cls, value):
"""Validates the regular expression"""
if not re.match(r"^[A-Za-z0-9]+((-|_|\s|\.)[A-Za-z0-9]+)*$", value):
raise ValueError(r"must validate the regular expression /^[A-Za-z0-9]+((-|_|\s|\.)[A-Za-z0-9]+)*$/")
if not re.match(r"^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$", value):
raise ValueError(r"must validate the regular expression /^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$/")
return value

model_config = ConfigDict(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class CreateBackupPayload(BaseModel):
default=None,
description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`.",
)
name: Optional[Annotated[str, Field(strict=True, max_length=63)]] = Field(
name: Optional[Annotated[str, Field(strict=True, max_length=127)]] = Field(
default=None, description="The name for a General Object. Matches Names and also UUIDs."
)
source: BackupSource
Expand All @@ -46,8 +46,8 @@ def name_validate_regular_expression(cls, value):
if value is None:
return value

if not re.match(r"^[A-Za-z0-9]+((-|_|\s|\.)[A-Za-z0-9]+)*$", value):
raise ValueError(r"must validate the regular expression /^[A-Za-z0-9]+((-|_|\s|\.)[A-Za-z0-9]+)*$/")
if not re.match(r"^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$", value):
raise ValueError(r"must validate the regular expression /^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$/")
return value

model_config = ConfigDict(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class CreateImagePayload(BaseModel):
)
min_disk_size: Optional[StrictInt] = Field(default=None, description="Size in Gigabyte.", alias="minDiskSize")
min_ram: Optional[StrictInt] = Field(default=None, description="Size in Megabyte.", alias="minRam")
name: Annotated[str, Field(strict=True, max_length=63)] = Field(
name: Annotated[str, Field(strict=True, max_length=127)] = Field(
description="The name for a General Object. Matches Names and also UUIDs."
)
owner: Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]] = Field(
Expand Down Expand Up @@ -108,8 +108,8 @@ def id_validate_regular_expression(cls, value):
@field_validator("name")
def name_validate_regular_expression(cls, value):
"""Validates the regular expression"""
if not re.match(r"^[A-Za-z0-9]+((-|_|\s|\.)[A-Za-z0-9]+)*$", value):
raise ValueError(r"must validate the regular expression /^[A-Za-z0-9]+((-|_|\s|\.)[A-Za-z0-9]+)*$/")
if not re.match(r"^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$", value):
raise ValueError(r"must validate the regular expression /^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$/")
return value

@field_validator("owner")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@ class CreateNetworkAreaPayload(BaseModel):
default=None,
description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`.",
)
name: Annotated[str, Field(strict=True, max_length=63)] = Field(
name: Annotated[str, Field(strict=True, max_length=127)] = Field(
description="The name for a General Object. Matches Names and also UUIDs."
)
__properties: ClassVar[List[str]] = ["addressFamily", "labels", "name"]

@field_validator("name")
def name_validate_regular_expression(cls, value):
"""Validates the regular expression"""
if not re.match(r"^[A-Za-z0-9]+((-|_|\s|\.)[A-Za-z0-9]+)*$", value):
raise ValueError(r"must validate the regular expression /^[A-Za-z0-9]+((-|_|\s|\.)[A-Za-z0-9]+)*$/")
if not re.match(r"^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$", value):
raise ValueError(r"must validate the regular expression /^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$/")
return value

model_config = ConfigDict(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class CreateNetworkPayload(BaseModel):
default=None,
description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`.",
)
name: Annotated[str, Field(strict=True, max_length=63)] = Field(
name: Annotated[str, Field(strict=True, max_length=127)] = Field(
description="The name for a General Object. Matches Names and also UUIDs."
)
routed: Optional[StrictBool] = Field(
Expand All @@ -46,8 +46,8 @@ class CreateNetworkPayload(BaseModel):
@field_validator("name")
def name_validate_regular_expression(cls, value):
"""Validates the regular expression"""
if not re.match(r"^[A-Za-z0-9]+((-|_|\s|\.)[A-Za-z0-9]+)*$", value):
raise ValueError(r"must validate the regular expression /^[A-Za-z0-9]+((-|_|\s|\.)[A-Za-z0-9]+)*$/")
if not re.match(r"^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$", value):
raise ValueError(r"must validate the regular expression /^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$/")
return value

model_config = ConfigDict(
Expand Down
6 changes: 3 additions & 3 deletions services/iaas/src/stackit/iaas/models/create_nic_payload.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class CreateNicPayload(BaseModel):
mac: Optional[Annotated[str, Field(strict=True)]] = Field(
default=None, description="Object that represents an MAC address."
)
name: Optional[Annotated[str, Field(strict=True, max_length=63)]] = Field(
name: Optional[Annotated[str, Field(strict=True, max_length=127)]] = Field(
default=None, description="The name for a General Object. Matches Names and also UUIDs."
)
network_id: Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]] = Field(
Expand Down Expand Up @@ -161,8 +161,8 @@ def name_validate_regular_expression(cls, value):
if value is None:
return value

if not re.match(r"^[A-Za-z0-9]+((-|_|\s|\.)[A-Za-z0-9]+)*$", value):
raise ValueError(r"must validate the regular expression /^[A-Za-z0-9]+((-|_|\s|\.)[A-Za-z0-9]+)*$/")
if not re.match(r"^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$", value):
raise ValueError(r"must validate the regular expression /^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$/")
return value

@field_validator("network_id")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class CreateSecurityGroupPayload(BaseModel):
default=None,
description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`.",
)
name: Annotated[str, Field(strict=True, max_length=63)] = Field(
name: Annotated[str, Field(strict=True, max_length=127)] = Field(
description="The name for a General Object. Matches Names and also UUIDs."
)
rules: Optional[List[SecurityGroupRule]] = Field(
Expand Down Expand Up @@ -83,8 +83,8 @@ def id_validate_regular_expression(cls, value):
@field_validator("name")
def name_validate_regular_expression(cls, value):
"""Validates the regular expression"""
if not re.match(r"^[A-Za-z0-9]+((-|_|\s|\.)[A-Za-z0-9]+)*$", value):
raise ValueError(r"must validate the regular expression /^[A-Za-z0-9]+((-|_|\s|\.)[A-Za-z0-9]+)*$/")
if not re.match(r"^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$", value):
raise ValueError(r"must validate the regular expression /^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$/")
return value

model_config = ConfigDict(
Expand Down
23 changes: 17 additions & 6 deletions services/iaas/src/stackit/iaas/models/create_server_payload.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,14 @@ class CreateServerPayload(BaseModel):
launched_at: Optional[datetime] = Field(
default=None, description="Date-time when resource was launched.", alias="launchedAt"
)
machine_type: Annotated[str, Field(strict=True, max_length=63)] = Field(
machine_type: Annotated[str, Field(strict=True, max_length=127)] = Field(
description="Name of the machine type the server shall belong to.", alias="machineType"
)
maintenance_window: Optional[ServerMaintenance] = Field(default=None, alias="maintenanceWindow")
metadata: Optional[Dict[str, Any]] = Field(
default=None,
description="Object that represents the metadata of an object. Regex for keys: `^[a-zA-Z0-9-_:. ]{1,255}$`. Regex for values: `^.{0,255}$`.",
)
name: Annotated[str, Field(strict=True, max_length=63)] = Field(description="The name for a Server.")
networking: Optional[CreateServerPayloadNetworking] = None
nics: Optional[List[ServerNetwork]] = Field(
Expand All @@ -87,7 +91,7 @@ class CreateServerPayload(BaseModel):
description="The power status of a server. Possible values: `CRASHED`, `ERROR`, `RUNNING`, `STOPPED`.",
alias="powerStatus",
)
security_groups: Optional[List[Annotated[str, Field(strict=True, max_length=63)]]] = Field(
security_groups: Optional[List[Annotated[str, Field(strict=True, max_length=127)]]] = Field(
default=None, description="The initial security groups for the server creation.", alias="securityGroups"
)
service_account_mails: Optional[
Expand Down Expand Up @@ -125,6 +129,7 @@ class CreateServerPayload(BaseModel):
"launchedAt",
"machineType",
"maintenanceWindow",
"metadata",
"name",
"networking",
"nics",
Expand Down Expand Up @@ -186,15 +191,20 @@ def keypair_name_validate_regular_expression(cls, value):
@field_validator("machine_type")
def machine_type_validate_regular_expression(cls, value):
"""Validates the regular expression"""
if not re.match(r"^[A-Za-z0-9]+((-|_|\s|\.)[A-Za-z0-9]+)*$", value):
raise ValueError(r"must validate the regular expression /^[A-Za-z0-9]+((-|_|\s|\.)[A-Za-z0-9]+)*$/")
if not re.match(r"^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$", value):
raise ValueError(r"must validate the regular expression /^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$/")
return value

@field_validator("name")
def name_validate_regular_expression(cls, value):
"""Validates the regular expression"""
if not re.match(r"^[A-Za-z0-9]+((-|\.)[A-Za-z0-9]+)*$", value):
raise ValueError(r"must validate the regular expression /^[A-Za-z0-9]+((-|\.)[A-Za-z0-9]+)*$/")
if not re.match(
r"^(([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])$",
value,
):
raise ValueError(
r"must validate the regular expression /^(([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])$/"
)
return value

model_config = ConfigDict(
Expand Down Expand Up @@ -300,6 +310,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
if obj.get("maintenanceWindow") is not None
else None
),
"metadata": obj.get("metadata"),
"name": obj.get("name"),
"networking": (
CreateServerPayloadNetworking.from_dict(obj["networking"])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class CreateSnapshotPayload(BaseModel):
default=None,
description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`.",
)
name: Optional[Annotated[str, Field(strict=True, max_length=63)]] = Field(
name: Optional[Annotated[str, Field(strict=True, max_length=127)]] = Field(
default=None, description="The name for a General Object. Matches Names and also UUIDs."
)
size: Optional[StrictInt] = Field(default=None, description="Size in Gigabyte.")
Expand Down Expand Up @@ -73,8 +73,8 @@ def name_validate_regular_expression(cls, value):
if value is None:
return value

if not re.match(r"^[A-Za-z0-9]+((-|_|\s|\.)[A-Za-z0-9]+)*$", value):
raise ValueError(r"must validate the regular expression /^[A-Za-z0-9]+((-|_|\s|\.)[A-Za-z0-9]+)*$/")
if not re.match(r"^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$", value):
raise ValueError(r"must validate the regular expression /^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$/")
return value

@field_validator("volume_id")
Expand Down
Loading
Loading