File tree Expand file tree Collapse file tree 4 files changed +18
-2
lines changed
scaleway-async/scaleway_async/instance/v1
scaleway/scaleway/instance/v1 Expand file tree Collapse file tree 4 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -582,6 +582,9 @@ def unmarshal_ServerMaintenance(data: Any) -> ServerMaintenance:
582582 field = data .get ("reason" , None )
583583 args ["reason" ] = field
584584
585+ field = data .get ("start_date" , None )
586+ args ["start_date" ] = parser .isoparse (field ) if type (field ) is str else field
587+
585588 return ServerMaintenance (** args )
586589
587590
@@ -2603,6 +2606,9 @@ def marshal_ServerMaintenance(
26032606 if request .reason is not None :
26042607 output ["reason" ] = request .reason
26052608
2609+ if request .start_date is not None :
2610+ output ["start_date" ] = request .start_date .astimezone ().isoformat ()
2611+
26062612 return output
26072613
26082614
Original file line number Diff line number Diff line change @@ -1357,6 +1357,8 @@ class ServerLocation:
13571357class ServerMaintenance :
13581358 reason : str
13591359
1360+ start_date : Optional [datetime ]
1361+
13601362
13611363@dataclass
13621364class ServerSummary :
Original file line number Diff line number Diff line change @@ -582,6 +582,9 @@ def unmarshal_ServerMaintenance(data: Any) -> ServerMaintenance:
582582 field = data .get ("reason" , None )
583583 args ["reason" ] = field
584584
585+ field = data .get ("start_date" , None )
586+ args ["start_date" ] = parser .isoparse (field ) if type (field ) is str else field
587+
585588 return ServerMaintenance (** args )
586589
587590
@@ -2603,6 +2606,9 @@ def marshal_ServerMaintenance(
26032606 if request .reason is not None :
26042607 output ["reason" ] = request .reason
26052608
2609+ if request .start_date is not None :
2610+ output ["start_date" ] = request .start_date .astimezone ().isoformat ()
2611+
26062612 return output
26072613
26082614
Original file line number Diff line number Diff line change @@ -1310,13 +1310,13 @@ class ServerIp:
13101310 Tags associated with the IP.
13111311 """
13121312
1313+ state : ServerIpState
1314+
13131315 ipam_id : str
13141316 """
13151317 The ip_id of an IPAM ip if the ip is created from IPAM, null if not.
13161318 """
13171319
1318- state : ServerIpState
1319-
13201320
13211321@dataclass
13221322class ServerIpv6 :
@@ -1357,6 +1357,8 @@ class ServerLocation:
13571357class ServerMaintenance :
13581358 reason : str
13591359
1360+ start_date : Optional [datetime ]
1361+
13601362
13611363@dataclass
13621364class ServerSummary :
You can’t perform that action at this time.
0 commit comments