From af5cebaaf8beaf5e330ea4224697fa5ba4dfa2b5 Mon Sep 17 00:00:00 2001 From: Nathanael DEMACON Date: Thu, 26 Oct 2023 11:27:43 +0200 Subject: [PATCH] feat: update generation --- .../applesilicon/v1alpha1/marshalling.py | 12 +- .../applesilicon/v1alpha1/types.py | 20 +- .../baremetal/v1/marshalling.py | 24 +-- .../scaleway_async/baremetal/v1/types.py | 44 ++-- .../block/v1alpha1/marshalling.py | 18 +- .../scaleway_async/block/v1alpha1/types.py | 32 +-- .../cockpit/v1beta1/marshalling.py | 18 +- .../scaleway_async/cockpit/v1beta1/types.py | 30 +-- .../document_db/v1beta1/marshalling.py | 18 +- .../document_db/v1beta1/types.py | 30 +-- .../domain/v2beta1/marshalling.py | 62 +++--- .../scaleway_async/domain/v2beta1/types.py | 60 +++--- .../flexibleip/v1alpha1/marshalling.py | 12 +- .../flexibleip/v1alpha1/types.py | 16 +- .../scaleway_async/instance/v1/marshalling.py | 114 +++++----- .../scaleway_async/instance/v1/types.py | 194 +++++++++--------- .../scaleway_async/iot/v1/marshalling.py | 24 +-- scaleway-async/scaleway_async/iot/v1/types.py | 40 ++-- scaleway-async/scaleway_async/ipam/v1/api.py | 7 +- .../scaleway_async/ipam/v1/marshalling.py | 12 +- .../scaleway_async/ipam/v1/types.py | 20 +- .../ipfs/v1alpha1/marshalling.py | 18 +- .../scaleway_async/ipfs/v1alpha1/types.py | 14 +- .../scaleway_async/k8s/v1/marshalling.py | 54 ++--- scaleway-async/scaleway_async/k8s/v1/types.py | 76 +++---- .../scaleway_async/lb/v1/marshalling.py | 60 +++--- scaleway-async/scaleway_async/lb/v1/types.py | 100 ++++----- .../marketplace/v1/marshalling.py | 6 +- .../scaleway_async/marketplace/v1/types.py | 14 +- .../mnq/v1alpha1/marshalling.py | 6 +- .../scaleway_async/mnq/v1alpha1/types.py | 10 +- .../scaleway_async/mnq/v1beta1/marshalling.py | 18 +- .../scaleway_async/mnq/v1beta1/types.py | 30 +-- .../scaleway_async/rdb/v1/marshalling.py | 18 +- scaleway-async/scaleway_async/rdb/v1/types.py | 30 +-- .../scaleway_async/redis/v1/types.py | 2 +- .../tem/v1alpha1/marshalling.py | 6 +- .../scaleway_async/tem/v1alpha1/types.py | 14 +- .../scaleway_async/vpcgw/v1/marshalling.py | 24 +-- .../scaleway_async/vpcgw/v1/types.py | 36 ++-- .../webhosting/v1alpha1/marshalling.py | 12 +- .../webhosting/v1alpha1/types.py | 20 +- .../applesilicon/v1alpha1/marshalling.py | 12 +- .../scaleway/applesilicon/v1alpha1/types.py | 20 +- scaleway/scaleway/baremetal/v1/marshalling.py | 24 +-- scaleway/scaleway/baremetal/v1/types.py | 44 ++-- .../scaleway/block/v1alpha1/marshalling.py | 18 +- scaleway/scaleway/block/v1alpha1/types.py | 32 +-- .../scaleway/cockpit/v1beta1/marshalling.py | 18 +- scaleway/scaleway/cockpit/v1beta1/types.py | 30 +-- .../document_db/v1beta1/marshalling.py | 18 +- .../scaleway/document_db/v1beta1/types.py | 30 +-- .../scaleway/domain/v2beta1/marshalling.py | 62 +++--- scaleway/scaleway/domain/v2beta1/types.py | 60 +++--- .../flexibleip/v1alpha1/marshalling.py | 12 +- .../scaleway/flexibleip/v1alpha1/types.py | 16 +- scaleway/scaleway/instance/v1/marshalling.py | 114 +++++----- scaleway/scaleway/instance/v1/types.py | 194 +++++++++--------- scaleway/scaleway/iot/v1/marshalling.py | 24 +-- scaleway/scaleway/iot/v1/types.py | 40 ++-- scaleway/scaleway/ipam/v1/api.py | 7 +- scaleway/scaleway/ipam/v1/marshalling.py | 12 +- scaleway/scaleway/ipam/v1/types.py | 20 +- .../scaleway/ipfs/v1alpha1/marshalling.py | 18 +- scaleway/scaleway/ipfs/v1alpha1/types.py | 14 +- scaleway/scaleway/k8s/v1/marshalling.py | 54 ++--- scaleway/scaleway/k8s/v1/types.py | 76 +++---- scaleway/scaleway/lb/v1/marshalling.py | 60 +++--- scaleway/scaleway/lb/v1/types.py | 100 ++++----- .../scaleway/marketplace/v1/marshalling.py | 6 +- scaleway/scaleway/marketplace/v1/types.py | 14 +- scaleway/scaleway/mnq/v1alpha1/marshalling.py | 6 +- scaleway/scaleway/mnq/v1alpha1/types.py | 10 +- scaleway/scaleway/mnq/v1beta1/marshalling.py | 18 +- scaleway/scaleway/mnq/v1beta1/types.py | 30 +-- scaleway/scaleway/rdb/v1/marshalling.py | 18 +- scaleway/scaleway/rdb/v1/types.py | 30 +-- scaleway/scaleway/redis/v1/types.py | 2 +- scaleway/scaleway/tem/v1alpha1/marshalling.py | 6 +- scaleway/scaleway/tem/v1alpha1/types.py | 14 +- scaleway/scaleway/vpcgw/v1/marshalling.py | 24 +-- scaleway/scaleway/vpcgw/v1/types.py | 36 ++-- .../webhosting/v1alpha1/marshalling.py | 12 +- .../scaleway/webhosting/v1alpha1/types.py | 20 +- 84 files changed, 1380 insertions(+), 1370 deletions(-) diff --git a/scaleway-async/scaleway_async/applesilicon/v1alpha1/marshalling.py b/scaleway-async/scaleway_async/applesilicon/v1alpha1/marshalling.py index 830eb8ed..7a9f0f9f 100644 --- a/scaleway-async/scaleway_async/applesilicon/v1alpha1/marshalling.py +++ b/scaleway-async/scaleway_async/applesilicon/v1alpha1/marshalling.py @@ -105,21 +105,21 @@ def unmarshal_ServerType(data: Any) -> ServerType: args: Dict[str, Any] = {} + field = data.get("name", None) + args["name"] = field + + field = data.get("stock", None) + args["stock"] = field + field = data.get("cpu", None) args["cpu"] = unmarshal_ServerTypeCPU(field) field = data.get("disk", None) args["disk"] = unmarshal_ServerTypeDisk(field) - field = data.get("name", None) - args["name"] = field - field = data.get("memory", None) args["memory"] = unmarshal_ServerTypeMemory(field) - field = data.get("stock", None) - args["stock"] = field - field = data.get("minimum_lease_duration", None) args["minimum_lease_duration"] = field diff --git a/scaleway-async/scaleway_async/applesilicon/v1alpha1/types.py b/scaleway-async/scaleway_async/applesilicon/v1alpha1/types.py index c70bd0d2..79291bad 100644 --- a/scaleway-async/scaleway_async/applesilicon/v1alpha1/types.py +++ b/scaleway-async/scaleway_async/applesilicon/v1alpha1/types.py @@ -100,29 +100,29 @@ class OS: @dataclass class ServerType: - cpu: ServerTypeCPU + name: str """ - CPU description. + Name of the type. """ - disk: ServerTypeDisk + stock: ServerTypeStock """ - Size of the local disk of the server. + Current stock. """ - name: str + cpu: Optional[ServerTypeCPU] """ - Name of the type. + CPU description. """ - memory: ServerTypeMemory + disk: Optional[ServerTypeDisk] """ - Size of memory available. + Size of the local disk of the server. """ - stock: ServerTypeStock + memory: Optional[ServerTypeMemory] """ - Current stock. + Size of memory available. """ minimum_lease_duration: Optional[str] diff --git a/scaleway-async/scaleway_async/baremetal/v1/marshalling.py b/scaleway-async/scaleway_async/baremetal/v1/marshalling.py index acb82a8b..c3ea1a16 100644 --- a/scaleway-async/scaleway_async/baremetal/v1/marshalling.py +++ b/scaleway-async/scaleway_async/baremetal/v1/marshalling.py @@ -126,6 +126,15 @@ def unmarshal_OS(data: Any) -> OS: field = data.get("logo_url", None) args["logo_url"] = field + field = data.get("enabled", None) + args["enabled"] = field + + field = data.get("license_required", None) + args["license_required"] = field + + field = data.get("allowed", None) + args["allowed"] = field + field = data.get("ssh", None) args["ssh"] = unmarshal_OSOSField(field) @@ -141,15 +150,6 @@ def unmarshal_OS(data: Any) -> OS: field = data.get("service_password", None) args["service_password"] = unmarshal_OSOSField(field) - field = data.get("enabled", None) - args["enabled"] = field - - field = data.get("license_required", None) - args["license_required"] = field - - field = data.get("allowed", None) - args["allowed"] = field - return OS(**args) @@ -556,9 +556,6 @@ def unmarshal_Server(data: Any) -> Server: field = data.get("zone", None) args["zone"] = field - field = data.get("install", None) - args["install"] = unmarshal_ServerInstall(field) - field = data.get("ping_status", None) args["ping_status"] = field @@ -567,6 +564,9 @@ def unmarshal_Server(data: Any) -> Server: [unmarshal_ServerOption(v) for v in field] if field is not None else None ) + field = data.get("install", None) + args["install"] = unmarshal_ServerInstall(field) + field = data.get("rescue_server", None) args["rescue_server"] = unmarshal_ServerRescueServer(field) diff --git a/scaleway-async/scaleway_async/baremetal/v1/types.py b/scaleway-async/scaleway_async/baremetal/v1/types.py index 36700e71..8f4a7ce7 100644 --- a/scaleway-async/scaleway_async/baremetal/v1/types.py +++ b/scaleway-async/scaleway_async/baremetal/v1/types.py @@ -474,44 +474,44 @@ class OS: URL of this OS's logo. """ - ssh: OSOSField + enabled: bool """ - Object defining the SSH requirements to install the OS. + Defines if the operating system is enabled or not. """ - user: OSOSField + license_required: bool """ - Object defining the username requirements to install the OS. + License required (check server options for pricing details). """ - password: OSOSField + allowed: bool """ - Object defining the password requirements to install the OS. + Defines if a specific Organization is allowed to install this OS type. """ - service_user: OSOSField + ssh: Optional[OSOSField] """ - Object defining the username requirements to install the service. + Object defining the SSH requirements to install the OS. """ - service_password: OSOSField + user: Optional[OSOSField] """ - Object defining the password requirements to install the service. + Object defining the username requirements to install the OS. """ - enabled: bool + password: Optional[OSOSField] """ - Defines if the operating system is enabled or not. + Object defining the password requirements to install the OS. """ - license_required: bool + service_user: Optional[OSOSField] """ - License required (check server options for pricing details). + Object defining the username requirements to install the service. """ - allowed: bool + service_password: Optional[OSOSField] """ - Defines if a specific Organization is allowed to install this OS type. + Object defining the password requirements to install the service. """ @@ -789,11 +789,6 @@ class Server: Zone in which is the server located. """ - install: ServerInstall - """ - Configuration of the installation. - """ - ping_status: ServerPingStatus """ Status of server ping. @@ -804,7 +799,12 @@ class Server: Options enabled on the server. """ - rescue_server: ServerRescueServer + install: Optional[ServerInstall] + """ + Configuration of the installation. + """ + + rescue_server: Optional[ServerRescueServer] """ Configuration of rescue boot. """ diff --git a/scaleway-async/scaleway_async/block/v1alpha1/marshalling.py b/scaleway-async/scaleway_async/block/v1alpha1/marshalling.py index 07460643..2eef49f5 100644 --- a/scaleway-async/scaleway_async/block/v1alpha1/marshalling.py +++ b/scaleway-async/scaleway_async/block/v1alpha1/marshalling.py @@ -168,9 +168,6 @@ def unmarshal_SnapshotSummary(data: Any) -> SnapshotSummary: field = data.get("name", None) args["name"] = field - field = data.get("parent_volume", None) - args["parent_volume"] = unmarshal_SnapshotParentVolume(field) - field = data.get("size", None) args["size"] = field @@ -189,6 +186,9 @@ def unmarshal_SnapshotSummary(data: Any) -> SnapshotSummary: field = data.get("class_", None) args["class_"] = field + field = data.get("parent_volume", None) + args["parent_volume"] = unmarshal_SnapshotParentVolume(field) + field = data.get("created_at", None) args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field @@ -228,15 +228,15 @@ def unmarshal_VolumeType(data: Any) -> VolumeType: field = data.get("type_", None) args["type_"] = field - field = data.get("specs", None) - args["specs"] = unmarshal_VolumeSpecifications(field) - field = data.get("pricing", None) args["pricing"] = unmarshal_Money(field) field = data.get("snapshot_pricing", None) args["snapshot_pricing"] = unmarshal_Money(field) + field = data.get("specs", None) + args["specs"] = unmarshal_VolumeSpecifications(field) + return VolumeType(**args) @@ -292,9 +292,6 @@ def unmarshal_Snapshot(data: Any) -> Snapshot: field = data.get("name", None) args["name"] = field - field = data.get("parent_volume", None) - args["parent_volume"] = unmarshal_SnapshotParentVolume(field) - field = data.get("size", None) args["size"] = field @@ -318,6 +315,9 @@ def unmarshal_Snapshot(data: Any) -> Snapshot: field = data.get("class_", None) args["class_"] = field + field = data.get("parent_volume", None) + args["parent_volume"] = unmarshal_SnapshotParentVolume(field) + field = data.get("created_at", None) args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field diff --git a/scaleway-async/scaleway_async/block/v1alpha1/types.py b/scaleway-async/scaleway_async/block/v1alpha1/types.py index b82f27d3..312d184a 100644 --- a/scaleway-async/scaleway_async/block/v1alpha1/types.py +++ b/scaleway-async/scaleway_async/block/v1alpha1/types.py @@ -202,11 +202,6 @@ class SnapshotSummary: Name of the snapshot. """ - parent_volume: SnapshotParentVolume - """ - If the parent volume has been deleted, value is null. - """ - size: int """ Size of the snapshot in bytes. @@ -237,6 +232,11 @@ class SnapshotSummary: Storage class of the snapshot. """ + parent_volume: Optional[SnapshotParentVolume] + """ + If the parent volume has been deleted, value is null. + """ + created_at: Optional[datetime] """ Creation date of the snapshot. @@ -255,11 +255,6 @@ class VolumeType: Volume type. """ - specs: VolumeSpecifications - """ - Volume specifications of the volume type. - """ - pricing: Optional[Money] """ Price of the volume billed in GB/hour. @@ -270,6 +265,11 @@ class VolumeType: Price of the snapshot billed in GB/hour. """ + specs: Optional[VolumeSpecifications] + """ + Volume specifications of the volume type. + """ + @dataclass class Volume: @@ -333,7 +333,7 @@ class Volume: Volume zone. """ - specs: VolumeSpecifications + specs: Optional[VolumeSpecifications] """ Specifications of the volume. """ @@ -611,11 +611,6 @@ class Snapshot: Name of the snapshot. """ - parent_volume: SnapshotParentVolume - """ - If the parent volume was deleted, value is null. - """ - size: int """ Size in bytes of the snapshot. @@ -651,6 +646,11 @@ class Snapshot: Storage class of the snapshot. """ + parent_volume: Optional[SnapshotParentVolume] + """ + If the parent volume was deleted, value is null. + """ + created_at: Optional[datetime] """ Creation date of the snapshot. diff --git a/scaleway-async/scaleway_async/cockpit/v1beta1/marshalling.py b/scaleway-async/scaleway_async/cockpit/v1beta1/marshalling.py index 11ceb1e9..846da82b 100644 --- a/scaleway-async/scaleway_async/cockpit/v1beta1/marshalling.py +++ b/scaleway-async/scaleway_async/cockpit/v1beta1/marshalling.py @@ -206,15 +206,15 @@ def unmarshal_Token(data: Any) -> Token: field = data.get("name", None) args["name"] = field - field = data.get("scopes", None) - args["scopes"] = unmarshal_TokenScopes(field) - field = data.get("created_at", None) args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field field = data.get("updated_at", None) args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + field = data.get("scopes", None) + args["scopes"] = unmarshal_TokenScopes(field) + field = data.get("secret_key", None) args["secret_key"] = field @@ -290,24 +290,24 @@ def unmarshal_Cockpit(data: Any) -> Cockpit: field = data.get("project_id", None) args["project_id"] = field - field = data.get("endpoints", None) - args["endpoints"] = unmarshal_CockpitEndpoints(field) - field = data.get("status", None) args["status"] = field field = data.get("managed_alerts_enabled", None) args["managed_alerts_enabled"] = field - field = data.get("plan", None) - args["plan"] = unmarshal_Plan(field) - field = data.get("created_at", None) args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field field = data.get("updated_at", None) args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + field = data.get("endpoints", None) + args["endpoints"] = unmarshal_CockpitEndpoints(field) + + field = data.get("plan", None) + args["plan"] = unmarshal_Plan(field) + return Cockpit(**args) diff --git a/scaleway-async/scaleway_async/cockpit/v1beta1/types.py b/scaleway-async/scaleway_async/cockpit/v1beta1/types.py index 0cb4ad6b..1b89755a 100644 --- a/scaleway-async/scaleway_async/cockpit/v1beta1/types.py +++ b/scaleway-async/scaleway_async/cockpit/v1beta1/types.py @@ -333,11 +333,6 @@ class Token: Name of the token. """ - scopes: TokenScopes - """ - Token's permissions. - """ - created_at: Optional[datetime] """ Date and time of the token's creation. @@ -348,6 +343,11 @@ class Token: Date and time of the token's last update. """ + scopes: Optional[TokenScopes] + """ + Token's permissions. + """ + secret_key: Optional[str] """ Token's secret key. @@ -373,11 +373,6 @@ class Cockpit: ID of the Project the Cockpit belongs to. """ - endpoints: CockpitEndpoints - """ - Endpoints of the Cockpit. - """ - status: CockpitStatus """ Status of the Cockpit. @@ -388,11 +383,6 @@ class Cockpit: Specifies whether managed alerts are enabled or disabled. """ - plan: Plan - """ - Pricing plan information. - """ - created_at: Optional[datetime] """ Date and time of the Cockpit's creation. @@ -403,6 +393,16 @@ class Cockpit: Date and time of the Cockpit's last update. """ + endpoints: Optional[CockpitEndpoints] + """ + Endpoints of the Cockpit. + """ + + plan: Optional[Plan] + """ + Pricing plan information. + """ + @dataclass class CockpitMetrics: diff --git a/scaleway-async/scaleway_async/document_db/v1beta1/marshalling.py b/scaleway-async/scaleway_async/document_db/v1beta1/marshalling.py index 8c4073c9..add3a09c 100644 --- a/scaleway-async/scaleway_async/document_db/v1beta1/marshalling.py +++ b/scaleway-async/scaleway_async/document_db/v1beta1/marshalling.py @@ -380,9 +380,6 @@ def unmarshal_Instance(data: Any) -> Instance: args: Dict[str, Any] = {} - field = data.get("volume", None) - args["volume"] = unmarshal_Volume(field) - field = data.get("region", None) args["region"] = field @@ -398,6 +395,9 @@ def unmarshal_Instance(data: Any) -> Instance: field = data.get("created_at", None) args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + field = data.get("volume", None) + args["volume"] = unmarshal_Volume(field) + field = data.get("project_id", None) args["project_id"] = field @@ -420,15 +420,15 @@ def unmarshal_Instance(data: Any) -> Instance: [unmarshal_InstanceSetting(v) for v in field] if field is not None else None ) - field = data.get("backup_schedule", None) - args["backup_schedule"] = unmarshal_BackupSchedule(field) - field = data.get("is_ha_cluster", None) args["is_ha_cluster"] = field field = data.get("endpoint", None) args["endpoint"] = unmarshal_Endpoint(field) + field = data.get("backup_schedule", None) + args["backup_schedule"] = unmarshal_BackupSchedule(field) + field = data.get("read_replicas", None) args["read_replicas"] = ( [unmarshal_ReadReplica(v) for v in field] if field is not None else None @@ -447,9 +447,6 @@ def unmarshal_Instance(data: Any) -> Instance: [unmarshal_Endpoint(v) for v in field] if field is not None else None ) - field = data.get("logs_policy", None) - args["logs_policy"] = unmarshal_LogsPolicy(field) - field = data.get("backup_same_region", None) args["backup_same_region"] = field @@ -458,6 +455,9 @@ def unmarshal_Instance(data: Any) -> Instance: [unmarshal_Maintenance(v) for v in field] if field is not None else None ) + field = data.get("logs_policy", None) + args["logs_policy"] = unmarshal_LogsPolicy(field) + return Instance(**args) diff --git a/scaleway-async/scaleway_async/document_db/v1beta1/types.py b/scaleway-async/scaleway_async/document_db/v1beta1/types.py index 6c5275fd..2bfe684c 100644 --- a/scaleway-async/scaleway_async/document_db/v1beta1/types.py +++ b/scaleway-async/scaleway_async/document_db/v1beta1/types.py @@ -703,11 +703,6 @@ class InstanceLog: @dataclass class Instance: - volume: Volume - """ - Volumes of the Database Instance. - """ - region: Region """ Region the Database Instance is in. @@ -733,6 +728,11 @@ class Instance: Creation date (must follow the ISO 8601 format). """ + volume: Optional[Volume] + """ + Volumes of the Database Instance. + """ + project_id: str """ Project ID the Database Instance belongs to. @@ -763,11 +763,6 @@ class Instance: Advanced settings of the Database Instance. """ - backup_schedule: BackupSchedule - """ - Backup schedule of the Database Instance. - """ - is_ha_cluster: bool """ Defines whether or not High-Availability is enabled. @@ -778,6 +773,11 @@ class Instance: Endpoint of the Database Instance. """ + backup_schedule: Optional[BackupSchedule] + """ + Backup schedule of the Database Instance. + """ + read_replicas: List[ReadReplica] """ Read Replicas of the Database Instance. @@ -798,11 +798,6 @@ class Instance: List of Database Instance endpoints. """ - logs_policy: LogsPolicy - """ - Logs policy of the Database Instance. - """ - backup_same_region: bool """ Store logical backups in the same region as the Database Instance. @@ -813,6 +808,11 @@ class Instance: List of Database Instance maintenance events. """ + logs_policy: Optional[LogsPolicy] + """ + Logs policy of the Database Instance. + """ + @dataclass class NodeType: diff --git a/scaleway-async/scaleway_async/domain/v2beta1/marshalling.py b/scaleway-async/scaleway_async/domain/v2beta1/marshalling.py index a092c090..82d0660c 100644 --- a/scaleway-async/scaleway_async/domain/v2beta1/marshalling.py +++ b/scaleway-async/scaleway_async/domain/v2beta1/marshalling.py @@ -340,12 +340,6 @@ def unmarshal_Contact(data: Any) -> Contact: field = data.get("resale", None) args["resale"] = field - field = data.get("extension_fr", None) - args["extension_fr"] = unmarshal_ContactExtensionFR(field) - - field = data.get("extension_eu", None) - args["extension_eu"] = unmarshal_ContactExtensionEU(field) - field = data.get("whois_opt_in", None) args["whois_opt_in"] = field @@ -355,14 +349,20 @@ def unmarshal_Contact(data: Any) -> Contact: field = data.get("state", None) args["state"] = field - field = data.get("extension_nl", None) - args["extension_nl"] = unmarshal_ContactExtensionNL(field) - field = data.get("questions", None) args["questions"] = ( [unmarshal_ContactQuestion(v) for v in field] if field is not None else None ) + field = data.get("extension_fr", None) + args["extension_fr"] = unmarshal_ContactExtensionFR(field) + + field = data.get("extension_eu", None) + args["extension_eu"] = unmarshal_ContactExtensionEU(field) + + field = data.get("extension_nl", None) + args["extension_nl"] = unmarshal_ContactExtensionNL(field) + return Contact(**args) @@ -743,12 +743,12 @@ def unmarshal_Domain(data: Any) -> Domain: field = data.get("auto_renew_status", None) args["auto_renew_status"] = field - field = data.get("dnssec", None) - args["dnssec"] = unmarshal_DomainDNSSEC(field) - field = data.get("epp_code", None) args["epp_code"] = field + field = data.get("dnssec", None) + args["dnssec"] = unmarshal_DomainDNSSEC(field) + field = data.get("expired_at", None) args["expired_at"] = parser.isoparse(field) if isinstance(field, str) else field @@ -778,9 +778,6 @@ def unmarshal_Domain(data: Any) -> Domain: field = data.get("administrative_contact", None) args["administrative_contact"] = unmarshal_Contact(field) - field = data.get("tld", None) - args["tld"] = unmarshal_Tld(field) - field = data.get("external_domain_registration_status", None) args[ "external_domain_registration_status" @@ -791,6 +788,9 @@ def unmarshal_Domain(data: Any) -> Domain: field ) + field = data.get("tld", None) + args["tld"] = unmarshal_Tld(field) + return Domain(**args) @@ -1199,9 +1199,6 @@ def unmarshal_ContactRoles(data: Any) -> ContactRoles: args: Dict[str, Any] = {} - field = data.get("contact", None) - args["contact"] = unmarshal_Contact(field) - field = data.get("roles", None) args["roles"] = ( {key: unmarshal_ContactRolesRoles(value) for key, value in field.items()} @@ -1209,6 +1206,9 @@ def unmarshal_ContactRoles(data: Any) -> ContactRoles: else None ) + field = data.get("contact", None) + args["contact"] = unmarshal_Contact(field) + return ContactRoles(**args) @@ -1469,9 +1469,6 @@ def unmarshal_RenewableDomain(data: Any) -> RenewableDomain: field = data.get("status", None) args["status"] = field - field = data.get("tld", None) - args["tld"] = unmarshal_Tld(field) - field = data.get("renewable_duration_in_years", None) args["renewable_duration_in_years"] = field @@ -1491,6 +1488,9 @@ def unmarshal_RenewableDomain(data: Any) -> RenewableDomain: parser.isoparse(field) if isinstance(field, str) else field ) + field = data.get("tld", None) + args["tld"] = unmarshal_Tld(field) + return RenewableDomain(**args) @@ -2112,6 +2112,14 @@ def marshal_NewContact( if request.resale is not None: output["resale"] = request.resale + if request.whois_opt_in is not None: + output["whois_opt_in"] = request.whois_opt_in + + if request.questions is not None: + output["questions"] = [ + marshal_ContactQuestion(item, defaults) for item in request.questions + ] + if request.extension_fr is not None: output["extension_fr"] = ( marshal_ContactExtensionFR(request.extension_fr, defaults), @@ -2122,22 +2130,14 @@ def marshal_NewContact( marshal_ContactExtensionEU(request.extension_eu, defaults), ) - if request.whois_opt_in is not None: - output["whois_opt_in"] = request.whois_opt_in + if request.state is not None: + output["state"] = request.state if request.extension_nl is not None: output["extension_nl"] = ( marshal_ContactExtensionNL(request.extension_nl, defaults), ) - if request.questions is not None: - output["questions"] = [ - marshal_ContactQuestion(item, defaults) for item in request.questions - ] - - if request.state is not None: - output["state"] = request.state - return output diff --git a/scaleway-async/scaleway_async/domain/v2beta1/types.py b/scaleway-async/scaleway_async/domain/v2beta1/types.py index b4ba307f..9af313ed 100644 --- a/scaleway-async/scaleway_async/domain/v2beta1/types.py +++ b/scaleway-async/scaleway_async/domain/v2beta1/types.py @@ -443,7 +443,7 @@ class DSRecordDigest: digest: str - public_key: DSRecordPublicKey + public_key: Optional[DSRecordPublicKey] @dataclass @@ -609,20 +609,20 @@ class Contact: resale: bool - extension_fr: ContactExtensionFR - - extension_eu: ContactExtensionEU - whois_opt_in: bool email_status: ContactEmailStatus state: str - extension_nl: ContactExtensionNL - questions: Optional[List[ContactQuestion]] + extension_fr: Optional[ContactExtensionFR] + + extension_eu: Optional[ContactExtensionEU] + + extension_nl: Optional[ContactExtensionNL] + @dataclass class ContactRolesRoles: @@ -700,18 +700,18 @@ class NewContact: resale: bool - extension_fr: ContactExtensionFR - - extension_eu: ContactExtensionEU - whois_opt_in: bool - extension_nl: ContactExtensionNL - questions: Optional[List[ContactQuestion]] + extension_fr: Optional[ContactExtensionFR] + + extension_eu: Optional[ContactExtensionEU] + state: Optional[str] + extension_nl: Optional[ContactExtensionNL] + @dataclass class CheckContactsCompatibilityResponseContactCheckResult: @@ -768,7 +768,7 @@ class ImportProviderDNSZoneRequestOnlineV1: class ImportRawDNSZoneRequestAXFRSource: name_server: str - tsig_key: ImportRawDNSZoneRequestTsigKey + tsig_key: Optional[ImportRawDNSZoneRequestTsigKey] @dataclass @@ -778,10 +778,10 @@ class ImportRawDNSZoneRequestBindSource: @dataclass class ContactRoles: - contact: Contact - roles: Dict[str, ContactRolesRoles] + contact: Optional[Contact] + @dataclass class Nameserver: @@ -849,8 +849,6 @@ class RenewableDomain: status: RenewableDomainStatus - tld: Tld - renewable_duration_in_years: Optional[int] expired_at: Optional[datetime] @@ -861,6 +859,8 @@ class RenewableDomain: estimated_delete_at: Optional[datetime] + tld: Optional[Tld] + @dataclass class SSLCertificate: @@ -920,18 +920,22 @@ class AvailableDomain: available: bool - tld: Tld + tld: Optional[Tld] @dataclass class CheckContactsCompatibilityResponse: compatible: bool - owner_check_result: CheckContactsCompatibilityResponseContactCheckResult + owner_check_result: Optional[CheckContactsCompatibilityResponseContactCheckResult] - administrative_check_result: CheckContactsCompatibilityResponseContactCheckResult + administrative_check_result: Optional[ + CheckContactsCompatibilityResponseContactCheckResult + ] - technical_check_result: CheckContactsCompatibilityResponseContactCheckResult + technical_check_result: Optional[ + CheckContactsCompatibilityResponseContactCheckResult + ] @dataclass @@ -1043,10 +1047,10 @@ class Domain: auto_renew_status: DomainFeatureStatus - dnssec: DomainDNSSEC - epp_code: List[str] + dnssec: Optional[DomainDNSSEC] + expired_at: Optional[datetime] updated_at: Optional[datetime] @@ -1059,13 +1063,13 @@ class Domain: dns_zones: List[DNSZone] - owner_contact: Contact + owner_contact: Optional[Contact] - technical_contact: Contact + technical_contact: Optional[Contact] - administrative_contact: Contact + administrative_contact: Optional[Contact] - tld: Tld + tld: Optional[Tld] external_domain_registration_status: Optional[ DomainRegistrationStatusExternalDomain diff --git a/scaleway-async/scaleway_async/flexibleip/v1alpha1/marshalling.py b/scaleway-async/scaleway_async/flexibleip/v1alpha1/marshalling.py index 607efbe7..4ae3eb5f 100644 --- a/scaleway-async/scaleway_async/flexibleip/v1alpha1/marshalling.py +++ b/scaleway-async/scaleway_async/flexibleip/v1alpha1/marshalling.py @@ -85,18 +85,18 @@ def unmarshal_FlexibleIP(data: Any) -> FlexibleIP: field = data.get("updated_at", None) args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field - field = data.get("created_at", None) - args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field - - field = data.get("mac_address", None) - args["mac_address"] = unmarshal_MACAddress(field) - field = data.get("reverse", None) args["reverse"] = field field = data.get("zone", None) args["zone"] = field + field = data.get("created_at", None) + args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + + field = data.get("mac_address", None) + args["mac_address"] = unmarshal_MACAddress(field) + field = data.get("server_id", None) args["server_id"] = field diff --git a/scaleway-async/scaleway_async/flexibleip/v1alpha1/types.py b/scaleway-async/scaleway_async/flexibleip/v1alpha1/types.py index 46e94bf1..36ce0fce 100644 --- a/scaleway-async/scaleway_async/flexibleip/v1alpha1/types.py +++ b/scaleway-async/scaleway_async/flexibleip/v1alpha1/types.py @@ -143,24 +143,24 @@ class FlexibleIP: Date on which the flexible IP was last updated. """ - created_at: Optional[datetime] + reverse: str """ - Date on which the flexible IP was created. + Reverse DNS value. """ - mac_address: MACAddress + zone: Zone """ - MAC address of the flexible IP. + Availability Zone of the flexible IP. """ - reverse: str + created_at: Optional[datetime] """ - Reverse DNS value. + Date on which the flexible IP was created. """ - zone: Zone + mac_address: Optional[MACAddress] """ - Availability Zone of the flexible IP. + MAC address of the flexible IP. """ server_id: Optional[str] diff --git a/scaleway-async/scaleway_async/instance/v1/marshalling.py b/scaleway-async/scaleway_async/instance/v1/marshalling.py index ef76fca8..8213c543 100644 --- a/scaleway-async/scaleway_async/instance/v1/marshalling.py +++ b/scaleway-async/scaleway_async/instance/v1/marshalling.py @@ -264,15 +264,15 @@ def unmarshal_Volume(data: Any) -> Volume: field = data.get("tags", None) args["tags"] = field - field = data.get("server", None) - args["server"] = unmarshal_ServerSummary(field) - field = data.get("state", None) args["state"] = field field = data.get("zone", None) args["zone"] = field + field = data.get("server", None) + args["server"] = unmarshal_ServerSummary(field) + return Volume(**args) @@ -343,9 +343,6 @@ def unmarshal_Image(data: Any) -> Image: field = data.get("public", None) args["public"] = field - field = data.get("root_volume", None) - args["root_volume"] = unmarshal_VolumeSummary(field) - field = data.get("state", None) args["state"] = field @@ -358,6 +355,9 @@ def unmarshal_Image(data: Any) -> Image: field = data.get("zone", None) args["zone"] = field + field = data.get("root_volume", None) + args["root_volume"] = unmarshal_VolumeSummary(field) + return Image(**args) @@ -389,9 +389,6 @@ def unmarshal_Ip(data: Any) -> Ip: field = data.get("address", None) args["address"] = field - field = data.get("server", None) - args["server"] = unmarshal_ServerSummary(field) - field = data.get("organization", None) args["organization"] = field @@ -416,6 +413,9 @@ def unmarshal_Ip(data: Any) -> Ip: field = data.get("reverse", None) args["reverse"] = field + field = data.get("server", None) + args["server"] = unmarshal_ServerSummary(field) + return Ip(**args) @@ -768,12 +768,12 @@ def unmarshal_VolumeServer(data: Any) -> VolumeServer: field = data.get("organization", None) args["organization"] = field - field = data.get("server", None) - args["server"] = unmarshal_ServerSummary(field) - field = data.get("size", None) args["size"] = field + field = data.get("server", None) + args["server"] = unmarshal_ServerSummary(field) + field = data.get("volume_type", None) args["volume_type"] = field @@ -846,18 +846,18 @@ def unmarshal_Server(data: Any) -> Server: field = data.get("hostname", None) args["hostname"] = field - field = data.get("image", None) - args["image"] = unmarshal_Image(field) - field = data.get("protected", None) args["protected"] = field - field = data.get("public_ip", None) - args["public_ip"] = unmarshal_ServerIp(field) + field = data.get("image", None) + args["image"] = unmarshal_Image(field) field = data.get("private_ip", None) args["private_ip"] = field + field = data.get("public_ip", None) + args["public_ip"] = unmarshal_ServerIp(field) + field = data.get("public_ips", None) args["public_ips"] = ( [unmarshal_ServerIp(v) for v in field] if field is not None else None @@ -869,20 +869,6 @@ def unmarshal_Server(data: Any) -> Server: field = data.get("state", None) args["state"] = field - field = data.get("location", None) - args["location"] = unmarshal_ServerLocation(field) - - field = data.get("ipv6", None) - args["ipv6"] = unmarshal_ServerIpv6(field) - - field = data.get("modification_date", None) - args["modification_date"] = ( - parser.isoparse(field) if isinstance(field, str) else field - ) - - field = data.get("bootscript", None) - args["bootscript"] = unmarshal_Bootscript(field) - field = data.get("boot_type", None) args["boot_type"] = field @@ -893,6 +879,20 @@ def unmarshal_Server(data: Any) -> Server: else None ) + field = data.get("modification_date", None) + args["modification_date"] = ( + parser.isoparse(field) if isinstance(field, str) else field + ) + + field = data.get("location", None) + args["location"] = unmarshal_ServerLocation(field) + + field = data.get("ipv6", None) + args["ipv6"] = unmarshal_ServerIpv6(field) + + field = data.get("bootscript", None) + args["bootscript"] = unmarshal_Bootscript(field) + field = data.get("security_group", None) args["security_group"] = unmarshal_SecurityGroupSummary(field) @@ -907,9 +907,6 @@ def unmarshal_Server(data: Any) -> Server: field = data.get("arch", None) args["arch"] = field - field = data.get("placement_group", None) - args["placement_group"] = unmarshal_PlacementGroup(field) - field = data.get("private_nics", None) args["private_nics"] = ( [unmarshal_PrivateNIC(v) for v in field] if field is not None else None @@ -918,6 +915,9 @@ def unmarshal_Server(data: Any) -> Server: field = data.get("zone", None) args["zone"] = field + field = data.get("placement_group", None) + args["placement_group"] = unmarshal_PlacementGroup(field) + return Server(**args) @@ -984,12 +984,12 @@ def unmarshal_Snapshot(data: Any) -> Snapshot: field = data.get("state", None) args["state"] = field - field = data.get("base_volume", None) - args["base_volume"] = unmarshal_SnapshotBaseVolume(field) - field = data.get("zone", None) args["zone"] = field + field = data.get("base_volume", None) + args["base_volume"] = unmarshal_SnapshotBaseVolume(field) + field = data.get("creation_date", None) args["creation_date"] = parser.isoparse(field) if isinstance(field, str) else field @@ -1661,18 +1661,15 @@ def unmarshal_ServerType(data: Any) -> ServerType: args: Dict[str, Any] = {} + field = data.get("monthly_price", None) + args["monthly_price"] = field + field = data.get("hourly_price", None) args["hourly_price"] = field field = data.get("alt_names", None) args["alt_names"] = field - field = data.get("per_volume_constraint", None) - args["per_volume_constraint"] = unmarshal_ServerTypeVolumeConstraintsByType(field) - - field = data.get("volumes_constraint", None) - args["volumes_constraint"] = unmarshal_ServerTypeVolumeConstraintSizes(field) - field = data.get("ncpus", None) args["ncpus"] = field @@ -1682,15 +1679,18 @@ def unmarshal_ServerType(data: Any) -> ServerType: field = data.get("arch", None) args["arch"] = field - field = data.get("monthly_price", None) - args["monthly_price"] = field + field = data.get("baremetal", None) + args["baremetal"] = field + + field = data.get("per_volume_constraint", None) + args["per_volume_constraint"] = unmarshal_ServerTypeVolumeConstraintsByType(field) + + field = data.get("volumes_constraint", None) + args["volumes_constraint"] = unmarshal_ServerTypeVolumeConstraintSizes(field) field = data.get("gpu", None) args["gpu"] = field - field = data.get("baremetal", None) - args["baremetal"] = field - field = data.get("network", None) args["network"] = unmarshal_ServerTypeNetwork(field) @@ -1842,9 +1842,6 @@ def unmarshal_MigrationPlan(data: Any) -> MigrationPlan: args: Dict[str, Any] = {} - field = data.get("volume", None) - args["volume"] = unmarshal_Volume(field) - field = data.get("snapshots", None) args["snapshots"] = ( [unmarshal_Snapshot(v) for v in field] if field is not None else None @@ -1853,6 +1850,9 @@ def unmarshal_MigrationPlan(data: Any) -> MigrationPlan: field = data.get("validation_key", None) args["validation_key"] = field + field = data.get("volume", None) + args["volume"] = unmarshal_Volume(field) + return MigrationPlan(**args) @@ -2689,15 +2689,15 @@ def marshal_Volume( if request.tags is not None: output["tags"] = request.tags - if request.server is not None: - output["server"] = (marshal_ServerSummary(request.server, defaults),) - if request.state is not None: output["state"] = str(request.state) if request.zone is not None: output["zone"] = request.zone or defaults.default_zone + if request.server is not None: + output["server"] = (marshal_ServerSummary(request.server, defaults),) + return output @@ -3161,9 +3161,6 @@ def marshal_Image( if request.public is not None: output["public"] = request.public - if request.root_volume is not None: - output["root_volume"] = (marshal_VolumeSummary(request.root_volume, defaults),) - if request.state is not None: output["state"] = str(request.state) @@ -3176,6 +3173,9 @@ def marshal_Image( if request.zone is not None: output["zone"] = request.zone or defaults.default_zone + if request.root_volume is not None: + output["root_volume"] = (marshal_VolumeSummary(request.root_volume, defaults),) + return output diff --git a/scaleway-async/scaleway_async/instance/v1/types.py b/scaleway-async/scaleway_async/instance/v1/types.py index 99defdc2..f192cc12 100644 --- a/scaleway-async/scaleway_async/instance/v1/types.py +++ b/scaleway-async/scaleway_async/instance/v1/types.py @@ -395,11 +395,6 @@ class Volume: Volume tags. """ - server: ServerSummary - """ - Instance attached to the volume. - """ - state: VolumeState """ Volume state. @@ -410,6 +405,11 @@ class Volume: Zone in which the volume is located. """ + server: Optional[ServerSummary] + """ + Instance attached to the volume. + """ + @dataclass class VolumeSummary: @@ -470,8 +470,6 @@ class Image: public: bool - root_volume: VolumeSummary - state: ImageState project: str @@ -483,6 +481,8 @@ class Image: Zone to target. If none is passed will use default zone from the config. """ + root_volume: Optional[VolumeSummary] + @dataclass class PlacementGroup: @@ -661,10 +661,10 @@ class VolumeServer: organization: str - server: ServerSummary - size: int + server: Optional[ServerSummary] + volume_type: VolumeServerVolumeType state: VolumeServerState @@ -734,7 +734,7 @@ class ServerTypeNetwork: @dataclass class ServerTypeVolumeConstraintsByType: - l_ssd: ServerTypeVolumeConstraintSizes + l_ssd: Optional[ServerTypeVolumeConstraintSizes] """ Local SSD volumes. """ @@ -785,8 +785,6 @@ class Ip: address: str - server: ServerSummary - organization: str tags: List[str] @@ -806,6 +804,8 @@ class Ip: reverse: Optional[str] + server: Optional[ServerSummary] + @dataclass class SecurityGroup: @@ -1026,19 +1026,14 @@ class Server: Instance host name. """ - image: Image - """ - Information about the Instance image. - """ - protected: bool """ Defines whether the Instance protection option is activated. """ - public_ip: ServerIp + image: Optional[Image] """ - Information about the public IP. + Information about the Instance image. """ private_ip: Optional[str] @@ -1046,6 +1041,11 @@ class Server: Private IP address of the Instance. """ + public_ip: Optional[ServerIp] + """ + Information about the public IP. + """ + public_ips: List[ServerIp] """ Information about all the public IPs attached to the server. @@ -1061,14 +1061,14 @@ class Server: Instance state. """ - location: ServerLocation + boot_type: BootType """ - Instance location. + Instance boot type. """ - ipv6: ServerIpv6 + volumes: Dict[str, VolumeServer] """ - Instance IPv6 address. + Instance volumes. """ modification_date: Optional[datetime] @@ -1076,22 +1076,22 @@ class Server: Instance modification date. """ - bootscript: Optional[Bootscript] + location: Optional[ServerLocation] """ - Instance bootscript. + Instance location. """ - boot_type: BootType + ipv6: Optional[ServerIpv6] """ - Instance boot type. + Instance IPv6 address. """ - volumes: Dict[str, VolumeServer] + bootscript: Optional[Bootscript] """ - Instance volumes. + Instance bootscript. """ - security_group: SecurityGroupSummary + security_group: Optional[SecurityGroupSummary] """ Instance security group. """ @@ -1111,11 +1111,6 @@ class Server: Instance architecture. """ - placement_group: PlacementGroup - """ - Instance placement group. - """ - private_nics: List[PrivateNIC] """ Instance private NICs. @@ -1126,6 +1121,11 @@ class Server: Zone in which the Instance is located. """ + placement_group: Optional[PlacementGroup] + """ + Instance placement group. + """ + @dataclass class Snapshot: @@ -1169,14 +1169,14 @@ class Snapshot: Snapshot state. """ - base_volume: SnapshotBaseVolume + zone: Zone """ - Volume on which the snapshot is based on. + Snapshot zone. """ - zone: Zone + base_volume: Optional[SnapshotBaseVolume] """ - Snapshot zone. + Volume on which the snapshot is based on. """ creation_date: Optional[datetime] @@ -1295,6 +1295,11 @@ class GetServerTypesAvailabilityResponseAvailability: @dataclass class ServerType: + monthly_price: Optional[float] + """ + Estimated monthly price, for a 30 days month, in Euro. + """ + hourly_price: float """ Hourly price in Euro. @@ -1305,16 +1310,6 @@ class ServerType: Alternative Instance name, if any. """ - per_volume_constraint: ServerTypeVolumeConstraintsByType - """ - Additional volume constraints. - """ - - volumes_constraint: ServerTypeVolumeConstraintSizes - """ - Initial volume constraints. - """ - ncpus: int """ Number of CPU. @@ -1330,27 +1325,32 @@ class ServerType: CPU architecture. """ - monthly_price: Optional[float] + baremetal: bool """ - Estimated monthly price, for a 30 days month, in Euro. + True if it is a baremetal Instance. """ - gpu: Optional[int] + per_volume_constraint: Optional[ServerTypeVolumeConstraintsByType] """ - Number of GPU. + Additional volume constraints. """ - baremetal: bool + volumes_constraint: Optional[ServerTypeVolumeConstraintSizes] """ - True if it is a baremetal Instance. + Initial volume constraints. """ - network: ServerTypeNetwork + gpu: Optional[int] + """ + Number of GPU. + """ + + network: Optional[ServerTypeNetwork] """ Network available for the Instance. """ - capabilities: ServerTypeCapabilities + capabilities: Optional[ServerTypeCapabilities] """ Capabilities. """ @@ -1365,9 +1365,9 @@ class ServerType: class VolumeType: display_name: str - capabilities: VolumeTypeCapabilities + capabilities: Optional[VolumeTypeCapabilities] - constraints: VolumeTypeConstraints + constraints: Optional[VolumeTypeConstraints] @dataclass @@ -1505,7 +1505,7 @@ class CreateImageRequest: @dataclass class CreateImageResponse: - image: Image + image: Optional[Image] @dataclass @@ -1537,7 +1537,7 @@ class CreateIpRequest: @dataclass class CreateIpResponse: - ip: Ip + ip: Optional[Ip] @dataclass @@ -1574,7 +1574,7 @@ class CreatePlacementGroupRequest: @dataclass class CreatePlacementGroupResponse: - placement_group: PlacementGroup + placement_group: Optional[PlacementGroup] @dataclass @@ -1607,7 +1607,7 @@ class CreatePrivateNICRequest: @dataclass class CreatePrivateNICResponse: - private_nic: PrivateNIC + private_nic: Optional[PrivateNIC] @dataclass @@ -1663,7 +1663,7 @@ class CreateSecurityGroupRequest: @dataclass class CreateSecurityGroupResponse: - security_group: SecurityGroup + security_group: Optional[SecurityGroup] @dataclass @@ -1709,7 +1709,7 @@ class CreateSecurityGroupRuleRequest: @dataclass class CreateSecurityGroupRuleResponse: - rule: SecurityGroupRule + rule: Optional[SecurityGroupRule] @dataclass @@ -1796,7 +1796,7 @@ class CreateServerRequest: @dataclass class CreateServerResponse: - server: Server + server: Optional[Server] @dataclass @@ -1849,9 +1849,9 @@ class CreateSnapshotRequest: @dataclass class CreateSnapshotResponse: - snapshot: Snapshot + snapshot: Optional[Snapshot] - task: Task + task: Optional[Task] @dataclass @@ -1889,7 +1889,7 @@ class CreateVolumeRequest: @dataclass class CreateVolumeResponse: - volume: Volume + volume: Optional[Volume] @dataclass @@ -2053,7 +2053,7 @@ class ExportSnapshotRequest: @dataclass class ExportSnapshotResponse: - task: Task + task: Optional[Task] @dataclass @@ -2068,7 +2068,7 @@ class GetBootscriptRequest: @dataclass class GetBootscriptResponse: - bootscript: Bootscript + bootscript: Optional[Bootscript] @dataclass @@ -2085,7 +2085,7 @@ class GetDashboardRequest: @dataclass class GetDashboardResponse: - dashboard: Dashboard + dashboard: Optional[Dashboard] @dataclass @@ -2103,7 +2103,7 @@ class GetImageRequest: @dataclass class GetImageResponse: - image: Image + image: Optional[Image] @dataclass @@ -2121,7 +2121,7 @@ class GetIpRequest: @dataclass class GetIpResponse: - ip: Ip + ip: Optional[Ip] @dataclass @@ -2139,7 +2139,7 @@ class GetPlacementGroupRequest: @dataclass class GetPlacementGroupResponse: - placement_group: PlacementGroup + placement_group: Optional[PlacementGroup] @dataclass @@ -2183,7 +2183,7 @@ class GetPrivateNICRequest: @dataclass class GetPrivateNICResponse: - private_nic: PrivateNIC + private_nic: Optional[PrivateNIC] @dataclass @@ -2201,7 +2201,7 @@ class GetSecurityGroupRequest: @dataclass class GetSecurityGroupResponse: - security_group: SecurityGroup + security_group: Optional[SecurityGroup] @dataclass @@ -2218,7 +2218,7 @@ class GetSecurityGroupRuleRequest: @dataclass class GetSecurityGroupRuleResponse: - rule: SecurityGroupRule + rule: Optional[SecurityGroupRule] @dataclass @@ -2236,7 +2236,7 @@ class GetServerRequest: @dataclass class GetServerResponse: - server: Server + server: Optional[Server] @dataclass @@ -2282,7 +2282,7 @@ class GetSnapshotRequest: @dataclass class GetSnapshotResponse: - snapshot: Snapshot + snapshot: Optional[Snapshot] @dataclass @@ -2300,7 +2300,7 @@ class GetVolumeRequest: @dataclass class GetVolumeResponse: - volume: Volume + volume: Optional[Volume] @dataclass @@ -2908,11 +2908,6 @@ class ListVolumesTypesResponse: @dataclass class MigrationPlan: - volume: Volume - """ - A volume which will be migrated to SBS together with the snapshots, if present. - """ - snapshots: List[Snapshot] """ A list of snapshots which will be migrated to SBS together and with the volume, if present. @@ -2923,6 +2918,11 @@ class MigrationPlan: A value to be passed to ApplyBlockMigrationRequest, to confirm that the execution of the plan is being requested. """ + volume: Optional[Volume] + """ + A volume which will be migrated to SBS together with the snapshots, if present. + """ + @dataclass class PlanBlockMigrationRequest: @@ -2968,7 +2968,7 @@ class ServerActionRequest: @dataclass class ServerActionResponse: - task: Task + task: Optional[Task] @dataclass @@ -3031,7 +3031,7 @@ class SetPlacementGroupRequest: @dataclass class SetPlacementGroupResponse: - placement_group: PlacementGroup + placement_group: Optional[PlacementGroup] @dataclass @@ -3115,7 +3115,7 @@ class UpdateIpRequest: @dataclass class UpdateIpResponse: - ip: Ip + ip: Optional[Ip] @dataclass @@ -3153,7 +3153,7 @@ class UpdatePlacementGroupRequest: @dataclass class UpdatePlacementGroupResponse: - placement_group: PlacementGroup + placement_group: Optional[PlacementGroup] @dataclass @@ -3272,7 +3272,7 @@ class UpdateServerRequest: @dataclass class UpdateServerResponse: - server: Server + server: Optional[Server] @dataclass @@ -3305,12 +3305,12 @@ class UpdateVolumeRequest: @dataclass class UpdateVolumeResponse: - volume: Volume + volume: Optional[Volume] @dataclass class _SetImageResponse: - image: Image + image: Optional[Image] @dataclass @@ -3398,7 +3398,7 @@ class _SetSecurityGroupRequest: @dataclass class _SetSecurityGroupResponse: - security_group: SecurityGroup + security_group: Optional[SecurityGroup] @dataclass @@ -3433,7 +3433,7 @@ class _SetSecurityGroupRuleRequest: @dataclass class _SetSecurityGroupRuleResponse: - rule: SecurityGroupRule + rule: Optional[SecurityGroupRule] @dataclass @@ -3596,7 +3596,7 @@ class _SetServerRequest: @dataclass class _SetServerResponse: - server: Server + server: Optional[Server] @dataclass @@ -3633,4 +3633,4 @@ class _SetSnapshotRequest: @dataclass class _SetSnapshotResponse: - snapshot: Snapshot + snapshot: Optional[Snapshot] diff --git a/scaleway-async/scaleway_async/iot/v1/marshalling.py b/scaleway-async/scaleway_async/iot/v1/marshalling.py index 19563a39..71bacc2f 100644 --- a/scaleway-async/scaleway_async/iot/v1/marshalling.py +++ b/scaleway-async/scaleway_async/iot/v1/marshalling.py @@ -131,12 +131,12 @@ def unmarshal_Device(data: Any) -> Device: field = data.get("allow_multiple_connections", None) args["allow_multiple_connections"] = field - field = data.get("message_filters", None) - args["message_filters"] = unmarshal_DeviceMessageFilters(field) - field = data.get("has_custom_certificate", None) args["has_custom_certificate"] = field + field = data.get("message_filters", None) + args["message_filters"] = unmarshal_DeviceMessageFilters(field) + field = data.get("created_at", None) args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field @@ -299,12 +299,12 @@ def unmarshal_CreateNetworkResponse(data: Any) -> CreateNetworkResponse: args: Dict[str, Any] = {} - field = data.get("network", None) - args["network"] = unmarshal_Network(field) - field = data.get("secret", None) args["secret"] = field + field = data.get("network", None) + args["network"] = unmarshal_Network(field) + return CreateNetworkResponse(**args) @@ -316,12 +316,12 @@ def unmarshal_GetDeviceCertificateResponse(data: Any) -> GetDeviceCertificateRes args: Dict[str, Any] = {} - field = data.get("device", None) - args["device"] = unmarshal_Device(field) - field = data.get("certificate_pem", None) args["certificate_pem"] = field + field = data.get("device", None) + args["device"] = unmarshal_Device(field) + return GetDeviceCertificateResponse(**args) @@ -654,12 +654,12 @@ def unmarshal_SetDeviceCertificateResponse(data: Any) -> SetDeviceCertificateRes args: Dict[str, Any] = {} - field = data.get("device", None) - args["device"] = unmarshal_Device(field) - field = data.get("certificate_pem", None) args["certificate_pem"] = field + field = data.get("device", None) + args["device"] = unmarshal_Device(field) + return SetDeviceCertificateResponse(**args) diff --git a/scaleway-async/scaleway_async/iot/v1/types.py b/scaleway-async/scaleway_async/iot/v1/types.py index 71297cc4..a967258a 100644 --- a/scaleway-async/scaleway_async/iot/v1/types.py +++ b/scaleway-async/scaleway_async/iot/v1/types.py @@ -182,12 +182,12 @@ class DeviceMessageFiltersRule: @dataclass class DeviceMessageFilters: - publish: DeviceMessageFiltersRule + publish: Optional[DeviceMessageFiltersRule] """ Filtering rule to restrict topics the device can publish to. """ - subscribe: DeviceMessageFiltersRule + subscribe: Optional[DeviceMessageFiltersRule] """ Filtering rule to restrict topics the device can subscribe to. """ @@ -252,14 +252,14 @@ class Device: Defines whether to allow multiple physical devices to connect to the Hub with this device's credentials. """ - message_filters: DeviceMessageFilters + has_custom_certificate: bool """ - Filter-sets to restrict the topics the device can publish/subscribe to. + Assigning a custom certificate allows a device to authenticate using that specific certificate without checking the Hub's CA certificate. """ - has_custom_certificate: bool + message_filters: Optional[DeviceMessageFilters] """ - Assigning a custom certificate allows a device to authenticate using that specific certificate without checking the Hub's CA certificate. + Filter-sets to restrict the topics the device can publish/subscribe to. """ created_at: Optional[datetime] @@ -640,12 +640,12 @@ class CreateDeviceRequest: @dataclass class CreateDeviceResponse: - device: Device + device: Optional[Device] """ Information related to the created device. """ - certificate: Certificate + certificate: Optional[Certificate] """ Device certificate. """ @@ -716,14 +716,14 @@ class CreateNetworkRequest: @dataclass class CreateNetworkResponse: - network: Network + secret: str """ - Information related to the created network. + Endpoint Key to keep secret. This cannot be retrieved later. """ - secret: str + network: Optional[Network] """ - Endpoint Key to keep secret. This cannot be retrieved later. + Information related to the created network. """ @@ -911,14 +911,14 @@ class GetDeviceCertificateRequest: @dataclass class GetDeviceCertificateResponse: - device: Device + certificate_pem: str """ - Information related to the created device. + Device certificate. """ - certificate_pem: str + device: Optional[Device] """ - Device certificate. + Information related to the created device. """ @@ -1360,12 +1360,12 @@ class RenewDeviceCertificateRequest: @dataclass class RenewDeviceCertificateResponse: - device: Device + device: Optional[Device] """ Information related to the created device. """ - certificate: Certificate + certificate: Optional[Certificate] """ Device certificate. """ @@ -1435,10 +1435,10 @@ class SetDeviceCertificateRequest: @dataclass class SetDeviceCertificateResponse: - device: Device - certificate_pem: str + device: Optional[Device] + @dataclass class SetHubCARequest: diff --git a/scaleway-async/scaleway_async/ipam/v1/api.py b/scaleway-async/scaleway_async/ipam/v1/api.py index 306fb265..47369b4d 100644 --- a/scaleway-async/scaleway_async/ipam/v1/api.py +++ b/scaleway-async/scaleway_async/ipam/v1/api.py @@ -38,20 +38,20 @@ class IpamV1API(API): async def book_ip( self, *, + source: Source, is_ipv6: bool, region: Optional[Region] = None, project_id: Optional[str] = None, - source: Optional[Source] = None, address: Optional[str] = None, tags: Optional[List[str]] = None, ) -> IP: """ Book a new IP. Book a new IP from the specified source. Currently IPs can only be booked from a Private Network. + :param source: Source in which to book the IP. Not all sources are available for booking. :param is_ipv6: Request an IPv6 instead of an IPv4. :param region: Region to target. If none is passed will use default region from the config. :param project_id: When creating an IP in a Private Network, the Project must match the Private Network's Project. - :param source: Source in which to book the IP. Not all sources are available for booking. :param address: Note that only the Private Network source allows you to pick a specific IP. If the requested IP is already booked, then the call will fail. :param tags: Tags for the IP. :return: :class:`IP ` @@ -60,6 +60,7 @@ async def book_ip( :: result = await api.book_ip( + source=Source(), is_ipv6=False, ) """ @@ -73,10 +74,10 @@ async def book_ip( f"/ipam/v1/regions/{param_region}/ips", body=marshal_BookIPRequest( BookIPRequest( + source=source, is_ipv6=is_ipv6, region=region, project_id=project_id, - source=source, address=address, tags=tags, ), diff --git a/scaleway-async/scaleway_async/ipam/v1/marshalling.py b/scaleway-async/scaleway_async/ipam/v1/marshalling.py index 26a365a9..a6476972 100644 --- a/scaleway-async/scaleway_async/ipam/v1/marshalling.py +++ b/scaleway-async/scaleway_async/ipam/v1/marshalling.py @@ -85,9 +85,6 @@ def unmarshal_IP(data: Any) -> IP: field = data.get("source", None) args["source"] = unmarshal_Source(field) - field = data.get("resource", None) - args["resource"] = unmarshal_Resource(field) - field = data.get("tags", None) args["tags"] = field @@ -100,6 +97,9 @@ def unmarshal_IP(data: Any) -> IP: field = data.get("updated_at", None) args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + field = data.get("resource", None) + args["resource"] = unmarshal_Resource(field) + field = data.get("zone", None) args["zone"] = field @@ -147,15 +147,15 @@ def marshal_BookIPRequest( ) -> Dict[str, Any]: output: Dict[str, Any] = {} + if request.source is not None: + output["source"] = (marshal_Source(request.source, defaults),) + if request.is_ipv6 is not None: output["is_ipv6"] = request.is_ipv6 if request.project_id is not None: output["project_id"] = request.project_id or defaults.default_project_id - if request.source is not None: - output["source"] = (marshal_Source(request.source, defaults),) - if request.address is not None: output["address"] = request.address diff --git a/scaleway-async/scaleway_async/ipam/v1/types.py b/scaleway-async/scaleway_async/ipam/v1/types.py index e40bb38b..a2022587 100644 --- a/scaleway-async/scaleway_async/ipam/v1/types.py +++ b/scaleway-async/scaleway_async/ipam/v1/types.py @@ -106,11 +106,6 @@ class IP: Source pool where the IP was booked in. """ - resource: Resource - """ - Resource which the IP is attached to. - """ - tags: List[str] """ Tags for the IP. @@ -131,6 +126,11 @@ class IP: Date the IP was last modified. """ + resource: Optional[Resource] + """ + Resource which the IP is attached to. + """ + zone: Optional[Zone] """ Zone of the IP, if zonal. @@ -139,6 +139,11 @@ class IP: @dataclass class BookIPRequest: + source: Source + """ + Source in which to book the IP. Not all sources are available for booking. + """ + is_ipv6: bool """ Request an IPv6 instead of an IPv4. @@ -154,11 +159,6 @@ class BookIPRequest: When creating an IP in a Private Network, the Project must match the Private Network's Project. """ - source: Optional[Source] - """ - Source in which to book the IP. Not all sources are available for booking. - """ - address: Optional[str] """ Note that only the Private Network source allows you to pick a specific IP. If the requested IP is already booked, then the call will fail. diff --git a/scaleway-async/scaleway_async/ipfs/v1alpha1/marshalling.py b/scaleway-async/scaleway_async/ipfs/v1alpha1/marshalling.py index eacad680..6a158651 100644 --- a/scaleway-async/scaleway_async/ipfs/v1alpha1/marshalling.py +++ b/scaleway-async/scaleway_async/ipfs/v1alpha1/marshalling.py @@ -95,15 +95,15 @@ def unmarshal_PinCID(data: Any) -> PinCID: field = data.get("origins", None) args["origins"] = field - field = data.get("meta", None) - args["meta"] = unmarshal_PinCIDMeta(field) - field = data.get("cid", None) args["cid"] = field field = data.get("name", None) args["name"] = field + field = data.get("meta", None) + args["meta"] = unmarshal_PinCIDMeta(field) + return PinCID(**args) @@ -147,18 +147,18 @@ def unmarshal_Pin(data: Any) -> Pin: field = data.get("status", None) args["status"] = field - field = data.get("cid", None) - args["cid"] = unmarshal_PinCID(field) - field = data.get("delegates", None) args["delegates"] = field - field = data.get("info", None) - args["info"] = unmarshal_PinInfo(field) - field = data.get("created_at", None) args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + field = data.get("cid", None) + args["cid"] = unmarshal_PinCID(field) + + field = data.get("info", None) + args["info"] = unmarshal_PinInfo(field) + return Pin(**args) diff --git a/scaleway-async/scaleway_async/ipfs/v1alpha1/types.py b/scaleway-async/scaleway_async/ipfs/v1alpha1/types.py index 1c147092..487351c2 100644 --- a/scaleway-async/scaleway_async/ipfs/v1alpha1/types.py +++ b/scaleway-async/scaleway_async/ipfs/v1alpha1/types.py @@ -97,12 +97,12 @@ class PinCIDMeta: class PinCID: origins: List[str] - meta: PinCIDMeta - cid: Optional[str] name: Optional[str] + meta: Optional[PinCIDMeta] + @dataclass class PinInfo: @@ -156,14 +156,14 @@ class Pin: status: PinStatus - cid: PinCID - delegates: List[str] - info: PinInfo - created_at: Optional[datetime] + cid: Optional[PinCID] + + info: Optional[PinInfo] + @dataclass class Volume: @@ -628,7 +628,7 @@ class ReplacePinRequest: @dataclass class ReplacePinResponse: - pin: Pin + pin: Optional[Pin] @dataclass diff --git a/scaleway-async/scaleway_async/k8s/v1/marshalling.py b/scaleway-async/scaleway_async/k8s/v1/marshalling.py index 0a4619d6..d45af6c9 100644 --- a/scaleway-async/scaleway_async/k8s/v1/marshalling.py +++ b/scaleway-async/scaleway_async/k8s/v1/marshalling.py @@ -125,9 +125,6 @@ def unmarshal_Pool(data: Any) -> Pool: field = data.get("kubelet_args", None) args["kubelet_args"] = field - field = data.get("upgrade_policy", None) - args["upgrade_policy"] = unmarshal_PoolUpgradePolicy(field) - field = data.get("zone", None) args["zone"] = field @@ -143,6 +140,9 @@ def unmarshal_Pool(data: Any) -> Pool: field = data.get("placement_group_id", None) args["placement_group_id"] = field + field = data.get("upgrade_policy", None) + args["upgrade_policy"] = unmarshal_PoolUpgradePolicy(field) + field = data.get("root_volume_size", None) args["root_volume_size"] = field @@ -345,9 +345,21 @@ def unmarshal_Cluster(data: Any) -> Cluster: field = data.get("dns_wildcard", None) args["dns_wildcard"] = field + field = data.get("created_at", None) + args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + + field = data.get("updated_at", None) + args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + field = data.get("autoscaler_config", None) args["autoscaler_config"] = unmarshal_ClusterAutoscalerConfig(field) + field = data.get("dashboard_enabled", None) + args["dashboard_enabled"] = field + + field = data.get("ingress", None) + args["ingress"] = field + field = data.get("auto_upgrade", None) args["auto_upgrade"] = unmarshal_ClusterAutoUpgrade(field) @@ -360,24 +372,12 @@ def unmarshal_Cluster(data: Any) -> Cluster: field = data.get("admission_plugins", None) args["admission_plugins"] = field - field = data.get("created_at", None) - args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field - - field = data.get("updated_at", None) - args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field - - field = data.get("dashboard_enabled", None) - args["dashboard_enabled"] = field - - field = data.get("ingress", None) - args["ingress"] = field + field = data.get("apiserver_cert_sans", None) + args["apiserver_cert_sans"] = field field = data.get("open_id_connect_config", None) args["open_id_connect_config"] = unmarshal_ClusterOpenIDConnectConfig(field) - field = data.get("apiserver_cert_sans", None) - args["apiserver_cert_sans"] = field - field = data.get("private_network_id", None) args["private_network_id"] = field @@ -797,13 +797,6 @@ def marshal_CreateClusterRequestPoolConfig( key: value for key, value in request.kubelet_args.items() } - if request.upgrade_policy is not None: - output["upgrade_policy"] = ( - marshal_CreateClusterRequestPoolConfigUpgradePolicy( - request.upgrade_policy, defaults - ), - ) - if request.zone is not None: output["zone"] = request.zone or defaults.default_zone @@ -813,6 +806,13 @@ def marshal_CreateClusterRequestPoolConfig( if request.public_ip_disabled is not None: output["public_ip_disabled"] = request.public_ip_disabled + if request.upgrade_policy is not None: + output["upgrade_policy"] = ( + marshal_CreateClusterRequestPoolConfigUpgradePolicy( + request.upgrade_policy, defaults + ), + ) + if request.root_volume_size is not None: output["root_volume_size"] = request.root_volume_size @@ -1009,14 +1009,14 @@ def marshal_UpdateClusterRequestAutoUpgrade( ) -> Dict[str, Any]: output: Dict[str, Any] = {} + if request.enable is not None: + output["enable"] = request.enable + if request.maintenance_window is not None: output["maintenance_window"] = ( marshal_MaintenanceWindow(request.maintenance_window, defaults), ) - if request.enable is not None: - output["enable"] = request.enable - return output diff --git a/scaleway-async/scaleway_async/k8s/v1/types.py b/scaleway-async/scaleway_async/k8s/v1/types.py index 7b17e97a..1b85e1f9 100644 --- a/scaleway-async/scaleway_async/k8s/v1/types.py +++ b/scaleway-async/scaleway_async/k8s/v1/types.py @@ -236,7 +236,7 @@ class ClusterAutoUpgrade: Defines whether auto upgrade is enabled for the cluster. """ - maintenance_window: MaintenanceWindow + maintenance_window: Optional[MaintenanceWindow] """ Maintenance window of the cluster auto upgrades. """ @@ -415,11 +415,6 @@ class Pool: Kubelet arguments to be used by this pool. Note that this feature is experimental. """ - upgrade_policy: PoolUpgradePolicy - """ - Pool upgrade policy. - """ - zone: Zone """ Zone in which the pool's nodes will be spawned. @@ -445,6 +440,11 @@ class Pool: Placement group ID in which all the nodes of the pool will be created. """ + upgrade_policy: Optional[PoolUpgradePolicy] + """ + Pool upgrade policy. + """ + root_volume_size: Optional[int] """ System volume disk size. @@ -458,7 +458,7 @@ class CreateClusterRequestAutoUpgrade: Defines whether auto upgrade is enabled for the cluster. """ - maintenance_window: MaintenanceWindow + maintenance_window: Optional[MaintenanceWindow] """ Maintenance window of the cluster auto upgrades. """ @@ -612,11 +612,6 @@ class CreateClusterRequestPoolConfig: Kubelet arguments to be used by this pool. Note that this feature is experimental. """ - upgrade_policy: CreateClusterRequestPoolConfigUpgradePolicy - """ - Pool upgrade policy. - """ - zone: Zone """ Zone in which the pool's nodes will be spawned. @@ -632,6 +627,11 @@ class CreateClusterRequestPoolConfig: Defines if the public IP should be removed from Nodes. To use this feature, your Cluster must have an attached Private Network set up with a Public Gateway. """ + upgrade_policy: Optional[CreateClusterRequestPoolConfigUpgradePolicy] + """ + Pool upgrade policy. + """ + root_volume_size: Optional[int] """ System volume disk size. @@ -803,59 +803,59 @@ class Cluster: Wildcard DNS resolving all the ready cluster nodes. """ - autoscaler_config: ClusterAutoscalerConfig + created_at: Optional[datetime] """ - Autoscaler config for the cluster. + Date on which the cluster was created. """ - auto_upgrade: ClusterAutoUpgrade + updated_at: Optional[datetime] """ - Auto upgrade configuration of the cluster. + Date on which the cluster was last updated. """ - upgrade_available: bool + autoscaler_config: Optional[ClusterAutoscalerConfig] """ - Defines whether a new Kubernetes version is available. + Autoscaler config for the cluster. """ - feature_gates: List[str] + dashboard_enabled: Optional[bool] """ - List of enabled feature gates. + Defines whether the Kubernetes dashboard is enabled for the cluster. """ - admission_plugins: List[str] + ingress: Optional[Ingress] """ - List of enabled admission plugins. + Managed Ingress controller used in the cluster (deprecated feature). """ - created_at: Optional[datetime] + auto_upgrade: Optional[ClusterAutoUpgrade] """ - Date on which the cluster was created. + Auto upgrade configuration of the cluster. """ - updated_at: Optional[datetime] + upgrade_available: bool """ - Date on which the cluster was last updated. + Defines whether a new Kubernetes version is available. """ - dashboard_enabled: Optional[bool] + feature_gates: List[str] """ - Defines whether the Kubernetes dashboard is enabled for the cluster. + List of enabled feature gates. """ - ingress: Optional[Ingress] + admission_plugins: List[str] """ - Managed Ingress controller used in the cluster (deprecated feature). + List of enabled admission plugins. """ - open_id_connect_config: ClusterOpenIDConnectConfig + apiserver_cert_sans: List[str] """ - This configuration enables to update the OpenID Connect configuration of the Kubernetes API server. + Additional Subject Alternative Names for the Kubernetes API server certificate. """ - apiserver_cert_sans: List[str] + open_id_connect_config: Optional[ClusterOpenIDConnectConfig] """ - Additional Subject Alternative Names for the Kubernetes API server certificate. + This configuration enables to update the OpenID Connect configuration of the Kubernetes API server. """ private_network_id: Optional[str] @@ -939,14 +939,14 @@ class Node: @dataclass class UpdateClusterRequestAutoUpgrade: - maintenance_window: MaintenanceWindow + enable: Optional[bool] """ - Maintenance window of the cluster auto upgrades. + Defines whether auto upgrade is enabled for the cluster. """ - enable: Optional[bool] + maintenance_window: Optional[MaintenanceWindow] """ - Defines whether auto upgrade is enabled for the cluster. + Maintenance window of the cluster auto upgrades. """ diff --git a/scaleway-async/scaleway_async/lb/v1/marshalling.py b/scaleway-async/scaleway_async/lb/v1/marshalling.py index 5050570a..f1d337cc 100644 --- a/scaleway-async/scaleway_async/lb/v1/marshalling.py +++ b/scaleway-async/scaleway_async/lb/v1/marshalling.py @@ -429,9 +429,6 @@ def unmarshal_Lb(data: Any) -> Lb: field = data.get("type_", None) args["type_"] = field - field = data.get("subscriber", None) - args["subscriber"] = unmarshal_Subscriber(field) - field = data.get("ssl_compatibility_level", None) args["ssl_compatibility_level"] = field @@ -444,6 +441,9 @@ def unmarshal_Lb(data: Any) -> Lb: field = data.get("zone", None) args["zone"] = field + field = data.get("subscriber", None) + args["subscriber"] = unmarshal_Subscriber(field) + field = data.get("created_at", None) args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field @@ -485,21 +485,21 @@ def unmarshal_Backend(data: Any) -> Backend: field = data.get("sticky_sessions_cookie_name", None) args["sticky_sessions_cookie_name"] = field - field = data.get("health_check", None) - args["health_check"] = unmarshal_HealthCheck(field) - field = data.get("pool", None) args["pool"] = field - field = data.get("lb", None) - args["lb"] = unmarshal_Lb(field) - field = data.get("on_marked_down_action", None) args["on_marked_down_action"] = field field = data.get("proxy_protocol", None) args["proxy_protocol"] = field + field = data.get("health_check", None) + args["health_check"] = unmarshal_HealthCheck(field) + + field = data.get("lb", None) + args["lb"] = unmarshal_Lb(field) + field = data.get("send_proxy_v2", None) args["send_proxy_v2"] = field @@ -568,9 +568,6 @@ def unmarshal_Certificate(data: Any) -> Certificate: field = data.get("status", None) args["status"] = field - field = data.get("lb", None) - args["lb"] = unmarshal_Lb(field) - field = data.get("not_valid_before", None) args["not_valid_before"] = ( parser.isoparse(field) if isinstance(field, str) else field @@ -581,6 +578,9 @@ def unmarshal_Certificate(data: Any) -> Certificate: parser.isoparse(field) if isinstance(field, str) else field ) + field = data.get("lb", None) + args["lb"] = unmarshal_Lb(field) + field = data.get("name", None) args["name"] = field @@ -613,18 +613,18 @@ def unmarshal_Frontend(data: Any) -> Frontend: field = data.get("inbound_port", None) args["inbound_port"] = field - field = data.get("backend", None) - args["backend"] = unmarshal_Backend(field) - - field = data.get("lb", None) - args["lb"] = unmarshal_Lb(field) - field = data.get("certificate_ids", None) args["certificate_ids"] = field field = data.get("enable_http3", None) args["enable_http3"] = field + field = data.get("backend", None) + args["backend"] = unmarshal_Backend(field) + + field = data.get("lb", None) + args["lb"] = unmarshal_Lb(field) + field = data.get("timeout_client", None) args["timeout_client"] = field @@ -717,6 +717,12 @@ def unmarshal_Acl(data: Any) -> Acl: field = data.get("name", None) args["name"] = field + field = data.get("index", None) + args["index"] = field + + field = data.get("description", None) + args["description"] = field + field = data.get("match", None) args["match"] = unmarshal_AclMatch(field) @@ -726,12 +732,6 @@ def unmarshal_Acl(data: Any) -> Acl: field = data.get("frontend", None) args["frontend"] = unmarshal_Frontend(field) - field = data.get("index", None) - args["index"] = field - - field = data.get("description", None) - args["description"] = field - field = data.get("created_at", None) args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field @@ -788,9 +788,6 @@ def unmarshal_PrivateNetwork(data: Any) -> PrivateNetwork: args: Dict[str, Any] = {} - field = data.get("lb", None) - args["lb"] = unmarshal_Lb(field) - field = data.get("ipam_ids", None) args["ipam_ids"] = field @@ -800,6 +797,9 @@ def unmarshal_PrivateNetwork(data: Any) -> PrivateNetwork: field = data.get("status", None) args["status"] = field + field = data.get("lb", None) + args["lb"] = unmarshal_Lb(field) + field = data.get("static_config", None) args["static_config"] = unmarshal_PrivateNetworkStaticConfig(field) @@ -2369,15 +2369,15 @@ def marshal_AclSpec( if request.action is not None: output["action"] = (marshal_AclAction(request.action, defaults),) - if request.match is not None: - output["match"] = (marshal_AclMatch(request.match, defaults),) - if request.index is not None: output["index"] = request.index if request.description is not None: output["description"] = request.description + if request.match is not None: + output["match"] = (marshal_AclMatch(request.match, defaults),) + return output diff --git a/scaleway-async/scaleway_async/lb/v1/types.py b/scaleway-async/scaleway_async/lb/v1/types.py index 783514fc..b0558417 100644 --- a/scaleway-async/scaleway_async/lb/v1/types.py +++ b/scaleway-async/scaleway_async/lb/v1/types.py @@ -577,11 +577,6 @@ class Lb: Load Balancer offer type. """ - subscriber: Subscriber - """ - Subscriber information. - """ - ssl_compatibility_level: SSLCompatibilityLevel """ Determines the minimal SSL version which needs to be supported on client side. @@ -602,6 +597,11 @@ class Lb: The zone the Load Balancer is in. """ + subscriber: Optional[Subscriber] + """ + Subscriber information. + """ + created_at: Optional[datetime] """ Date on which the Load Balancer was created. @@ -673,21 +673,11 @@ class Backend: Cookie name for cookie-based sticky sessions. """ - health_check: HealthCheck - """ - Object defining the health check to be carried out by the backend when checking the status and health of backend servers. - """ - pool: List[str] """ List of IP addresses of backend servers attached to this backend. """ - lb: Lb - """ - Load Balancer the backend is attached to. - """ - on_marked_down_action: OnMarkedDownAction """ Action to take when a backend server is marked as down. @@ -698,6 +688,16 @@ class Backend: Protocol to use between the Load Balancer and backend servers. Allows the backend servers to be informed of the client's real IP address. The PROXY protocol must be supported by the backend servers' software. """ + health_check: Optional[HealthCheck] + """ + Object defining the health check to be carried out by the backend when checking the status and health of backend servers. + """ + + lb: Optional[Lb] + """ + Load Balancer the backend is attached to. + """ + send_proxy_v2: Optional[bool] """ Deprecated in favor of proxy_protocol field. @@ -796,11 +796,6 @@ class Certificate: Certificate status. """ - lb: Lb - """ - Load Balancer object the certificate is attached to. - """ - not_valid_before: Optional[datetime] """ Lower validity bound. @@ -811,6 +806,11 @@ class Certificate: Upper validity bound. """ + lb: Optional[Lb] + """ + Load Balancer object the certificate is attached to. + """ + name: str """ Certificate name. @@ -839,7 +839,7 @@ class AclAction: Action to take when incoming traffic matches an ACL filter. """ - redirect: AclActionRedirect + redirect: Optional[AclActionRedirect] """ Redirection parameters when using an ACL with a `redirect` action. """ @@ -890,24 +890,24 @@ class Frontend: Port the frontend listens on. """ - backend: Backend + certificate_ids: List[str] """ - Backend object the frontend is attached to. + List of SSL/TLS certificate IDs to bind to the frontend. """ - lb: Lb + enable_http3: bool """ - Load Balancer object the frontend is attached to. + Defines whether to enable HTTP/3 protocol on the frontend. """ - certificate_ids: List[str] + backend: Optional[Backend] """ - List of SSL/TLS certificate IDs to bind to the frontend. + Backend object the frontend is attached to. """ - enable_http3: bool + lb: Optional[Lb] """ - Defines whether to enable HTTP/3 protocol on the frontend. + Load Balancer object the frontend is attached to. """ timeout_client: Optional[str] @@ -1022,29 +1022,29 @@ class Acl: ACL name. """ - match: AclMatch + index: int """ - ACL match filter object. One of `ip_subnet` or `http_filter` & `http_filter_value` are required. + Priority of this ACL (ACLs are applied in ascending order, 0 is the first ACL executed). """ - action: AclAction + description: str """ - Action to take when incoming traffic matches an ACL filter. + ACL description. """ - frontend: Frontend + match: Optional[AclMatch] """ - ACL is attached to this frontend object. + ACL match filter object. One of `ip_subnet` or `http_filter` & `http_filter_value` are required. """ - index: int + action: Optional[AclAction] """ - Priority of this ACL (ACLs are applied in ascending order, 0 is the first ACL executed). + Action to take when incoming traffic matches an ACL filter. """ - description: str + frontend: Optional[Frontend] """ - ACL description. + ACL is attached to this frontend object. """ created_at: Optional[datetime] @@ -1060,11 +1060,6 @@ class Acl: @dataclass class PrivateNetwork: - lb: Lb - """ - Load Balancer object which is attached to the Private Network. - """ - ipam_ids: List[str] """ IPAM IDs of the booked IP addresses. @@ -1080,6 +1075,11 @@ class PrivateNetwork: Status of Private Network connection. """ + lb: Optional[Lb] + """ + Load Balancer object which is attached to the Private Network. + """ + created_at: Optional[datetime] """ Date on which the Private Network was created. @@ -1142,7 +1142,7 @@ class Route: ID of the target backend. """ - match: RouteMatch + match: Optional[RouteMatch] """ Object defining the match condition for a route to be applied. If an incoming client session matches the specified condition (i.e. it has a matching SNI value or HTTP Host header value), it will be passed to the target backend. """ @@ -1170,11 +1170,6 @@ class AclSpec: Action to take when incoming traffic matches an ACL filter. """ - match: AclMatch - """ - ACL match filter object. One of `ip_subnet` or `http_filter` and `http_filter_value` are required. - """ - index: int """ Priority of this ACL (ACLs are applied in ascending order, 0 is the first ACL executed). @@ -1185,6 +1180,11 @@ class AclSpec: ACL description. """ + match: Optional[AclMatch] + """ + ACL match filter object. One of `ip_subnet` or `http_filter` and `http_filter_value` are required. + """ + @dataclass class AddBackendServersRequest: diff --git a/scaleway-async/scaleway_async/marketplace/v1/marshalling.py b/scaleway-async/scaleway_async/marketplace/v1/marshalling.py index 31ee34d6..1c27c84f 100644 --- a/scaleway-async/scaleway_async/marketplace/v1/marshalling.py +++ b/scaleway-async/scaleway_async/marketplace/v1/marshalling.py @@ -117,9 +117,6 @@ def unmarshal_Image(data: Any) -> Image: [unmarshal_Version(v) for v in field] if field is not None else None ) - field = data.get("organization", None) - args["organization"] = unmarshal_Organization(field) - field = data.get("current_public_version", None) args["current_public_version"] = field @@ -134,6 +131,9 @@ def unmarshal_Image(data: Any) -> Image: field = data.get("valid_until", None) args["valid_until"] = parser.isoparse(field) if isinstance(field, str) else field + field = data.get("organization", None) + args["organization"] = unmarshal_Organization(field) + return Image(**args) diff --git a/scaleway-async/scaleway_async/marketplace/v1/types.py b/scaleway-async/scaleway_async/marketplace/v1/types.py index 9c0ae1cd..ef8d5efb 100644 --- a/scaleway-async/scaleway_async/marketplace/v1/types.py +++ b/scaleway-async/scaleway_async/marketplace/v1/types.py @@ -106,11 +106,6 @@ class Image: List of versions of this image. """ - organization: Organization - """ - Organization this image belongs to. - """ - current_public_version: str creation_date: Optional[datetime] @@ -128,6 +123,11 @@ class Image: Expiration date of this image. """ + organization: Optional[Organization] + """ + Organization this image belongs to. + """ + @dataclass class GetImageRequest: @@ -139,7 +139,7 @@ class GetImageRequest: @dataclass class GetImageResponse: - image: Image + image: Optional[Image] @dataclass @@ -151,7 +151,7 @@ class GetVersionRequest: @dataclass class GetVersionResponse: - version: Version + version: Optional[Version] @dataclass diff --git a/scaleway-async/scaleway_async/mnq/v1alpha1/marshalling.py b/scaleway-async/scaleway_async/mnq/v1alpha1/marshalling.py index 2256084a..fa6cdfcc 100644 --- a/scaleway-async/scaleway_async/mnq/v1alpha1/marshalling.py +++ b/scaleway-async/scaleway_async/mnq/v1alpha1/marshalling.py @@ -102,12 +102,12 @@ def unmarshal_CredentialSQSSNSCreds(data: Any) -> CredentialSQSSNSCreds: field = data.get("access_key", None) args["access_key"] = field - field = data.get("permissions", None) - args["permissions"] = unmarshal_Permissions(field) - field = data.get("secret_key", None) args["secret_key"] = field + field = data.get("permissions", None) + args["permissions"] = unmarshal_Permissions(field) + return CredentialSQSSNSCreds(**args) diff --git a/scaleway-async/scaleway_async/mnq/v1alpha1/types.py b/scaleway-async/scaleway_async/mnq/v1alpha1/types.py index 229c990a..3fc07527 100644 --- a/scaleway-async/scaleway_async/mnq/v1alpha1/types.py +++ b/scaleway-async/scaleway_async/mnq/v1alpha1/types.py @@ -75,7 +75,7 @@ class CredentialSummarySQSSNSCreds: Access key ID. """ - permissions: Permissions + permissions: Optional[Permissions] """ Permissions associated with these credentials. """ @@ -96,14 +96,14 @@ class CredentialSQSSNSCreds: Access key ID. """ - permissions: Permissions + secret_key: Optional[str] """ - Permissions associated with these credentials. + Secret key ID. """ - secret_key: Optional[str] + permissions: Optional[Permissions] """ - Secret key ID. + Permissions associated with these credentials. """ diff --git a/scaleway-async/scaleway_async/mnq/v1beta1/marshalling.py b/scaleway-async/scaleway_async/mnq/v1beta1/marshalling.py index b950ec9d..7931e166 100644 --- a/scaleway-async/scaleway_async/mnq/v1beta1/marshalling.py +++ b/scaleway-async/scaleway_async/mnq/v1beta1/marshalling.py @@ -99,9 +99,6 @@ def unmarshal_NatsCredentials(data: Any) -> NatsCredentials: field = data.get("nats_account_id", None) args["nats_account_id"] = field - field = data.get("credentials", None) - args["credentials"] = unmarshal_File(field) - field = data.get("checksum", None) args["checksum"] = field @@ -111,6 +108,9 @@ def unmarshal_NatsCredentials(data: Any) -> NatsCredentials: field = data.get("updated_at", None) args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + field = data.get("credentials", None) + args["credentials"] = unmarshal_File(field) + return NatsCredentials(**args) @@ -163,15 +163,15 @@ def unmarshal_SnsCredentials(data: Any) -> SnsCredentials: field = data.get("secret_checksum", None) args["secret_checksum"] = field - field = data.get("permissions", None) - args["permissions"] = unmarshal_SnsPermissions(field) - field = data.get("created_at", None) args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field field = data.get("updated_at", None) args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + field = data.get("permissions", None) + args["permissions"] = unmarshal_SnsPermissions(field) + return SnsCredentials(**args) @@ -224,15 +224,15 @@ def unmarshal_SqsCredentials(data: Any) -> SqsCredentials: field = data.get("secret_checksum", None) args["secret_checksum"] = field - field = data.get("permissions", None) - args["permissions"] = unmarshal_SqsPermissions(field) - field = data.get("created_at", None) args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field field = data.get("updated_at", None) args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + field = data.get("permissions", None) + args["permissions"] = unmarshal_SqsPermissions(field) + return SqsCredentials(**args) diff --git a/scaleway-async/scaleway_async/mnq/v1beta1/types.py b/scaleway-async/scaleway_async/mnq/v1beta1/types.py index 2df4d7df..d41c5607 100644 --- a/scaleway-async/scaleway_async/mnq/v1beta1/types.py +++ b/scaleway-async/scaleway_async/mnq/v1beta1/types.py @@ -185,11 +185,6 @@ class NatsCredentials: NATS account containing the credentials. """ - credentials: File - """ - Object containing the credentials file (Only returned by **Create Nats Credentials** call). - """ - checksum: str """ Checksum of the credentials file. @@ -205,6 +200,11 @@ class NatsCredentials: NATS credentials last modification date. """ + credentials: Optional[File] + """ + Object containing the credentials file (Only returned by **Create Nats Credentials** call). + """ + @dataclass class SnsCredentials: @@ -243,11 +243,6 @@ class SnsCredentials: Checksum of the Secret key. """ - permissions: SnsPermissions - """ - Permissions associated with these credentials. - """ - created_at: Optional[datetime] """ Credentials creation date. @@ -258,6 +253,11 @@ class SnsCredentials: Credentials last modification date. """ + permissions: Optional[SnsPermissions] + """ + Permissions associated with these credentials. + """ + @dataclass class SqsCredentials: @@ -296,11 +296,6 @@ class SqsCredentials: Checksum of the Secret key. """ - permissions: SqsPermissions - """ - Permissions associated with these credentials. - """ - created_at: Optional[datetime] """ Credentials creation date. @@ -311,6 +306,11 @@ class SqsCredentials: Credentials last modification date. """ + permissions: Optional[SqsPermissions] + """ + Permissions associated with these credentials. + """ + @dataclass class ListNatsAccountsResponse: diff --git a/scaleway-async/scaleway_async/rdb/v1/marshalling.py b/scaleway-async/scaleway_async/rdb/v1/marshalling.py index c003267b..8fc1c8f7 100644 --- a/scaleway-async/scaleway_async/rdb/v1/marshalling.py +++ b/scaleway-async/scaleway_async/rdb/v1/marshalling.py @@ -445,9 +445,6 @@ def unmarshal_Instance(data: Any) -> Instance: args: Dict[str, Any] = {} - field = data.get("volume", None) - args["volume"] = unmarshal_Volume(field) - field = data.get("region", None) args["region"] = field @@ -463,6 +460,9 @@ def unmarshal_Instance(data: Any) -> Instance: field = data.get("created_at", None) args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + field = data.get("volume", None) + args["volume"] = unmarshal_Volume(field) + field = data.get("project_id", None) args["project_id"] = field @@ -485,15 +485,15 @@ def unmarshal_Instance(data: Any) -> Instance: [unmarshal_InstanceSetting(v) for v in field] if field is not None else None ) - field = data.get("backup_schedule", None) - args["backup_schedule"] = unmarshal_BackupSchedule(field) - field = data.get("is_ha_cluster", None) args["is_ha_cluster"] = field field = data.get("endpoint", None) args["endpoint"] = unmarshal_Endpoint(field) + field = data.get("backup_schedule", None) + args["backup_schedule"] = unmarshal_BackupSchedule(field) + field = data.get("read_replicas", None) args["read_replicas"] = ( [unmarshal_ReadReplica(v) for v in field] if field is not None else None @@ -512,9 +512,6 @@ def unmarshal_Instance(data: Any) -> Instance: [unmarshal_Endpoint(v) for v in field] if field is not None else None ) - field = data.get("logs_policy", None) - args["logs_policy"] = unmarshal_LogsPolicy(field) - field = data.get("backup_same_region", None) args["backup_same_region"] = field @@ -523,6 +520,9 @@ def unmarshal_Instance(data: Any) -> Instance: [unmarshal_Maintenance(v) for v in field] if field is not None else None ) + field = data.get("logs_policy", None) + args["logs_policy"] = unmarshal_LogsPolicy(field) + return Instance(**args) diff --git a/scaleway-async/scaleway_async/rdb/v1/types.py b/scaleway-async/scaleway_async/rdb/v1/types.py index e59e08a4..ddd79e02 100644 --- a/scaleway-async/scaleway_async/rdb/v1/types.py +++ b/scaleway-async/scaleway_async/rdb/v1/types.py @@ -821,11 +821,6 @@ class InstanceLog: @dataclass class Instance: - volume: Volume - """ - Volumes of the Database Instance. - """ - region: Region """ Region the Database Instance is in. @@ -851,6 +846,11 @@ class Instance: Creation date (must follow the ISO 8601 format). """ + volume: Optional[Volume] + """ + Volumes of the Database Instance. + """ + project_id: str """ Project ID the Database Instance belongs to. @@ -881,11 +881,6 @@ class Instance: Advanced settings of the Database Instance. """ - backup_schedule: BackupSchedule - """ - Backup schedule of the Database Instance. - """ - is_ha_cluster: bool """ Defines whether or not High-Availability is enabled. @@ -896,6 +891,11 @@ class Instance: Endpoint of the Database Instance. """ + backup_schedule: Optional[BackupSchedule] + """ + Backup schedule of the Database Instance. + """ + read_replicas: List[ReadReplica] """ Read Replicas of the Database Instance. @@ -916,11 +916,6 @@ class Instance: List of Database Instance endpoints. """ - logs_policy: LogsPolicy - """ - Logs policy of the Database Instance. - """ - backup_same_region: bool """ Store logical backups in the same region as the Database Instance. @@ -931,6 +926,11 @@ class Instance: List of Database Instance maintenance events. """ + logs_policy: Optional[LogsPolicy] + """ + Logs policy of the Database Instance. + """ + @dataclass class NodeType: diff --git a/scaleway-async/scaleway_async/redis/v1/types.py b/scaleway-async/scaleway_async/redis/v1/types.py index 12774998..5d9f2c3c 100644 --- a/scaleway-async/scaleway_async/redis/v1/types.py +++ b/scaleway-async/scaleway_async/redis/v1/types.py @@ -115,7 +115,7 @@ class EndpointSpecPrivateNetworkSpec: Endpoint IPv4 address with a CIDR notation. You must provide at least one IPv4 per node. """ - ipam_config: EndpointSpecPrivateNetworkSpecIpamConfig + ipam_config: Optional[EndpointSpecPrivateNetworkSpecIpamConfig] """ Automated configuration of your Private Network endpoint with Scaleway IPAM service. """ diff --git a/scaleway-async/scaleway_async/tem/v1alpha1/marshalling.py b/scaleway-async/scaleway_async/tem/v1alpha1/marshalling.py index 9d98b413..7d4b1d37 100644 --- a/scaleway-async/scaleway_async/tem/v1alpha1/marshalling.py +++ b/scaleway-async/scaleway_async/tem/v1alpha1/marshalling.py @@ -161,9 +161,6 @@ def unmarshal_Domain(data: Any) -> Domain: field = data.get("dkim_config", None) args["dkim_config"] = field - field = data.get("statistics", None) - args["statistics"] = unmarshal_DomainStatistics(field) - field = data.get("region", None) args["region"] = field @@ -179,6 +176,9 @@ def unmarshal_Domain(data: Any) -> Domain: field = data.get("last_error", None) args["last_error"] = field + field = data.get("statistics", None) + args["statistics"] = unmarshal_DomainStatistics(field) + return Domain(**args) diff --git a/scaleway-async/scaleway_async/tem/v1alpha1/types.py b/scaleway-async/scaleway_async/tem/v1alpha1/types.py index de3cde44..7435f565 100644 --- a/scaleway-async/scaleway_async/tem/v1alpha1/types.py +++ b/scaleway-async/scaleway_async/tem/v1alpha1/types.py @@ -313,11 +313,6 @@ class Domain: DKIM public key to record in the DNS zone. """ - statistics: DomainStatistics - """ - Domain's statistics. - """ - region: Region """ Region to target. If none is passed will use default region from the config. @@ -343,6 +338,11 @@ class Domain: Error message returned if the last check failed. """ + statistics: Optional[DomainStatistics] + """ + Domain's statistics. + """ + @dataclass class CancelEmailRequest: @@ -471,12 +471,12 @@ class DomainLastStatus: The domain name (example.com). """ - spf_record: DomainLastStatusSpfRecord + spf_record: Optional[DomainLastStatusSpfRecord] """ The SPF record verification data. """ - dkim_record: DomainLastStatusDkimRecord + dkim_record: Optional[DomainLastStatusDkimRecord] """ The DKIM record verification data. """ diff --git a/scaleway-async/scaleway_async/vpcgw/v1/marshalling.py b/scaleway-async/scaleway_async/vpcgw/v1/marshalling.py index fbcc6187..938b3eea 100644 --- a/scaleway-async/scaleway_async/vpcgw/v1/marshalling.py +++ b/scaleway-async/scaleway_async/vpcgw/v1/marshalling.py @@ -160,21 +160,21 @@ def unmarshal_GatewayNetwork(data: Any) -> GatewayNetwork: field = data.get("status", None) args["status"] = field - field = data.get("dhcp", None) - args["dhcp"] = unmarshal_DHCP(field) - field = data.get("enable_dhcp", None) args["enable_dhcp"] = field - field = data.get("ipam_config", None) - args["ipam_config"] = unmarshal_IpamConfig(field) - field = data.get("zone", None) args["zone"] = field + field = data.get("dhcp", None) + args["dhcp"] = unmarshal_DHCP(field) + field = data.get("address", None) args["address"] = field + field = data.get("ipam_config", None) + args["ipam_config"] = unmarshal_IpamConfig(field) + return GatewayNetwork(**args) @@ -294,9 +294,6 @@ def unmarshal_Gateway(data: Any) -> Gateway: field = data.get("project_id", None) args["project_id"] = field - field = data.get("type_", None) - args["type_"] = unmarshal_GatewayType(field) - field = data.get("status", None) args["status"] = field @@ -309,12 +306,12 @@ def unmarshal_Gateway(data: Any) -> Gateway: field = data.get("updated_at", None) args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + field = data.get("type_", None) + args["type_"] = unmarshal_GatewayType(field) + field = data.get("tags", None) args["tags"] = field - field = data.get("ip", None) - args["ip"] = unmarshal_IP(field) - field = data.get("gateway_networks", None) args["gateway_networks"] = ( [unmarshal_GatewayNetwork(v) for v in field] if field is not None else None @@ -338,6 +335,9 @@ def unmarshal_Gateway(data: Any) -> Gateway: field = data.get("zone", None) args["zone"] = field + field = data.get("ip", None) + args["ip"] = unmarshal_IP(field) + field = data.get("version", None) args["version"] = field diff --git a/scaleway-async/scaleway_async/vpcgw/v1/types.py b/scaleway-async/scaleway_async/vpcgw/v1/types.py index 86d4d639..e0605f54 100644 --- a/scaleway-async/scaleway_async/vpcgw/v1/types.py +++ b/scaleway-async/scaleway_async/vpcgw/v1/types.py @@ -279,24 +279,19 @@ class GatewayNetwork: Current status of the Public Gateway's connection to the Private Network. """ - dhcp: DHCP - """ - DHCP configuration for the connected Private Network. - """ - enable_dhcp: bool """ Defines whether DHCP is enabled on the connected Private Network. """ - ipam_config: IpamConfig + zone: Zone """ - IPAM IP configuration used. + Zone of the GatewayNetwork connection. """ - zone: Zone + dhcp: Optional[DHCP] """ - Zone of the GatewayNetwork connection. + DHCP configuration for the connected Private Network. """ address: Optional[str] @@ -304,6 +299,11 @@ class GatewayNetwork: Address of the Gateway (in CIDR form) to use when DHCP is not used. """ + ipam_config: Optional[IpamConfig] + """ + IPAM IP configuration used. + """ + @dataclass class GatewayType: @@ -519,11 +519,6 @@ class Gateway: Owning Project. """ - type_: GatewayType - """ - Gateway type (commercial offer). - """ - status: GatewayStatus """ Current status of the gateway. @@ -544,14 +539,14 @@ class Gateway: Gateway last modification date. """ - tags: List[str] + type_: Optional[GatewayType] """ - Tags associated with the gateway. + Gateway type (commercial offer). """ - ip: IP + tags: List[str] """ - Public IP address of the gateway. + Tags associated with the gateway. """ gateway_networks: List[GatewayNetwork] @@ -589,6 +584,11 @@ class Gateway: Zone of the gateway. """ + ip: Optional[IP] + """ + Public IP address of the gateway. + """ + version: Optional[str] """ Version of the running gateway software. diff --git a/scaleway-async/scaleway_async/webhosting/v1alpha1/marshalling.py b/scaleway-async/scaleway_async/webhosting/v1alpha1/marshalling.py index 9aae3032..ca10b849 100644 --- a/scaleway-async/scaleway_async/webhosting/v1alpha1/marshalling.py +++ b/scaleway-async/scaleway_async/webhosting/v1alpha1/marshalling.py @@ -111,9 +111,6 @@ def unmarshal_Hosting(data: Any) -> Hosting: field = data.get("dns_status", None) args["dns_status"] = field - field = data.get("cpanel_urls", None) - args["cpanel_urls"] = unmarshal_HostingCpanelUrls(field) - field = data.get("username", None) args["username"] = field @@ -123,6 +120,9 @@ def unmarshal_Hosting(data: Any) -> Hosting: field = data.get("region", None) args["region"] = field + field = data.get("cpanel_urls", None) + args["cpanel_urls"] = unmarshal_HostingCpanelUrls(field) + return Hosting(**args) @@ -273,9 +273,6 @@ def unmarshal_Offer(data: Any) -> Offer: field = data.get("billing_operation_path", None) args["billing_operation_path"] = field - field = data.get("product", None) - args["product"] = unmarshal_OfferProduct(field) - field = data.get("available", None) args["available"] = field @@ -287,6 +284,9 @@ def unmarshal_Offer(data: Any) -> Offer: field = data.get("end_of_life", None) args["end_of_life"] = field + field = data.get("product", None) + args["product"] = unmarshal_OfferProduct(field) + field = data.get("price", None) args["price"] = unmarshal_Money(field) diff --git a/scaleway-async/scaleway_async/webhosting/v1alpha1/types.py b/scaleway-async/scaleway_async/webhosting/v1alpha1/types.py index ed45e9db..565a7428 100644 --- a/scaleway-async/scaleway_async/webhosting/v1alpha1/types.py +++ b/scaleway-async/scaleway_async/webhosting/v1alpha1/types.py @@ -299,11 +299,6 @@ class Hosting: DNS status of the Web Hosting plan. """ - cpanel_urls: HostingCpanelUrls - """ - URL to connect to cPanel dashboard and to Webmail interface. - """ - username: str """ Main Web Hosting cPanel username. @@ -319,6 +314,11 @@ class Hosting: Region where the Web Hosting plan is hosted. """ + cpanel_urls: Optional[HostingCpanelUrls] + """ + URL to connect to cPanel dashboard and to Webmail interface. + """ + @dataclass class Offer: @@ -332,11 +332,6 @@ class Offer: Unique identifier used for billing. """ - product: OfferProduct - """ - Product constituting this offer. - """ - available: bool """ If a hosting_id was specified in the call, defines whether this offer is available for that Web Hosting plan to migrate (update) to. @@ -352,6 +347,11 @@ class Offer: Indicates if the offer has reached its end of life. """ + product: Optional[OfferProduct] + """ + Product constituting this offer. + """ + price: Optional[Money] """ Price of this offer. diff --git a/scaleway/scaleway/applesilicon/v1alpha1/marshalling.py b/scaleway/scaleway/applesilicon/v1alpha1/marshalling.py index 830eb8ed..7a9f0f9f 100644 --- a/scaleway/scaleway/applesilicon/v1alpha1/marshalling.py +++ b/scaleway/scaleway/applesilicon/v1alpha1/marshalling.py @@ -105,21 +105,21 @@ def unmarshal_ServerType(data: Any) -> ServerType: args: Dict[str, Any] = {} + field = data.get("name", None) + args["name"] = field + + field = data.get("stock", None) + args["stock"] = field + field = data.get("cpu", None) args["cpu"] = unmarshal_ServerTypeCPU(field) field = data.get("disk", None) args["disk"] = unmarshal_ServerTypeDisk(field) - field = data.get("name", None) - args["name"] = field - field = data.get("memory", None) args["memory"] = unmarshal_ServerTypeMemory(field) - field = data.get("stock", None) - args["stock"] = field - field = data.get("minimum_lease_duration", None) args["minimum_lease_duration"] = field diff --git a/scaleway/scaleway/applesilicon/v1alpha1/types.py b/scaleway/scaleway/applesilicon/v1alpha1/types.py index c70bd0d2..79291bad 100644 --- a/scaleway/scaleway/applesilicon/v1alpha1/types.py +++ b/scaleway/scaleway/applesilicon/v1alpha1/types.py @@ -100,29 +100,29 @@ class OS: @dataclass class ServerType: - cpu: ServerTypeCPU + name: str """ - CPU description. + Name of the type. """ - disk: ServerTypeDisk + stock: ServerTypeStock """ - Size of the local disk of the server. + Current stock. """ - name: str + cpu: Optional[ServerTypeCPU] """ - Name of the type. + CPU description. """ - memory: ServerTypeMemory + disk: Optional[ServerTypeDisk] """ - Size of memory available. + Size of the local disk of the server. """ - stock: ServerTypeStock + memory: Optional[ServerTypeMemory] """ - Current stock. + Size of memory available. """ minimum_lease_duration: Optional[str] diff --git a/scaleway/scaleway/baremetal/v1/marshalling.py b/scaleway/scaleway/baremetal/v1/marshalling.py index acb82a8b..c3ea1a16 100644 --- a/scaleway/scaleway/baremetal/v1/marshalling.py +++ b/scaleway/scaleway/baremetal/v1/marshalling.py @@ -126,6 +126,15 @@ def unmarshal_OS(data: Any) -> OS: field = data.get("logo_url", None) args["logo_url"] = field + field = data.get("enabled", None) + args["enabled"] = field + + field = data.get("license_required", None) + args["license_required"] = field + + field = data.get("allowed", None) + args["allowed"] = field + field = data.get("ssh", None) args["ssh"] = unmarshal_OSOSField(field) @@ -141,15 +150,6 @@ def unmarshal_OS(data: Any) -> OS: field = data.get("service_password", None) args["service_password"] = unmarshal_OSOSField(field) - field = data.get("enabled", None) - args["enabled"] = field - - field = data.get("license_required", None) - args["license_required"] = field - - field = data.get("allowed", None) - args["allowed"] = field - return OS(**args) @@ -556,9 +556,6 @@ def unmarshal_Server(data: Any) -> Server: field = data.get("zone", None) args["zone"] = field - field = data.get("install", None) - args["install"] = unmarshal_ServerInstall(field) - field = data.get("ping_status", None) args["ping_status"] = field @@ -567,6 +564,9 @@ def unmarshal_Server(data: Any) -> Server: [unmarshal_ServerOption(v) for v in field] if field is not None else None ) + field = data.get("install", None) + args["install"] = unmarshal_ServerInstall(field) + field = data.get("rescue_server", None) args["rescue_server"] = unmarshal_ServerRescueServer(field) diff --git a/scaleway/scaleway/baremetal/v1/types.py b/scaleway/scaleway/baremetal/v1/types.py index 36700e71..8f4a7ce7 100644 --- a/scaleway/scaleway/baremetal/v1/types.py +++ b/scaleway/scaleway/baremetal/v1/types.py @@ -474,44 +474,44 @@ class OS: URL of this OS's logo. """ - ssh: OSOSField + enabled: bool """ - Object defining the SSH requirements to install the OS. + Defines if the operating system is enabled or not. """ - user: OSOSField + license_required: bool """ - Object defining the username requirements to install the OS. + License required (check server options for pricing details). """ - password: OSOSField + allowed: bool """ - Object defining the password requirements to install the OS. + Defines if a specific Organization is allowed to install this OS type. """ - service_user: OSOSField + ssh: Optional[OSOSField] """ - Object defining the username requirements to install the service. + Object defining the SSH requirements to install the OS. """ - service_password: OSOSField + user: Optional[OSOSField] """ - Object defining the password requirements to install the service. + Object defining the username requirements to install the OS. """ - enabled: bool + password: Optional[OSOSField] """ - Defines if the operating system is enabled or not. + Object defining the password requirements to install the OS. """ - license_required: bool + service_user: Optional[OSOSField] """ - License required (check server options for pricing details). + Object defining the username requirements to install the service. """ - allowed: bool + service_password: Optional[OSOSField] """ - Defines if a specific Organization is allowed to install this OS type. + Object defining the password requirements to install the service. """ @@ -789,11 +789,6 @@ class Server: Zone in which is the server located. """ - install: ServerInstall - """ - Configuration of the installation. - """ - ping_status: ServerPingStatus """ Status of server ping. @@ -804,7 +799,12 @@ class Server: Options enabled on the server. """ - rescue_server: ServerRescueServer + install: Optional[ServerInstall] + """ + Configuration of the installation. + """ + + rescue_server: Optional[ServerRescueServer] """ Configuration of rescue boot. """ diff --git a/scaleway/scaleway/block/v1alpha1/marshalling.py b/scaleway/scaleway/block/v1alpha1/marshalling.py index 07460643..2eef49f5 100644 --- a/scaleway/scaleway/block/v1alpha1/marshalling.py +++ b/scaleway/scaleway/block/v1alpha1/marshalling.py @@ -168,9 +168,6 @@ def unmarshal_SnapshotSummary(data: Any) -> SnapshotSummary: field = data.get("name", None) args["name"] = field - field = data.get("parent_volume", None) - args["parent_volume"] = unmarshal_SnapshotParentVolume(field) - field = data.get("size", None) args["size"] = field @@ -189,6 +186,9 @@ def unmarshal_SnapshotSummary(data: Any) -> SnapshotSummary: field = data.get("class_", None) args["class_"] = field + field = data.get("parent_volume", None) + args["parent_volume"] = unmarshal_SnapshotParentVolume(field) + field = data.get("created_at", None) args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field @@ -228,15 +228,15 @@ def unmarshal_VolumeType(data: Any) -> VolumeType: field = data.get("type_", None) args["type_"] = field - field = data.get("specs", None) - args["specs"] = unmarshal_VolumeSpecifications(field) - field = data.get("pricing", None) args["pricing"] = unmarshal_Money(field) field = data.get("snapshot_pricing", None) args["snapshot_pricing"] = unmarshal_Money(field) + field = data.get("specs", None) + args["specs"] = unmarshal_VolumeSpecifications(field) + return VolumeType(**args) @@ -292,9 +292,6 @@ def unmarshal_Snapshot(data: Any) -> Snapshot: field = data.get("name", None) args["name"] = field - field = data.get("parent_volume", None) - args["parent_volume"] = unmarshal_SnapshotParentVolume(field) - field = data.get("size", None) args["size"] = field @@ -318,6 +315,9 @@ def unmarshal_Snapshot(data: Any) -> Snapshot: field = data.get("class_", None) args["class_"] = field + field = data.get("parent_volume", None) + args["parent_volume"] = unmarshal_SnapshotParentVolume(field) + field = data.get("created_at", None) args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field diff --git a/scaleway/scaleway/block/v1alpha1/types.py b/scaleway/scaleway/block/v1alpha1/types.py index b82f27d3..312d184a 100644 --- a/scaleway/scaleway/block/v1alpha1/types.py +++ b/scaleway/scaleway/block/v1alpha1/types.py @@ -202,11 +202,6 @@ class SnapshotSummary: Name of the snapshot. """ - parent_volume: SnapshotParentVolume - """ - If the parent volume has been deleted, value is null. - """ - size: int """ Size of the snapshot in bytes. @@ -237,6 +232,11 @@ class SnapshotSummary: Storage class of the snapshot. """ + parent_volume: Optional[SnapshotParentVolume] + """ + If the parent volume has been deleted, value is null. + """ + created_at: Optional[datetime] """ Creation date of the snapshot. @@ -255,11 +255,6 @@ class VolumeType: Volume type. """ - specs: VolumeSpecifications - """ - Volume specifications of the volume type. - """ - pricing: Optional[Money] """ Price of the volume billed in GB/hour. @@ -270,6 +265,11 @@ class VolumeType: Price of the snapshot billed in GB/hour. """ + specs: Optional[VolumeSpecifications] + """ + Volume specifications of the volume type. + """ + @dataclass class Volume: @@ -333,7 +333,7 @@ class Volume: Volume zone. """ - specs: VolumeSpecifications + specs: Optional[VolumeSpecifications] """ Specifications of the volume. """ @@ -611,11 +611,6 @@ class Snapshot: Name of the snapshot. """ - parent_volume: SnapshotParentVolume - """ - If the parent volume was deleted, value is null. - """ - size: int """ Size in bytes of the snapshot. @@ -651,6 +646,11 @@ class Snapshot: Storage class of the snapshot. """ + parent_volume: Optional[SnapshotParentVolume] + """ + If the parent volume was deleted, value is null. + """ + created_at: Optional[datetime] """ Creation date of the snapshot. diff --git a/scaleway/scaleway/cockpit/v1beta1/marshalling.py b/scaleway/scaleway/cockpit/v1beta1/marshalling.py index 11ceb1e9..846da82b 100644 --- a/scaleway/scaleway/cockpit/v1beta1/marshalling.py +++ b/scaleway/scaleway/cockpit/v1beta1/marshalling.py @@ -206,15 +206,15 @@ def unmarshal_Token(data: Any) -> Token: field = data.get("name", None) args["name"] = field - field = data.get("scopes", None) - args["scopes"] = unmarshal_TokenScopes(field) - field = data.get("created_at", None) args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field field = data.get("updated_at", None) args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + field = data.get("scopes", None) + args["scopes"] = unmarshal_TokenScopes(field) + field = data.get("secret_key", None) args["secret_key"] = field @@ -290,24 +290,24 @@ def unmarshal_Cockpit(data: Any) -> Cockpit: field = data.get("project_id", None) args["project_id"] = field - field = data.get("endpoints", None) - args["endpoints"] = unmarshal_CockpitEndpoints(field) - field = data.get("status", None) args["status"] = field field = data.get("managed_alerts_enabled", None) args["managed_alerts_enabled"] = field - field = data.get("plan", None) - args["plan"] = unmarshal_Plan(field) - field = data.get("created_at", None) args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field field = data.get("updated_at", None) args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + field = data.get("endpoints", None) + args["endpoints"] = unmarshal_CockpitEndpoints(field) + + field = data.get("plan", None) + args["plan"] = unmarshal_Plan(field) + return Cockpit(**args) diff --git a/scaleway/scaleway/cockpit/v1beta1/types.py b/scaleway/scaleway/cockpit/v1beta1/types.py index 0cb4ad6b..1b89755a 100644 --- a/scaleway/scaleway/cockpit/v1beta1/types.py +++ b/scaleway/scaleway/cockpit/v1beta1/types.py @@ -333,11 +333,6 @@ class Token: Name of the token. """ - scopes: TokenScopes - """ - Token's permissions. - """ - created_at: Optional[datetime] """ Date and time of the token's creation. @@ -348,6 +343,11 @@ class Token: Date and time of the token's last update. """ + scopes: Optional[TokenScopes] + """ + Token's permissions. + """ + secret_key: Optional[str] """ Token's secret key. @@ -373,11 +373,6 @@ class Cockpit: ID of the Project the Cockpit belongs to. """ - endpoints: CockpitEndpoints - """ - Endpoints of the Cockpit. - """ - status: CockpitStatus """ Status of the Cockpit. @@ -388,11 +383,6 @@ class Cockpit: Specifies whether managed alerts are enabled or disabled. """ - plan: Plan - """ - Pricing plan information. - """ - created_at: Optional[datetime] """ Date and time of the Cockpit's creation. @@ -403,6 +393,16 @@ class Cockpit: Date and time of the Cockpit's last update. """ + endpoints: Optional[CockpitEndpoints] + """ + Endpoints of the Cockpit. + """ + + plan: Optional[Plan] + """ + Pricing plan information. + """ + @dataclass class CockpitMetrics: diff --git a/scaleway/scaleway/document_db/v1beta1/marshalling.py b/scaleway/scaleway/document_db/v1beta1/marshalling.py index 8c4073c9..add3a09c 100644 --- a/scaleway/scaleway/document_db/v1beta1/marshalling.py +++ b/scaleway/scaleway/document_db/v1beta1/marshalling.py @@ -380,9 +380,6 @@ def unmarshal_Instance(data: Any) -> Instance: args: Dict[str, Any] = {} - field = data.get("volume", None) - args["volume"] = unmarshal_Volume(field) - field = data.get("region", None) args["region"] = field @@ -398,6 +395,9 @@ def unmarshal_Instance(data: Any) -> Instance: field = data.get("created_at", None) args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + field = data.get("volume", None) + args["volume"] = unmarshal_Volume(field) + field = data.get("project_id", None) args["project_id"] = field @@ -420,15 +420,15 @@ def unmarshal_Instance(data: Any) -> Instance: [unmarshal_InstanceSetting(v) for v in field] if field is not None else None ) - field = data.get("backup_schedule", None) - args["backup_schedule"] = unmarshal_BackupSchedule(field) - field = data.get("is_ha_cluster", None) args["is_ha_cluster"] = field field = data.get("endpoint", None) args["endpoint"] = unmarshal_Endpoint(field) + field = data.get("backup_schedule", None) + args["backup_schedule"] = unmarshal_BackupSchedule(field) + field = data.get("read_replicas", None) args["read_replicas"] = ( [unmarshal_ReadReplica(v) for v in field] if field is not None else None @@ -447,9 +447,6 @@ def unmarshal_Instance(data: Any) -> Instance: [unmarshal_Endpoint(v) for v in field] if field is not None else None ) - field = data.get("logs_policy", None) - args["logs_policy"] = unmarshal_LogsPolicy(field) - field = data.get("backup_same_region", None) args["backup_same_region"] = field @@ -458,6 +455,9 @@ def unmarshal_Instance(data: Any) -> Instance: [unmarshal_Maintenance(v) for v in field] if field is not None else None ) + field = data.get("logs_policy", None) + args["logs_policy"] = unmarshal_LogsPolicy(field) + return Instance(**args) diff --git a/scaleway/scaleway/document_db/v1beta1/types.py b/scaleway/scaleway/document_db/v1beta1/types.py index 6c5275fd..2bfe684c 100644 --- a/scaleway/scaleway/document_db/v1beta1/types.py +++ b/scaleway/scaleway/document_db/v1beta1/types.py @@ -703,11 +703,6 @@ class InstanceLog: @dataclass class Instance: - volume: Volume - """ - Volumes of the Database Instance. - """ - region: Region """ Region the Database Instance is in. @@ -733,6 +728,11 @@ class Instance: Creation date (must follow the ISO 8601 format). """ + volume: Optional[Volume] + """ + Volumes of the Database Instance. + """ + project_id: str """ Project ID the Database Instance belongs to. @@ -763,11 +763,6 @@ class Instance: Advanced settings of the Database Instance. """ - backup_schedule: BackupSchedule - """ - Backup schedule of the Database Instance. - """ - is_ha_cluster: bool """ Defines whether or not High-Availability is enabled. @@ -778,6 +773,11 @@ class Instance: Endpoint of the Database Instance. """ + backup_schedule: Optional[BackupSchedule] + """ + Backup schedule of the Database Instance. + """ + read_replicas: List[ReadReplica] """ Read Replicas of the Database Instance. @@ -798,11 +798,6 @@ class Instance: List of Database Instance endpoints. """ - logs_policy: LogsPolicy - """ - Logs policy of the Database Instance. - """ - backup_same_region: bool """ Store logical backups in the same region as the Database Instance. @@ -813,6 +808,11 @@ class Instance: List of Database Instance maintenance events. """ + logs_policy: Optional[LogsPolicy] + """ + Logs policy of the Database Instance. + """ + @dataclass class NodeType: diff --git a/scaleway/scaleway/domain/v2beta1/marshalling.py b/scaleway/scaleway/domain/v2beta1/marshalling.py index a092c090..82d0660c 100644 --- a/scaleway/scaleway/domain/v2beta1/marshalling.py +++ b/scaleway/scaleway/domain/v2beta1/marshalling.py @@ -340,12 +340,6 @@ def unmarshal_Contact(data: Any) -> Contact: field = data.get("resale", None) args["resale"] = field - field = data.get("extension_fr", None) - args["extension_fr"] = unmarshal_ContactExtensionFR(field) - - field = data.get("extension_eu", None) - args["extension_eu"] = unmarshal_ContactExtensionEU(field) - field = data.get("whois_opt_in", None) args["whois_opt_in"] = field @@ -355,14 +349,20 @@ def unmarshal_Contact(data: Any) -> Contact: field = data.get("state", None) args["state"] = field - field = data.get("extension_nl", None) - args["extension_nl"] = unmarshal_ContactExtensionNL(field) - field = data.get("questions", None) args["questions"] = ( [unmarshal_ContactQuestion(v) for v in field] if field is not None else None ) + field = data.get("extension_fr", None) + args["extension_fr"] = unmarshal_ContactExtensionFR(field) + + field = data.get("extension_eu", None) + args["extension_eu"] = unmarshal_ContactExtensionEU(field) + + field = data.get("extension_nl", None) + args["extension_nl"] = unmarshal_ContactExtensionNL(field) + return Contact(**args) @@ -743,12 +743,12 @@ def unmarshal_Domain(data: Any) -> Domain: field = data.get("auto_renew_status", None) args["auto_renew_status"] = field - field = data.get("dnssec", None) - args["dnssec"] = unmarshal_DomainDNSSEC(field) - field = data.get("epp_code", None) args["epp_code"] = field + field = data.get("dnssec", None) + args["dnssec"] = unmarshal_DomainDNSSEC(field) + field = data.get("expired_at", None) args["expired_at"] = parser.isoparse(field) if isinstance(field, str) else field @@ -778,9 +778,6 @@ def unmarshal_Domain(data: Any) -> Domain: field = data.get("administrative_contact", None) args["administrative_contact"] = unmarshal_Contact(field) - field = data.get("tld", None) - args["tld"] = unmarshal_Tld(field) - field = data.get("external_domain_registration_status", None) args[ "external_domain_registration_status" @@ -791,6 +788,9 @@ def unmarshal_Domain(data: Any) -> Domain: field ) + field = data.get("tld", None) + args["tld"] = unmarshal_Tld(field) + return Domain(**args) @@ -1199,9 +1199,6 @@ def unmarshal_ContactRoles(data: Any) -> ContactRoles: args: Dict[str, Any] = {} - field = data.get("contact", None) - args["contact"] = unmarshal_Contact(field) - field = data.get("roles", None) args["roles"] = ( {key: unmarshal_ContactRolesRoles(value) for key, value in field.items()} @@ -1209,6 +1206,9 @@ def unmarshal_ContactRoles(data: Any) -> ContactRoles: else None ) + field = data.get("contact", None) + args["contact"] = unmarshal_Contact(field) + return ContactRoles(**args) @@ -1469,9 +1469,6 @@ def unmarshal_RenewableDomain(data: Any) -> RenewableDomain: field = data.get("status", None) args["status"] = field - field = data.get("tld", None) - args["tld"] = unmarshal_Tld(field) - field = data.get("renewable_duration_in_years", None) args["renewable_duration_in_years"] = field @@ -1491,6 +1488,9 @@ def unmarshal_RenewableDomain(data: Any) -> RenewableDomain: parser.isoparse(field) if isinstance(field, str) else field ) + field = data.get("tld", None) + args["tld"] = unmarshal_Tld(field) + return RenewableDomain(**args) @@ -2112,6 +2112,14 @@ def marshal_NewContact( if request.resale is not None: output["resale"] = request.resale + if request.whois_opt_in is not None: + output["whois_opt_in"] = request.whois_opt_in + + if request.questions is not None: + output["questions"] = [ + marshal_ContactQuestion(item, defaults) for item in request.questions + ] + if request.extension_fr is not None: output["extension_fr"] = ( marshal_ContactExtensionFR(request.extension_fr, defaults), @@ -2122,22 +2130,14 @@ def marshal_NewContact( marshal_ContactExtensionEU(request.extension_eu, defaults), ) - if request.whois_opt_in is not None: - output["whois_opt_in"] = request.whois_opt_in + if request.state is not None: + output["state"] = request.state if request.extension_nl is not None: output["extension_nl"] = ( marshal_ContactExtensionNL(request.extension_nl, defaults), ) - if request.questions is not None: - output["questions"] = [ - marshal_ContactQuestion(item, defaults) for item in request.questions - ] - - if request.state is not None: - output["state"] = request.state - return output diff --git a/scaleway/scaleway/domain/v2beta1/types.py b/scaleway/scaleway/domain/v2beta1/types.py index b4ba307f..9af313ed 100644 --- a/scaleway/scaleway/domain/v2beta1/types.py +++ b/scaleway/scaleway/domain/v2beta1/types.py @@ -443,7 +443,7 @@ class DSRecordDigest: digest: str - public_key: DSRecordPublicKey + public_key: Optional[DSRecordPublicKey] @dataclass @@ -609,20 +609,20 @@ class Contact: resale: bool - extension_fr: ContactExtensionFR - - extension_eu: ContactExtensionEU - whois_opt_in: bool email_status: ContactEmailStatus state: str - extension_nl: ContactExtensionNL - questions: Optional[List[ContactQuestion]] + extension_fr: Optional[ContactExtensionFR] + + extension_eu: Optional[ContactExtensionEU] + + extension_nl: Optional[ContactExtensionNL] + @dataclass class ContactRolesRoles: @@ -700,18 +700,18 @@ class NewContact: resale: bool - extension_fr: ContactExtensionFR - - extension_eu: ContactExtensionEU - whois_opt_in: bool - extension_nl: ContactExtensionNL - questions: Optional[List[ContactQuestion]] + extension_fr: Optional[ContactExtensionFR] + + extension_eu: Optional[ContactExtensionEU] + state: Optional[str] + extension_nl: Optional[ContactExtensionNL] + @dataclass class CheckContactsCompatibilityResponseContactCheckResult: @@ -768,7 +768,7 @@ class ImportProviderDNSZoneRequestOnlineV1: class ImportRawDNSZoneRequestAXFRSource: name_server: str - tsig_key: ImportRawDNSZoneRequestTsigKey + tsig_key: Optional[ImportRawDNSZoneRequestTsigKey] @dataclass @@ -778,10 +778,10 @@ class ImportRawDNSZoneRequestBindSource: @dataclass class ContactRoles: - contact: Contact - roles: Dict[str, ContactRolesRoles] + contact: Optional[Contact] + @dataclass class Nameserver: @@ -849,8 +849,6 @@ class RenewableDomain: status: RenewableDomainStatus - tld: Tld - renewable_duration_in_years: Optional[int] expired_at: Optional[datetime] @@ -861,6 +859,8 @@ class RenewableDomain: estimated_delete_at: Optional[datetime] + tld: Optional[Tld] + @dataclass class SSLCertificate: @@ -920,18 +920,22 @@ class AvailableDomain: available: bool - tld: Tld + tld: Optional[Tld] @dataclass class CheckContactsCompatibilityResponse: compatible: bool - owner_check_result: CheckContactsCompatibilityResponseContactCheckResult + owner_check_result: Optional[CheckContactsCompatibilityResponseContactCheckResult] - administrative_check_result: CheckContactsCompatibilityResponseContactCheckResult + administrative_check_result: Optional[ + CheckContactsCompatibilityResponseContactCheckResult + ] - technical_check_result: CheckContactsCompatibilityResponseContactCheckResult + technical_check_result: Optional[ + CheckContactsCompatibilityResponseContactCheckResult + ] @dataclass @@ -1043,10 +1047,10 @@ class Domain: auto_renew_status: DomainFeatureStatus - dnssec: DomainDNSSEC - epp_code: List[str] + dnssec: Optional[DomainDNSSEC] + expired_at: Optional[datetime] updated_at: Optional[datetime] @@ -1059,13 +1063,13 @@ class Domain: dns_zones: List[DNSZone] - owner_contact: Contact + owner_contact: Optional[Contact] - technical_contact: Contact + technical_contact: Optional[Contact] - administrative_contact: Contact + administrative_contact: Optional[Contact] - tld: Tld + tld: Optional[Tld] external_domain_registration_status: Optional[ DomainRegistrationStatusExternalDomain diff --git a/scaleway/scaleway/flexibleip/v1alpha1/marshalling.py b/scaleway/scaleway/flexibleip/v1alpha1/marshalling.py index 607efbe7..4ae3eb5f 100644 --- a/scaleway/scaleway/flexibleip/v1alpha1/marshalling.py +++ b/scaleway/scaleway/flexibleip/v1alpha1/marshalling.py @@ -85,18 +85,18 @@ def unmarshal_FlexibleIP(data: Any) -> FlexibleIP: field = data.get("updated_at", None) args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field - field = data.get("created_at", None) - args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field - - field = data.get("mac_address", None) - args["mac_address"] = unmarshal_MACAddress(field) - field = data.get("reverse", None) args["reverse"] = field field = data.get("zone", None) args["zone"] = field + field = data.get("created_at", None) + args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + + field = data.get("mac_address", None) + args["mac_address"] = unmarshal_MACAddress(field) + field = data.get("server_id", None) args["server_id"] = field diff --git a/scaleway/scaleway/flexibleip/v1alpha1/types.py b/scaleway/scaleway/flexibleip/v1alpha1/types.py index 46e94bf1..36ce0fce 100644 --- a/scaleway/scaleway/flexibleip/v1alpha1/types.py +++ b/scaleway/scaleway/flexibleip/v1alpha1/types.py @@ -143,24 +143,24 @@ class FlexibleIP: Date on which the flexible IP was last updated. """ - created_at: Optional[datetime] + reverse: str """ - Date on which the flexible IP was created. + Reverse DNS value. """ - mac_address: MACAddress + zone: Zone """ - MAC address of the flexible IP. + Availability Zone of the flexible IP. """ - reverse: str + created_at: Optional[datetime] """ - Reverse DNS value. + Date on which the flexible IP was created. """ - zone: Zone + mac_address: Optional[MACAddress] """ - Availability Zone of the flexible IP. + MAC address of the flexible IP. """ server_id: Optional[str] diff --git a/scaleway/scaleway/instance/v1/marshalling.py b/scaleway/scaleway/instance/v1/marshalling.py index ef76fca8..8213c543 100644 --- a/scaleway/scaleway/instance/v1/marshalling.py +++ b/scaleway/scaleway/instance/v1/marshalling.py @@ -264,15 +264,15 @@ def unmarshal_Volume(data: Any) -> Volume: field = data.get("tags", None) args["tags"] = field - field = data.get("server", None) - args["server"] = unmarshal_ServerSummary(field) - field = data.get("state", None) args["state"] = field field = data.get("zone", None) args["zone"] = field + field = data.get("server", None) + args["server"] = unmarshal_ServerSummary(field) + return Volume(**args) @@ -343,9 +343,6 @@ def unmarshal_Image(data: Any) -> Image: field = data.get("public", None) args["public"] = field - field = data.get("root_volume", None) - args["root_volume"] = unmarshal_VolumeSummary(field) - field = data.get("state", None) args["state"] = field @@ -358,6 +355,9 @@ def unmarshal_Image(data: Any) -> Image: field = data.get("zone", None) args["zone"] = field + field = data.get("root_volume", None) + args["root_volume"] = unmarshal_VolumeSummary(field) + return Image(**args) @@ -389,9 +389,6 @@ def unmarshal_Ip(data: Any) -> Ip: field = data.get("address", None) args["address"] = field - field = data.get("server", None) - args["server"] = unmarshal_ServerSummary(field) - field = data.get("organization", None) args["organization"] = field @@ -416,6 +413,9 @@ def unmarshal_Ip(data: Any) -> Ip: field = data.get("reverse", None) args["reverse"] = field + field = data.get("server", None) + args["server"] = unmarshal_ServerSummary(field) + return Ip(**args) @@ -768,12 +768,12 @@ def unmarshal_VolumeServer(data: Any) -> VolumeServer: field = data.get("organization", None) args["organization"] = field - field = data.get("server", None) - args["server"] = unmarshal_ServerSummary(field) - field = data.get("size", None) args["size"] = field + field = data.get("server", None) + args["server"] = unmarshal_ServerSummary(field) + field = data.get("volume_type", None) args["volume_type"] = field @@ -846,18 +846,18 @@ def unmarshal_Server(data: Any) -> Server: field = data.get("hostname", None) args["hostname"] = field - field = data.get("image", None) - args["image"] = unmarshal_Image(field) - field = data.get("protected", None) args["protected"] = field - field = data.get("public_ip", None) - args["public_ip"] = unmarshal_ServerIp(field) + field = data.get("image", None) + args["image"] = unmarshal_Image(field) field = data.get("private_ip", None) args["private_ip"] = field + field = data.get("public_ip", None) + args["public_ip"] = unmarshal_ServerIp(field) + field = data.get("public_ips", None) args["public_ips"] = ( [unmarshal_ServerIp(v) for v in field] if field is not None else None @@ -869,20 +869,6 @@ def unmarshal_Server(data: Any) -> Server: field = data.get("state", None) args["state"] = field - field = data.get("location", None) - args["location"] = unmarshal_ServerLocation(field) - - field = data.get("ipv6", None) - args["ipv6"] = unmarshal_ServerIpv6(field) - - field = data.get("modification_date", None) - args["modification_date"] = ( - parser.isoparse(field) if isinstance(field, str) else field - ) - - field = data.get("bootscript", None) - args["bootscript"] = unmarshal_Bootscript(field) - field = data.get("boot_type", None) args["boot_type"] = field @@ -893,6 +879,20 @@ def unmarshal_Server(data: Any) -> Server: else None ) + field = data.get("modification_date", None) + args["modification_date"] = ( + parser.isoparse(field) if isinstance(field, str) else field + ) + + field = data.get("location", None) + args["location"] = unmarshal_ServerLocation(field) + + field = data.get("ipv6", None) + args["ipv6"] = unmarshal_ServerIpv6(field) + + field = data.get("bootscript", None) + args["bootscript"] = unmarshal_Bootscript(field) + field = data.get("security_group", None) args["security_group"] = unmarshal_SecurityGroupSummary(field) @@ -907,9 +907,6 @@ def unmarshal_Server(data: Any) -> Server: field = data.get("arch", None) args["arch"] = field - field = data.get("placement_group", None) - args["placement_group"] = unmarshal_PlacementGroup(field) - field = data.get("private_nics", None) args["private_nics"] = ( [unmarshal_PrivateNIC(v) for v in field] if field is not None else None @@ -918,6 +915,9 @@ def unmarshal_Server(data: Any) -> Server: field = data.get("zone", None) args["zone"] = field + field = data.get("placement_group", None) + args["placement_group"] = unmarshal_PlacementGroup(field) + return Server(**args) @@ -984,12 +984,12 @@ def unmarshal_Snapshot(data: Any) -> Snapshot: field = data.get("state", None) args["state"] = field - field = data.get("base_volume", None) - args["base_volume"] = unmarshal_SnapshotBaseVolume(field) - field = data.get("zone", None) args["zone"] = field + field = data.get("base_volume", None) + args["base_volume"] = unmarshal_SnapshotBaseVolume(field) + field = data.get("creation_date", None) args["creation_date"] = parser.isoparse(field) if isinstance(field, str) else field @@ -1661,18 +1661,15 @@ def unmarshal_ServerType(data: Any) -> ServerType: args: Dict[str, Any] = {} + field = data.get("monthly_price", None) + args["monthly_price"] = field + field = data.get("hourly_price", None) args["hourly_price"] = field field = data.get("alt_names", None) args["alt_names"] = field - field = data.get("per_volume_constraint", None) - args["per_volume_constraint"] = unmarshal_ServerTypeVolumeConstraintsByType(field) - - field = data.get("volumes_constraint", None) - args["volumes_constraint"] = unmarshal_ServerTypeVolumeConstraintSizes(field) - field = data.get("ncpus", None) args["ncpus"] = field @@ -1682,15 +1679,18 @@ def unmarshal_ServerType(data: Any) -> ServerType: field = data.get("arch", None) args["arch"] = field - field = data.get("monthly_price", None) - args["monthly_price"] = field + field = data.get("baremetal", None) + args["baremetal"] = field + + field = data.get("per_volume_constraint", None) + args["per_volume_constraint"] = unmarshal_ServerTypeVolumeConstraintsByType(field) + + field = data.get("volumes_constraint", None) + args["volumes_constraint"] = unmarshal_ServerTypeVolumeConstraintSizes(field) field = data.get("gpu", None) args["gpu"] = field - field = data.get("baremetal", None) - args["baremetal"] = field - field = data.get("network", None) args["network"] = unmarshal_ServerTypeNetwork(field) @@ -1842,9 +1842,6 @@ def unmarshal_MigrationPlan(data: Any) -> MigrationPlan: args: Dict[str, Any] = {} - field = data.get("volume", None) - args["volume"] = unmarshal_Volume(field) - field = data.get("snapshots", None) args["snapshots"] = ( [unmarshal_Snapshot(v) for v in field] if field is not None else None @@ -1853,6 +1850,9 @@ def unmarshal_MigrationPlan(data: Any) -> MigrationPlan: field = data.get("validation_key", None) args["validation_key"] = field + field = data.get("volume", None) + args["volume"] = unmarshal_Volume(field) + return MigrationPlan(**args) @@ -2689,15 +2689,15 @@ def marshal_Volume( if request.tags is not None: output["tags"] = request.tags - if request.server is not None: - output["server"] = (marshal_ServerSummary(request.server, defaults),) - if request.state is not None: output["state"] = str(request.state) if request.zone is not None: output["zone"] = request.zone or defaults.default_zone + if request.server is not None: + output["server"] = (marshal_ServerSummary(request.server, defaults),) + return output @@ -3161,9 +3161,6 @@ def marshal_Image( if request.public is not None: output["public"] = request.public - if request.root_volume is not None: - output["root_volume"] = (marshal_VolumeSummary(request.root_volume, defaults),) - if request.state is not None: output["state"] = str(request.state) @@ -3176,6 +3173,9 @@ def marshal_Image( if request.zone is not None: output["zone"] = request.zone or defaults.default_zone + if request.root_volume is not None: + output["root_volume"] = (marshal_VolumeSummary(request.root_volume, defaults),) + return output diff --git a/scaleway/scaleway/instance/v1/types.py b/scaleway/scaleway/instance/v1/types.py index 99defdc2..f192cc12 100644 --- a/scaleway/scaleway/instance/v1/types.py +++ b/scaleway/scaleway/instance/v1/types.py @@ -395,11 +395,6 @@ class Volume: Volume tags. """ - server: ServerSummary - """ - Instance attached to the volume. - """ - state: VolumeState """ Volume state. @@ -410,6 +405,11 @@ class Volume: Zone in which the volume is located. """ + server: Optional[ServerSummary] + """ + Instance attached to the volume. + """ + @dataclass class VolumeSummary: @@ -470,8 +470,6 @@ class Image: public: bool - root_volume: VolumeSummary - state: ImageState project: str @@ -483,6 +481,8 @@ class Image: Zone to target. If none is passed will use default zone from the config. """ + root_volume: Optional[VolumeSummary] + @dataclass class PlacementGroup: @@ -661,10 +661,10 @@ class VolumeServer: organization: str - server: ServerSummary - size: int + server: Optional[ServerSummary] + volume_type: VolumeServerVolumeType state: VolumeServerState @@ -734,7 +734,7 @@ class ServerTypeNetwork: @dataclass class ServerTypeVolumeConstraintsByType: - l_ssd: ServerTypeVolumeConstraintSizes + l_ssd: Optional[ServerTypeVolumeConstraintSizes] """ Local SSD volumes. """ @@ -785,8 +785,6 @@ class Ip: address: str - server: ServerSummary - organization: str tags: List[str] @@ -806,6 +804,8 @@ class Ip: reverse: Optional[str] + server: Optional[ServerSummary] + @dataclass class SecurityGroup: @@ -1026,19 +1026,14 @@ class Server: Instance host name. """ - image: Image - """ - Information about the Instance image. - """ - protected: bool """ Defines whether the Instance protection option is activated. """ - public_ip: ServerIp + image: Optional[Image] """ - Information about the public IP. + Information about the Instance image. """ private_ip: Optional[str] @@ -1046,6 +1041,11 @@ class Server: Private IP address of the Instance. """ + public_ip: Optional[ServerIp] + """ + Information about the public IP. + """ + public_ips: List[ServerIp] """ Information about all the public IPs attached to the server. @@ -1061,14 +1061,14 @@ class Server: Instance state. """ - location: ServerLocation + boot_type: BootType """ - Instance location. + Instance boot type. """ - ipv6: ServerIpv6 + volumes: Dict[str, VolumeServer] """ - Instance IPv6 address. + Instance volumes. """ modification_date: Optional[datetime] @@ -1076,22 +1076,22 @@ class Server: Instance modification date. """ - bootscript: Optional[Bootscript] + location: Optional[ServerLocation] """ - Instance bootscript. + Instance location. """ - boot_type: BootType + ipv6: Optional[ServerIpv6] """ - Instance boot type. + Instance IPv6 address. """ - volumes: Dict[str, VolumeServer] + bootscript: Optional[Bootscript] """ - Instance volumes. + Instance bootscript. """ - security_group: SecurityGroupSummary + security_group: Optional[SecurityGroupSummary] """ Instance security group. """ @@ -1111,11 +1111,6 @@ class Server: Instance architecture. """ - placement_group: PlacementGroup - """ - Instance placement group. - """ - private_nics: List[PrivateNIC] """ Instance private NICs. @@ -1126,6 +1121,11 @@ class Server: Zone in which the Instance is located. """ + placement_group: Optional[PlacementGroup] + """ + Instance placement group. + """ + @dataclass class Snapshot: @@ -1169,14 +1169,14 @@ class Snapshot: Snapshot state. """ - base_volume: SnapshotBaseVolume + zone: Zone """ - Volume on which the snapshot is based on. + Snapshot zone. """ - zone: Zone + base_volume: Optional[SnapshotBaseVolume] """ - Snapshot zone. + Volume on which the snapshot is based on. """ creation_date: Optional[datetime] @@ -1295,6 +1295,11 @@ class GetServerTypesAvailabilityResponseAvailability: @dataclass class ServerType: + monthly_price: Optional[float] + """ + Estimated monthly price, for a 30 days month, in Euro. + """ + hourly_price: float """ Hourly price in Euro. @@ -1305,16 +1310,6 @@ class ServerType: Alternative Instance name, if any. """ - per_volume_constraint: ServerTypeVolumeConstraintsByType - """ - Additional volume constraints. - """ - - volumes_constraint: ServerTypeVolumeConstraintSizes - """ - Initial volume constraints. - """ - ncpus: int """ Number of CPU. @@ -1330,27 +1325,32 @@ class ServerType: CPU architecture. """ - monthly_price: Optional[float] + baremetal: bool """ - Estimated monthly price, for a 30 days month, in Euro. + True if it is a baremetal Instance. """ - gpu: Optional[int] + per_volume_constraint: Optional[ServerTypeVolumeConstraintsByType] """ - Number of GPU. + Additional volume constraints. """ - baremetal: bool + volumes_constraint: Optional[ServerTypeVolumeConstraintSizes] """ - True if it is a baremetal Instance. + Initial volume constraints. """ - network: ServerTypeNetwork + gpu: Optional[int] + """ + Number of GPU. + """ + + network: Optional[ServerTypeNetwork] """ Network available for the Instance. """ - capabilities: ServerTypeCapabilities + capabilities: Optional[ServerTypeCapabilities] """ Capabilities. """ @@ -1365,9 +1365,9 @@ class ServerType: class VolumeType: display_name: str - capabilities: VolumeTypeCapabilities + capabilities: Optional[VolumeTypeCapabilities] - constraints: VolumeTypeConstraints + constraints: Optional[VolumeTypeConstraints] @dataclass @@ -1505,7 +1505,7 @@ class CreateImageRequest: @dataclass class CreateImageResponse: - image: Image + image: Optional[Image] @dataclass @@ -1537,7 +1537,7 @@ class CreateIpRequest: @dataclass class CreateIpResponse: - ip: Ip + ip: Optional[Ip] @dataclass @@ -1574,7 +1574,7 @@ class CreatePlacementGroupRequest: @dataclass class CreatePlacementGroupResponse: - placement_group: PlacementGroup + placement_group: Optional[PlacementGroup] @dataclass @@ -1607,7 +1607,7 @@ class CreatePrivateNICRequest: @dataclass class CreatePrivateNICResponse: - private_nic: PrivateNIC + private_nic: Optional[PrivateNIC] @dataclass @@ -1663,7 +1663,7 @@ class CreateSecurityGroupRequest: @dataclass class CreateSecurityGroupResponse: - security_group: SecurityGroup + security_group: Optional[SecurityGroup] @dataclass @@ -1709,7 +1709,7 @@ class CreateSecurityGroupRuleRequest: @dataclass class CreateSecurityGroupRuleResponse: - rule: SecurityGroupRule + rule: Optional[SecurityGroupRule] @dataclass @@ -1796,7 +1796,7 @@ class CreateServerRequest: @dataclass class CreateServerResponse: - server: Server + server: Optional[Server] @dataclass @@ -1849,9 +1849,9 @@ class CreateSnapshotRequest: @dataclass class CreateSnapshotResponse: - snapshot: Snapshot + snapshot: Optional[Snapshot] - task: Task + task: Optional[Task] @dataclass @@ -1889,7 +1889,7 @@ class CreateVolumeRequest: @dataclass class CreateVolumeResponse: - volume: Volume + volume: Optional[Volume] @dataclass @@ -2053,7 +2053,7 @@ class ExportSnapshotRequest: @dataclass class ExportSnapshotResponse: - task: Task + task: Optional[Task] @dataclass @@ -2068,7 +2068,7 @@ class GetBootscriptRequest: @dataclass class GetBootscriptResponse: - bootscript: Bootscript + bootscript: Optional[Bootscript] @dataclass @@ -2085,7 +2085,7 @@ class GetDashboardRequest: @dataclass class GetDashboardResponse: - dashboard: Dashboard + dashboard: Optional[Dashboard] @dataclass @@ -2103,7 +2103,7 @@ class GetImageRequest: @dataclass class GetImageResponse: - image: Image + image: Optional[Image] @dataclass @@ -2121,7 +2121,7 @@ class GetIpRequest: @dataclass class GetIpResponse: - ip: Ip + ip: Optional[Ip] @dataclass @@ -2139,7 +2139,7 @@ class GetPlacementGroupRequest: @dataclass class GetPlacementGroupResponse: - placement_group: PlacementGroup + placement_group: Optional[PlacementGroup] @dataclass @@ -2183,7 +2183,7 @@ class GetPrivateNICRequest: @dataclass class GetPrivateNICResponse: - private_nic: PrivateNIC + private_nic: Optional[PrivateNIC] @dataclass @@ -2201,7 +2201,7 @@ class GetSecurityGroupRequest: @dataclass class GetSecurityGroupResponse: - security_group: SecurityGroup + security_group: Optional[SecurityGroup] @dataclass @@ -2218,7 +2218,7 @@ class GetSecurityGroupRuleRequest: @dataclass class GetSecurityGroupRuleResponse: - rule: SecurityGroupRule + rule: Optional[SecurityGroupRule] @dataclass @@ -2236,7 +2236,7 @@ class GetServerRequest: @dataclass class GetServerResponse: - server: Server + server: Optional[Server] @dataclass @@ -2282,7 +2282,7 @@ class GetSnapshotRequest: @dataclass class GetSnapshotResponse: - snapshot: Snapshot + snapshot: Optional[Snapshot] @dataclass @@ -2300,7 +2300,7 @@ class GetVolumeRequest: @dataclass class GetVolumeResponse: - volume: Volume + volume: Optional[Volume] @dataclass @@ -2908,11 +2908,6 @@ class ListVolumesTypesResponse: @dataclass class MigrationPlan: - volume: Volume - """ - A volume which will be migrated to SBS together with the snapshots, if present. - """ - snapshots: List[Snapshot] """ A list of snapshots which will be migrated to SBS together and with the volume, if present. @@ -2923,6 +2918,11 @@ class MigrationPlan: A value to be passed to ApplyBlockMigrationRequest, to confirm that the execution of the plan is being requested. """ + volume: Optional[Volume] + """ + A volume which will be migrated to SBS together with the snapshots, if present. + """ + @dataclass class PlanBlockMigrationRequest: @@ -2968,7 +2968,7 @@ class ServerActionRequest: @dataclass class ServerActionResponse: - task: Task + task: Optional[Task] @dataclass @@ -3031,7 +3031,7 @@ class SetPlacementGroupRequest: @dataclass class SetPlacementGroupResponse: - placement_group: PlacementGroup + placement_group: Optional[PlacementGroup] @dataclass @@ -3115,7 +3115,7 @@ class UpdateIpRequest: @dataclass class UpdateIpResponse: - ip: Ip + ip: Optional[Ip] @dataclass @@ -3153,7 +3153,7 @@ class UpdatePlacementGroupRequest: @dataclass class UpdatePlacementGroupResponse: - placement_group: PlacementGroup + placement_group: Optional[PlacementGroup] @dataclass @@ -3272,7 +3272,7 @@ class UpdateServerRequest: @dataclass class UpdateServerResponse: - server: Server + server: Optional[Server] @dataclass @@ -3305,12 +3305,12 @@ class UpdateVolumeRequest: @dataclass class UpdateVolumeResponse: - volume: Volume + volume: Optional[Volume] @dataclass class _SetImageResponse: - image: Image + image: Optional[Image] @dataclass @@ -3398,7 +3398,7 @@ class _SetSecurityGroupRequest: @dataclass class _SetSecurityGroupResponse: - security_group: SecurityGroup + security_group: Optional[SecurityGroup] @dataclass @@ -3433,7 +3433,7 @@ class _SetSecurityGroupRuleRequest: @dataclass class _SetSecurityGroupRuleResponse: - rule: SecurityGroupRule + rule: Optional[SecurityGroupRule] @dataclass @@ -3596,7 +3596,7 @@ class _SetServerRequest: @dataclass class _SetServerResponse: - server: Server + server: Optional[Server] @dataclass @@ -3633,4 +3633,4 @@ class _SetSnapshotRequest: @dataclass class _SetSnapshotResponse: - snapshot: Snapshot + snapshot: Optional[Snapshot] diff --git a/scaleway/scaleway/iot/v1/marshalling.py b/scaleway/scaleway/iot/v1/marshalling.py index 19563a39..71bacc2f 100644 --- a/scaleway/scaleway/iot/v1/marshalling.py +++ b/scaleway/scaleway/iot/v1/marshalling.py @@ -131,12 +131,12 @@ def unmarshal_Device(data: Any) -> Device: field = data.get("allow_multiple_connections", None) args["allow_multiple_connections"] = field - field = data.get("message_filters", None) - args["message_filters"] = unmarshal_DeviceMessageFilters(field) - field = data.get("has_custom_certificate", None) args["has_custom_certificate"] = field + field = data.get("message_filters", None) + args["message_filters"] = unmarshal_DeviceMessageFilters(field) + field = data.get("created_at", None) args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field @@ -299,12 +299,12 @@ def unmarshal_CreateNetworkResponse(data: Any) -> CreateNetworkResponse: args: Dict[str, Any] = {} - field = data.get("network", None) - args["network"] = unmarshal_Network(field) - field = data.get("secret", None) args["secret"] = field + field = data.get("network", None) + args["network"] = unmarshal_Network(field) + return CreateNetworkResponse(**args) @@ -316,12 +316,12 @@ def unmarshal_GetDeviceCertificateResponse(data: Any) -> GetDeviceCertificateRes args: Dict[str, Any] = {} - field = data.get("device", None) - args["device"] = unmarshal_Device(field) - field = data.get("certificate_pem", None) args["certificate_pem"] = field + field = data.get("device", None) + args["device"] = unmarshal_Device(field) + return GetDeviceCertificateResponse(**args) @@ -654,12 +654,12 @@ def unmarshal_SetDeviceCertificateResponse(data: Any) -> SetDeviceCertificateRes args: Dict[str, Any] = {} - field = data.get("device", None) - args["device"] = unmarshal_Device(field) - field = data.get("certificate_pem", None) args["certificate_pem"] = field + field = data.get("device", None) + args["device"] = unmarshal_Device(field) + return SetDeviceCertificateResponse(**args) diff --git a/scaleway/scaleway/iot/v1/types.py b/scaleway/scaleway/iot/v1/types.py index 71297cc4..a967258a 100644 --- a/scaleway/scaleway/iot/v1/types.py +++ b/scaleway/scaleway/iot/v1/types.py @@ -182,12 +182,12 @@ class DeviceMessageFiltersRule: @dataclass class DeviceMessageFilters: - publish: DeviceMessageFiltersRule + publish: Optional[DeviceMessageFiltersRule] """ Filtering rule to restrict topics the device can publish to. """ - subscribe: DeviceMessageFiltersRule + subscribe: Optional[DeviceMessageFiltersRule] """ Filtering rule to restrict topics the device can subscribe to. """ @@ -252,14 +252,14 @@ class Device: Defines whether to allow multiple physical devices to connect to the Hub with this device's credentials. """ - message_filters: DeviceMessageFilters + has_custom_certificate: bool """ - Filter-sets to restrict the topics the device can publish/subscribe to. + Assigning a custom certificate allows a device to authenticate using that specific certificate without checking the Hub's CA certificate. """ - has_custom_certificate: bool + message_filters: Optional[DeviceMessageFilters] """ - Assigning a custom certificate allows a device to authenticate using that specific certificate without checking the Hub's CA certificate. + Filter-sets to restrict the topics the device can publish/subscribe to. """ created_at: Optional[datetime] @@ -640,12 +640,12 @@ class CreateDeviceRequest: @dataclass class CreateDeviceResponse: - device: Device + device: Optional[Device] """ Information related to the created device. """ - certificate: Certificate + certificate: Optional[Certificate] """ Device certificate. """ @@ -716,14 +716,14 @@ class CreateNetworkRequest: @dataclass class CreateNetworkResponse: - network: Network + secret: str """ - Information related to the created network. + Endpoint Key to keep secret. This cannot be retrieved later. """ - secret: str + network: Optional[Network] """ - Endpoint Key to keep secret. This cannot be retrieved later. + Information related to the created network. """ @@ -911,14 +911,14 @@ class GetDeviceCertificateRequest: @dataclass class GetDeviceCertificateResponse: - device: Device + certificate_pem: str """ - Information related to the created device. + Device certificate. """ - certificate_pem: str + device: Optional[Device] """ - Device certificate. + Information related to the created device. """ @@ -1360,12 +1360,12 @@ class RenewDeviceCertificateRequest: @dataclass class RenewDeviceCertificateResponse: - device: Device + device: Optional[Device] """ Information related to the created device. """ - certificate: Certificate + certificate: Optional[Certificate] """ Device certificate. """ @@ -1435,10 +1435,10 @@ class SetDeviceCertificateRequest: @dataclass class SetDeviceCertificateResponse: - device: Device - certificate_pem: str + device: Optional[Device] + @dataclass class SetHubCARequest: diff --git a/scaleway/scaleway/ipam/v1/api.py b/scaleway/scaleway/ipam/v1/api.py index a9542a9e..acfc65ea 100644 --- a/scaleway/scaleway/ipam/v1/api.py +++ b/scaleway/scaleway/ipam/v1/api.py @@ -38,20 +38,20 @@ class IpamV1API(API): def book_ip( self, *, + source: Source, is_ipv6: bool, region: Optional[Region] = None, project_id: Optional[str] = None, - source: Optional[Source] = None, address: Optional[str] = None, tags: Optional[List[str]] = None, ) -> IP: """ Book a new IP. Book a new IP from the specified source. Currently IPs can only be booked from a Private Network. + :param source: Source in which to book the IP. Not all sources are available for booking. :param is_ipv6: Request an IPv6 instead of an IPv4. :param region: Region to target. If none is passed will use default region from the config. :param project_id: When creating an IP in a Private Network, the Project must match the Private Network's Project. - :param source: Source in which to book the IP. Not all sources are available for booking. :param address: Note that only the Private Network source allows you to pick a specific IP. If the requested IP is already booked, then the call will fail. :param tags: Tags for the IP. :return: :class:`IP ` @@ -60,6 +60,7 @@ def book_ip( :: result = api.book_ip( + source=Source(), is_ipv6=False, ) """ @@ -73,10 +74,10 @@ def book_ip( f"/ipam/v1/regions/{param_region}/ips", body=marshal_BookIPRequest( BookIPRequest( + source=source, is_ipv6=is_ipv6, region=region, project_id=project_id, - source=source, address=address, tags=tags, ), diff --git a/scaleway/scaleway/ipam/v1/marshalling.py b/scaleway/scaleway/ipam/v1/marshalling.py index 26a365a9..a6476972 100644 --- a/scaleway/scaleway/ipam/v1/marshalling.py +++ b/scaleway/scaleway/ipam/v1/marshalling.py @@ -85,9 +85,6 @@ def unmarshal_IP(data: Any) -> IP: field = data.get("source", None) args["source"] = unmarshal_Source(field) - field = data.get("resource", None) - args["resource"] = unmarshal_Resource(field) - field = data.get("tags", None) args["tags"] = field @@ -100,6 +97,9 @@ def unmarshal_IP(data: Any) -> IP: field = data.get("updated_at", None) args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + field = data.get("resource", None) + args["resource"] = unmarshal_Resource(field) + field = data.get("zone", None) args["zone"] = field @@ -147,15 +147,15 @@ def marshal_BookIPRequest( ) -> Dict[str, Any]: output: Dict[str, Any] = {} + if request.source is not None: + output["source"] = (marshal_Source(request.source, defaults),) + if request.is_ipv6 is not None: output["is_ipv6"] = request.is_ipv6 if request.project_id is not None: output["project_id"] = request.project_id or defaults.default_project_id - if request.source is not None: - output["source"] = (marshal_Source(request.source, defaults),) - if request.address is not None: output["address"] = request.address diff --git a/scaleway/scaleway/ipam/v1/types.py b/scaleway/scaleway/ipam/v1/types.py index e40bb38b..a2022587 100644 --- a/scaleway/scaleway/ipam/v1/types.py +++ b/scaleway/scaleway/ipam/v1/types.py @@ -106,11 +106,6 @@ class IP: Source pool where the IP was booked in. """ - resource: Resource - """ - Resource which the IP is attached to. - """ - tags: List[str] """ Tags for the IP. @@ -131,6 +126,11 @@ class IP: Date the IP was last modified. """ + resource: Optional[Resource] + """ + Resource which the IP is attached to. + """ + zone: Optional[Zone] """ Zone of the IP, if zonal. @@ -139,6 +139,11 @@ class IP: @dataclass class BookIPRequest: + source: Source + """ + Source in which to book the IP. Not all sources are available for booking. + """ + is_ipv6: bool """ Request an IPv6 instead of an IPv4. @@ -154,11 +159,6 @@ class BookIPRequest: When creating an IP in a Private Network, the Project must match the Private Network's Project. """ - source: Optional[Source] - """ - Source in which to book the IP. Not all sources are available for booking. - """ - address: Optional[str] """ Note that only the Private Network source allows you to pick a specific IP. If the requested IP is already booked, then the call will fail. diff --git a/scaleway/scaleway/ipfs/v1alpha1/marshalling.py b/scaleway/scaleway/ipfs/v1alpha1/marshalling.py index eacad680..6a158651 100644 --- a/scaleway/scaleway/ipfs/v1alpha1/marshalling.py +++ b/scaleway/scaleway/ipfs/v1alpha1/marshalling.py @@ -95,15 +95,15 @@ def unmarshal_PinCID(data: Any) -> PinCID: field = data.get("origins", None) args["origins"] = field - field = data.get("meta", None) - args["meta"] = unmarshal_PinCIDMeta(field) - field = data.get("cid", None) args["cid"] = field field = data.get("name", None) args["name"] = field + field = data.get("meta", None) + args["meta"] = unmarshal_PinCIDMeta(field) + return PinCID(**args) @@ -147,18 +147,18 @@ def unmarshal_Pin(data: Any) -> Pin: field = data.get("status", None) args["status"] = field - field = data.get("cid", None) - args["cid"] = unmarshal_PinCID(field) - field = data.get("delegates", None) args["delegates"] = field - field = data.get("info", None) - args["info"] = unmarshal_PinInfo(field) - field = data.get("created_at", None) args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + field = data.get("cid", None) + args["cid"] = unmarshal_PinCID(field) + + field = data.get("info", None) + args["info"] = unmarshal_PinInfo(field) + return Pin(**args) diff --git a/scaleway/scaleway/ipfs/v1alpha1/types.py b/scaleway/scaleway/ipfs/v1alpha1/types.py index 1c147092..487351c2 100644 --- a/scaleway/scaleway/ipfs/v1alpha1/types.py +++ b/scaleway/scaleway/ipfs/v1alpha1/types.py @@ -97,12 +97,12 @@ class PinCIDMeta: class PinCID: origins: List[str] - meta: PinCIDMeta - cid: Optional[str] name: Optional[str] + meta: Optional[PinCIDMeta] + @dataclass class PinInfo: @@ -156,14 +156,14 @@ class Pin: status: PinStatus - cid: PinCID - delegates: List[str] - info: PinInfo - created_at: Optional[datetime] + cid: Optional[PinCID] + + info: Optional[PinInfo] + @dataclass class Volume: @@ -628,7 +628,7 @@ class ReplacePinRequest: @dataclass class ReplacePinResponse: - pin: Pin + pin: Optional[Pin] @dataclass diff --git a/scaleway/scaleway/k8s/v1/marshalling.py b/scaleway/scaleway/k8s/v1/marshalling.py index 0a4619d6..d45af6c9 100644 --- a/scaleway/scaleway/k8s/v1/marshalling.py +++ b/scaleway/scaleway/k8s/v1/marshalling.py @@ -125,9 +125,6 @@ def unmarshal_Pool(data: Any) -> Pool: field = data.get("kubelet_args", None) args["kubelet_args"] = field - field = data.get("upgrade_policy", None) - args["upgrade_policy"] = unmarshal_PoolUpgradePolicy(field) - field = data.get("zone", None) args["zone"] = field @@ -143,6 +140,9 @@ def unmarshal_Pool(data: Any) -> Pool: field = data.get("placement_group_id", None) args["placement_group_id"] = field + field = data.get("upgrade_policy", None) + args["upgrade_policy"] = unmarshal_PoolUpgradePolicy(field) + field = data.get("root_volume_size", None) args["root_volume_size"] = field @@ -345,9 +345,21 @@ def unmarshal_Cluster(data: Any) -> Cluster: field = data.get("dns_wildcard", None) args["dns_wildcard"] = field + field = data.get("created_at", None) + args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + + field = data.get("updated_at", None) + args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + field = data.get("autoscaler_config", None) args["autoscaler_config"] = unmarshal_ClusterAutoscalerConfig(field) + field = data.get("dashboard_enabled", None) + args["dashboard_enabled"] = field + + field = data.get("ingress", None) + args["ingress"] = field + field = data.get("auto_upgrade", None) args["auto_upgrade"] = unmarshal_ClusterAutoUpgrade(field) @@ -360,24 +372,12 @@ def unmarshal_Cluster(data: Any) -> Cluster: field = data.get("admission_plugins", None) args["admission_plugins"] = field - field = data.get("created_at", None) - args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field - - field = data.get("updated_at", None) - args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field - - field = data.get("dashboard_enabled", None) - args["dashboard_enabled"] = field - - field = data.get("ingress", None) - args["ingress"] = field + field = data.get("apiserver_cert_sans", None) + args["apiserver_cert_sans"] = field field = data.get("open_id_connect_config", None) args["open_id_connect_config"] = unmarshal_ClusterOpenIDConnectConfig(field) - field = data.get("apiserver_cert_sans", None) - args["apiserver_cert_sans"] = field - field = data.get("private_network_id", None) args["private_network_id"] = field @@ -797,13 +797,6 @@ def marshal_CreateClusterRequestPoolConfig( key: value for key, value in request.kubelet_args.items() } - if request.upgrade_policy is not None: - output["upgrade_policy"] = ( - marshal_CreateClusterRequestPoolConfigUpgradePolicy( - request.upgrade_policy, defaults - ), - ) - if request.zone is not None: output["zone"] = request.zone or defaults.default_zone @@ -813,6 +806,13 @@ def marshal_CreateClusterRequestPoolConfig( if request.public_ip_disabled is not None: output["public_ip_disabled"] = request.public_ip_disabled + if request.upgrade_policy is not None: + output["upgrade_policy"] = ( + marshal_CreateClusterRequestPoolConfigUpgradePolicy( + request.upgrade_policy, defaults + ), + ) + if request.root_volume_size is not None: output["root_volume_size"] = request.root_volume_size @@ -1009,14 +1009,14 @@ def marshal_UpdateClusterRequestAutoUpgrade( ) -> Dict[str, Any]: output: Dict[str, Any] = {} + if request.enable is not None: + output["enable"] = request.enable + if request.maintenance_window is not None: output["maintenance_window"] = ( marshal_MaintenanceWindow(request.maintenance_window, defaults), ) - if request.enable is not None: - output["enable"] = request.enable - return output diff --git a/scaleway/scaleway/k8s/v1/types.py b/scaleway/scaleway/k8s/v1/types.py index 7b17e97a..1b85e1f9 100644 --- a/scaleway/scaleway/k8s/v1/types.py +++ b/scaleway/scaleway/k8s/v1/types.py @@ -236,7 +236,7 @@ class ClusterAutoUpgrade: Defines whether auto upgrade is enabled for the cluster. """ - maintenance_window: MaintenanceWindow + maintenance_window: Optional[MaintenanceWindow] """ Maintenance window of the cluster auto upgrades. """ @@ -415,11 +415,6 @@ class Pool: Kubelet arguments to be used by this pool. Note that this feature is experimental. """ - upgrade_policy: PoolUpgradePolicy - """ - Pool upgrade policy. - """ - zone: Zone """ Zone in which the pool's nodes will be spawned. @@ -445,6 +440,11 @@ class Pool: Placement group ID in which all the nodes of the pool will be created. """ + upgrade_policy: Optional[PoolUpgradePolicy] + """ + Pool upgrade policy. + """ + root_volume_size: Optional[int] """ System volume disk size. @@ -458,7 +458,7 @@ class CreateClusterRequestAutoUpgrade: Defines whether auto upgrade is enabled for the cluster. """ - maintenance_window: MaintenanceWindow + maintenance_window: Optional[MaintenanceWindow] """ Maintenance window of the cluster auto upgrades. """ @@ -612,11 +612,6 @@ class CreateClusterRequestPoolConfig: Kubelet arguments to be used by this pool. Note that this feature is experimental. """ - upgrade_policy: CreateClusterRequestPoolConfigUpgradePolicy - """ - Pool upgrade policy. - """ - zone: Zone """ Zone in which the pool's nodes will be spawned. @@ -632,6 +627,11 @@ class CreateClusterRequestPoolConfig: Defines if the public IP should be removed from Nodes. To use this feature, your Cluster must have an attached Private Network set up with a Public Gateway. """ + upgrade_policy: Optional[CreateClusterRequestPoolConfigUpgradePolicy] + """ + Pool upgrade policy. + """ + root_volume_size: Optional[int] """ System volume disk size. @@ -803,59 +803,59 @@ class Cluster: Wildcard DNS resolving all the ready cluster nodes. """ - autoscaler_config: ClusterAutoscalerConfig + created_at: Optional[datetime] """ - Autoscaler config for the cluster. + Date on which the cluster was created. """ - auto_upgrade: ClusterAutoUpgrade + updated_at: Optional[datetime] """ - Auto upgrade configuration of the cluster. + Date on which the cluster was last updated. """ - upgrade_available: bool + autoscaler_config: Optional[ClusterAutoscalerConfig] """ - Defines whether a new Kubernetes version is available. + Autoscaler config for the cluster. """ - feature_gates: List[str] + dashboard_enabled: Optional[bool] """ - List of enabled feature gates. + Defines whether the Kubernetes dashboard is enabled for the cluster. """ - admission_plugins: List[str] + ingress: Optional[Ingress] """ - List of enabled admission plugins. + Managed Ingress controller used in the cluster (deprecated feature). """ - created_at: Optional[datetime] + auto_upgrade: Optional[ClusterAutoUpgrade] """ - Date on which the cluster was created. + Auto upgrade configuration of the cluster. """ - updated_at: Optional[datetime] + upgrade_available: bool """ - Date on which the cluster was last updated. + Defines whether a new Kubernetes version is available. """ - dashboard_enabled: Optional[bool] + feature_gates: List[str] """ - Defines whether the Kubernetes dashboard is enabled for the cluster. + List of enabled feature gates. """ - ingress: Optional[Ingress] + admission_plugins: List[str] """ - Managed Ingress controller used in the cluster (deprecated feature). + List of enabled admission plugins. """ - open_id_connect_config: ClusterOpenIDConnectConfig + apiserver_cert_sans: List[str] """ - This configuration enables to update the OpenID Connect configuration of the Kubernetes API server. + Additional Subject Alternative Names for the Kubernetes API server certificate. """ - apiserver_cert_sans: List[str] + open_id_connect_config: Optional[ClusterOpenIDConnectConfig] """ - Additional Subject Alternative Names for the Kubernetes API server certificate. + This configuration enables to update the OpenID Connect configuration of the Kubernetes API server. """ private_network_id: Optional[str] @@ -939,14 +939,14 @@ class Node: @dataclass class UpdateClusterRequestAutoUpgrade: - maintenance_window: MaintenanceWindow + enable: Optional[bool] """ - Maintenance window of the cluster auto upgrades. + Defines whether auto upgrade is enabled for the cluster. """ - enable: Optional[bool] + maintenance_window: Optional[MaintenanceWindow] """ - Defines whether auto upgrade is enabled for the cluster. + Maintenance window of the cluster auto upgrades. """ diff --git a/scaleway/scaleway/lb/v1/marshalling.py b/scaleway/scaleway/lb/v1/marshalling.py index 5050570a..f1d337cc 100644 --- a/scaleway/scaleway/lb/v1/marshalling.py +++ b/scaleway/scaleway/lb/v1/marshalling.py @@ -429,9 +429,6 @@ def unmarshal_Lb(data: Any) -> Lb: field = data.get("type_", None) args["type_"] = field - field = data.get("subscriber", None) - args["subscriber"] = unmarshal_Subscriber(field) - field = data.get("ssl_compatibility_level", None) args["ssl_compatibility_level"] = field @@ -444,6 +441,9 @@ def unmarshal_Lb(data: Any) -> Lb: field = data.get("zone", None) args["zone"] = field + field = data.get("subscriber", None) + args["subscriber"] = unmarshal_Subscriber(field) + field = data.get("created_at", None) args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field @@ -485,21 +485,21 @@ def unmarshal_Backend(data: Any) -> Backend: field = data.get("sticky_sessions_cookie_name", None) args["sticky_sessions_cookie_name"] = field - field = data.get("health_check", None) - args["health_check"] = unmarshal_HealthCheck(field) - field = data.get("pool", None) args["pool"] = field - field = data.get("lb", None) - args["lb"] = unmarshal_Lb(field) - field = data.get("on_marked_down_action", None) args["on_marked_down_action"] = field field = data.get("proxy_protocol", None) args["proxy_protocol"] = field + field = data.get("health_check", None) + args["health_check"] = unmarshal_HealthCheck(field) + + field = data.get("lb", None) + args["lb"] = unmarshal_Lb(field) + field = data.get("send_proxy_v2", None) args["send_proxy_v2"] = field @@ -568,9 +568,6 @@ def unmarshal_Certificate(data: Any) -> Certificate: field = data.get("status", None) args["status"] = field - field = data.get("lb", None) - args["lb"] = unmarshal_Lb(field) - field = data.get("not_valid_before", None) args["not_valid_before"] = ( parser.isoparse(field) if isinstance(field, str) else field @@ -581,6 +578,9 @@ def unmarshal_Certificate(data: Any) -> Certificate: parser.isoparse(field) if isinstance(field, str) else field ) + field = data.get("lb", None) + args["lb"] = unmarshal_Lb(field) + field = data.get("name", None) args["name"] = field @@ -613,18 +613,18 @@ def unmarshal_Frontend(data: Any) -> Frontend: field = data.get("inbound_port", None) args["inbound_port"] = field - field = data.get("backend", None) - args["backend"] = unmarshal_Backend(field) - - field = data.get("lb", None) - args["lb"] = unmarshal_Lb(field) - field = data.get("certificate_ids", None) args["certificate_ids"] = field field = data.get("enable_http3", None) args["enable_http3"] = field + field = data.get("backend", None) + args["backend"] = unmarshal_Backend(field) + + field = data.get("lb", None) + args["lb"] = unmarshal_Lb(field) + field = data.get("timeout_client", None) args["timeout_client"] = field @@ -717,6 +717,12 @@ def unmarshal_Acl(data: Any) -> Acl: field = data.get("name", None) args["name"] = field + field = data.get("index", None) + args["index"] = field + + field = data.get("description", None) + args["description"] = field + field = data.get("match", None) args["match"] = unmarshal_AclMatch(field) @@ -726,12 +732,6 @@ def unmarshal_Acl(data: Any) -> Acl: field = data.get("frontend", None) args["frontend"] = unmarshal_Frontend(field) - field = data.get("index", None) - args["index"] = field - - field = data.get("description", None) - args["description"] = field - field = data.get("created_at", None) args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field @@ -788,9 +788,6 @@ def unmarshal_PrivateNetwork(data: Any) -> PrivateNetwork: args: Dict[str, Any] = {} - field = data.get("lb", None) - args["lb"] = unmarshal_Lb(field) - field = data.get("ipam_ids", None) args["ipam_ids"] = field @@ -800,6 +797,9 @@ def unmarshal_PrivateNetwork(data: Any) -> PrivateNetwork: field = data.get("status", None) args["status"] = field + field = data.get("lb", None) + args["lb"] = unmarshal_Lb(field) + field = data.get("static_config", None) args["static_config"] = unmarshal_PrivateNetworkStaticConfig(field) @@ -2369,15 +2369,15 @@ def marshal_AclSpec( if request.action is not None: output["action"] = (marshal_AclAction(request.action, defaults),) - if request.match is not None: - output["match"] = (marshal_AclMatch(request.match, defaults),) - if request.index is not None: output["index"] = request.index if request.description is not None: output["description"] = request.description + if request.match is not None: + output["match"] = (marshal_AclMatch(request.match, defaults),) + return output diff --git a/scaleway/scaleway/lb/v1/types.py b/scaleway/scaleway/lb/v1/types.py index 783514fc..b0558417 100644 --- a/scaleway/scaleway/lb/v1/types.py +++ b/scaleway/scaleway/lb/v1/types.py @@ -577,11 +577,6 @@ class Lb: Load Balancer offer type. """ - subscriber: Subscriber - """ - Subscriber information. - """ - ssl_compatibility_level: SSLCompatibilityLevel """ Determines the minimal SSL version which needs to be supported on client side. @@ -602,6 +597,11 @@ class Lb: The zone the Load Balancer is in. """ + subscriber: Optional[Subscriber] + """ + Subscriber information. + """ + created_at: Optional[datetime] """ Date on which the Load Balancer was created. @@ -673,21 +673,11 @@ class Backend: Cookie name for cookie-based sticky sessions. """ - health_check: HealthCheck - """ - Object defining the health check to be carried out by the backend when checking the status and health of backend servers. - """ - pool: List[str] """ List of IP addresses of backend servers attached to this backend. """ - lb: Lb - """ - Load Balancer the backend is attached to. - """ - on_marked_down_action: OnMarkedDownAction """ Action to take when a backend server is marked as down. @@ -698,6 +688,16 @@ class Backend: Protocol to use between the Load Balancer and backend servers. Allows the backend servers to be informed of the client's real IP address. The PROXY protocol must be supported by the backend servers' software. """ + health_check: Optional[HealthCheck] + """ + Object defining the health check to be carried out by the backend when checking the status and health of backend servers. + """ + + lb: Optional[Lb] + """ + Load Balancer the backend is attached to. + """ + send_proxy_v2: Optional[bool] """ Deprecated in favor of proxy_protocol field. @@ -796,11 +796,6 @@ class Certificate: Certificate status. """ - lb: Lb - """ - Load Balancer object the certificate is attached to. - """ - not_valid_before: Optional[datetime] """ Lower validity bound. @@ -811,6 +806,11 @@ class Certificate: Upper validity bound. """ + lb: Optional[Lb] + """ + Load Balancer object the certificate is attached to. + """ + name: str """ Certificate name. @@ -839,7 +839,7 @@ class AclAction: Action to take when incoming traffic matches an ACL filter. """ - redirect: AclActionRedirect + redirect: Optional[AclActionRedirect] """ Redirection parameters when using an ACL with a `redirect` action. """ @@ -890,24 +890,24 @@ class Frontend: Port the frontend listens on. """ - backend: Backend + certificate_ids: List[str] """ - Backend object the frontend is attached to. + List of SSL/TLS certificate IDs to bind to the frontend. """ - lb: Lb + enable_http3: bool """ - Load Balancer object the frontend is attached to. + Defines whether to enable HTTP/3 protocol on the frontend. """ - certificate_ids: List[str] + backend: Optional[Backend] """ - List of SSL/TLS certificate IDs to bind to the frontend. + Backend object the frontend is attached to. """ - enable_http3: bool + lb: Optional[Lb] """ - Defines whether to enable HTTP/3 protocol on the frontend. + Load Balancer object the frontend is attached to. """ timeout_client: Optional[str] @@ -1022,29 +1022,29 @@ class Acl: ACL name. """ - match: AclMatch + index: int """ - ACL match filter object. One of `ip_subnet` or `http_filter` & `http_filter_value` are required. + Priority of this ACL (ACLs are applied in ascending order, 0 is the first ACL executed). """ - action: AclAction + description: str """ - Action to take when incoming traffic matches an ACL filter. + ACL description. """ - frontend: Frontend + match: Optional[AclMatch] """ - ACL is attached to this frontend object. + ACL match filter object. One of `ip_subnet` or `http_filter` & `http_filter_value` are required. """ - index: int + action: Optional[AclAction] """ - Priority of this ACL (ACLs are applied in ascending order, 0 is the first ACL executed). + Action to take when incoming traffic matches an ACL filter. """ - description: str + frontend: Optional[Frontend] """ - ACL description. + ACL is attached to this frontend object. """ created_at: Optional[datetime] @@ -1060,11 +1060,6 @@ class Acl: @dataclass class PrivateNetwork: - lb: Lb - """ - Load Balancer object which is attached to the Private Network. - """ - ipam_ids: List[str] """ IPAM IDs of the booked IP addresses. @@ -1080,6 +1075,11 @@ class PrivateNetwork: Status of Private Network connection. """ + lb: Optional[Lb] + """ + Load Balancer object which is attached to the Private Network. + """ + created_at: Optional[datetime] """ Date on which the Private Network was created. @@ -1142,7 +1142,7 @@ class Route: ID of the target backend. """ - match: RouteMatch + match: Optional[RouteMatch] """ Object defining the match condition for a route to be applied. If an incoming client session matches the specified condition (i.e. it has a matching SNI value or HTTP Host header value), it will be passed to the target backend. """ @@ -1170,11 +1170,6 @@ class AclSpec: Action to take when incoming traffic matches an ACL filter. """ - match: AclMatch - """ - ACL match filter object. One of `ip_subnet` or `http_filter` and `http_filter_value` are required. - """ - index: int """ Priority of this ACL (ACLs are applied in ascending order, 0 is the first ACL executed). @@ -1185,6 +1180,11 @@ class AclSpec: ACL description. """ + match: Optional[AclMatch] + """ + ACL match filter object. One of `ip_subnet` or `http_filter` and `http_filter_value` are required. + """ + @dataclass class AddBackendServersRequest: diff --git a/scaleway/scaleway/marketplace/v1/marshalling.py b/scaleway/scaleway/marketplace/v1/marshalling.py index 31ee34d6..1c27c84f 100644 --- a/scaleway/scaleway/marketplace/v1/marshalling.py +++ b/scaleway/scaleway/marketplace/v1/marshalling.py @@ -117,9 +117,6 @@ def unmarshal_Image(data: Any) -> Image: [unmarshal_Version(v) for v in field] if field is not None else None ) - field = data.get("organization", None) - args["organization"] = unmarshal_Organization(field) - field = data.get("current_public_version", None) args["current_public_version"] = field @@ -134,6 +131,9 @@ def unmarshal_Image(data: Any) -> Image: field = data.get("valid_until", None) args["valid_until"] = parser.isoparse(field) if isinstance(field, str) else field + field = data.get("organization", None) + args["organization"] = unmarshal_Organization(field) + return Image(**args) diff --git a/scaleway/scaleway/marketplace/v1/types.py b/scaleway/scaleway/marketplace/v1/types.py index 9c0ae1cd..ef8d5efb 100644 --- a/scaleway/scaleway/marketplace/v1/types.py +++ b/scaleway/scaleway/marketplace/v1/types.py @@ -106,11 +106,6 @@ class Image: List of versions of this image. """ - organization: Organization - """ - Organization this image belongs to. - """ - current_public_version: str creation_date: Optional[datetime] @@ -128,6 +123,11 @@ class Image: Expiration date of this image. """ + organization: Optional[Organization] + """ + Organization this image belongs to. + """ + @dataclass class GetImageRequest: @@ -139,7 +139,7 @@ class GetImageRequest: @dataclass class GetImageResponse: - image: Image + image: Optional[Image] @dataclass @@ -151,7 +151,7 @@ class GetVersionRequest: @dataclass class GetVersionResponse: - version: Version + version: Optional[Version] @dataclass diff --git a/scaleway/scaleway/mnq/v1alpha1/marshalling.py b/scaleway/scaleway/mnq/v1alpha1/marshalling.py index 2256084a..fa6cdfcc 100644 --- a/scaleway/scaleway/mnq/v1alpha1/marshalling.py +++ b/scaleway/scaleway/mnq/v1alpha1/marshalling.py @@ -102,12 +102,12 @@ def unmarshal_CredentialSQSSNSCreds(data: Any) -> CredentialSQSSNSCreds: field = data.get("access_key", None) args["access_key"] = field - field = data.get("permissions", None) - args["permissions"] = unmarshal_Permissions(field) - field = data.get("secret_key", None) args["secret_key"] = field + field = data.get("permissions", None) + args["permissions"] = unmarshal_Permissions(field) + return CredentialSQSSNSCreds(**args) diff --git a/scaleway/scaleway/mnq/v1alpha1/types.py b/scaleway/scaleway/mnq/v1alpha1/types.py index 229c990a..3fc07527 100644 --- a/scaleway/scaleway/mnq/v1alpha1/types.py +++ b/scaleway/scaleway/mnq/v1alpha1/types.py @@ -75,7 +75,7 @@ class CredentialSummarySQSSNSCreds: Access key ID. """ - permissions: Permissions + permissions: Optional[Permissions] """ Permissions associated with these credentials. """ @@ -96,14 +96,14 @@ class CredentialSQSSNSCreds: Access key ID. """ - permissions: Permissions + secret_key: Optional[str] """ - Permissions associated with these credentials. + Secret key ID. """ - secret_key: Optional[str] + permissions: Optional[Permissions] """ - Secret key ID. + Permissions associated with these credentials. """ diff --git a/scaleway/scaleway/mnq/v1beta1/marshalling.py b/scaleway/scaleway/mnq/v1beta1/marshalling.py index b950ec9d..7931e166 100644 --- a/scaleway/scaleway/mnq/v1beta1/marshalling.py +++ b/scaleway/scaleway/mnq/v1beta1/marshalling.py @@ -99,9 +99,6 @@ def unmarshal_NatsCredentials(data: Any) -> NatsCredentials: field = data.get("nats_account_id", None) args["nats_account_id"] = field - field = data.get("credentials", None) - args["credentials"] = unmarshal_File(field) - field = data.get("checksum", None) args["checksum"] = field @@ -111,6 +108,9 @@ def unmarshal_NatsCredentials(data: Any) -> NatsCredentials: field = data.get("updated_at", None) args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + field = data.get("credentials", None) + args["credentials"] = unmarshal_File(field) + return NatsCredentials(**args) @@ -163,15 +163,15 @@ def unmarshal_SnsCredentials(data: Any) -> SnsCredentials: field = data.get("secret_checksum", None) args["secret_checksum"] = field - field = data.get("permissions", None) - args["permissions"] = unmarshal_SnsPermissions(field) - field = data.get("created_at", None) args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field field = data.get("updated_at", None) args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + field = data.get("permissions", None) + args["permissions"] = unmarshal_SnsPermissions(field) + return SnsCredentials(**args) @@ -224,15 +224,15 @@ def unmarshal_SqsCredentials(data: Any) -> SqsCredentials: field = data.get("secret_checksum", None) args["secret_checksum"] = field - field = data.get("permissions", None) - args["permissions"] = unmarshal_SqsPermissions(field) - field = data.get("created_at", None) args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field field = data.get("updated_at", None) args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + field = data.get("permissions", None) + args["permissions"] = unmarshal_SqsPermissions(field) + return SqsCredentials(**args) diff --git a/scaleway/scaleway/mnq/v1beta1/types.py b/scaleway/scaleway/mnq/v1beta1/types.py index 2df4d7df..d41c5607 100644 --- a/scaleway/scaleway/mnq/v1beta1/types.py +++ b/scaleway/scaleway/mnq/v1beta1/types.py @@ -185,11 +185,6 @@ class NatsCredentials: NATS account containing the credentials. """ - credentials: File - """ - Object containing the credentials file (Only returned by **Create Nats Credentials** call). - """ - checksum: str """ Checksum of the credentials file. @@ -205,6 +200,11 @@ class NatsCredentials: NATS credentials last modification date. """ + credentials: Optional[File] + """ + Object containing the credentials file (Only returned by **Create Nats Credentials** call). + """ + @dataclass class SnsCredentials: @@ -243,11 +243,6 @@ class SnsCredentials: Checksum of the Secret key. """ - permissions: SnsPermissions - """ - Permissions associated with these credentials. - """ - created_at: Optional[datetime] """ Credentials creation date. @@ -258,6 +253,11 @@ class SnsCredentials: Credentials last modification date. """ + permissions: Optional[SnsPermissions] + """ + Permissions associated with these credentials. + """ + @dataclass class SqsCredentials: @@ -296,11 +296,6 @@ class SqsCredentials: Checksum of the Secret key. """ - permissions: SqsPermissions - """ - Permissions associated with these credentials. - """ - created_at: Optional[datetime] """ Credentials creation date. @@ -311,6 +306,11 @@ class SqsCredentials: Credentials last modification date. """ + permissions: Optional[SqsPermissions] + """ + Permissions associated with these credentials. + """ + @dataclass class ListNatsAccountsResponse: diff --git a/scaleway/scaleway/rdb/v1/marshalling.py b/scaleway/scaleway/rdb/v1/marshalling.py index c003267b..8fc1c8f7 100644 --- a/scaleway/scaleway/rdb/v1/marshalling.py +++ b/scaleway/scaleway/rdb/v1/marshalling.py @@ -445,9 +445,6 @@ def unmarshal_Instance(data: Any) -> Instance: args: Dict[str, Any] = {} - field = data.get("volume", None) - args["volume"] = unmarshal_Volume(field) - field = data.get("region", None) args["region"] = field @@ -463,6 +460,9 @@ def unmarshal_Instance(data: Any) -> Instance: field = data.get("created_at", None) args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + field = data.get("volume", None) + args["volume"] = unmarshal_Volume(field) + field = data.get("project_id", None) args["project_id"] = field @@ -485,15 +485,15 @@ def unmarshal_Instance(data: Any) -> Instance: [unmarshal_InstanceSetting(v) for v in field] if field is not None else None ) - field = data.get("backup_schedule", None) - args["backup_schedule"] = unmarshal_BackupSchedule(field) - field = data.get("is_ha_cluster", None) args["is_ha_cluster"] = field field = data.get("endpoint", None) args["endpoint"] = unmarshal_Endpoint(field) + field = data.get("backup_schedule", None) + args["backup_schedule"] = unmarshal_BackupSchedule(field) + field = data.get("read_replicas", None) args["read_replicas"] = ( [unmarshal_ReadReplica(v) for v in field] if field is not None else None @@ -512,9 +512,6 @@ def unmarshal_Instance(data: Any) -> Instance: [unmarshal_Endpoint(v) for v in field] if field is not None else None ) - field = data.get("logs_policy", None) - args["logs_policy"] = unmarshal_LogsPolicy(field) - field = data.get("backup_same_region", None) args["backup_same_region"] = field @@ -523,6 +520,9 @@ def unmarshal_Instance(data: Any) -> Instance: [unmarshal_Maintenance(v) for v in field] if field is not None else None ) + field = data.get("logs_policy", None) + args["logs_policy"] = unmarshal_LogsPolicy(field) + return Instance(**args) diff --git a/scaleway/scaleway/rdb/v1/types.py b/scaleway/scaleway/rdb/v1/types.py index e59e08a4..ddd79e02 100644 --- a/scaleway/scaleway/rdb/v1/types.py +++ b/scaleway/scaleway/rdb/v1/types.py @@ -821,11 +821,6 @@ class InstanceLog: @dataclass class Instance: - volume: Volume - """ - Volumes of the Database Instance. - """ - region: Region """ Region the Database Instance is in. @@ -851,6 +846,11 @@ class Instance: Creation date (must follow the ISO 8601 format). """ + volume: Optional[Volume] + """ + Volumes of the Database Instance. + """ + project_id: str """ Project ID the Database Instance belongs to. @@ -881,11 +881,6 @@ class Instance: Advanced settings of the Database Instance. """ - backup_schedule: BackupSchedule - """ - Backup schedule of the Database Instance. - """ - is_ha_cluster: bool """ Defines whether or not High-Availability is enabled. @@ -896,6 +891,11 @@ class Instance: Endpoint of the Database Instance. """ + backup_schedule: Optional[BackupSchedule] + """ + Backup schedule of the Database Instance. + """ + read_replicas: List[ReadReplica] """ Read Replicas of the Database Instance. @@ -916,11 +916,6 @@ class Instance: List of Database Instance endpoints. """ - logs_policy: LogsPolicy - """ - Logs policy of the Database Instance. - """ - backup_same_region: bool """ Store logical backups in the same region as the Database Instance. @@ -931,6 +926,11 @@ class Instance: List of Database Instance maintenance events. """ + logs_policy: Optional[LogsPolicy] + """ + Logs policy of the Database Instance. + """ + @dataclass class NodeType: diff --git a/scaleway/scaleway/redis/v1/types.py b/scaleway/scaleway/redis/v1/types.py index 12774998..5d9f2c3c 100644 --- a/scaleway/scaleway/redis/v1/types.py +++ b/scaleway/scaleway/redis/v1/types.py @@ -115,7 +115,7 @@ class EndpointSpecPrivateNetworkSpec: Endpoint IPv4 address with a CIDR notation. You must provide at least one IPv4 per node. """ - ipam_config: EndpointSpecPrivateNetworkSpecIpamConfig + ipam_config: Optional[EndpointSpecPrivateNetworkSpecIpamConfig] """ Automated configuration of your Private Network endpoint with Scaleway IPAM service. """ diff --git a/scaleway/scaleway/tem/v1alpha1/marshalling.py b/scaleway/scaleway/tem/v1alpha1/marshalling.py index 9d98b413..7d4b1d37 100644 --- a/scaleway/scaleway/tem/v1alpha1/marshalling.py +++ b/scaleway/scaleway/tem/v1alpha1/marshalling.py @@ -161,9 +161,6 @@ def unmarshal_Domain(data: Any) -> Domain: field = data.get("dkim_config", None) args["dkim_config"] = field - field = data.get("statistics", None) - args["statistics"] = unmarshal_DomainStatistics(field) - field = data.get("region", None) args["region"] = field @@ -179,6 +176,9 @@ def unmarshal_Domain(data: Any) -> Domain: field = data.get("last_error", None) args["last_error"] = field + field = data.get("statistics", None) + args["statistics"] = unmarshal_DomainStatistics(field) + return Domain(**args) diff --git a/scaleway/scaleway/tem/v1alpha1/types.py b/scaleway/scaleway/tem/v1alpha1/types.py index de3cde44..7435f565 100644 --- a/scaleway/scaleway/tem/v1alpha1/types.py +++ b/scaleway/scaleway/tem/v1alpha1/types.py @@ -313,11 +313,6 @@ class Domain: DKIM public key to record in the DNS zone. """ - statistics: DomainStatistics - """ - Domain's statistics. - """ - region: Region """ Region to target. If none is passed will use default region from the config. @@ -343,6 +338,11 @@ class Domain: Error message returned if the last check failed. """ + statistics: Optional[DomainStatistics] + """ + Domain's statistics. + """ + @dataclass class CancelEmailRequest: @@ -471,12 +471,12 @@ class DomainLastStatus: The domain name (example.com). """ - spf_record: DomainLastStatusSpfRecord + spf_record: Optional[DomainLastStatusSpfRecord] """ The SPF record verification data. """ - dkim_record: DomainLastStatusDkimRecord + dkim_record: Optional[DomainLastStatusDkimRecord] """ The DKIM record verification data. """ diff --git a/scaleway/scaleway/vpcgw/v1/marshalling.py b/scaleway/scaleway/vpcgw/v1/marshalling.py index fbcc6187..938b3eea 100644 --- a/scaleway/scaleway/vpcgw/v1/marshalling.py +++ b/scaleway/scaleway/vpcgw/v1/marshalling.py @@ -160,21 +160,21 @@ def unmarshal_GatewayNetwork(data: Any) -> GatewayNetwork: field = data.get("status", None) args["status"] = field - field = data.get("dhcp", None) - args["dhcp"] = unmarshal_DHCP(field) - field = data.get("enable_dhcp", None) args["enable_dhcp"] = field - field = data.get("ipam_config", None) - args["ipam_config"] = unmarshal_IpamConfig(field) - field = data.get("zone", None) args["zone"] = field + field = data.get("dhcp", None) + args["dhcp"] = unmarshal_DHCP(field) + field = data.get("address", None) args["address"] = field + field = data.get("ipam_config", None) + args["ipam_config"] = unmarshal_IpamConfig(field) + return GatewayNetwork(**args) @@ -294,9 +294,6 @@ def unmarshal_Gateway(data: Any) -> Gateway: field = data.get("project_id", None) args["project_id"] = field - field = data.get("type_", None) - args["type_"] = unmarshal_GatewayType(field) - field = data.get("status", None) args["status"] = field @@ -309,12 +306,12 @@ def unmarshal_Gateway(data: Any) -> Gateway: field = data.get("updated_at", None) args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + field = data.get("type_", None) + args["type_"] = unmarshal_GatewayType(field) + field = data.get("tags", None) args["tags"] = field - field = data.get("ip", None) - args["ip"] = unmarshal_IP(field) - field = data.get("gateway_networks", None) args["gateway_networks"] = ( [unmarshal_GatewayNetwork(v) for v in field] if field is not None else None @@ -338,6 +335,9 @@ def unmarshal_Gateway(data: Any) -> Gateway: field = data.get("zone", None) args["zone"] = field + field = data.get("ip", None) + args["ip"] = unmarshal_IP(field) + field = data.get("version", None) args["version"] = field diff --git a/scaleway/scaleway/vpcgw/v1/types.py b/scaleway/scaleway/vpcgw/v1/types.py index 86d4d639..e0605f54 100644 --- a/scaleway/scaleway/vpcgw/v1/types.py +++ b/scaleway/scaleway/vpcgw/v1/types.py @@ -279,24 +279,19 @@ class GatewayNetwork: Current status of the Public Gateway's connection to the Private Network. """ - dhcp: DHCP - """ - DHCP configuration for the connected Private Network. - """ - enable_dhcp: bool """ Defines whether DHCP is enabled on the connected Private Network. """ - ipam_config: IpamConfig + zone: Zone """ - IPAM IP configuration used. + Zone of the GatewayNetwork connection. """ - zone: Zone + dhcp: Optional[DHCP] """ - Zone of the GatewayNetwork connection. + DHCP configuration for the connected Private Network. """ address: Optional[str] @@ -304,6 +299,11 @@ class GatewayNetwork: Address of the Gateway (in CIDR form) to use when DHCP is not used. """ + ipam_config: Optional[IpamConfig] + """ + IPAM IP configuration used. + """ + @dataclass class GatewayType: @@ -519,11 +519,6 @@ class Gateway: Owning Project. """ - type_: GatewayType - """ - Gateway type (commercial offer). - """ - status: GatewayStatus """ Current status of the gateway. @@ -544,14 +539,14 @@ class Gateway: Gateway last modification date. """ - tags: List[str] + type_: Optional[GatewayType] """ - Tags associated with the gateway. + Gateway type (commercial offer). """ - ip: IP + tags: List[str] """ - Public IP address of the gateway. + Tags associated with the gateway. """ gateway_networks: List[GatewayNetwork] @@ -589,6 +584,11 @@ class Gateway: Zone of the gateway. """ + ip: Optional[IP] + """ + Public IP address of the gateway. + """ + version: Optional[str] """ Version of the running gateway software. diff --git a/scaleway/scaleway/webhosting/v1alpha1/marshalling.py b/scaleway/scaleway/webhosting/v1alpha1/marshalling.py index 9aae3032..ca10b849 100644 --- a/scaleway/scaleway/webhosting/v1alpha1/marshalling.py +++ b/scaleway/scaleway/webhosting/v1alpha1/marshalling.py @@ -111,9 +111,6 @@ def unmarshal_Hosting(data: Any) -> Hosting: field = data.get("dns_status", None) args["dns_status"] = field - field = data.get("cpanel_urls", None) - args["cpanel_urls"] = unmarshal_HostingCpanelUrls(field) - field = data.get("username", None) args["username"] = field @@ -123,6 +120,9 @@ def unmarshal_Hosting(data: Any) -> Hosting: field = data.get("region", None) args["region"] = field + field = data.get("cpanel_urls", None) + args["cpanel_urls"] = unmarshal_HostingCpanelUrls(field) + return Hosting(**args) @@ -273,9 +273,6 @@ def unmarshal_Offer(data: Any) -> Offer: field = data.get("billing_operation_path", None) args["billing_operation_path"] = field - field = data.get("product", None) - args["product"] = unmarshal_OfferProduct(field) - field = data.get("available", None) args["available"] = field @@ -287,6 +284,9 @@ def unmarshal_Offer(data: Any) -> Offer: field = data.get("end_of_life", None) args["end_of_life"] = field + field = data.get("product", None) + args["product"] = unmarshal_OfferProduct(field) + field = data.get("price", None) args["price"] = unmarshal_Money(field) diff --git a/scaleway/scaleway/webhosting/v1alpha1/types.py b/scaleway/scaleway/webhosting/v1alpha1/types.py index ed45e9db..565a7428 100644 --- a/scaleway/scaleway/webhosting/v1alpha1/types.py +++ b/scaleway/scaleway/webhosting/v1alpha1/types.py @@ -299,11 +299,6 @@ class Hosting: DNS status of the Web Hosting plan. """ - cpanel_urls: HostingCpanelUrls - """ - URL to connect to cPanel dashboard and to Webmail interface. - """ - username: str """ Main Web Hosting cPanel username. @@ -319,6 +314,11 @@ class Hosting: Region where the Web Hosting plan is hosted. """ + cpanel_urls: Optional[HostingCpanelUrls] + """ + URL to connect to cPanel dashboard and to Webmail interface. + """ + @dataclass class Offer: @@ -332,11 +332,6 @@ class Offer: Unique identifier used for billing. """ - product: OfferProduct - """ - Product constituting this offer. - """ - available: bool """ If a hosting_id was specified in the call, defines whether this offer is available for that Web Hosting plan to migrate (update) to. @@ -352,6 +347,11 @@ class Offer: Indicates if the offer has reached its end of life. """ + product: Optional[OfferProduct] + """ + Product constituting this offer. + """ + price: Optional[Money] """ Price of this offer.