Skip to content

Commit ec6af97

Browse files
Generate iaas
1 parent a559ffc commit ec6af97

File tree

4 files changed

+61
-6
lines changed

4 files changed

+61
-6
lines changed

services/iaas/src/stackit/iaas/models/allowed_addresses_inner.py

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
import json
1818
import pprint
19+
import re
1920
from typing import Any, Dict, Optional, Set, Union
2021

2122
from pydantic import (
@@ -37,13 +38,35 @@ class AllowedAddressesInner(BaseModel):
3738
"""
3839

3940
# data type: str
41+
# BEGIN of the workaround until upstream issues are fixed:
42+
# https://github.com/OpenAPITools/openapi-generator/issues/19034 from Jun 28, 2024
43+
# and https://github.com/OpenAPITools/openapi-generator/issues/19842 from Oct 11, 2024
44+
# Tracking issue on our side: https://jira.schwarz/browse/STACKITSDK-227
4045
oneof_schema_1_validator: Optional[Annotated[str, Field(strict=True)]] = Field(
41-
default=None, description="Object that represents an IP address."
46+
default=None,
47+
description="Object that represents an IP address.",
48+
pattern=re.sub(
49+
r"^\/|\/$",
50+
"",
51+
r"/((^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$)|(^\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$))/",
52+
),
4253
)
54+
# END of the workaround
4355
# data type: str
56+
# BEGIN of the workaround until upstream issues are fixed:
57+
# https://github.com/OpenAPITools/openapi-generator/issues/19034 from Jun 28, 2024
58+
# and https://github.com/OpenAPITools/openapi-generator/issues/19842 from Oct 11, 2024
59+
# Tracking issue on our side: https://jira.schwarz/browse/STACKITSDK-227
4460
oneof_schema_2_validator: Optional[Annotated[str, Field(strict=True)]] = Field(
45-
default=None, description="Classless Inter-Domain Routing (CIDR)."
61+
default=None,
62+
description="Classless Inter-Domain Routing (CIDR).",
63+
pattern=re.sub(
64+
r"^\/|\/$",
65+
"",
66+
r"/^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$/",
67+
),
4668
)
69+
# END of the workaround
4770
actual_instance: Optional[Union[str]] = None
4871
one_of_schemas: Set[str] = {"str"}
4972

services/iaas/src/stackit/iaas/models/area_id.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
import json
1818
import pprint
19+
import re
1920
from typing import Any, Dict, Optional, Set, Union
2021

2122
from pydantic import (
@@ -39,11 +40,23 @@ class AreaId(BaseModel):
3940
"""
4041

4142
# data type: str
42-
oneof_schema_1_validator: Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]] = Field(
43-
default=None, description="Universally Unique Identifier (UUID)."
43+
# BEGIN of the workaround until upstream issues are fixed:
44+
# https://github.com/OpenAPITools/openapi-generator/issues/19034 from Jun 28, 2024
45+
# and https://github.com/OpenAPITools/openapi-generator/issues/19842 from Oct 11, 2024
46+
# Tracking issue on our side: https://jira.schwarz/browse/STACKITSDK-227
47+
oneof_schema_1_validator: Optional[Annotated[str, Field(strict=True)]] = Field(
48+
default=None,
49+
description="Universally Unique Identifier (UUID).",
50+
pattern=re.sub(r"^\/|\/$", "", r"/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/"),
4451
)
52+
# END of the workaround
4553
# data type: StaticAreaID
54+
# BEGIN of the workaround until upstream issues are fixed:
55+
# https://github.com/OpenAPITools/openapi-generator/issues/19034 from Jun 28, 2024
56+
# and https://github.com/OpenAPITools/openapi-generator/issues/19842 from Oct 11, 2024
57+
# Tracking issue on our side: https://jira.schwarz/browse/STACKITSDK-227
4658
oneof_schema_2_validator: Optional[StaticAreaID] = None
59+
# END of the workaround
4760
actual_instance: Optional[Union[StaticAreaID, str]] = None
4861
one_of_schemas: Set[str] = {"StaticAreaID", "str"}
4962

services/iaas/src/stackit/iaas/models/create_protocol.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
BaseModel,
2323
ConfigDict,
2424
Field,
25-
StrictStr,
2625
ValidationError,
2726
field_validator,
2827
)
@@ -38,14 +37,24 @@ class CreateProtocol(BaseModel):
3837
"""
3938

4039
# data type: int
40+
# BEGIN of the workaround until upstream issues are fixed:
41+
# https://github.com/OpenAPITools/openapi-generator/issues/19034 from Jun 28, 2024
42+
# and https://github.com/OpenAPITools/openapi-generator/issues/19842 from Oct 11, 2024
43+
# Tracking issue on our side: https://jira.schwarz/browse/STACKITSDK-227
4144
oneof_schema_1_validator: Optional[Annotated[int, Field(le=255, strict=True, ge=0)]] = Field(
4245
default=None, description="The protocol number which the rule should match."
4346
)
47+
# END of the workaround
4448
# data type: str
45-
oneof_schema_2_validator: Optional[StrictStr] = Field(
49+
# BEGIN of the workaround until upstream issues are fixed:
50+
# https://github.com/OpenAPITools/openapi-generator/issues/19034 from Jun 28, 2024
51+
# and https://github.com/OpenAPITools/openapi-generator/issues/19842 from Oct 11, 2024
52+
# Tracking issue on our side: https://jira.schwarz/browse/STACKITSDK-227
53+
oneof_schema_2_validator: Optional[Annotated[str, Field(strict=True)]] = Field(
4654
default=None,
4755
description="The protocol name which the rule should match. Possible values: `ah`, `dccp`, `egp`, `esp`, `gre`, `icmp`, `igmp`, `ipip`, `ipv6-encap`, `ipv6-frag`, `ipv6-icmp`, `ipv6-nonxt`, `ipv6-opts`, `ipv6-route`, `ospf`, `pgm`, `rsvp`, `sctp`, `tcp`, `udp`, `udplite`, `vrrp`.",
4856
)
57+
# END of the workaround
4958
actual_instance: Optional[Union[int, str]] = None
5059
one_of_schemas: Set[str] = {"int", "str"}
5160

services/iaas/src/stackit/iaas/models/create_server_payload_networking.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,19 @@ class CreateServerPayloadNetworking(BaseModel):
4141
"""
4242

