Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 25 additions & 22 deletions scaleway-async/scaleway_async/webhosting/v1alpha1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -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] = {}
Expand All @@ -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] = {}
Expand All @@ -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] = {}
Expand All @@ -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

Expand All @@ -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] = {}
Expand All @@ -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] = {}
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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] = {}
Expand All @@ -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] = {}
Expand Down Expand Up @@ -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] = {}
Expand All @@ -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] = {}
Expand All @@ -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] = {}
Expand Down
26 changes: 26 additions & 0 deletions scaleway-async/scaleway_async/webhosting/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
47 changes: 25 additions & 22 deletions scaleway/scaleway/webhosting/v1alpha1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -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] = {}
Expand All @@ -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] = {}
Expand All @@ -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] = {}
Expand All @@ -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

Expand All @@ -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] = {}
Expand All @@ -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] = {}
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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] = {}
Expand All @@ -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] = {}
Expand Down Expand Up @@ -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] = {}
Expand All @@ -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] = {}
Expand All @@ -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] = {}
Expand Down
26 changes: 26 additions & 0 deletions scaleway/scaleway/webhosting/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down