From 2d61b5ad24cebf5a16a521520d446aae165b14db Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Thu, 20 Feb 2025 15:33:53 +0000 Subject: [PATCH] feat: update generated APIs --- .../webhosting/v1/marshalling.py | 54 ++++++++++++------- .../scaleway_async/webhosting/v1/types.py | 49 +++++++++++------ .../scaleway/webhosting/v1/marshalling.py | 54 ++++++++++++------- scaleway/scaleway/webhosting/v1/types.py | 49 +++++++++++------ 4 files changed, 136 insertions(+), 70 deletions(-) diff --git a/scaleway-async/scaleway_async/webhosting/v1/marshalling.py b/scaleway-async/scaleway_async/webhosting/v1/marshalling.py index 462a8ccbf..873ac7014 100644 --- a/scaleway-async/scaleway_async/webhosting/v1/marshalling.py +++ b/scaleway-async/scaleway_async/webhosting/v1/marshalling.py @@ -515,9 +515,9 @@ def unmarshal_Hosting(data: Any) -> Hosting: if field is not None: args["tags"] = field - field = data.get("dns_status", None) + field = data.get("ipv4", None) if field is not None: - args["dns_status"] = field + args["ipv4"] = field field = data.get("updated_at", None) if field is not None: @@ -525,23 +525,23 @@ def unmarshal_Hosting(data: Any) -> Hosting: else: args["updated_at"] = None - field = data.get("ipv4", None) + field = data.get("created_at", None) if field is not None: - args["ipv4"] = field + args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("protected", None) if field is not None: args["protected"] = field - field = data.get("region", None) + field = data.get("domain_status", None) if field is not None: - args["region"] = field + args["domain_status"] = field - field = data.get("created_at", None) + field = data.get("region", None) if field is not None: - args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field - else: - args["created_at"] = None + args["region"] = field field = data.get("offer", None) if field is not None: @@ -555,6 +555,12 @@ def unmarshal_Hosting(data: Any) -> Hosting: else: args["platform"] = None + field = data.get("dns_status", None) + if field is not None: + args["dns_status"] = field + else: + args["dns_status"] = None + field = data.get("user", None) if field is not None: args["user"] = unmarshal_HostingUser(field) @@ -693,10 +699,6 @@ def unmarshal_HostingSummary(data: Any) -> HostingSummary: if field is not None: args["project_id"] = field - field = data.get("status", None) - if field is not None: - args["status"] = field - field = data.get("domain", None) if field is not None: args["domain"] = field @@ -705,14 +707,18 @@ def unmarshal_HostingSummary(data: Any) -> HostingSummary: if field is not None: args["protected"] = field - field = data.get("dns_status", None) - if field is not None: - args["dns_status"] = field - field = data.get("offer_name", None) if field is not None: args["offer_name"] = field + field = data.get("hosting_status", None) + if field is not None: + args["hosting_status"] = field + + field = data.get("domain_status", None) + if field is not None: + args["domain_status"] = field + field = data.get("region", None) if field is not None: args["region"] = field @@ -729,6 +735,18 @@ def unmarshal_HostingSummary(data: Any) -> HostingSummary: else: args["updated_at"] = None + field = data.get("status", None) + if field is not None: + args["status"] = field + else: + args["status"] = None + + field = data.get("dns_status", None) + if field is not None: + args["dns_status"] = field + else: + args["dns_status"] = None + return HostingSummary(**args) diff --git a/scaleway-async/scaleway_async/webhosting/v1/types.py b/scaleway-async/scaleway_async/webhosting/v1/types.py index ee610795d..480e1974a 100644 --- a/scaleway-async/scaleway_async/webhosting/v1/types.py +++ b/scaleway-async/scaleway_async/webhosting/v1/types.py @@ -579,11 +579,6 @@ class HostingSummary: ID of the Scaleway Project the Web Hosting plan belongs to. """ - status: HostingSummaryStatus - """ - Status of the Web Hosting plan. - """ - domain: str """ Main domain associated with the Web Hosting plan. @@ -594,14 +589,19 @@ class HostingSummary: Whether the hosting is protected or not. """ - dns_status: DnsRecordsStatus + offer_name: str """ - DNS status of the Web Hosting plan. + Name of the active offer for the Web Hosting plan. """ - offer_name: str + hosting_status: HostingStatus """ - Name of the active offer for the Web Hosting plan. + Status of the Web Hosting plan. + """ + + domain_status: DomainStatus + """ + Main domain status of the Web Hosting plan. """ region: ScwRegion @@ -619,6 +619,16 @@ class HostingSummary: Date on which the Web Hosting plan was last updated. """ + status: Optional[HostingSummaryStatus] + """ + Status of the Web Hosting plan. + """ + + dns_status: Optional[DnsRecordsStatus] + """ + DNS status of the Web Hosting plan. + """ + @dataclass class MailAccount: @@ -1232,9 +1242,9 @@ class Hosting: List of tags associated with the Web Hosting plan. """ - dns_status: DnsRecordsStatus + ipv4: str """ - DNS status of the Web Hosting plan. + Current IPv4 address of the hosting. """ updated_at: Optional[datetime] @@ -1242,9 +1252,9 @@ class Hosting: Date on which the Web Hosting plan was last updated. """ - ipv4: str + created_at: Optional[datetime] """ - Current IPv4 address of the hosting. + Date on which the Web Hosting plan was created. """ protected: bool @@ -1252,14 +1262,14 @@ class Hosting: Whether the hosting is protected or not. """ - region: ScwRegion + domain_status: DomainStatus """ - Region where the Web Hosting plan is hosted. + Main domain status of the Web Hosting plan. """ - created_at: Optional[datetime] + region: ScwRegion """ - Date on which the Web Hosting plan was created. + Region where the Web Hosting plan is hosted. """ offer: Optional[Offer] @@ -1272,6 +1282,11 @@ class Hosting: Details of the hosting platform. """ + dns_status: Optional[DnsRecordsStatus] + """ + DNS status of the Web Hosting plan. + """ + user: Optional[HostingUser] """ Details of the hosting user. diff --git a/scaleway/scaleway/webhosting/v1/marshalling.py b/scaleway/scaleway/webhosting/v1/marshalling.py index 462a8ccbf..873ac7014 100644 --- a/scaleway/scaleway/webhosting/v1/marshalling.py +++ b/scaleway/scaleway/webhosting/v1/marshalling.py @@ -515,9 +515,9 @@ def unmarshal_Hosting(data: Any) -> Hosting: if field is not None: args["tags"] = field - field = data.get("dns_status", None) + field = data.get("ipv4", None) if field is not None: - args["dns_status"] = field + args["ipv4"] = field field = data.get("updated_at", None) if field is not None: @@ -525,23 +525,23 @@ def unmarshal_Hosting(data: Any) -> Hosting: else: args["updated_at"] = None - field = data.get("ipv4", None) + field = data.get("created_at", None) if field is not None: - args["ipv4"] = field + args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("protected", None) if field is not None: args["protected"] = field - field = data.get("region", None) + field = data.get("domain_status", None) if field is not None: - args["region"] = field + args["domain_status"] = field - field = data.get("created_at", None) + field = data.get("region", None) if field is not None: - args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field - else: - args["created_at"] = None + args["region"] = field field = data.get("offer", None) if field is not None: @@ -555,6 +555,12 @@ def unmarshal_Hosting(data: Any) -> Hosting: else: args["platform"] = None + field = data.get("dns_status", None) + if field is not None: + args["dns_status"] = field + else: + args["dns_status"] = None + field = data.get("user", None) if field is not None: args["user"] = unmarshal_HostingUser(field) @@ -693,10 +699,6 @@ def unmarshal_HostingSummary(data: Any) -> HostingSummary: if field is not None: args["project_id"] = field - field = data.get("status", None) - if field is not None: - args["status"] = field - field = data.get("domain", None) if field is not None: args["domain"] = field @@ -705,14 +707,18 @@ def unmarshal_HostingSummary(data: Any) -> HostingSummary: if field is not None: args["protected"] = field - field = data.get("dns_status", None) - if field is not None: - args["dns_status"] = field - field = data.get("offer_name", None) if field is not None: args["offer_name"] = field + field = data.get("hosting_status", None) + if field is not None: + args["hosting_status"] = field + + field = data.get("domain_status", None) + if field is not None: + args["domain_status"] = field + field = data.get("region", None) if field is not None: args["region"] = field @@ -729,6 +735,18 @@ def unmarshal_HostingSummary(data: Any) -> HostingSummary: else: args["updated_at"] = None + field = data.get("status", None) + if field is not None: + args["status"] = field + else: + args["status"] = None + + field = data.get("dns_status", None) + if field is not None: + args["dns_status"] = field + else: + args["dns_status"] = None + return HostingSummary(**args) diff --git a/scaleway/scaleway/webhosting/v1/types.py b/scaleway/scaleway/webhosting/v1/types.py index ee610795d..480e1974a 100644 --- a/scaleway/scaleway/webhosting/v1/types.py +++ b/scaleway/scaleway/webhosting/v1/types.py @@ -579,11 +579,6 @@ class HostingSummary: ID of the Scaleway Project the Web Hosting plan belongs to. """ - status: HostingSummaryStatus - """ - Status of the Web Hosting plan. - """ - domain: str """ Main domain associated with the Web Hosting plan. @@ -594,14 +589,19 @@ class HostingSummary: Whether the hosting is protected or not. """ - dns_status: DnsRecordsStatus + offer_name: str """ - DNS status of the Web Hosting plan. + Name of the active offer for the Web Hosting plan. """ - offer_name: str + hosting_status: HostingStatus """ - Name of the active offer for the Web Hosting plan. + Status of the Web Hosting plan. + """ + + domain_status: DomainStatus + """ + Main domain status of the Web Hosting plan. """ region: ScwRegion @@ -619,6 +619,16 @@ class HostingSummary: Date on which the Web Hosting plan was last updated. """ + status: Optional[HostingSummaryStatus] + """ + Status of the Web Hosting plan. + """ + + dns_status: Optional[DnsRecordsStatus] + """ + DNS status of the Web Hosting plan. + """ + @dataclass class MailAccount: @@ -1232,9 +1242,9 @@ class Hosting: List of tags associated with the Web Hosting plan. """ - dns_status: DnsRecordsStatus + ipv4: str """ - DNS status of the Web Hosting plan. + Current IPv4 address of the hosting. """ updated_at: Optional[datetime] @@ -1242,9 +1252,9 @@ class Hosting: Date on which the Web Hosting plan was last updated. """ - ipv4: str + created_at: Optional[datetime] """ - Current IPv4 address of the hosting. + Date on which the Web Hosting plan was created. """ protected: bool @@ -1252,14 +1262,14 @@ class Hosting: Whether the hosting is protected or not. """ - region: ScwRegion + domain_status: DomainStatus """ - Region where the Web Hosting plan is hosted. + Main domain status of the Web Hosting plan. """ - created_at: Optional[datetime] + region: ScwRegion """ - Date on which the Web Hosting plan was created. + Region where the Web Hosting plan is hosted. """ offer: Optional[Offer] @@ -1272,6 +1282,11 @@ class Hosting: Details of the hosting platform. """ + dns_status: Optional[DnsRecordsStatus] + """ + DNS status of the Web Hosting plan. + """ + user: Optional[HostingUser] """ Details of the hosting user.