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
18 changes: 18 additions & 0 deletions scaleway-async/scaleway_async/qaas/v1alpha1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,18 @@ def unmarshal_PlatformBookingRequirement(data: Any) -> PlatformBookingRequiremen

args: dict[str, Any] = {}

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

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

field = data.get("min_duration", None)
if field is not None:
args["min_duration"] = field
Expand All @@ -338,6 +350,12 @@ def unmarshal_PlatformBookingRequirement(data: Any) -> PlatformBookingRequiremen
else:
args["max_planification_duration"] = None

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

return PlatformBookingRequirement(**args)


Expand Down
15 changes: 15 additions & 0 deletions scaleway-async/scaleway_async/qaas/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,16 @@ def __str__(self) -> str:

@dataclass
class PlatformBookingRequirement:
max_booking_per_week: int
"""
Maximum amount of booking allowed for one organization per week.
"""

max_booking_per_day: int
"""
Maximum amount of booking allowed for one organization per day.
"""

min_duration: Optional[str] = None
"""
Minimal duration of any booking based on this platform.
Expand All @@ -262,6 +272,11 @@ class PlatformBookingRequirement:
Allowed planification time from now where the platform can be booked in the future.
"""

min_planification_duration: Optional[str] = None
"""
Minimum planification time before a platform can be booked.
"""


@dataclass
class PlatformHardware:
Expand Down
18 changes: 18 additions & 0 deletions scaleway/scaleway/qaas/v1alpha1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,18 @@ def unmarshal_PlatformBookingRequirement(data: Any) -> PlatformBookingRequiremen

args: dict[str, Any] = {}

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

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

field = data.get("min_duration", None)
if field is not None:
args["min_duration"] = field
Expand All @@ -338,6 +350,12 @@ def unmarshal_PlatformBookingRequirement(data: Any) -> PlatformBookingRequiremen
else:
args["max_planification_duration"] = None

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

return PlatformBookingRequirement(**args)


Expand Down
15 changes: 15 additions & 0 deletions scaleway/scaleway/qaas/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,16 @@ def __str__(self) -> str:

@dataclass
class PlatformBookingRequirement:
max_booking_per_week: int
"""
Maximum amount of booking allowed for one organization per week.
"""

max_booking_per_day: int
"""
Maximum amount of booking allowed for one organization per day.
"""

min_duration: Optional[str] = None
"""
Minimal duration of any booking based on this platform.
Expand All @@ -262,6 +272,11 @@ class PlatformBookingRequirement:
Allowed planification time from now where the platform can be booked in the future.
"""

min_planification_duration: Optional[str] = None
"""
Minimum planification time before a platform can be booked.
"""


@dataclass
class PlatformHardware:
Expand Down