From 0af0dee2166674f72f6beb7f44807942ec9e0ba7 Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Fri, 27 Mar 2026 19:54:18 +0000 Subject: [PATCH] feat: update generated APIs --- .../scaleway_async/domain/v2beta1/api.py | 15 ++-- .../domain/v2beta1/marshalling.py | 16 ++-- .../scaleway_async/domain/v2beta1/types.py | 38 ++++---- .../scaleway_async/instance/v1/marshalling.py | 36 ++++---- .../scaleway_async/instance/v1/types.py | 20 ++--- .../s2s_vpn/v1alpha1/marshalling.py | 4 +- .../scaleway_async/s2s_vpn/v1alpha1/types.py | 4 +- .../scaleway_async/webhosting/v1/api.py | 16 ++-- .../webhosting/v1/marshalling.py | 76 ++++++++-------- .../scaleway_async/webhosting/v1/types.py | 90 +++++++++---------- scaleway/scaleway/domain/v2beta1/api.py | 15 ++-- .../scaleway/domain/v2beta1/marshalling.py | 28 +++--- scaleway/scaleway/domain/v2beta1/types.py | 38 ++++---- scaleway/scaleway/instance/v1/marshalling.py | 36 ++++---- scaleway/scaleway/instance/v1/types.py | 20 ++--- .../scaleway/s2s_vpn/v1alpha1/marshalling.py | 4 +- scaleway/scaleway/s2s_vpn/v1alpha1/types.py | 4 +- scaleway/scaleway/webhosting/v1/api.py | 16 ++-- .../scaleway/webhosting/v1/marshalling.py | 76 ++++++++-------- scaleway/scaleway/webhosting/v1/types.py | 90 +++++++++---------- 20 files changed, 314 insertions(+), 328 deletions(-) diff --git a/scaleway-async/scaleway_async/domain/v2beta1/api.py b/scaleway-async/scaleway_async/domain/v2beta1/api.py index 21f1b2a22..8b30d6189 100644 --- a/scaleway-async/scaleway_async/domain/v2beta1/api.py +++ b/scaleway-async/scaleway_async/domain/v2beta1/api.py @@ -189,12 +189,12 @@ async def list_dns_zones( self, *, domain: str, - dns_zone: str, organization_id: Optional[str] = None, project_id: Optional[str] = None, order_by: Optional[ListDNSZonesRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, + dns_zone: Optional[str] = None, dns_zones: Optional[list[str]] = None, created_after: Optional[datetime] = None, created_before: Optional[datetime] = None, @@ -205,12 +205,12 @@ async def list_dns_zones( List DNS zones. Retrieve the list of DNS zones you can manage and filter DNS zones associated with specific domain names. :param domain: Domain on which to filter the returned DNS zones. - :param dns_zone: DNS zone on which to filter the returned DNS zones. :param organization_id: Organization ID on which to filter the returned DNS zones. :param project_id: Project ID on which to filter the returned DNS zones. :param order_by: Sort order of the returned DNS zones. :param page: Page number to return, from the paginated results. :param page_size: Maximum number of DNS zones to return per page. + :param dns_zone: DNS zone on which to filter the returned DNS zones. :param dns_zones: DNS zones on which to filter the returned DNS zones. :param created_after: Only list DNS zones created after this date. :param created_before: Only list DNS zones created before this date. @@ -223,7 +223,6 @@ async def list_dns_zones( result = await api.list_dns_zones( domain="example", - dns_zone="example", ) """ @@ -254,12 +253,12 @@ async def list_dns_zones_all( self, *, domain: str, - dns_zone: str, organization_id: Optional[str] = None, project_id: Optional[str] = None, order_by: Optional[ListDNSZonesRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, + dns_zone: Optional[str] = None, dns_zones: Optional[list[str]] = None, created_after: Optional[datetime] = None, created_before: Optional[datetime] = None, @@ -270,12 +269,12 @@ async def list_dns_zones_all( List DNS zones. Retrieve the list of DNS zones you can manage and filter DNS zones associated with specific domain names. :param domain: Domain on which to filter the returned DNS zones. - :param dns_zone: DNS zone on which to filter the returned DNS zones. :param organization_id: Organization ID on which to filter the returned DNS zones. :param project_id: Project ID on which to filter the returned DNS zones. :param order_by: Sort order of the returned DNS zones. :param page: Page number to return, from the paginated results. :param page_size: Maximum number of DNS zones to return per page. + :param dns_zone: DNS zone on which to filter the returned DNS zones. :param dns_zones: DNS zones on which to filter the returned DNS zones. :param created_after: Only list DNS zones created after this date. :param created_before: Only list DNS zones created before this date. @@ -288,7 +287,6 @@ async def list_dns_zones_all( result = await api.list_dns_zones_all( domain="example", - dns_zone="example", ) """ @@ -298,12 +296,12 @@ async def list_dns_zones_all( fetcher=self.list_dns_zones, args={ "domain": domain, - "dns_zone": dns_zone, "organization_id": organization_id, "project_id": project_id, "order_by": order_by, "page": page, "page_size": page_size, + "dns_zone": dns_zone, "dns_zones": dns_zones, "created_after": created_after, "created_before": created_before, @@ -776,7 +774,7 @@ async def import_raw_dns_zone( self, *, dns_zone: str, - content: str, + content: Optional[str] = None, project_id: Optional[str] = None, format: Optional[RawFormat] = None, bind_source: Optional[ImportRawDNSZoneRequestBindSource] = None, @@ -800,7 +798,6 @@ async def import_raw_dns_zone( result = await api.import_raw_dns_zone( dns_zone="example", - content="example", ) """ diff --git a/scaleway-async/scaleway_async/domain/v2beta1/marshalling.py b/scaleway-async/scaleway_async/domain/v2beta1/marshalling.py index b1df52ff7..c8dc1d65f 100644 --- a/scaleway-async/scaleway_async/domain/v2beta1/marshalling.py +++ b/scaleway-async/scaleway_async/domain/v2beta1/marshalling.py @@ -535,14 +535,6 @@ def unmarshal_Contact(data: Any) -> Contact: else: args["status"] = ContactStatus.STATUS_UNKNOWN - field = data.get("questions", None) - if field is not None: - args["questions"] = ( - [unmarshal_ContactQuestion(v) for v in field] if field is not None else None - ) - else: - args["questions"] = [] - field = data.get("extension_nl", None) if field is not None: args["extension_nl"] = unmarshal_ContactExtensionNL(field) @@ -555,6 +547,14 @@ def unmarshal_Contact(data: Any) -> Contact: else: args["extension_it"] = None + field = data.get("questions", None) + if field is not None: + args["questions"] = ( + [unmarshal_ContactQuestion(v) for v in field] if field is not None else None + ) + else: + args["questions"] = None + return Contact(**args) diff --git a/scaleway-async/scaleway_async/domain/v2beta1/types.py b/scaleway-async/scaleway_async/domain/v2beta1/types.py index b2a53529d..7cd3bad78 100644 --- a/scaleway-async/scaleway_async/domain/v2beta1/types.py +++ b/scaleway-async/scaleway_async/domain/v2beta1/types.py @@ -518,16 +518,6 @@ class ContactExtensionFR: @dataclass class ContactExtensionIT: - european_citizenship: str - """ - This option is useless anymore. - """ - - tax_code: str - """ - Tax_code is renamed to pin. - """ - pin: str """ Domain name registrant's Taxcode (mandatory / only optional when the trustee is used) @@ -538,6 +528,16 @@ class ContactExtensionIT: * In all other cases it must be equal to VAT number (in the 16 characters format if nationality is IT) or the numeric Codice Fiscale. """ + european_citizenship: Optional[str] = None + """ + This option is useless anymore. + """ + + tax_code: Optional[str] = None + """ + Tax_code is renamed to pin. + """ + @dataclass class ContactExtensionNL: @@ -623,11 +623,11 @@ class Contact: email_status: ContactEmailStatus state: str status: ContactStatus - questions: list[ContactQuestion] extension_fr: Optional[ContactExtensionFR] = None extension_eu: Optional[ContactExtensionEU] = None extension_nl: Optional[ContactExtensionNL] = None extension_it: Optional[ContactExtensionIT] = None + questions: Optional[list[ContactQuestion]] = field(default_factory=list) @dataclass @@ -674,7 +674,6 @@ class NewContact: lang: StdLanguageCode resale: bool whois_opt_in: bool - questions: list[ContactQuestion] company_name: Optional[str] = None email_alt: Optional[str] = None fax_number: Optional[str] = None @@ -686,6 +685,7 @@ class NewContact: state: Optional[str] = None extension_nl: Optional[ContactExtensionNL] = None extension_it: Optional[ContactExtensionIT] = None + questions: Optional[list[ContactQuestion]] = field(default_factory=list) @dataclass @@ -1187,9 +1187,9 @@ class ImportRawDNSZoneRequest: DNS zone to import. """ - content: str + content: Optional[str] = None project_id: Optional[str] = None - format: Optional[RawFormat] = RawFormat.UNKNOWN_RAW_FORMAT + format: Optional[RawFormat] = None bind_source: Optional[ImportRawDNSZoneRequestBindSource] = None axfr_source: Optional[ImportRawDNSZoneRequestAXFRSource] = None @@ -1340,11 +1340,6 @@ class ListDNSZonesRequest: Domain on which to filter the returned DNS zones. """ - dns_zone: str - """ - DNS zone on which to filter the returned DNS zones. - """ - organization_id: Optional[str] = None """ Organization ID on which to filter the returned DNS zones. @@ -1372,6 +1367,11 @@ class ListDNSZonesRequest: Maximum number of DNS zones to return per page. """ + dns_zone: Optional[str] = None + """ + DNS zone on which to filter the returned DNS zones. + """ + dns_zones: Optional[list[str]] = field(default_factory=list) """ DNS zones on which to filter the returned DNS zones. diff --git a/scaleway-async/scaleway_async/instance/v1/marshalling.py b/scaleway-async/scaleway_async/instance/v1/marshalling.py index 2e72fdb36..8aabb07a6 100644 --- a/scaleway-async/scaleway_async/instance/v1/marshalling.py +++ b/scaleway-async/scaleway_async/instance/v1/marshalling.py @@ -1108,13 +1108,13 @@ def unmarshal_Server(data: Any) -> Server: if field is not None: args["routed_ip_enabled"] = field else: - args["routed_ip_enabled"] = False + args["routed_ip_enabled"] = None field = data.get("enable_ipv6", None) if field is not None: args["enable_ipv6"] = field else: - args["enable_ipv6"] = False + args["enable_ipv6"] = None field = data.get("image", None) if field is not None: @@ -1472,7 +1472,7 @@ def unmarshal_SecurityGroup(data: Any) -> SecurityGroup: if field is not None: args["organization_default"] = field else: - args["organization_default"] = False + args["organization_default"] = None field = data.get("creation_date", None) if field is not None: @@ -1905,85 +1905,85 @@ def unmarshal_Dashboard(data: Any) -> Dashboard: if field is not None: args["volumes_count"] = field else: - args["volumes_count"] = None + args["volumes_count"] = 0 field = data.get("running_servers_count", None) if field is not None: args["running_servers_count"] = field else: - args["running_servers_count"] = None + args["running_servers_count"] = 0 field = data.get("servers_by_types", None) if field is not None: args["servers_by_types"] = field else: - args["servers_by_types"] = None + args["servers_by_types"] = {} field = data.get("images_count", None) if field is not None: args["images_count"] = field else: - args["images_count"] = None + args["images_count"] = 0 field = data.get("snapshots_count", None) if field is not None: args["snapshots_count"] = field else: - args["snapshots_count"] = None + args["snapshots_count"] = 0 field = data.get("servers_count", None) if field is not None: args["servers_count"] = field else: - args["servers_count"] = None + args["servers_count"] = 0 field = data.get("ips_count", None) if field is not None: args["ips_count"] = field else: - args["ips_count"] = None + args["ips_count"] = 0 field = data.get("security_groups_count", None) if field is not None: args["security_groups_count"] = field else: - args["security_groups_count"] = None + args["security_groups_count"] = 0 field = data.get("ips_unused", None) if field is not None: args["ips_unused"] = field else: - args["ips_unused"] = None + args["ips_unused"] = 0 field = data.get("volumes_l_ssd_count", None) if field is not None: args["volumes_l_ssd_count"] = field else: - args["volumes_l_ssd_count"] = None + args["volumes_l_ssd_count"] = 0 field = data.get("volumes_l_ssd_total_size", None) if field is not None: args["volumes_l_ssd_total_size"] = field else: - args["volumes_l_ssd_total_size"] = None + args["volumes_l_ssd_total_size"] = 0 field = data.get("private_nics_count", None) if field is not None: args["private_nics_count"] = field else: - args["private_nics_count"] = None + args["private_nics_count"] = 0 field = data.get("placement_groups_count", None) if field is not None: args["placement_groups_count"] = field else: - args["placement_groups_count"] = None + args["placement_groups_count"] = 0 field = data.get("volumes_scratch_count", None) if field is not None: args["volumes_scratch_count"] = field else: - args["volumes_scratch_count"] = None + args["volumes_scratch_count"] = 0 field = data.get("volumes_b_ssd_count", None) if field is not None: @@ -2662,7 +2662,7 @@ def unmarshal_ServerType(data: Any) -> ServerType: if field is not None: args["monthly_price"] = field else: - args["monthly_price"] = 0.0 + args["monthly_price"] = None field = data.get("hourly_price", None) if field is not None: diff --git a/scaleway-async/scaleway_async/instance/v1/types.py b/scaleway-async/scaleway_async/instance/v1/types.py index 4470ba522..a21f0f80b 100644 --- a/scaleway-async/scaleway_async/instance/v1/types.py +++ b/scaleway-async/scaleway_async/instance/v1/types.py @@ -879,12 +879,12 @@ class Server: Instance creation date. """ - routed_ip_enabled: Optional[bool] = False + routed_ip_enabled: Optional[bool] = None """ True to configure the instance so it uses the routed IP mode. Use of `routed_ip_enabled` as `False` is deprecated. """ - enable_ipv6: Optional[bool] = False + enable_ipv6: Optional[bool] = None """ True if IPv6 is enabled (deprecated and always `False` when `routed_ip_enabled` is `True`). """ @@ -1064,7 +1064,7 @@ class SecurityGroup: Zone in which the security group is located. """ - organization_default: Optional[bool] = False + organization_default: Optional[bool] = None """ True if it is your default security group for this Organization ID. """ @@ -1329,7 +1329,7 @@ class ServerType: True if this Instance type has reached end of service. """ - monthly_price: Optional[float] = 0.0 + monthly_price: Optional[float] = None """ Estimated monthly price, for a 30 days month, in Euro. """ @@ -1724,7 +1724,7 @@ class CreateSecurityGroupRequest: organization: Optional[str] = None - organization_default: Optional[bool] = False + organization_default: Optional[bool] = None project_default: Optional[bool] = False @@ -1803,7 +1803,7 @@ class CreateServerRequest: By default, `dynamic_ip_required` is true, a dynamic ip is attached to the instance (if no flexible ip is already attached). """ - routed_ip_enabled: Optional[bool] = False + routed_ip_enabled: Optional[bool] = None """ If true, configure the Instance so it uses the new routed IP mode. """ @@ -1818,7 +1818,7 @@ class CreateServerRequest: Volumes attached to the server. """ - enable_ipv6: Optional[bool] = False + enable_ipv6: Optional[bool] = None """ True if IPv6 is enabled on the server (deprecated and always `False` when `routed_ip_enabled` is `True`). """ @@ -3354,7 +3354,7 @@ class UpdateSecurityGroupRequest: Tags of the security group. """ - organization_default: Optional[bool] = False + organization_default: Optional[bool] = None """ Please use project_default instead. """ @@ -3469,7 +3469,7 @@ class UpdateServerRequest: volumes: Optional[dict[str, VolumeServerTemplate]] = field(default_factory=dict) dynamic_ip_required: Optional[bool] = False - routed_ip_enabled: Optional[bool] = False + routed_ip_enabled: Optional[bool] = None """ True to configure the instance so it uses the new routed IP mode (once this is set to True you cannot set it back to False). """ @@ -3479,7 +3479,7 @@ class UpdateServerRequest: A list of reserved IP IDs to attach to the Instance. """ - enable_ipv6: Optional[bool] = False + enable_ipv6: Optional[bool] = None protected: Optional[bool] = False """ True to activate server protection option. diff --git a/scaleway-async/scaleway_async/s2s_vpn/v1alpha1/marshalling.py b/scaleway-async/scaleway_async/s2s_vpn/v1alpha1/marshalling.py index 0bb965c94..7898770b5 100644 --- a/scaleway-async/scaleway_async/s2s_vpn/v1alpha1/marshalling.py +++ b/scaleway-async/scaleway_async/s2s_vpn/v1alpha1/marshalling.py @@ -253,13 +253,13 @@ def unmarshal_Connection(data: Any) -> Connection: if field is not None: args["tunnel_status_ipv4"] = field else: - args["tunnel_status_ipv4"] = TunnelStatus.UNKNOWN_TUNNEL_STATUS + args["tunnel_status_ipv4"] = None field = data.get("tunnel_status_ipv6", None) if field is not None: args["tunnel_status_ipv6"] = field else: - args["tunnel_status_ipv6"] = TunnelStatus.UNKNOWN_TUNNEL_STATUS + args["tunnel_status_ipv6"] = None field = data.get("bgp_session_ipv4", None) if field is not None: diff --git a/scaleway-async/scaleway_async/s2s_vpn/v1alpha1/types.py b/scaleway-async/scaleway_async/s2s_vpn/v1alpha1/types.py index 2c4d78e10..9c8f0c0b8 100644 --- a/scaleway-async/scaleway_async/s2s_vpn/v1alpha1/types.py +++ b/scaleway-async/scaleway_async/s2s_vpn/v1alpha1/types.py @@ -313,12 +313,12 @@ class Connection: Last modification date of the connection. """ - tunnel_status_ipv4: Optional[TunnelStatus] = TunnelStatus.UNKNOWN_TUNNEL_STATUS + tunnel_status_ipv4: Optional[TunnelStatus] = None """ Status of the IPv4 IPsec tunnel. """ - tunnel_status_ipv6: Optional[TunnelStatus] = TunnelStatus.UNKNOWN_TUNNEL_STATUS + tunnel_status_ipv6: Optional[TunnelStatus] = None """ Status of the IPv6 IPsec tunnel. """ diff --git a/scaleway-async/scaleway_async/webhosting/v1/api.py b/scaleway-async/scaleway_async/webhosting/v1/api.py index 44df63d04..dd0f1f70a 100644 --- a/scaleway-async/scaleway_async/webhosting/v1/api.py +++ b/scaleway-async/scaleway_async/webhosting/v1/api.py @@ -1232,22 +1232,22 @@ async def sync_domain_dns_records( self, *, domain: str, - update_web_records: bool, - update_mail_records: bool, - update_all_records: bool, - update_nameservers: bool, region: Optional[ScwRegion] = None, + update_web_records: Optional[bool] = None, + update_mail_records: Optional[bool] = None, + update_all_records: Optional[bool] = None, + update_nameservers: Optional[bool] = None, custom_records: Optional[list[SyncDomainDnsRecordsRequestRecord]] = None, auto_config_domain_dns: Optional[AutoConfigDomainDns] = None, ) -> DnsRecords: """ Synchronize your DNS records on the Elements Console and on cPanel. :param domain: Domain for which the DNS records will be synchronized. + :param region: Region to target. If none is passed will use default region from the config. :param update_web_records: Whether or not to synchronize the web records (deprecated, use auto_config_domain_dns). :param update_mail_records: Whether or not to synchronize the mail records (deprecated, use auto_config_domain_dns). :param update_all_records: Whether or not to synchronize all types of records. This one has priority (deprecated, use auto_config_domain_dns). :param update_nameservers: Whether or not to synchronize domain nameservers (deprecated, use auto_config_domain_dns). - :param region: Region to target. If none is passed will use default region from the config. :param custom_records: Custom records to synchronize. :param auto_config_domain_dns: Whether or not to synchronize each types of records. :return: :class:`DnsRecords ` @@ -1257,10 +1257,6 @@ async def sync_domain_dns_records( result = await api.sync_domain_dns_records( domain="example", - update_web_records=False, - update_mail_records=False, - update_all_records=False, - update_nameservers=False, ) """ @@ -1275,11 +1271,11 @@ async def sync_domain_dns_records( body=marshal_DnsApiSyncDomainDnsRecordsRequest( DnsApiSyncDomainDnsRecordsRequest( domain=domain, + region=region, update_web_records=update_web_records, update_mail_records=update_mail_records, update_all_records=update_all_records, update_nameservers=update_nameservers, - region=region, custom_records=custom_records, auto_config_domain_dns=auto_config_domain_dns, ), diff --git a/scaleway-async/scaleway_async/webhosting/v1/marshalling.py b/scaleway-async/scaleway_async/webhosting/v1/marshalling.py index 44f87579b..3a5cfa52a 100644 --- a/scaleway-async/scaleway_async/webhosting/v1/marshalling.py +++ b/scaleway-async/scaleway_async/webhosting/v1/marshalling.py @@ -350,36 +350,18 @@ def unmarshal_HostingSummary(data: Any) -> HostingSummary: else: args["status"] = HostingStatus.UNKNOWN_STATUS - field = data.get("domain", None) - if field is not None: - args["domain"] = field - else: - args["domain"] = None - field = data.get("protected", None) if field is not None: args["protected"] = field else: args["protected"] = False - field = data.get("dns_status", None) - if field is not None: - args["dns_status"] = field - else: - args["dns_status"] = DnsRecordsStatus.UNKNOWN_STATUS - field = data.get("offer_name", None) if field is not None: args["offer_name"] = field else: args["offer_name"] = None - field = data.get("domain_status", None) - if field is not None: - args["domain_status"] = field - else: - args["domain_status"] = DomainStatus.UNKNOWN_STATUS - field = data.get("region", None) if field is not None: args["region"] = field @@ -398,6 +380,24 @@ def unmarshal_HostingSummary(data: Any) -> HostingSummary: else: args["updated_at"] = None + field = data.get("domain", None) + if field is not None: + args["domain"] = field + else: + args["domain"] = None + + field = data.get("dns_status", None) + if field is not None: + args["dns_status"] = field + else: + args["dns_status"] = None + + field = data.get("domain_status", None) + if field is not None: + args["domain_status"] = field + else: + args["domain_status"] = None + field = data.get("domain_info", None) if field is not None: args["domain_info"] = unmarshal_HostingDomain(field) @@ -650,7 +650,7 @@ def unmarshal_DnsRecords(data: Any) -> DnsRecords: [DomainDnsAction(v) for v in field] if field is not None else None ) else: - args["dns_config"] = [] + args["dns_config"] = None field = data.get("auto_config_domain_dns", None) if field is not None: @@ -707,7 +707,7 @@ def unmarshal_Domain(data: Any) -> Domain: [DomainDnsAction(v) for v in field] if field is not None else None ) else: - args["available_dns_actions"] = [] + args["available_dns_actions"] = None field = data.get("auto_config_domain_dns", None) if field is not None: @@ -1145,12 +1145,6 @@ def unmarshal_Hosting(data: Any) -> Hosting: else: args["status"] = HostingStatus.UNKNOWN_STATUS - field = data.get("domain", None) - if field is not None: - args["domain"] = field - else: - args["domain"] = None - field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field @@ -1163,6 +1157,12 @@ def unmarshal_Hosting(data: Any) -> Hosting: else: args["created_at"] = None + field = data.get("domain", None) + if field is not None: + args["domain"] = field + else: + args["domain"] = None + field = data.get("offer", None) if field is not None: args["offer"] = unmarshal_Offer(field) @@ -1181,12 +1181,6 @@ def unmarshal_Hosting(data: Any) -> Hosting: else: args["tags"] = [] - field = data.get("dns_status", None) - if field is not None: - args["dns_status"] = field - else: - args["dns_status"] = DnsRecordsStatus.UNKNOWN_STATUS - field = data.get("ipv4", None) if field is not None: args["ipv4"] = field @@ -1199,24 +1193,30 @@ def unmarshal_Hosting(data: Any) -> Hosting: else: args["protected"] = False - field = data.get("domain_status", None) - if field is not None: - args["domain_status"] = field - else: - args["domain_status"] = DomainStatus.UNKNOWN_STATUS - field = data.get("region", None) if field is not None: args["region"] = field else: args["region"] = 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) else: args["user"] = None + field = data.get("domain_status", None) + if field is not None: + args["domain_status"] = field + else: + args["domain_status"] = None + field = data.get("domain_info", None) if field is not None: args["domain_info"] = unmarshal_HostingDomain(field) diff --git a/scaleway-async/scaleway_async/webhosting/v1/types.py b/scaleway-async/scaleway_async/webhosting/v1/types.py index 07d378d5a..4df2c5424 100644 --- a/scaleway-async/scaleway_async/webhosting/v1/types.py +++ b/scaleway-async/scaleway_async/webhosting/v1/types.py @@ -891,31 +891,16 @@ class HostingSummary: Status of the Web Hosting plan. """ - domain: str - """ - Main domain associated with the Web Hosting plan (deprecated, use domain_info). - """ - protected: bool """ Whether the hosting is protected or not. """ - dns_status: DnsRecordsStatus - """ - DNS status of the Web Hosting plan. - """ - offer_name: str """ Name of the active offer for the Web Hosting plan. """ - domain_status: DomainStatus - """ - Main domain status of the Web Hosting plan. - """ - region: ScwRegion """ Region where the Web Hosting plan is hosted. @@ -931,6 +916,21 @@ class HostingSummary: Date on which the Web Hosting plan was last updated. """ + domain: Optional[str] = None + """ + Main domain associated with the Web Hosting plan (deprecated, use domain_info). + """ + + dns_status: Optional[DnsRecordsStatus] = None + """ + DNS status of the Web Hosting plan. + """ + + domain_status: Optional[DomainStatus] = None + """ + Main domain status of the Web Hosting plan. + """ + domain_info: Optional[HostingDomain] = None """ Domain configuration block (subdomain, optional custom domain, and DNS settings). @@ -1523,31 +1523,31 @@ class DnsApiSyncDomainDnsRecordsRequest: Domain for which the DNS records will be synchronized. """ - update_web_records: bool + region: Optional[ScwRegion] = None + """ + Region to target. If none is passed will use default region from the config. + """ + + update_web_records: Optional[bool] = None """ Whether or not to synchronize the web records (deprecated, use auto_config_domain_dns). """ - update_mail_records: bool + update_mail_records: Optional[bool] = None """ Whether or not to synchronize the mail records (deprecated, use auto_config_domain_dns). """ - update_all_records: bool + update_all_records: Optional[bool] = None """ Whether or not to synchronize all types of records. This one has priority (deprecated, use auto_config_domain_dns). """ - update_nameservers: bool + update_nameservers: Optional[bool] = None """ Whether or not to synchronize domain nameservers (deprecated, use auto_config_domain_dns). """ - region: Optional[ScwRegion] = None - """ - Region to target. If none is passed will use default region from the config. - """ - custom_records: Optional[list[SyncDomainDnsRecordsRequestRecord]] = field( default_factory=list ) @@ -1578,7 +1578,7 @@ class DnsRecords: Status of the records. """ - dns_config: list[DomainDnsAction] + dns_config: Optional[list[DomainDnsAction]] = field(default_factory=list) """ Records dns auto configuration settings (deprecated, use auto_config_domain_dns). """ @@ -1616,7 +1616,7 @@ class Domain: A list of actions that can be performed on the domain. """ - available_dns_actions: list[DomainDnsAction] + available_dns_actions: Optional[list[DomainDnsAction]] = field(default_factory=list) """ A list of DNS-related actions that can be auto configured for the domain (deprecated, use auto_config_domain_dns instead). """ @@ -1784,21 +1784,11 @@ class Hosting: Status of the Web Hosting plan. """ - domain: str - """ - Main domain associated with the Web Hosting plan (deprecated, use domain_info). - """ - tags: list[str] """ List of tags associated with the Web Hosting plan. """ - dns_status: DnsRecordsStatus - """ - DNS status of the Web Hosting plan (deprecated, use domain_info). - """ - ipv4: str """ Current IPv4 address of the hosting. @@ -1809,11 +1799,6 @@ class Hosting: Whether the hosting is protected or not. """ - domain_status: DomainStatus - """ - Main domain status of the Web Hosting plan (deprecated, use domain_info). - """ - region: ScwRegion """ Region where the Web Hosting plan is hosted. @@ -1829,6 +1814,11 @@ class Hosting: Date on which the Web Hosting plan was created. """ + domain: Optional[str] = None + """ + Main domain associated with the Web Hosting plan (deprecated, use domain_info). + """ + offer: Optional[Offer] = None """ Details of the Web Hosting plan offer and options. @@ -1839,11 +1829,21 @@ class Hosting: Details of the hosting platform. """ + dns_status: Optional[DnsRecordsStatus] = None + """ + DNS status of the Web Hosting plan (deprecated, use domain_info). + """ + user: Optional[HostingUser] = None """ Details of the hosting user. """ + domain_status: Optional[DomainStatus] = None + """ + Main domain status of the Web Hosting plan (deprecated, use domain_info). + """ + domain_info: Optional[HostingDomain] = None """ Domain configuration block (subdomain, optional custom domain, and DNS settings). @@ -2517,14 +2517,14 @@ class Progress: @dataclass class ResetHostingPasswordResponse: - one_time_password: str + one_time_password_b64: str """ - New temporary password (deprecated, use password_b64 instead). + New temporary password, encoded in base64. """ - one_time_password_b64: str + one_time_password: Optional[str] = None """ - New temporary password, encoded in base64. + New temporary password (deprecated, use password_b64 instead). """ diff --git a/scaleway/scaleway/domain/v2beta1/api.py b/scaleway/scaleway/domain/v2beta1/api.py index f011b87ff..48bacf667 100644 --- a/scaleway/scaleway/domain/v2beta1/api.py +++ b/scaleway/scaleway/domain/v2beta1/api.py @@ -189,12 +189,12 @@ def list_dns_zones( self, *, domain: str, - dns_zone: str, organization_id: Optional[str] = None, project_id: Optional[str] = None, order_by: Optional[ListDNSZonesRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, + dns_zone: Optional[str] = None, dns_zones: Optional[list[str]] = None, created_after: Optional[datetime] = None, created_before: Optional[datetime] = None, @@ -205,12 +205,12 @@ def list_dns_zones( List DNS zones. Retrieve the list of DNS zones you can manage and filter DNS zones associated with specific domain names. :param domain: Domain on which to filter the returned DNS zones. - :param dns_zone: DNS zone on which to filter the returned DNS zones. :param organization_id: Organization ID on which to filter the returned DNS zones. :param project_id: Project ID on which to filter the returned DNS zones. :param order_by: Sort order of the returned DNS zones. :param page: Page number to return, from the paginated results. :param page_size: Maximum number of DNS zones to return per page. + :param dns_zone: DNS zone on which to filter the returned DNS zones. :param dns_zones: DNS zones on which to filter the returned DNS zones. :param created_after: Only list DNS zones created after this date. :param created_before: Only list DNS zones created before this date. @@ -223,7 +223,6 @@ def list_dns_zones( result = api.list_dns_zones( domain="example", - dns_zone="example", ) """ @@ -254,12 +253,12 @@ def list_dns_zones_all( self, *, domain: str, - dns_zone: str, organization_id: Optional[str] = None, project_id: Optional[str] = None, order_by: Optional[ListDNSZonesRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, + dns_zone: Optional[str] = None, dns_zones: Optional[list[str]] = None, created_after: Optional[datetime] = None, created_before: Optional[datetime] = None, @@ -270,12 +269,12 @@ def list_dns_zones_all( List DNS zones. Retrieve the list of DNS zones you can manage and filter DNS zones associated with specific domain names. :param domain: Domain on which to filter the returned DNS zones. - :param dns_zone: DNS zone on which to filter the returned DNS zones. :param organization_id: Organization ID on which to filter the returned DNS zones. :param project_id: Project ID on which to filter the returned DNS zones. :param order_by: Sort order of the returned DNS zones. :param page: Page number to return, from the paginated results. :param page_size: Maximum number of DNS zones to return per page. + :param dns_zone: DNS zone on which to filter the returned DNS zones. :param dns_zones: DNS zones on which to filter the returned DNS zones. :param created_after: Only list DNS zones created after this date. :param created_before: Only list DNS zones created before this date. @@ -288,7 +287,6 @@ def list_dns_zones_all( result = api.list_dns_zones_all( domain="example", - dns_zone="example", ) """ @@ -298,12 +296,12 @@ def list_dns_zones_all( fetcher=self.list_dns_zones, args={ "domain": domain, - "dns_zone": dns_zone, "organization_id": organization_id, "project_id": project_id, "order_by": order_by, "page": page, "page_size": page_size, + "dns_zone": dns_zone, "dns_zones": dns_zones, "created_after": created_after, "created_before": created_before, @@ -776,7 +774,7 @@ def import_raw_dns_zone( self, *, dns_zone: str, - content: str, + content: Optional[str] = None, project_id: Optional[str] = None, format: Optional[RawFormat] = None, bind_source: Optional[ImportRawDNSZoneRequestBindSource] = None, @@ -800,7 +798,6 @@ def import_raw_dns_zone( result = api.import_raw_dns_zone( dns_zone="example", - content="example", ) """ diff --git a/scaleway/scaleway/domain/v2beta1/marshalling.py b/scaleway/scaleway/domain/v2beta1/marshalling.py index c9b811602..c8dc1d65f 100644 --- a/scaleway/scaleway/domain/v2beta1/marshalling.py +++ b/scaleway/scaleway/domain/v2beta1/marshalling.py @@ -316,6 +316,12 @@ def unmarshal_ContactExtensionIT(data: Any) -> ContactExtensionIT: args: dict[str, Any] = {} + field = data.get("pin", None) + if field is not None: + args["pin"] = field + else: + args["pin"] = None + field = data.get("european_citizenship", None) if field is not None: args["european_citizenship"] = field @@ -328,12 +334,6 @@ def unmarshal_ContactExtensionIT(data: Any) -> ContactExtensionIT: else: args["tax_code"] = None - field = data.get("pin", None) - if field is not None: - args["pin"] = field - else: - args["pin"] = None - return ContactExtensionIT(**args) @@ -535,14 +535,6 @@ def unmarshal_Contact(data: Any) -> Contact: else: args["status"] = ContactStatus.STATUS_UNKNOWN - field = data.get("questions", None) - if field is not None: - args["questions"] = ( - [unmarshal_ContactQuestion(v) for v in field] if field is not None else None - ) - else: - args["questions"] = [] - field = data.get("extension_nl", None) if field is not None: args["extension_nl"] = unmarshal_ContactExtensionNL(field) @@ -555,6 +547,14 @@ def unmarshal_Contact(data: Any) -> Contact: else: args["extension_it"] = None + field = data.get("questions", None) + if field is not None: + args["questions"] = ( + [unmarshal_ContactQuestion(v) for v in field] if field is not None else None + ) + else: + args["questions"] = None + return Contact(**args) diff --git a/scaleway/scaleway/domain/v2beta1/types.py b/scaleway/scaleway/domain/v2beta1/types.py index b2a53529d..7cd3bad78 100644 --- a/scaleway/scaleway/domain/v2beta1/types.py +++ b/scaleway/scaleway/domain/v2beta1/types.py @@ -518,16 +518,6 @@ class ContactExtensionFR: @dataclass class ContactExtensionIT: - european_citizenship: str - """ - This option is useless anymore. - """ - - tax_code: str - """ - Tax_code is renamed to pin. - """ - pin: str """ Domain name registrant's Taxcode (mandatory / only optional when the trustee is used) @@ -538,6 +528,16 @@ class ContactExtensionIT: * In all other cases it must be equal to VAT number (in the 16 characters format if nationality is IT) or the numeric Codice Fiscale. """ + european_citizenship: Optional[str] = None + """ + This option is useless anymore. + """ + + tax_code: Optional[str] = None + """ + Tax_code is renamed to pin. + """ + @dataclass class ContactExtensionNL: @@ -623,11 +623,11 @@ class Contact: email_status: ContactEmailStatus state: str status: ContactStatus - questions: list[ContactQuestion] extension_fr: Optional[ContactExtensionFR] = None extension_eu: Optional[ContactExtensionEU] = None extension_nl: Optional[ContactExtensionNL] = None extension_it: Optional[ContactExtensionIT] = None + questions: Optional[list[ContactQuestion]] = field(default_factory=list) @dataclass @@ -674,7 +674,6 @@ class NewContact: lang: StdLanguageCode resale: bool whois_opt_in: bool - questions: list[ContactQuestion] company_name: Optional[str] = None email_alt: Optional[str] = None fax_number: Optional[str] = None @@ -686,6 +685,7 @@ class NewContact: state: Optional[str] = None extension_nl: Optional[ContactExtensionNL] = None extension_it: Optional[ContactExtensionIT] = None + questions: Optional[list[ContactQuestion]] = field(default_factory=list) @dataclass @@ -1187,9 +1187,9 @@ class ImportRawDNSZoneRequest: DNS zone to import. """ - content: str + content: Optional[str] = None project_id: Optional[str] = None - format: Optional[RawFormat] = RawFormat.UNKNOWN_RAW_FORMAT + format: Optional[RawFormat] = None bind_source: Optional[ImportRawDNSZoneRequestBindSource] = None axfr_source: Optional[ImportRawDNSZoneRequestAXFRSource] = None @@ -1340,11 +1340,6 @@ class ListDNSZonesRequest: Domain on which to filter the returned DNS zones. """ - dns_zone: str - """ - DNS zone on which to filter the returned DNS zones. - """ - organization_id: Optional[str] = None """ Organization ID on which to filter the returned DNS zones. @@ -1372,6 +1367,11 @@ class ListDNSZonesRequest: Maximum number of DNS zones to return per page. """ + dns_zone: Optional[str] = None + """ + DNS zone on which to filter the returned DNS zones. + """ + dns_zones: Optional[list[str]] = field(default_factory=list) """ DNS zones on which to filter the returned DNS zones. diff --git a/scaleway/scaleway/instance/v1/marshalling.py b/scaleway/scaleway/instance/v1/marshalling.py index 2e72fdb36..8aabb07a6 100644 --- a/scaleway/scaleway/instance/v1/marshalling.py +++ b/scaleway/scaleway/instance/v1/marshalling.py @@ -1108,13 +1108,13 @@ def unmarshal_Server(data: Any) -> Server: if field is not None: args["routed_ip_enabled"] = field else: - args["routed_ip_enabled"] = False + args["routed_ip_enabled"] = None field = data.get("enable_ipv6", None) if field is not None: args["enable_ipv6"] = field else: - args["enable_ipv6"] = False + args["enable_ipv6"] = None field = data.get("image", None) if field is not None: @@ -1472,7 +1472,7 @@ def unmarshal_SecurityGroup(data: Any) -> SecurityGroup: if field is not None: args["organization_default"] = field else: - args["organization_default"] = False + args["organization_default"] = None field = data.get("creation_date", None) if field is not None: @@ -1905,85 +1905,85 @@ def unmarshal_Dashboard(data: Any) -> Dashboard: if field is not None: args["volumes_count"] = field else: - args["volumes_count"] = None + args["volumes_count"] = 0 field = data.get("running_servers_count", None) if field is not None: args["running_servers_count"] = field else: - args["running_servers_count"] = None + args["running_servers_count"] = 0 field = data.get("servers_by_types", None) if field is not None: args["servers_by_types"] = field else: - args["servers_by_types"] = None + args["servers_by_types"] = {} field = data.get("images_count", None) if field is not None: args["images_count"] = field else: - args["images_count"] = None + args["images_count"] = 0 field = data.get("snapshots_count", None) if field is not None: args["snapshots_count"] = field else: - args["snapshots_count"] = None + args["snapshots_count"] = 0 field = data.get("servers_count", None) if field is not None: args["servers_count"] = field else: - args["servers_count"] = None + args["servers_count"] = 0 field = data.get("ips_count", None) if field is not None: args["ips_count"] = field else: - args["ips_count"] = None + args["ips_count"] = 0 field = data.get("security_groups_count", None) if field is not None: args["security_groups_count"] = field else: - args["security_groups_count"] = None + args["security_groups_count"] = 0 field = data.get("ips_unused", None) if field is not None: args["ips_unused"] = field else: - args["ips_unused"] = None + args["ips_unused"] = 0 field = data.get("volumes_l_ssd_count", None) if field is not None: args["volumes_l_ssd_count"] = field else: - args["volumes_l_ssd_count"] = None + args["volumes_l_ssd_count"] = 0 field = data.get("volumes_l_ssd_total_size", None) if field is not None: args["volumes_l_ssd_total_size"] = field else: - args["volumes_l_ssd_total_size"] = None + args["volumes_l_ssd_total_size"] = 0 field = data.get("private_nics_count", None) if field is not None: args["private_nics_count"] = field else: - args["private_nics_count"] = None + args["private_nics_count"] = 0 field = data.get("placement_groups_count", None) if field is not None: args["placement_groups_count"] = field else: - args["placement_groups_count"] = None + args["placement_groups_count"] = 0 field = data.get("volumes_scratch_count", None) if field is not None: args["volumes_scratch_count"] = field else: - args["volumes_scratch_count"] = None + args["volumes_scratch_count"] = 0 field = data.get("volumes_b_ssd_count", None) if field is not None: @@ -2662,7 +2662,7 @@ def unmarshal_ServerType(data: Any) -> ServerType: if field is not None: args["monthly_price"] = field else: - args["monthly_price"] = 0.0 + args["monthly_price"] = None field = data.get("hourly_price", None) if field is not None: diff --git a/scaleway/scaleway/instance/v1/types.py b/scaleway/scaleway/instance/v1/types.py index 4470ba522..a21f0f80b 100644 --- a/scaleway/scaleway/instance/v1/types.py +++ b/scaleway/scaleway/instance/v1/types.py @@ -879,12 +879,12 @@ class Server: Instance creation date. """ - routed_ip_enabled: Optional[bool] = False + routed_ip_enabled: Optional[bool] = None """ True to configure the instance so it uses the routed IP mode. Use of `routed_ip_enabled` as `False` is deprecated. """ - enable_ipv6: Optional[bool] = False + enable_ipv6: Optional[bool] = None """ True if IPv6 is enabled (deprecated and always `False` when `routed_ip_enabled` is `True`). """ @@ -1064,7 +1064,7 @@ class SecurityGroup: Zone in which the security group is located. """ - organization_default: Optional[bool] = False + organization_default: Optional[bool] = None """ True if it is your default security group for this Organization ID. """ @@ -1329,7 +1329,7 @@ class ServerType: True if this Instance type has reached end of service. """ - monthly_price: Optional[float] = 0.0 + monthly_price: Optional[float] = None """ Estimated monthly price, for a 30 days month, in Euro. """ @@ -1724,7 +1724,7 @@ class CreateSecurityGroupRequest: organization: Optional[str] = None - organization_default: Optional[bool] = False + organization_default: Optional[bool] = None project_default: Optional[bool] = False @@ -1803,7 +1803,7 @@ class CreateServerRequest: By default, `dynamic_ip_required` is true, a dynamic ip is attached to the instance (if no flexible ip is already attached). """ - routed_ip_enabled: Optional[bool] = False + routed_ip_enabled: Optional[bool] = None """ If true, configure the Instance so it uses the new routed IP mode. """ @@ -1818,7 +1818,7 @@ class CreateServerRequest: Volumes attached to the server. """ - enable_ipv6: Optional[bool] = False + enable_ipv6: Optional[bool] = None """ True if IPv6 is enabled on the server (deprecated and always `False` when `routed_ip_enabled` is `True`). """ @@ -3354,7 +3354,7 @@ class UpdateSecurityGroupRequest: Tags of the security group. """ - organization_default: Optional[bool] = False + organization_default: Optional[bool] = None """ Please use project_default instead. """ @@ -3469,7 +3469,7 @@ class UpdateServerRequest: volumes: Optional[dict[str, VolumeServerTemplate]] = field(default_factory=dict) dynamic_ip_required: Optional[bool] = False - routed_ip_enabled: Optional[bool] = False + routed_ip_enabled: Optional[bool] = None """ True to configure the instance so it uses the new routed IP mode (once this is set to True you cannot set it back to False). """ @@ -3479,7 +3479,7 @@ class UpdateServerRequest: A list of reserved IP IDs to attach to the Instance. """ - enable_ipv6: Optional[bool] = False + enable_ipv6: Optional[bool] = None protected: Optional[bool] = False """ True to activate server protection option. diff --git a/scaleway/scaleway/s2s_vpn/v1alpha1/marshalling.py b/scaleway/scaleway/s2s_vpn/v1alpha1/marshalling.py index 0bb965c94..7898770b5 100644 --- a/scaleway/scaleway/s2s_vpn/v1alpha1/marshalling.py +++ b/scaleway/scaleway/s2s_vpn/v1alpha1/marshalling.py @@ -253,13 +253,13 @@ def unmarshal_Connection(data: Any) -> Connection: if field is not None: args["tunnel_status_ipv4"] = field else: - args["tunnel_status_ipv4"] = TunnelStatus.UNKNOWN_TUNNEL_STATUS + args["tunnel_status_ipv4"] = None field = data.get("tunnel_status_ipv6", None) if field is not None: args["tunnel_status_ipv6"] = field else: - args["tunnel_status_ipv6"] = TunnelStatus.UNKNOWN_TUNNEL_STATUS + args["tunnel_status_ipv6"] = None field = data.get("bgp_session_ipv4", None) if field is not None: diff --git a/scaleway/scaleway/s2s_vpn/v1alpha1/types.py b/scaleway/scaleway/s2s_vpn/v1alpha1/types.py index 2c4d78e10..9c8f0c0b8 100644 --- a/scaleway/scaleway/s2s_vpn/v1alpha1/types.py +++ b/scaleway/scaleway/s2s_vpn/v1alpha1/types.py @@ -313,12 +313,12 @@ class Connection: Last modification date of the connection. """ - tunnel_status_ipv4: Optional[TunnelStatus] = TunnelStatus.UNKNOWN_TUNNEL_STATUS + tunnel_status_ipv4: Optional[TunnelStatus] = None """ Status of the IPv4 IPsec tunnel. """ - tunnel_status_ipv6: Optional[TunnelStatus] = TunnelStatus.UNKNOWN_TUNNEL_STATUS + tunnel_status_ipv6: Optional[TunnelStatus] = None """ Status of the IPv6 IPsec tunnel. """ diff --git a/scaleway/scaleway/webhosting/v1/api.py b/scaleway/scaleway/webhosting/v1/api.py index 19ba4db9a..dd9cece7b 100644 --- a/scaleway/scaleway/webhosting/v1/api.py +++ b/scaleway/scaleway/webhosting/v1/api.py @@ -1232,22 +1232,22 @@ def sync_domain_dns_records( self, *, domain: str, - update_web_records: bool, - update_mail_records: bool, - update_all_records: bool, - update_nameservers: bool, region: Optional[ScwRegion] = None, + update_web_records: Optional[bool] = None, + update_mail_records: Optional[bool] = None, + update_all_records: Optional[bool] = None, + update_nameservers: Optional[bool] = None, custom_records: Optional[list[SyncDomainDnsRecordsRequestRecord]] = None, auto_config_domain_dns: Optional[AutoConfigDomainDns] = None, ) -> DnsRecords: """ Synchronize your DNS records on the Elements Console and on cPanel. :param domain: Domain for which the DNS records will be synchronized. + :param region: Region to target. If none is passed will use default region from the config. :param update_web_records: Whether or not to synchronize the web records (deprecated, use auto_config_domain_dns). :param update_mail_records: Whether or not to synchronize the mail records (deprecated, use auto_config_domain_dns). :param update_all_records: Whether or not to synchronize all types of records. This one has priority (deprecated, use auto_config_domain_dns). :param update_nameservers: Whether or not to synchronize domain nameservers (deprecated, use auto_config_domain_dns). - :param region: Region to target. If none is passed will use default region from the config. :param custom_records: Custom records to synchronize. :param auto_config_domain_dns: Whether or not to synchronize each types of records. :return: :class:`DnsRecords ` @@ -1257,10 +1257,6 @@ def sync_domain_dns_records( result = api.sync_domain_dns_records( domain="example", - update_web_records=False, - update_mail_records=False, - update_all_records=False, - update_nameservers=False, ) """ @@ -1275,11 +1271,11 @@ def sync_domain_dns_records( body=marshal_DnsApiSyncDomainDnsRecordsRequest( DnsApiSyncDomainDnsRecordsRequest( domain=domain, + region=region, update_web_records=update_web_records, update_mail_records=update_mail_records, update_all_records=update_all_records, update_nameservers=update_nameservers, - region=region, custom_records=custom_records, auto_config_domain_dns=auto_config_domain_dns, ), diff --git a/scaleway/scaleway/webhosting/v1/marshalling.py b/scaleway/scaleway/webhosting/v1/marshalling.py index 44f87579b..3a5cfa52a 100644 --- a/scaleway/scaleway/webhosting/v1/marshalling.py +++ b/scaleway/scaleway/webhosting/v1/marshalling.py @@ -350,36 +350,18 @@ def unmarshal_HostingSummary(data: Any) -> HostingSummary: else: args["status"] = HostingStatus.UNKNOWN_STATUS - field = data.get("domain", None) - if field is not None: - args["domain"] = field - else: - args["domain"] = None - field = data.get("protected", None) if field is not None: args["protected"] = field else: args["protected"] = False - field = data.get("dns_status", None) - if field is not None: - args["dns_status"] = field - else: - args["dns_status"] = DnsRecordsStatus.UNKNOWN_STATUS - field = data.get("offer_name", None) if field is not None: args["offer_name"] = field else: args["offer_name"] = None - field = data.get("domain_status", None) - if field is not None: - args["domain_status"] = field - else: - args["domain_status"] = DomainStatus.UNKNOWN_STATUS - field = data.get("region", None) if field is not None: args["region"] = field @@ -398,6 +380,24 @@ def unmarshal_HostingSummary(data: Any) -> HostingSummary: else: args["updated_at"] = None + field = data.get("domain", None) + if field is not None: + args["domain"] = field + else: + args["domain"] = None + + field = data.get("dns_status", None) + if field is not None: + args["dns_status"] = field + else: + args["dns_status"] = None + + field = data.get("domain_status", None) + if field is not None: + args["domain_status"] = field + else: + args["domain_status"] = None + field = data.get("domain_info", None) if field is not None: args["domain_info"] = unmarshal_HostingDomain(field) @@ -650,7 +650,7 @@ def unmarshal_DnsRecords(data: Any) -> DnsRecords: [DomainDnsAction(v) for v in field] if field is not None else None ) else: - args["dns_config"] = [] + args["dns_config"] = None field = data.get("auto_config_domain_dns", None) if field is not None: @@ -707,7 +707,7 @@ def unmarshal_Domain(data: Any) -> Domain: [DomainDnsAction(v) for v in field] if field is not None else None ) else: - args["available_dns_actions"] = [] + args["available_dns_actions"] = None field = data.get("auto_config_domain_dns", None) if field is not None: @@ -1145,12 +1145,6 @@ def unmarshal_Hosting(data: Any) -> Hosting: else: args["status"] = HostingStatus.UNKNOWN_STATUS - field = data.get("domain", None) - if field is not None: - args["domain"] = field - else: - args["domain"] = None - field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field @@ -1163,6 +1157,12 @@ def unmarshal_Hosting(data: Any) -> Hosting: else: args["created_at"] = None + field = data.get("domain", None) + if field is not None: + args["domain"] = field + else: + args["domain"] = None + field = data.get("offer", None) if field is not None: args["offer"] = unmarshal_Offer(field) @@ -1181,12 +1181,6 @@ def unmarshal_Hosting(data: Any) -> Hosting: else: args["tags"] = [] - field = data.get("dns_status", None) - if field is not None: - args["dns_status"] = field - else: - args["dns_status"] = DnsRecordsStatus.UNKNOWN_STATUS - field = data.get("ipv4", None) if field is not None: args["ipv4"] = field @@ -1199,24 +1193,30 @@ def unmarshal_Hosting(data: Any) -> Hosting: else: args["protected"] = False - field = data.get("domain_status", None) - if field is not None: - args["domain_status"] = field - else: - args["domain_status"] = DomainStatus.UNKNOWN_STATUS - field = data.get("region", None) if field is not None: args["region"] = field else: args["region"] = 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) else: args["user"] = None + field = data.get("domain_status", None) + if field is not None: + args["domain_status"] = field + else: + args["domain_status"] = None + field = data.get("domain_info", None) if field is not None: args["domain_info"] = unmarshal_HostingDomain(field) diff --git a/scaleway/scaleway/webhosting/v1/types.py b/scaleway/scaleway/webhosting/v1/types.py index 07d378d5a..4df2c5424 100644 --- a/scaleway/scaleway/webhosting/v1/types.py +++ b/scaleway/scaleway/webhosting/v1/types.py @@ -891,31 +891,16 @@ class HostingSummary: Status of the Web Hosting plan. """ - domain: str - """ - Main domain associated with the Web Hosting plan (deprecated, use domain_info). - """ - protected: bool """ Whether the hosting is protected or not. """ - dns_status: DnsRecordsStatus - """ - DNS status of the Web Hosting plan. - """ - offer_name: str """ Name of the active offer for the Web Hosting plan. """ - domain_status: DomainStatus - """ - Main domain status of the Web Hosting plan. - """ - region: ScwRegion """ Region where the Web Hosting plan is hosted. @@ -931,6 +916,21 @@ class HostingSummary: Date on which the Web Hosting plan was last updated. """ + domain: Optional[str] = None + """ + Main domain associated with the Web Hosting plan (deprecated, use domain_info). + """ + + dns_status: Optional[DnsRecordsStatus] = None + """ + DNS status of the Web Hosting plan. + """ + + domain_status: Optional[DomainStatus] = None + """ + Main domain status of the Web Hosting plan. + """ + domain_info: Optional[HostingDomain] = None """ Domain configuration block (subdomain, optional custom domain, and DNS settings). @@ -1523,31 +1523,31 @@ class DnsApiSyncDomainDnsRecordsRequest: Domain for which the DNS records will be synchronized. """ - update_web_records: bool + region: Optional[ScwRegion] = None + """ + Region to target. If none is passed will use default region from the config. + """ + + update_web_records: Optional[bool] = None """ Whether or not to synchronize the web records (deprecated, use auto_config_domain_dns). """ - update_mail_records: bool + update_mail_records: Optional[bool] = None """ Whether or not to synchronize the mail records (deprecated, use auto_config_domain_dns). """ - update_all_records: bool + update_all_records: Optional[bool] = None """ Whether or not to synchronize all types of records. This one has priority (deprecated, use auto_config_domain_dns). """ - update_nameservers: bool + update_nameservers: Optional[bool] = None """ Whether or not to synchronize domain nameservers (deprecated, use auto_config_domain_dns). """ - region: Optional[ScwRegion] = None - """ - Region to target. If none is passed will use default region from the config. - """ - custom_records: Optional[list[SyncDomainDnsRecordsRequestRecord]] = field( default_factory=list ) @@ -1578,7 +1578,7 @@ class DnsRecords: Status of the records. """ - dns_config: list[DomainDnsAction] + dns_config: Optional[list[DomainDnsAction]] = field(default_factory=list) """ Records dns auto configuration settings (deprecated, use auto_config_domain_dns). """ @@ -1616,7 +1616,7 @@ class Domain: A list of actions that can be performed on the domain. """ - available_dns_actions: list[DomainDnsAction] + available_dns_actions: Optional[list[DomainDnsAction]] = field(default_factory=list) """ A list of DNS-related actions that can be auto configured for the domain (deprecated, use auto_config_domain_dns instead). """ @@ -1784,21 +1784,11 @@ class Hosting: Status of the Web Hosting plan. """ - domain: str - """ - Main domain associated with the Web Hosting plan (deprecated, use domain_info). - """ - tags: list[str] """ List of tags associated with the Web Hosting plan. """ - dns_status: DnsRecordsStatus - """ - DNS status of the Web Hosting plan (deprecated, use domain_info). - """ - ipv4: str """ Current IPv4 address of the hosting. @@ -1809,11 +1799,6 @@ class Hosting: Whether the hosting is protected or not. """ - domain_status: DomainStatus - """ - Main domain status of the Web Hosting plan (deprecated, use domain_info). - """ - region: ScwRegion """ Region where the Web Hosting plan is hosted. @@ -1829,6 +1814,11 @@ class Hosting: Date on which the Web Hosting plan was created. """ + domain: Optional[str] = None + """ + Main domain associated with the Web Hosting plan (deprecated, use domain_info). + """ + offer: Optional[Offer] = None """ Details of the Web Hosting plan offer and options. @@ -1839,11 +1829,21 @@ class Hosting: Details of the hosting platform. """ + dns_status: Optional[DnsRecordsStatus] = None + """ + DNS status of the Web Hosting plan (deprecated, use domain_info). + """ + user: Optional[HostingUser] = None """ Details of the hosting user. """ + domain_status: Optional[DomainStatus] = None + """ + Main domain status of the Web Hosting plan (deprecated, use domain_info). + """ + domain_info: Optional[HostingDomain] = None """ Domain configuration block (subdomain, optional custom domain, and DNS settings). @@ -2517,14 +2517,14 @@ class Progress: @dataclass class ResetHostingPasswordResponse: - one_time_password: str + one_time_password_b64: str """ - New temporary password (deprecated, use password_b64 instead). + New temporary password, encoded in base64. """ - one_time_password_b64: str + one_time_password: Optional[str] = None """ - New temporary password, encoded in base64. + New temporary password (deprecated, use password_b64 instead). """