Skip to content

Commit

Permalink
feat(webhosting): add support for one_time_password (#488)
Browse files Browse the repository at this point in the history
  • Loading branch information
scaleway-bot authored Apr 11, 2024
1 parent ff57694 commit d2a16a1
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 36 deletions.
20 changes: 12 additions & 8 deletions scaleway-async/scaleway_async/webhosting/v1alpha1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@ def unmarshal_Hosting(data: Any) -> Hosting:
if field is not None:
args["offer_name"] = field

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

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

field = data.get("updated_at", None)
if field is not None:
args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field
Expand All @@ -114,14 +122,6 @@ def unmarshal_Hosting(data: Any) -> Hosting:
if field is not None:
args["platform_number"] = field

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

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

field = data.get("options", None)
if field is not None:
args["options"] = (
Expand Down Expand Up @@ -160,6 +160,10 @@ def unmarshal_Hosting(data: Any) -> Hosting:
if field is not None:
args["protected"] = field

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

field = data.get("region", None)
if field is not None:
args["region"] = field
Expand Down
25 changes: 15 additions & 10 deletions scaleway-async/scaleway_async/webhosting/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,29 +297,29 @@ class Hosting:
Name of the active offer for the Web Hosting plan.
"""

updated_at: Optional[datetime]
domain: str
"""
Date on which the Web Hosting plan was last updated.
Main domain associated with the Web Hosting plan.
"""

created_at: Optional[datetime]
tags: List[str]
"""
Date on which the Web Hosting plan was created.
List of tags associated with the Web Hosting plan.
"""

platform_number: Optional[int]
updated_at: Optional[datetime]
"""
Number of the host platform.
Date on which the Web Hosting plan was last updated.
"""

domain: str
created_at: Optional[datetime]
"""
Main domain associated with the Web Hosting plan.
Date on which the Web Hosting plan was created.
"""

tags: List[str]
platform_number: Optional[int]
"""
List of tags associated with the Web Hosting plan.
Number of the host platform.
"""

options: List[HostingOption]
Expand Down Expand Up @@ -367,6 +367,11 @@ class Hosting:
Whether the hosting is protected or not.
"""

one_time_password: str
"""
One-time-password used for the first login or reset password, empty after first use.
"""

region: Region
"""
Region where the Web Hosting plan is hosted.
Expand Down
20 changes: 12 additions & 8 deletions scaleway/scaleway/webhosting/v1alpha1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@ def unmarshal_Hosting(data: Any) -> Hosting:
if field is not None:
args["offer_name"] = field

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

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

field = data.get("updated_at", None)
if field is not None:
args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field
Expand All @@ -114,14 +122,6 @@ def unmarshal_Hosting(data: Any) -> Hosting:
if field is not None:
args["platform_number"] = field

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

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

field = data.get("options", None)
if field is not None:
args["options"] = (
Expand Down Expand Up @@ -160,6 +160,10 @@ def unmarshal_Hosting(data: Any) -> Hosting:
if field is not None:
args["protected"] = field

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

field = data.get("region", None)
if field is not None:
args["region"] = field
Expand Down
25 changes: 15 additions & 10 deletions scaleway/scaleway/webhosting/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,29 +297,29 @@ class Hosting:
Name of the active offer for the Web Hosting plan.
"""

updated_at: Optional[datetime]
domain: str
"""
Date on which the Web Hosting plan was last updated.
Main domain associated with the Web Hosting plan.
"""

created_at: Optional[datetime]
tags: List[str]
"""
Date on which the Web Hosting plan was created.
List of tags associated with the Web Hosting plan.
"""

platform_number: Optional[int]
updated_at: Optional[datetime]
"""
Number of the host platform.
Date on which the Web Hosting plan was last updated.
"""

domain: str
created_at: Optional[datetime]
"""
Main domain associated with the Web Hosting plan.
Date on which the Web Hosting plan was created.
"""

tags: List[str]
platform_number: Optional[int]
"""
List of tags associated with the Web Hosting plan.
Number of the host platform.
"""

options: List[HostingOption]
Expand Down Expand Up @@ -367,6 +367,11 @@ class Hosting:
Whether the hosting is protected or not.
"""

one_time_password: str
"""
One-time-password used for the first login or reset password, empty after first use.
"""

region: Region
"""
Region where the Web Hosting plan is hosted.
Expand Down

0 comments on commit d2a16a1

Please sign in to comment.