Skip to content
Merged
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
50 changes: 25 additions & 25 deletions scaleway-async/scaleway_async/lb/v1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,12 +515,6 @@ def unmarshal_Instance(data: Any) -> Instance:
else:
args["ip_address"] = None

field = data.get("region", None)
if field is not None:
args["region"] = field
else:
args["region"] = None

field = data.get("zone", None)
if field is not None:
args["zone"] = field
Expand All @@ -539,6 +533,12 @@ def unmarshal_Instance(data: Any) -> Instance:
else:
args["updated_at"] = None

field = data.get("region", None)
if field is not None:
args["region"] = field
else:
args["region"] = None

return Instance(**args)


Expand Down Expand Up @@ -644,12 +644,6 @@ def unmarshal_Lb(data: Any) -> Lb:
else:
args["route_count"] = 0

field = data.get("region", None)
if field is not None:
args["region"] = field
else:
args["region"] = None

field = data.get("zone", None)
if field is not None:
args["zone"] = field
Expand All @@ -674,6 +668,12 @@ def unmarshal_Lb(data: Any) -> Lb:
else:
args["updated_at"] = None

field = data.get("region", None)
if field is not None:
args["region"] = field
else:
args["region"] = None

return Lb(**args)


Expand Down Expand Up @@ -733,12 +733,6 @@ def unmarshal_Backend(data: Any) -> Backend:
else:
args["pool"] = []

field = data.get("send_proxy_v2", None)
if field is not None:
args["send_proxy_v2"] = field
else:
args["send_proxy_v2"] = False

field = data.get("on_marked_down_action", None)
if field is not None:
args["on_marked_down_action"] = field
Expand All @@ -763,6 +757,12 @@ def unmarshal_Backend(data: Any) -> Backend:
else:
args["lb"] = None

field = data.get("send_proxy_v2", None)
if field is not None:
args["send_proxy_v2"] = field
else:
args["send_proxy_v2"] = None

field = data.get("timeout_server", None)
if field is not None:
args["timeout_server"] = field
Expand Down Expand Up @@ -1224,7 +1224,7 @@ def unmarshal_PrivateNetworkStaticConfig(data: Any) -> PrivateNetworkStaticConfi
if field is not None:
args["ip_address"] = field
else:
args["ip_address"] = []
args["ip_address"] = None

return PrivateNetworkStaticConfig(**args)

Expand Down Expand Up @@ -1645,18 +1645,18 @@ def unmarshal_LbType(data: Any) -> LbType:
else:
args["description"] = None

field = data.get("region", None)
if field is not None:
args["region"] = field
else:
args["region"] = None

field = data.get("zone", None)
if field is not None:
args["zone"] = field
else:
args["zone"] = None

field = data.get("region", None)
if field is not None:
args["region"] = field
else:
args["region"] = None

return LbType(**args)


Expand Down
50 changes: 25 additions & 25 deletions scaleway-async/scaleway_async/lb/v1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,11 +393,6 @@ class Instance:
Instance IP address.
"""

region: ScwRegion
"""
The region the Instance is in.
"""

zone: ScwZone
"""
The zone the Instance is in.
Expand All @@ -413,6 +408,11 @@ class Instance:
Date on which the Instance was last updated.
"""

region: Optional[ScwRegion] = None
"""
The region the Instance is in.
"""


@dataclass
class Ip:
Expand Down Expand Up @@ -446,11 +446,6 @@ class Ip:
IP tags.
"""

region: ScwRegion
"""
The region the IP address is in.
"""

zone: ScwZone
"""
The zone the IP address is in.
Expand All @@ -461,6 +456,11 @@ class Ip:
Load Balancer ID.
"""

region: Optional[ScwRegion] = None
"""
The region the IP address is in.
"""