4343
# data type: CreateServerNetworking
44+
# BEGIN of the workaround until upstream issues are fixed:
45+
# https://github.com/OpenAPITools/openapi-generator/issues/19034 from Jun 28, 2024
46+
# and https://github.com/OpenAPITools/openapi-generator/issues/19842 from Oct 11, 2024
47+
# Tracking issue on our side: https://jira.schwarz/browse/STACKITSDK-227
4448
oneof_schema_1_validator: Optional[CreateServerNetworking] = None
49+
# END of the workaround
4550
# data type: CreateServerNetworkingWithNics
51+
# BEGIN of the workaround until upstream issues are fixed:
52+
# https://github.com/OpenAPITools/openapi-generator/issues/19034 from Jun 28, 2024
53+
# and https://github.com/OpenAPITools/openapi-generator/issues/19842 from Oct 11, 2024
54+
# Tracking issue on our side: https://jira.schwarz/browse/STACKITSDK-227
4655
oneof_schema_2_validator: Optional[CreateServerNetworkingWithNics] = None
56+
# END of the workaround
4757
actual_instance: Optional[Union[CreateServerNetworking, CreateServerNetworkingWithNics]] = None
4858
one_of_schemas: Set[str] = {"CreateServerNetworking", "CreateServerNetworkingWithNics"}
4959

0 commit comments

Comments
 (0)