From 38a7191f7fda3e139ab48a96b8a993ac64b0fc80 Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Thu, 14 Sep 2023 15:59:00 +0000 Subject: [PATCH] feat: update generated APIs --- .../webhosting/v1alpha1/marshalling.py | 47 ++++++++++--------- .../webhosting/v1alpha1/types.py | 26 ++++++++++ .../webhosting/v1alpha1/marshalling.py | 47 ++++++++++--------- .../scaleway/webhosting/v1alpha1/types.py | 26 ++++++++++ 4 files changed, 102 insertions(+), 44 deletions(-) diff --git a/scaleway-async/scaleway_async/webhosting/v1alpha1/marshalling.py b/scaleway-async/scaleway_async/webhosting/v1alpha1/marshalling.py index 00cc963f5..1be1636f8 100644 --- a/scaleway-async/scaleway_async/webhosting/v1alpha1/marshalling.py +++ b/scaleway-async/scaleway_async/webhosting/v1alpha1/marshalling.py @@ -25,9 +25,9 @@ def unmarshal_HostingCpanelUrls(data: Any) -> HostingCpanelUrls: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'HostingCpanelUrls' failed as data isn't a dictionary." + f"Unmarshalling the type 'HostingCpanelUrls' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -42,9 +42,9 @@ def unmarshal_HostingCpanelUrls(data: Any) -> HostingCpanelUrls: def unmarshal_HostingOption(data: Any) -> HostingOption: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'HostingOption' failed as data isn't a dictionary." + f"Unmarshalling the type 'HostingOption' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -59,9 +59,9 @@ def unmarshal_HostingOption(data: Any) -> HostingOption: def unmarshal_OfferProduct(data: Any) -> OfferProduct: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'OfferProduct' failed as data isn't a dictionary." + f"Unmarshalling the type 'OfferProduct' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -78,6 +78,9 @@ def unmarshal_OfferProduct(data: Any) -> OfferProduct: field = data.get("hosting_storage_quota", None) args["hosting_storage_quota"] = field + field = data.get("max_addon_domains", None) + args["max_addon_domains"] = field + field = data.get("name", None) args["name"] = field @@ -97,9 +100,9 @@ def unmarshal_OfferProduct(data: Any) -> OfferProduct: def unmarshal_DnsRecord(data: Any) -> DnsRecord: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'DnsRecord' failed as data isn't a dictionary." + f"Unmarshalling the type 'DnsRecord' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -126,9 +129,9 @@ def unmarshal_DnsRecord(data: Any) -> DnsRecord: def unmarshal_Hosting(data: Any) -> Hosting: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'Hosting' failed as data isn't a dictionary." + f"Unmarshalling the type 'Hosting' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -139,7 +142,7 @@ def unmarshal_Hosting(data: Any) -> Hosting: ) field = data.get("created_at", None) - args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + args["created_at"] = parser.isoparse(field) if type(field) is str else field field = data.get("dns_status", None) args["dns_status"] = field @@ -186,7 +189,7 @@ def unmarshal_Hosting(data: Any) -> Hosting: args["tags"] = field field = data.get("updated_at", None) - args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + args["updated_at"] = parser.isoparse(field) if type(field) is str else field field = data.get("username", None) args["username"] = field @@ -195,9 +198,9 @@ def unmarshal_Hosting(data: Any) -> Hosting: def unmarshal_Nameserver(data: Any) -> Nameserver: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'Nameserver' failed as data isn't a dictionary." + f"Unmarshalling the type 'Nameserver' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -215,9 +218,9 @@ def unmarshal_Nameserver(data: Any) -> Nameserver: def unmarshal_Offer(data: Any) -> Offer: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'Offer' failed as data isn't a dictionary." + f"Unmarshalling the type 'Offer' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -247,9 +250,9 @@ def unmarshal_Offer(data: Any) -> Offer: def unmarshal_DnsRecords(data: Any) -> DnsRecords: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'DnsRecords' failed as data isn't a dictionary." + f"Unmarshalling the type 'DnsRecords' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -271,9 +274,9 @@ def unmarshal_DnsRecords(data: Any) -> DnsRecords: def unmarshal_ListHostingsResponse(data: Any) -> ListHostingsResponse: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'ListHostingsResponse' failed as data isn't a dictionary." + f"Unmarshalling the type 'ListHostingsResponse' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -290,9 +293,9 @@ def unmarshal_ListHostingsResponse(data: Any) -> ListHostingsResponse: def unmarshal_ListOffersResponse(data: Any) -> ListOffersResponse: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'ListOffersResponse' failed as data isn't a dictionary." + f"Unmarshalling the type 'ListOffersResponse' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} diff --git a/scaleway-async/scaleway_async/webhosting/v1alpha1/types.py b/scaleway-async/scaleway_async/webhosting/v1alpha1/types.py index e3c18786d..5a94480d5 100644 --- a/scaleway-async/scaleway_async/webhosting/v1alpha1/types.py +++ b/scaleway-async/scaleway_async/webhosting/v1alpha1/types.py @@ -393,18 +393,44 @@ class OfferProduct: """ email_accounts_quota: int + """ + Limit number of email accounts. + """ email_storage_quota: int + """ + Limit quantity of email storage in gigabytes. + """ databases_quota: int + """ + Limit number of databases. + """ hosting_storage_quota: int + """ + Limit quantity of hosting storage in gigabytes. + """ support_included: bool + """ + Whether or not support is included. + """ v_cpu: int + """ + Limit number of virtual CPU. + """ ram: int + """ + Limit quantity of memory in gigabytes. + """ + + max_addon_domains: int + """ + Limit number of add-on domains. + """ @dataclass diff --git a/scaleway/scaleway/webhosting/v1alpha1/marshalling.py b/scaleway/scaleway/webhosting/v1alpha1/marshalling.py index 00cc963f5..1be1636f8 100644 --- a/scaleway/scaleway/webhosting/v1alpha1/marshalling.py +++ b/scaleway/scaleway/webhosting/v1alpha1/marshalling.py @@ -25,9 +25,9 @@ def unmarshal_HostingCpanelUrls(data: Any) -> HostingCpanelUrls: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'HostingCpanelUrls' failed as data isn't a dictionary." + f"Unmarshalling the type 'HostingCpanelUrls' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -42,9 +42,9 @@ def unmarshal_HostingCpanelUrls(data: Any) -> HostingCpanelUrls: def unmarshal_HostingOption(data: Any) -> HostingOption: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'HostingOption' failed as data isn't a dictionary." + f"Unmarshalling the type 'HostingOption' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -59,9 +59,9 @@ def unmarshal_HostingOption(data: Any) -> HostingOption: def unmarshal_OfferProduct(data: Any) -> OfferProduct: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'OfferProduct' failed as data isn't a dictionary." + f"Unmarshalling the type 'OfferProduct' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -78,6 +78,9 @@ def unmarshal_OfferProduct(data: Any) -> OfferProduct: field = data.get("hosting_storage_quota", None) args["hosting_storage_quota"] = field + field = data.get("max_addon_domains", None) + args["max_addon_domains"] = field + field = data.get("name", None) args["name"] = field @@ -97,9 +100,9 @@ def unmarshal_OfferProduct(data: Any) -> OfferProduct: def unmarshal_DnsRecord(data: Any) -> DnsRecord: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'DnsRecord' failed as data isn't a dictionary." + f"Unmarshalling the type 'DnsRecord' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -126,9 +129,9 @@ def unmarshal_DnsRecord(data: Any) -> DnsRecord: def unmarshal_Hosting(data: Any) -> Hosting: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'Hosting' failed as data isn't a dictionary." + f"Unmarshalling the type 'Hosting' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -139,7 +142,7 @@ def unmarshal_Hosting(data: Any) -> Hosting: ) field = data.get("created_at", None) - args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + args["created_at"] = parser.isoparse(field) if type(field) is str else field field = data.get("dns_status", None) args["dns_status"] = field @@ -186,7 +189,7 @@ def unmarshal_Hosting(data: Any) -> Hosting: args["tags"] = field field = data.get("updated_at", None) - args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + args["updated_at"] = parser.isoparse(field) if type(field) is str else field field = data.get("username", None) args["username"] = field @@ -195,9 +198,9 @@ def unmarshal_Hosting(data: Any) -> Hosting: def unmarshal_Nameserver(data: Any) -> Nameserver: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'Nameserver' failed as data isn't a dictionary." + f"Unmarshalling the type 'Nameserver' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -215,9 +218,9 @@ def unmarshal_Nameserver(data: Any) -> Nameserver: def unmarshal_Offer(data: Any) -> Offer: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'Offer' failed as data isn't a dictionary." + f"Unmarshalling the type 'Offer' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -247,9 +250,9 @@ def unmarshal_Offer(data: Any) -> Offer: def unmarshal_DnsRecords(data: Any) -> DnsRecords: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'DnsRecords' failed as data isn't a dictionary." + f"Unmarshalling the type 'DnsRecords' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -271,9 +274,9 @@ def unmarshal_DnsRecords(data: Any) -> DnsRecords: def unmarshal_ListHostingsResponse(data: Any) -> ListHostingsResponse: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'ListHostingsResponse' failed as data isn't a dictionary." + f"Unmarshalling the type 'ListHostingsResponse' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -290,9 +293,9 @@ def unmarshal_ListHostingsResponse(data: Any) -> ListHostingsResponse: def unmarshal_ListOffersResponse(data: Any) -> ListOffersResponse: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'ListOffersResponse' failed as data isn't a dictionary." + f"Unmarshalling the type 'ListOffersResponse' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} diff --git a/scaleway/scaleway/webhosting/v1alpha1/types.py b/scaleway/scaleway/webhosting/v1alpha1/types.py index e3c18786d..5a94480d5 100644 --- a/scaleway/scaleway/webhosting/v1alpha1/types.py +++ b/scaleway/scaleway/webhosting/v1alpha1/types.py @@ -393,18 +393,44 @@ class OfferProduct: """ email_accounts_quota: int + """ + Limit number of email accounts. + """ email_storage_quota: int + """ + Limit quantity of email storage in gigabytes. + """ databases_quota: int + """ + Limit number of databases. + """ hosting_storage_quota: int + """ + Limit quantity of hosting storage in gigabytes. + """ support_included: bool + """ + Whether or not support is included. + """ v_cpu: int + """ + Limit number of virtual CPU. + """ ram: int + """ + Limit quantity of memory in gigabytes. + """ + + max_addon_domains: int + """ + Limit number of add-on domains. + """ @dataclass