@dataclass
class Subscriber:
Expand Down Expand Up @@ -607,11 +607,6 @@ class Lb:
Number of routes configured on the Load Balancer.
"""

region: ScwRegion
"""
The region the Load Balancer is in.
"""

zone: ScwZone
"""
The zone the Load Balancer is in.
Expand All @@ -632,6 +627,11 @@ class Lb:
Date on which the Load Balancer was last updated.
"""

region: Optional[ScwRegion] = None
"""
The region the Load Balancer is in.
"""


@dataclass
class AclActionRedirect:
Expand Down Expand Up @@ -713,7 +713,7 @@ class Backend:
Load Balancer the backend is attached to.
"""

send_proxy_v2: Optional[bool] = False
send_proxy_v2: Optional[bool] = None
"""
Deprecated in favor of proxy_protocol field.
"""
Expand Down Expand Up @@ -973,7 +973,7 @@ class PrivateNetworkIpamConfig:

@dataclass
class PrivateNetworkStaticConfig:
ip_address: list[str]
ip_address: Optional[list[str]] = field(default_factory=list)
"""
Array of a local IP address for the Load Balancer on this Private Network.
"""
Expand Down Expand Up @@ -1151,14 +1151,14 @@ class LbType:
Load Balancer commercial offer type description.
"""

region: ScwRegion
zone: ScwZone
"""
The region the Load Balancer stock is in.
The zone the Load Balancer stock is in.
"""

zone: ScwZone
region: Optional[ScwRegion] = None
"""
The zone the Load Balancer stock is in.
The region the Load Balancer stock is in.
"""


Expand Down Expand Up @@ -1364,7 +1364,7 @@ class CreateBackendRequest:
Name for the backend.
"""

send_proxy_v2: Optional[bool] = False
send_proxy_v2: Optional[bool] = None
"""
Deprecated in favor of proxy_protocol field.
"""
Expand Down Expand Up @@ -2598,7 +2598,7 @@ class UpdateBackendRequest:
Region to target. If none is passed will use default region from the config.
"""

send_proxy_v2: Optional[bool] = False
send_proxy_v2: Optional[bool] = None
"""
Deprecated in favor of proxy_protocol field.
"""
Expand Down Expand Up @@ -3048,7 +3048,7 @@ class ZonedApiCreateBackendRequest:
Name for the backend.
"""

send_proxy_v2: Optional[bool] = False
send_proxy_v2: Optional[bool] = None
"""
Deprecated in favor of proxy_protocol field.
"""
Expand Down Expand Up @@ -4136,7 +4136,7 @@ class ZonedApiUpdateBackendRequest:
Zone to target. If none is passed will use default zone from the config.
"""

send_proxy_v2: Optional[bool] = False
send_proxy_v2: Optional[bool] = None
"""
Deprecated in favor of proxy_protocol field.
"""
Expand Down
14 changes: 7 additions & 7 deletions scaleway/scaleway/lb/v1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -733,12 +733,6 @@ def unmarshal_Backend(data: Any) -> Backend:
else:
args["pool"] = []

field = data.get("send_proxy_v2", None)
if field is not None:
args["send_proxy_v2"] = field
else:
args["send_proxy_v2"] = False

field = data.get("on_marked_down_action", None)
if field is not None:
args["on_marked_down_action"] = field
Expand All @@ -763,6 +757,12 @@ def unmarshal_Backend(data: Any) -> Backend:
else:
args["lb"] = None

field = data.get("send_proxy_v2", None)
if field is not None:
args["send_proxy_v2"] = field
else:
args["send_proxy_v2"] = None

field = data.get("timeout_server", None)
if field is not None:
args["timeout_server"] = field
Expand Down Expand Up @@ -1224,7 +1224,7 @@ def unmarshal_PrivateNetworkStaticConfig(data: Any) -> PrivateNetworkStaticConfi
if field is not None:
args["ip_address"] = field
else:
args["ip_address"] = []
args["ip_address"] = None

return PrivateNetworkStaticConfig(**args)

Expand Down
Loading
Loading