Skip to content

Commit d2a16a1

Browse files
authored
feat(webhosting): add support for one_time_password (#488)
1 parent ff57694 commit d2a16a1

File tree

4 files changed

+54
-36
lines changed

4 files changed

+54
-36
lines changed

scaleway-async/scaleway_async/webhosting/v1alpha1/marshalling.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,14 @@ def unmarshal_Hosting(data: Any) -> Hosting:
102102
if field is not None:
103103
args["offer_name"] = field
104104

105+
field = data.get("domain", None)
106+
if field is not None:
107+
args["domain"] = field
108+
109+
field = data.get("tags", None)
110+
if field is not None:
111+
args["tags"] = field
112+
105113
field = data.get("updated_at", None)
106114
if field is not None:
107115
args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field
@@ -114,14 +122,6 @@ def unmarshal_Hosting(data: Any) -> Hosting:
114122
if field is not None:
115123
args["platform_number"] = field
116124

117-
field = data.get("domain", None)
118-
if field is not None:
119-
args["domain"] = field
120-
121-
field = data.get("tags", None)
122-
if field is not None:
123-
args["tags"] = field
124-
125125
field = data.get("options", None)
126126
if field is not None:
127127
args["options"] = (
@@ -160,6 +160,10 @@ def unmarshal_Hosting(data: Any) -> Hosting:
160160
if field is not None:
161161
args["protected"] = field
162162

163+
field = data.get("one_time_password", None)
164+
if field is not None:
165+
args["one_time_password"] = field
166+
163167
field = data.get("region", None)
164168
if field is not None:
165169
args["region"] = field

scaleway-async/scaleway_async/webhosting/v1alpha1/types.py

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -297,29 +297,29 @@ class Hosting:
297297
Name of the active offer for the Web Hosting plan.
298298
"""
299299

300-
updated_at: Optional[datetime]
300+
domain: str
301301
"""
302-
Date on which the Web Hosting plan was last updated.
302+
Main domain associated with the Web Hosting plan.
303303
"""
304304

305-
created_at: Optional[datetime]
305+
tags: List[str]
306306
"""
307-
Date on which the Web Hosting plan was created.
307+
List of tags associated with the Web Hosting plan.
308308
"""
309309

310-
platform_number: Optional[int]
310+
updated_at: Optional[datetime]
311311
"""
312-
Number of the host platform.
312+
Date on which the Web Hosting plan was last updated.
313313
"""
314314

315-
domain: str
315+
created_at: Optional[datetime]
316316
"""
317-
Main domain associated with the Web Hosting plan.
317+
Date on which the Web Hosting plan was created.
318318
"""
319319

320-
tags: List[str]
320+
platform_number: Optional[int]
321321
"""
322-
List of tags associated with the Web Hosting plan.
322+
Number of the host platform.
323323
"""
324324

325325
options: List[HostingOption]
@@ -367,6 +367,11 @@ class Hosting:
367367
Whether the hosting is protected or not.
368368
"""
369369

370+
one_time_password: str
371+
"""
372+
One-time-password used for the first login or reset password, empty after first use.
373+
"""
374+
370375
region: Region
371376
"""
372377
Region where the Web Hosting plan is hosted.

scaleway/scaleway/webhosting/v1alpha1/marshalling.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,14 @@ def unmarshal_Hosting(data: Any) -> Hosting:
102102
if field is not None:
103103
args["offer_name"] = field
104104

105+
field = data.get("domain", None)
106+
if field is not None:
107+
args["domain"] = field
108+
109+
field = data.get("tags", None)
110+
if field is not None:
111+
args["tags"] = field
112+
105113
field = data.get("updated_at", None)
106114
if field is not None:
107115
args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field
@@ -114,14 +122,6 @@ def unmarshal_Hosting(data: Any) -> Hosting:
114122
if field is not None:
115123
args["platform_number"] = field
116124

117-
field = data.get("domain", None)
118-
if field is not None:
119-
args["domain"] = field
120-
121-
field = data.get("tags", None)
122-
if field is not None:
123-
args["tags"] = field
124-
125125
field = data.get("options", None)
126126
if field is not None:
127127
args["options"] = (
@@ -160,6 +160,10 @@ def unmarshal_Hosting(data: Any) -> Hosting:
160160
if field is not None:
161161
args["protected"] = field
162162

163+
field = data.get("one_time_password", None)
164+
if field is not None:
165+
args["one_time_password"] = field
166+
163167
field = data.get("region", None)
164168
if field is not None:
165169
args["region"] = field

scaleway/scaleway/webhosting/v1alpha1/types.py

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -297,29 +297,29 @@ class Hosting:
297297
Name of the active offer for the Web Hosting plan.
298298
"""
299299

300-
updated_at: Optional[datetime]
300+
domain: str
301301
"""
302-
Date on which the Web Hosting plan was last updated.
302+
Main domain associated with the Web Hosting plan.
303303
"""
304304

305-
created_at: Optional[datetime]
305+
tags: List[str]
306306
"""
307-
Date on which the Web Hosting plan was created.
307+
List of tags associated with the Web Hosting plan.
308308
"""
309309

310-
platform_number: Optional[int]
310+
updated_at: Optional[datetime]
311311
"""
312-
Number of the host platform.
312+
Date on which the Web Hosting plan was last updated.
313313
"""
314314

315-
domain: str
315+
created_at: Optional[datetime]
316316
"""
317-
Main domain associated with the Web Hosting plan.
317+
Date on which the Web Hosting plan was created.
318318
"""
319319

320-
tags: List[str]
320+
platform_number: Optional[int]
321321
"""
322-
List of tags associated with the Web Hosting plan.
322+
Number of the host platform.
323323
"""
324324

325325
options: List[HostingOption]
@@ -367,6 +367,11 @@ class Hosting:
367367
Whether the hosting is protected or not.
368368
"""
369369

370+
one_time_password: str
371+
"""
372+
One-time-password used for the first login or reset password, empty after first use.
373+
"""
374+
370375
region: Region
371376
"""
372377
Region where the Web Hosting plan is hosted.

0 commit comments

Comments
 (0)