diff --git a/scaleway-async/scaleway_async/account/v2/marshalling.py b/scaleway-async/scaleway_async/account/v2/marshalling.py index 869668e9..c577c2d2 100644 --- a/scaleway-async/scaleway_async/account/v2/marshalling.py +++ b/scaleway-async/scaleway_async/account/v2/marshalling.py @@ -40,10 +40,14 @@ def unmarshal_Project(data: Any) -> Project: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return Project(**args) diff --git a/scaleway-async/scaleway_async/account/v3/marshalling.py b/scaleway-async/scaleway_async/account/v3/marshalling.py index 2725094d..adf14cd3 100644 --- a/scaleway-async/scaleway_async/account/v3/marshalling.py +++ b/scaleway-async/scaleway_async/account/v3/marshalling.py @@ -40,10 +40,14 @@ def unmarshal_Project(data: Any) -> Project: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return Project(**args) diff --git a/scaleway-async/scaleway_async/applesilicon/v1alpha1/marshalling.py b/scaleway-async/scaleway_async/applesilicon/v1alpha1/marshalling.py index 4524d1c5..9d92c06d 100644 --- a/scaleway-async/scaleway_async/applesilicon/v1alpha1/marshalling.py +++ b/scaleway-async/scaleway_async/applesilicon/v1alpha1/marshalling.py @@ -82,7 +82,7 @@ def unmarshal_ServerTypeDisk(data: Any) -> ServerTypeDisk: if field is not None: args["capacity"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -101,7 +101,7 @@ def unmarshal_ServerTypeMemory(data: Any) -> ServerTypeMemory: if field is not None: args["capacity"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -127,18 +127,26 @@ def unmarshal_ServerType(data: Any) -> ServerType: field = data.get("cpu", None) if field is not None: args["cpu"] = unmarshal_ServerTypeCPU(field) + else: + args["cpu"] = None field = data.get("disk", None) if field is not None: args["disk"] = unmarshal_ServerTypeDisk(field) + else: + args["disk"] = None field = data.get("memory", None) if field is not None: args["memory"] = unmarshal_ServerTypeMemory(field) + else: + args["memory"] = None field = data.get("minimum_lease_duration", None) if field is not None: args["minimum_lease_duration"] = field + else: + args["minimum_lease_duration"] = None return ServerType(**args) @@ -155,7 +163,7 @@ def unmarshal_Server(data: Any) -> Server: if field is not None: args["id"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -190,16 +198,22 @@ def unmarshal_Server(data: Any) -> Server: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("deletable_at", None) if field is not None: args["deletable_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["deletable_at"] = None return Server(**args) diff --git a/scaleway-async/scaleway_async/baremetal/v1/marshalling.py b/scaleway-async/scaleway_async/baremetal/v1/marshalling.py index 60471d4d..dc637d6c 100644 --- a/scaleway-async/scaleway_async/baremetal/v1/marshalling.py +++ b/scaleway-async/scaleway_async/baremetal/v1/marshalling.py @@ -111,6 +111,8 @@ def unmarshal_OSOSField(data: Any) -> OSOSField: field = data.get("default_value", None) if field is not None: args["default_value"] = field + else: + args["default_value"] = None return OSOSField(**args) @@ -154,22 +156,32 @@ def unmarshal_OS(data: Any) -> OS: field = data.get("ssh", None) if field is not None: args["ssh"] = unmarshal_OSOSField(field) + else: + args["ssh"] = None field = data.get("user", None) if field is not None: args["user"] = unmarshal_OSOSField(field) + else: + args["user"] = None field = data.get("password", None) if field is not None: args["password"] = unmarshal_OSOSField(field) + else: + args["password"] = None field = data.get("service_user", None) if field is not None: args["service_user"] = unmarshal_OSOSField(field) + else: + args["service_user"] = None field = data.get("service_password", None) if field is not None: args["service_password"] = unmarshal_OSOSField(field) + else: + args["service_password"] = None return OS(**args) @@ -217,7 +229,7 @@ def unmarshal_Disk(data: Any) -> Disk: if field is not None: args["capacity"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -236,7 +248,7 @@ def unmarshal_Memory(data: Any) -> Memory: if field is not None: args["capacity"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -282,10 +294,14 @@ def unmarshal_OfferOptionOffer(data: Any) -> OfferOptionOffer: field = data.get("price", None) if field is not None: args["price"] = unmarshal_Money(field) + else: + args["price"] = None field = data.get("os_id", None) if field is not None: args["os_id"] = field + else: + args["os_id"] = None return OfferOptionOffer(**args) @@ -302,7 +318,7 @@ def unmarshal_PersistentMemory(data: Any) -> PersistentMemory: if field is not None: args["capacity"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -373,10 +389,14 @@ def unmarshal_Offer(data: Any) -> Offer: field = data.get("price_per_hour", None) if field is not None: args["price_per_hour"] = unmarshal_Money(field) + else: + args["price_per_hour"] = None field = data.get("price_per_month", None) if field is not None: args["price_per_month"] = unmarshal_Money(field) + else: + args["price_per_month"] = None field = data.get("cpus", None) if field is not None: @@ -441,6 +461,8 @@ def unmarshal_Offer(data: Any) -> Offer: field = data.get("fee", None) if field is not None: args["fee"] = unmarshal_Money(field) + else: + args["fee"] = None return Offer(**args) @@ -499,14 +521,20 @@ def unmarshal_ServerPrivateNetwork(data: Any) -> ServerPrivateNetwork: field = data.get("vlan", None) if field is not None: args["vlan"] = field + else: + args["vlan"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return ServerPrivateNetwork(**args) @@ -577,6 +605,8 @@ def unmarshal_ServerOption(data: Any) -> ServerOption: field = data.get("expires_at", None) if field is not None: args["expires_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expires_at"] = None return ServerOption(**args) @@ -635,10 +665,14 @@ def unmarshal_Server(data: Any) -> Server: field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("offer_id", None) if field is not None: @@ -681,10 +715,14 @@ def unmarshal_Server(data: Any) -> Server: field = data.get("install", None) if field is not None: args["install"] = unmarshal_ServerInstall(field) + else: + args["install"] = None field = data.get("rescue_server", None) if field is not None: args["rescue_server"] = unmarshal_ServerRescueServer(field) + else: + args["rescue_server"] = None return Server(**args) @@ -701,7 +739,7 @@ def unmarshal_Setting(data: Any) -> Setting: if field is not None: args["id"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -739,6 +777,8 @@ def unmarshal_BMCAccess(data: Any) -> BMCAccess: field = data.get("expires_at", None) if field is not None: args["expires_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expires_at"] = None return BMCAccess(**args) @@ -754,6 +794,8 @@ def unmarshal_GetServerMetricsResponse(data: Any) -> GetServerMetricsResponse: field = data.get("pings", None) if field is not None: args["pings"] = unmarshal_TimeSeries(field) + else: + args["pings"] = None return GetServerMetricsResponse(**args) @@ -838,10 +880,14 @@ def unmarshal_ServerEvent(data: Any) -> ServerEvent: field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None return ServerEvent(**args) diff --git a/scaleway-async/scaleway_async/billing/v2alpha1/marshalling.py b/scaleway-async/scaleway_async/billing/v2alpha1/marshalling.py index 351e16f2..3fe90b66 100644 --- a/scaleway-async/scaleway_async/billing/v2alpha1/marshalling.py +++ b/scaleway-async/scaleway_async/billing/v2alpha1/marshalling.py @@ -48,6 +48,8 @@ def unmarshal_GetConsumptionResponseConsumption( field = data.get("value", None) if field is not None: args["value"] = unmarshal_Money(field) + else: + args["value"] = None return GetConsumptionResponseConsumption(**args) @@ -71,6 +73,8 @@ def unmarshal_GetConsumptionResponse(data: Any) -> GetConsumptionResponse: field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return GetConsumptionResponse(**args) @@ -86,6 +90,8 @@ def unmarshal_DiscountCoupon(data: Any) -> DiscountCoupon: field = data.get("description", None) if field is not None: args["description"] = field + else: + args["description"] = None return DiscountCoupon(**args) @@ -98,7 +104,7 @@ def unmarshal_DiscountFilter(data: Any) -> DiscountFilter: args: Dict[str, Any] = {} - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -156,18 +162,26 @@ def unmarshal_Discount(data: Any) -> Discount: args["creation_date"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["creation_date"] = None field = data.get("start_date", None) if field is not None: args["start_date"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["start_date"] = None field = data.get("stop_date", None) if field is not None: args["stop_date"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["stop_date"] = None field = data.get("coupon", None) if field is not None: args["coupon"] = unmarshal_DiscountCoupon(field) + else: + args["coupon"] = None return Discount(**args) @@ -216,24 +230,34 @@ def unmarshal_Invoice(data: Any) -> Invoice: field = data.get("start_date", None) if field is not None: args["start_date"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["start_date"] = None field = data.get("issued_date", None) if field is not None: args["issued_date"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["issued_date"] = None field = data.get("due_date", None) if field is not None: args["due_date"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["due_date"] = None field = data.get("total_untaxed", None) if field is not None: args["total_untaxed"] = unmarshal_Money(field) + else: + args["total_untaxed"] = None field = data.get("total_taxed", None) if field is not None: args["total_taxed"] = unmarshal_Money(field) + else: + args["total_taxed"] = None return Invoice(**args) diff --git a/scaleway-async/scaleway_async/billing/v2beta1/marshalling.py b/scaleway-async/scaleway_async/billing/v2beta1/marshalling.py index 48328d55..69debc7a 100644 --- a/scaleway-async/scaleway_async/billing/v2beta1/marshalling.py +++ b/scaleway-async/scaleway_async/billing/v2beta1/marshalling.py @@ -44,28 +44,38 @@ def unmarshal_Invoice(data: Any) -> Invoice: field = data.get("start_date", None) if field is not None: args["start_date"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["start_date"] = None field = data.get("stop_date", None) if field is not None: args["stop_date"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["stop_date"] = None field = data.get("billing_period", None) if field is not None: args["billing_period"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["billing_period"] = None field = data.get("issued_date", None) if field is not None: args["issued_date"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["issued_date"] = None field = data.get("due_date", None) if field is not None: args["due_date"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["due_date"] = None - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -84,22 +94,32 @@ def unmarshal_Invoice(data: Any) -> Invoice: field = data.get("total_untaxed", None) if field is not None: args["total_untaxed"] = unmarshal_Money(field) + else: + args["total_untaxed"] = None field = data.get("total_taxed", None) if field is not None: args["total_taxed"] = unmarshal_Money(field) + else: + args["total_taxed"] = None field = data.get("total_tax", None) if field is not None: args["total_tax"] = unmarshal_Money(field) + else: + args["total_tax"] = None field = data.get("total_discount", None) if field is not None: args["total_discount"] = unmarshal_Money(field) + else: + args["total_discount"] = None field = data.get("total_undiscount", None) if field is not None: args["total_undiscount"] = unmarshal_Money(field) + else: + args["total_undiscount"] = None return Invoice(**args) @@ -145,6 +165,8 @@ def unmarshal_ListConsumptionsResponseConsumption( field = data.get("value", None) if field is not None: args["value"] = unmarshal_Money(field) + else: + args["value"] = None return ListConsumptionsResponseConsumption(**args) @@ -176,6 +198,8 @@ def unmarshal_ListConsumptionsResponse(data: Any) -> ListConsumptionsResponse: field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return ListConsumptionsResponse(**args) @@ -191,6 +215,8 @@ def unmarshal_DiscountCoupon(data: Any) -> DiscountCoupon: field = data.get("description", None) if field is not None: args["description"] = field + else: + args["description"] = None return DiscountCoupon(**args) @@ -203,7 +229,7 @@ def unmarshal_DiscountFilter(data: Any) -> DiscountFilter: args: Dict[str, Any] = {} - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -261,18 +287,26 @@ def unmarshal_Discount(data: Any) -> Discount: args["creation_date"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["creation_date"] = None field = data.get("start_date", None) if field is not None: args["start_date"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["start_date"] = None field = data.get("stop_date", None) if field is not None: args["stop_date"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["stop_date"] = None field = data.get("coupon", None) if field is not None: args["coupon"] = unmarshal_DiscountCoupon(field) + else: + args["coupon"] = None return Discount(**args) @@ -338,10 +372,14 @@ def unmarshal_ListTaxesResponseTax(data: Any) -> ListTaxesResponseTax: field = data.get("rate", None) if field is not None: args["rate"] = field + else: + args["rate"] = None field = data.get("total_tax_value", None) if field is not None: args["total_tax_value"] = field + else: + args["total_tax_value"] = None return ListTaxesResponseTax(**args) @@ -369,5 +407,7 @@ def unmarshal_ListTaxesResponse(data: Any) -> ListTaxesResponse: field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return ListTaxesResponse(**args) diff --git a/scaleway-async/scaleway_async/block/v1alpha1/marshalling.py b/scaleway-async/scaleway_async/block/v1alpha1/marshalling.py index 4381f821..b7f7e70b 100644 --- a/scaleway-async/scaleway_async/block/v1alpha1/marshalling.py +++ b/scaleway-async/scaleway_async/block/v1alpha1/marshalling.py @@ -51,7 +51,7 @@ def unmarshal_Reference(data: Any) -> Reference: if field is not None: args["product_resource_id"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -62,6 +62,8 @@ def unmarshal_Reference(data: Any) -> Reference: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None return Reference(**args) @@ -82,7 +84,7 @@ def unmarshal_SnapshotParentVolume(data: Any) -> SnapshotParentVolume: if field is not None: args["name"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -135,21 +137,27 @@ def unmarshal_Snapshot(data: Any) -> Snapshot: if field is not None: args["zone"] = field - field = data.get("class_", None) + field = data.get("class", None) if field is not None: args["class_"] = field field = data.get("parent_volume", None) if field is not None: args["parent_volume"] = unmarshal_SnapshotParentVolume(field) + else: + args["parent_volume"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return Snapshot(**args) @@ -162,13 +170,15 @@ def unmarshal_VolumeSpecifications(data: Any) -> VolumeSpecifications: args: Dict[str, Any] = {} - field = data.get("class_", None) + field = data.get("class", None) if field is not None: args["class_"] = field field = data.get("perf_iops", None) if field is not None: args["perf_iops"] = field + else: + args["perf_iops"] = None return VolumeSpecifications(**args) @@ -189,7 +199,7 @@ def unmarshal_Volume(data: Any) -> Volume: if field is not None: args["name"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -210,14 +220,20 @@ def unmarshal_Volume(data: Any) -> Volume: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("parent_snapshot_id", None) if field is not None: args["parent_snapshot_id"] = field + else: + args["parent_snapshot_id"] = None field = data.get("status", None) if field is not None: @@ -234,12 +250,16 @@ def unmarshal_Volume(data: Any) -> Volume: field = data.get("specs", None) if field is not None: args["specs"] = unmarshal_VolumeSpecifications(field) + else: + args["specs"] = None field = data.get("last_detached_at", None) if field is not None: args["last_detached_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["last_detached_at"] = None return Volume(**args) @@ -273,21 +293,27 @@ def unmarshal_VolumeType(data: Any) -> VolumeType: args: Dict[str, Any] = {} - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field field = data.get("pricing", None) if field is not None: args["pricing"] = unmarshal_Money(field) + else: + args["pricing"] = None field = data.get("snapshot_pricing", None) if field is not None: args["snapshot_pricing"] = unmarshal_Money(field) + else: + args["snapshot_pricing"] = None field = data.get("specs", None) if field is not None: args["specs"] = unmarshal_VolumeSpecifications(field) + else: + args["specs"] = None return VolumeType(**args) diff --git a/scaleway-async/scaleway_async/cockpit/v1/marshalling.py b/scaleway-async/scaleway_async/cockpit/v1/marshalling.py index 12bc2dd4..ac633628 100644 --- a/scaleway-async/scaleway_async/cockpit/v1/marshalling.py +++ b/scaleway-async/scaleway_async/cockpit/v1/marshalling.py @@ -74,6 +74,8 @@ def unmarshal_ContactPoint(data: Any) -> ContactPoint: field = data.get("email", None) if field is not None: args["email"] = unmarshal_ContactPointEmail(field) + else: + args["email"] = None return ContactPoint(**args) @@ -102,7 +104,7 @@ def unmarshal_DataSource(data: Any) -> DataSource: if field is not None: args["url"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -121,10 +123,14 @@ def unmarshal_DataSource(data: Any) -> DataSource: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return DataSource(**args) @@ -183,6 +189,8 @@ def unmarshal_GrafanaUser(data: Any) -> GrafanaUser: field = data.get("password", None) if field is not None: args["password"] = field + else: + args["password"] = None return GrafanaUser(**args) @@ -218,14 +226,20 @@ def unmarshal_Plan(data: Any) -> Plan: field = data.get("retention_metrics_interval", None) if field is not None: args["retention_metrics_interval"] = field + else: + args["retention_metrics_interval"] = None field = data.get("retention_logs_interval", None) if field is not None: args["retention_logs_interval"] = field + else: + args["retention_logs_interval"] = None field = data.get("retention_traces_interval", None) if field is not None: args["retention_traces_interval"] = field + else: + args["retention_traces_interval"] = None return Plan(**args) @@ -261,14 +275,20 @@ def unmarshal_Token(data: Any) -> Token: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("secret_key", None) if field is not None: args["secret_key"] = field + else: + args["secret_key"] = None return Token(**args) @@ -296,6 +316,8 @@ def unmarshal_AlertManager(data: Any) -> AlertManager: field = data.get("alert_manager_url", None) if field is not None: args["alert_manager_url"] = field + else: + args["alert_manager_url"] = None return AlertManager(**args) @@ -488,10 +510,14 @@ def unmarshal_Usage(data: Any) -> Usage: field = data.get("data_source_id", None) if field is not None: args["data_source_id"] = field + else: + args["data_source_id"] = None field = data.get("interval", None) if field is not None: args["interval"] = field + else: + args["interval"] = None return Usage(**args) @@ -507,22 +533,32 @@ def unmarshal_UsageOverview(data: Any) -> UsageOverview: field = data.get("scaleway_metrics_usage", None) if field is not None: args["scaleway_metrics_usage"] = unmarshal_Usage(field) + else: + args["scaleway_metrics_usage"] = None field = data.get("scaleway_logs_usage", None) if field is not None: args["scaleway_logs_usage"] = unmarshal_Usage(field) + else: + args["scaleway_logs_usage"] = None field = data.get("external_metrics_usage", None) if field is not None: args["external_metrics_usage"] = unmarshal_Usage(field) + else: + args["external_metrics_usage"] = None field = data.get("external_logs_usage", None) if field is not None: args["external_logs_usage"] = unmarshal_Usage(field) + else: + args["external_logs_usage"] = None field = data.get("external_traces_usage", None) if field is not None: args["external_traces_usage"] = unmarshal_Usage(field) + else: + args["external_traces_usage"] = None return UsageOverview(**args) diff --git a/scaleway-async/scaleway_async/cockpit/v1beta1/marshalling.py b/scaleway-async/scaleway_async/cockpit/v1beta1/marshalling.py index edf291af..47df80c4 100644 --- a/scaleway-async/scaleway_async/cockpit/v1beta1/marshalling.py +++ b/scaleway-async/scaleway_async/cockpit/v1beta1/marshalling.py @@ -73,6 +73,8 @@ def unmarshal_ContactPoint(data: Any) -> ContactPoint: field = data.get("email", None) if field is not None: args["email"] = unmarshal_ContactPointEmail(field) + else: + args["email"] = None return ContactPoint(**args) @@ -101,7 +103,7 @@ def unmarshal_Datasource(data: Any) -> Datasource: if field is not None: args["url"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -166,6 +168,8 @@ def unmarshal_GrafanaUser(data: Any) -> GrafanaUser: field = data.get("password", None) if field is not None: args["password"] = field + else: + args["password"] = None return GrafanaUser(**args) @@ -240,18 +244,26 @@ def unmarshal_Token(data: Any) -> Token: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("scopes", None) if field is not None: args["scopes"] = unmarshal_TokenScopes(field) + else: + args["scopes"] = None field = data.get("secret_key", None) if field is not None: args["secret_key"] = field + else: + args["secret_key"] = None return Token(**args) @@ -322,14 +334,20 @@ def unmarshal_Plan(data: Any) -> Plan: field = data.get("retention_metrics_interval", None) if field is not None: args["retention_metrics_interval"] = field + else: + args["retention_metrics_interval"] = None field = data.get("retention_logs_interval", None) if field is not None: args["retention_logs_interval"] = field + else: + args["retention_logs_interval"] = None field = data.get("retention_traces_interval", None) if field is not None: args["retention_traces_interval"] = field + else: + args["retention_traces_interval"] = None return Plan(**args) @@ -357,18 +375,26 @@ def unmarshal_Cockpit(data: Any) -> Cockpit: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("endpoints", None) if field is not None: args["endpoints"] = unmarshal_CockpitEndpoints(field) + else: + args["endpoints"] = None field = data.get("plan", None) if field is not None: args["plan"] = unmarshal_Plan(field) + else: + args["plan"] = None return Cockpit(**args) diff --git a/scaleway-async/scaleway_async/container/v1beta1/marshalling.py b/scaleway-async/scaleway_async/container/v1beta1/marshalling.py index 224844ea..98c072c3 100644 --- a/scaleway-async/scaleway_async/container/v1beta1/marshalling.py +++ b/scaleway-async/scaleway_async/container/v1beta1/marshalling.py @@ -122,14 +122,20 @@ def unmarshal_Container(data: Any) -> Container: field = data.get("timeout", None) if field is not None: args["timeout"] = field + else: + args["timeout"] = None field = data.get("error_message", None) if field is not None: args["error_message"] = field + else: + args["error_message"] = None field = data.get("description", None) if field is not None: args["description"] = field + else: + args["description"] = None field = data.get("domain_name", None) if field is not None: @@ -193,6 +199,8 @@ def unmarshal_Cron(data: Any) -> Cron: field = data.get("args", None) if field is not None: args["args"] = field + else: + args["args"] = None return Cron(**args) @@ -228,6 +236,8 @@ def unmarshal_Domain(data: Any) -> Domain: field = data.get("error_message", None) if field is not None: args["error_message"] = field + else: + args["error_message"] = None return Domain(**args) @@ -287,10 +297,14 @@ def unmarshal_Namespace(data: Any) -> Namespace: field = data.get("error_message", None) if field is not None: args["error_message"] = field + else: + args["error_message"] = None field = data.get("description", None) if field is not None: args["description"] = field + else: + args["description"] = None return Namespace(**args) @@ -318,22 +332,32 @@ def unmarshal_Token(data: Any) -> Token: field = data.get("container_id", None) if field is not None: args["container_id"] = field + else: + args["container_id"] = None field = data.get("namespace_id", None) if field is not None: args["namespace_id"] = field + else: + args["namespace_id"] = None field = data.get("public_key", None) if field is not None: args["public_key"] = field + else: + args["public_key"] = None field = data.get("description", None) if field is not None: args["description"] = field + else: + args["description"] = None field = data.get("expires_at", None) if field is not None: args["expires_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expires_at"] = None return Token(**args) @@ -365,6 +389,8 @@ def unmarshal_TriggerMnqNatsClientConfig(data: Any) -> TriggerMnqNatsClientConfi field = data.get("mnq_credential_id", None) if field is not None: args["mnq_credential_id"] = field + else: + args["mnq_credential_id"] = None return TriggerMnqNatsClientConfig(**args) @@ -392,6 +418,8 @@ def unmarshal_TriggerMnqSqsClientConfig(data: Any) -> TriggerMnqSqsClientConfig: field = data.get("mnq_credential_id", None) if field is not None: args["mnq_credential_id"] = field + else: + args["mnq_credential_id"] = None return TriggerMnqSqsClientConfig(**args) @@ -458,18 +486,26 @@ def unmarshal_Trigger(data: Any) -> Trigger: field = data.get("error_message", None) if field is not None: args["error_message"] = field + else: + args["error_message"] = None field = data.get("scw_sqs_config", None) if field is not None: args["scw_sqs_config"] = unmarshal_TriggerMnqSqsClientConfig(field) + else: + args["scw_sqs_config"] = None field = data.get("scw_nats_config", None) if field is not None: args["scw_nats_config"] = unmarshal_TriggerMnqNatsClientConfig(field) + else: + args["scw_nats_config"] = None field = data.get("sqs_config", None) if field is not None: args["sqs_config"] = unmarshal_TriggerSqsClientConfig(field) + else: + args["sqs_config"] = None return Trigger(**args) diff --git a/scaleway-async/scaleway_async/dedibox/v1/marshalling.py b/scaleway-async/scaleway_async/dedibox/v1/marshalling.py index 4452a9a7..8bdd9b9b 100644 --- a/scaleway-async/scaleway_async/dedibox/v1/marshalling.py +++ b/scaleway-async/scaleway_async/dedibox/v1/marshalling.py @@ -222,7 +222,7 @@ def unmarshal_Disk(data: Any) -> Disk: if field is not None: args["capacity"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -241,7 +241,7 @@ def unmarshal_Memory(data: Any) -> Memory: if field is not None: args["capacity"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -306,7 +306,7 @@ def unmarshal_OfferAntiDosInfo(data: Any) -> OfferAntiDosInfo: args: Dict[str, Any] = {} - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -354,6 +354,8 @@ def unmarshal_OfferFailoverBlockInfo(data: Any) -> OfferFailoverBlockInfo: field = data.get("onetime_fees", None) if field is not None: args["onetime_fees"] = unmarshal_Offer(field) + else: + args["onetime_fees"] = None return OfferFailoverBlockInfo(**args) @@ -369,6 +371,8 @@ def unmarshal_OfferFailoverIpInfo(data: Any) -> OfferFailoverIpInfo: field = data.get("onetime_fees", None) if field is not None: args["onetime_fees"] = unmarshal_Offer(field) + else: + args["onetime_fees"] = None return OfferFailoverIpInfo(**args) @@ -497,10 +501,14 @@ def unmarshal_OfferServerInfo(data: Any) -> OfferServerInfo: field = data.get("rpn_version", None) if field is not None: args["rpn_version"] = field + else: + args["rpn_version"] = None field = data.get("onetime_fees", None) if field is not None: args["onetime_fees"] = unmarshal_Offer(field) + else: + args["onetime_fees"] = None return OfferServerInfo(**args) @@ -608,54 +616,80 @@ def unmarshal_Offer(data: Any) -> Offer: field = data.get("pricing", None) if field is not None: args["pricing"] = unmarshal_Money(field) + else: + args["pricing"] = None field = data.get("server_info", None) if field is not None: args["server_info"] = unmarshal_OfferServerInfo(field) + else: + args["server_info"] = None field = data.get("service_level_info", None) if field is not None: args["service_level_info"] = unmarshal_OfferServiceLevelInfo(field) + else: + args["service_level_info"] = None field = data.get("rpn_info", None) if field is not None: args["rpn_info"] = unmarshal_OfferRPNInfo(field) + else: + args["rpn_info"] = None field = data.get("san_info", None) if field is not None: args["san_info"] = unmarshal_OfferSANInfo(field) + else: + args["san_info"] = None field = data.get("antidos_info", None) if field is not None: args["antidos_info"] = unmarshal_OfferAntiDosInfo(field) + else: + args["antidos_info"] = None field = data.get("backup_info", None) if field is not None: args["backup_info"] = unmarshal_OfferBackupInfo(field) + else: + args["backup_info"] = None field = data.get("usb_storage_info", None) if field is not None: args["usb_storage_info"] = unmarshal_OfferStorageInfo(field) + else: + args["usb_storage_info"] = None field = data.get("storage_info", None) if field is not None: args["storage_info"] = unmarshal_OfferStorageInfo(field) + else: + args["storage_info"] = None field = data.get("license_info", None) if field is not None: args["license_info"] = unmarshal_OfferLicenseInfo(field) + else: + args["license_info"] = None field = data.get("failover_ip_info", None) if field is not None: args["failover_ip_info"] = unmarshal_OfferFailoverIpInfo(field) + else: + args["failover_ip_info"] = None field = data.get("failover_block_info", None) if field is not None: args["failover_block_info"] = unmarshal_OfferFailoverBlockInfo(field) + else: + args["failover_block_info"] = None field = data.get("bandwidth_info", None) if field is not None: args["bandwidth_info"] = unmarshal_OfferBandwidthInfo(field) + else: + args["bandwidth_info"] = None return Offer(**args) @@ -676,7 +710,7 @@ def unmarshal_OS(data: Any) -> OS: if field is not None: args["name"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -739,24 +773,34 @@ def unmarshal_OS(data: Any) -> OS: field = data.get("max_partitions", None) if field is not None: args["max_partitions"] = field + else: + args["max_partitions"] = None field = data.get("panel_password_regex", None) if field is not None: args["panel_password_regex"] = field + else: + args["panel_password_regex"] = None field = data.get("requires_valid_hostname", None) if field is not None: args["requires_valid_hostname"] = field + else: + args["requires_valid_hostname"] = None field = data.get("hostname_regex", None) if field is not None: args["hostname_regex"] = field + else: + args["hostname_regex"] = None field = data.get("released_at", None) if field is not None: args["released_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["released_at"] = None return OS(**args) @@ -800,6 +844,8 @@ def unmarshal_RpnSan(data: Any) -> RpnSan: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("offer_name", None) if field is not None: @@ -828,22 +874,30 @@ def unmarshal_RpnSan(data: Any) -> RpnSan: field = data.get("offer", None) if field is not None: args["offer"] = unmarshal_Offer(field) + else: + args["offer"] = None field = data.get("delivered_at", None) if field is not None: args["delivered_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["delivered_at"] = None field = data.get("terminated_at", None) if field is not None: args["terminated_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["terminated_at"] = None field = data.get("expires_at", None) if field is not None: args["expires_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expires_at"] = None return RpnSan(**args) @@ -864,7 +918,7 @@ def unmarshal_RpnGroup(data: Any) -> RpnGroup: if field is not None: args["name"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -891,6 +945,8 @@ def unmarshal_RpnGroup(data: Any) -> RpnGroup: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None return RpnGroup(**args) @@ -915,7 +971,7 @@ def unmarshal_NetworkInterface(data: Any) -> NetworkInterface: if field is not None: args["mac"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -966,18 +1022,26 @@ def unmarshal_ServerOption(data: Any) -> ServerOption: field = data.get("offer", None) if field is not None: args["offer"] = unmarshal_Offer(field) + else: + args["offer"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("expired_at", None) if field is not None: args["expired_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expired_at"] = None return ServerOption(**args) @@ -1030,6 +1094,8 @@ def unmarshal_Server(data: Any) -> Server: args["rebooted_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["rebooted_at"] = None field = data.get("status", None) if field is not None: @@ -1084,34 +1150,50 @@ def unmarshal_Server(data: Any) -> Server: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("expired_at", None) if field is not None: args["expired_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expired_at"] = None field = data.get("offer", None) if field is not None: args["offer"] = unmarshal_Offer(field) + else: + args["offer"] = None field = data.get("location", None) if field is not None: args["location"] = unmarshal_ServerLocation(field) + else: + args["location"] = None field = data.get("os", None) if field is not None: args["os"] = unmarshal_OS(field) + else: + args["os"] = None field = data.get("level", None) if field is not None: args["level"] = unmarshal_ServiceLevel(field) + else: + args["level"] = None field = data.get("rescue_os", None) if field is not None: args["rescue_os"] = unmarshal_OS(field) + else: + args["rescue_os"] = None return Server(**args) @@ -1163,7 +1245,7 @@ def unmarshal_RpnV2Group(data: Any) -> RpnV2Group: if field is not None: args["project_id"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -1186,10 +1268,14 @@ def unmarshal_RpnV2Group(data: Any) -> RpnV2Group: field = data.get("subnet", None) if field is not None: args["subnet"] = unmarshal_RpnV2GroupSubnet(field) + else: + args["subnet"] = None field = data.get("rpnv1_group", None) if field is not None: args["rpnv1_group"] = unmarshal_RpnGroup(field) + else: + args["rpnv1_group"] = None return RpnV2Group(**args) @@ -1210,37 +1296,49 @@ def unmarshal_Service(data: Any) -> Service: if field is not None: args["provisioning_status"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field field = data.get("resource_id", None) if field is not None: args["resource_id"] = field + else: + args["resource_id"] = None field = data.get("offer", None) if field is not None: args["offer"] = unmarshal_Offer(field) + else: + args["offer"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("delivered_at", None) if field is not None: args["delivered_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["delivered_at"] = None field = data.get("terminated_at", None) if field is not None: args["terminated_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["terminated_at"] = None field = data.get("expires_at", None) if field is not None: args["expires_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expires_at"] = None return Service(**args) @@ -1324,25 +1422,33 @@ def unmarshal_FailoverIP(data: Any) -> FailoverIP: if field is not None: args["status"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field field = data.get("mac", None) if field is not None: args["mac"] = field + else: + args["mac"] = None field = data.get("server_id", None) if field is not None: args["server_id"] = field + else: + args["server_id"] = None field = data.get("block", None) if field is not None: args["block"] = unmarshal_FailoverBlock(field) + else: + args["block"] = None field = data.get("server_zone", None) if field is not None: args["server_zone"] = field + else: + args["server_zone"] = None return FailoverIP(**args) @@ -1374,6 +1480,8 @@ def unmarshal_BMCAccess(data: Any) -> BMCAccess: field = data.get("expires_at", None) if field is not None: args["expires_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expires_at"] = None return BMCAccess(**args) @@ -1468,6 +1576,8 @@ def unmarshal_CanOrderResponse(data: Any) -> CanOrderResponse: field = data.get("message", None) if field is not None: args["message"] = field + else: + args["message"] = None return CanOrderResponse(**args) @@ -1579,6 +1689,8 @@ def unmarshal_GetRpnStatusResponse(data: Any) -> GetRpnStatusResponse: field = data.get("operations_left", None) if field is not None: args["operations_left"] = field + else: + args["operations_left"] = None return GetRpnStatusResponse(**args) @@ -1655,18 +1767,26 @@ def unmarshal_Invoice(data: Any) -> Invoice: field = data.get("total_with_taxes", None) if field is not None: args["total_with_taxes"] = unmarshal_Money(field) + else: + args["total_with_taxes"] = None field = data.get("total_without_taxes", None) if field is not None: args["total_without_taxes"] = unmarshal_Money(field) + else: + args["total_without_taxes"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("paid_at", None) if field is not None: args["paid_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["paid_at"] = None return Invoice(**args) @@ -1765,18 +1885,26 @@ def unmarshal_InvoiceSummary(data: Any) -> InvoiceSummary: field = data.get("total_with_taxes", None) if field is not None: args["total_with_taxes"] = unmarshal_Money(field) + else: + args["total_with_taxes"] = None field = data.get("total_without_taxes", None) if field is not None: args["total_without_taxes"] = unmarshal_Money(field) + else: + args["total_without_taxes"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("paid_at", None) if field is not None: args["paid_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["paid_at"] = None return InvoiceSummary(**args) @@ -1852,21 +1980,27 @@ def unmarshal_RpnSanIp(data: Any) -> RpnSanIp: args: Dict[str, Any] = {} - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field field = data.get("server", None) if field is not None: args["server"] = unmarshal_RpnSanIpServer(field) + else: + args["server"] = None field = data.get("rpnv2_group", None) if field is not None: args["rpnv2_group"] = unmarshal_RpnSanIpRpnV2Group(field) + else: + args["rpnv2_group"] = None field = data.get("ip", None) if field is not None: args["ip"] = unmarshal_IP(field) + else: + args["ip"] = None return RpnSanIp(**args) @@ -1955,20 +2089,28 @@ def unmarshal_RefundSummary(data: Any) -> RefundSummary: field = data.get("total_with_taxes", None) if field is not None: args["total_with_taxes"] = unmarshal_Money(field) + else: + args["total_with_taxes"] = None field = data.get("total_without_taxes", None) if field is not None: args["total_without_taxes"] = unmarshal_Money(field) + else: + args["total_without_taxes"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("refunded_at", None) if field is not None: args["refunded_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["refunded_at"] = None return RefundSummary(**args) @@ -2106,14 +2248,20 @@ def unmarshal_RpnGroupMember(data: Any) -> RpnGroupMember: field = data.get("san_server", None) if field is not None: args["san_server"] = unmarshal_RpnSanServer(field) + else: + args["san_server"] = None field = data.get("server", None) if field is not None: args["server"] = unmarshal_Server(field) + else: + args["server"] = None field = data.get("speed", None) if field is not None: args["speed"] = field + else: + args["speed"] = None return RpnGroupMember(**args) @@ -2220,6 +2368,8 @@ def unmarshal_RpnSanSummary(data: Any) -> RpnSanSummary: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("offer_name", None) if field is not None: @@ -2246,16 +2396,22 @@ def unmarshal_RpnSanSummary(data: Any) -> RpnSanSummary: args["delivered_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["delivered_at"] = None field = data.get("terminated_at", None) if field is not None: args["terminated_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["terminated_at"] = None field = data.get("expires_at", None) if field is not None: args["expires_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expires_at"] = None return RpnSanSummary(**args) @@ -2328,10 +2484,14 @@ def unmarshal_RpnServerCapability(data: Any) -> RpnServerCapability: field = data.get("ip_address", None) if field is not None: args["ip_address"] = field + else: + args["ip_address"] = None field = data.get("rpn_version", None) if field is not None: args["rpn_version"] = field + else: + args["rpn_version"] = None return RpnServerCapability(**args) @@ -2407,14 +2567,20 @@ def unmarshal_RpnV2Member(data: Any) -> RpnV2Member: field = data.get("server", None) if field is not None: args["server"] = unmarshal_Server(field) + else: + args["server"] = None field = data.get("rpnv1_group", None) if field is not None: args["rpnv1_group"] = unmarshal_RpnGroup(field) + else: + args["rpnv1_group"] = None field = data.get("speed", None) if field is not None: args["speed"] = field + else: + args["speed"] = None return RpnV2Member(**args) @@ -2442,20 +2608,28 @@ def unmarshal_Log(data: Any) -> Log: field = data.get("group", None) if field is not None: args["group"] = unmarshal_RpnV2Group(field) + else: + args["group"] = None field = data.get("member", None) if field is not None: args["member"] = unmarshal_RpnV2Member(field) + else: + args["member"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("finished_at", None) if field is not None: args["finished_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["finished_at"] = None return Log(**args) @@ -2537,7 +2711,7 @@ def unmarshal_ServerDisk(data: Any) -> ServerDisk: if field is not None: args["connector"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -2592,6 +2766,8 @@ def unmarshal_ServerEvent(data: Any) -> ServerEvent: field = data.get("date", None) if field is not None: args["date"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["date"] = None return ServerEvent(**args) @@ -2648,14 +2824,20 @@ def unmarshal_ServerSummary(data: Any) -> ServerSummary: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("expired_at", None) if field is not None: args["expired_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expired_at"] = None field = data.get("offer_id", None) if field is not None: @@ -2692,14 +2874,20 @@ def unmarshal_ServerSummary(data: Any) -> ServerSummary: field = data.get("os_id", None) if field is not None: args["os_id"] = field + else: + args["os_id"] = None field = data.get("level", None) if field is not None: args["level"] = unmarshal_ServiceLevel(field) + else: + args["level"] = None field = data.get("rpn_version", None) if field is not None: args["rpn_version"] = field + else: + args["rpn_version"] = None return ServerSummary(**args) @@ -2834,20 +3022,28 @@ def unmarshal_Refund(data: Any) -> Refund: field = data.get("total_with_taxes", None) if field is not None: args["total_with_taxes"] = unmarshal_Money(field) + else: + args["total_with_taxes"] = None field = data.get("total_without_taxes", None) if field is not None: args["total_without_taxes"] = unmarshal_Money(field) + else: + args["total_without_taxes"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("refunded_at", None) if field is not None: args["refunded_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["refunded_at"] = None return Refund(**args) @@ -2887,7 +3083,7 @@ def unmarshal_Partition(data: Any) -> Partition: args: Dict[str, Any] = {} - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -2910,6 +3106,8 @@ def unmarshal_Partition(data: Any) -> Partition: field = data.get("mount_point", None) if field is not None: args["mount_point"] = field + else: + args["mount_point"] = None return Partition(**args) @@ -2964,10 +3162,14 @@ def unmarshal_ServerInstall(data: Any) -> ServerInstall: field = data.get("user_login", None) if field is not None: args["user_login"] = field + else: + args["user_login"] = None field = data.get("panel_url", None) if field is not None: args["panel_url"] = field + else: + args["panel_url"] = None return ServerInstall(**args) diff --git a/scaleway-async/scaleway_async/document_db/v1beta1/marshalling.py b/scaleway-async/scaleway_async/document_db/v1beta1/marshalling.py index 8efeb6af..b4b876ca 100644 --- a/scaleway-async/scaleway_async/document_db/v1beta1/marshalling.py +++ b/scaleway-async/scaleway_async/document_db/v1beta1/marshalling.py @@ -155,26 +155,38 @@ def unmarshal_Endpoint(data: Any) -> Endpoint: field = data.get("ip", None) if field is not None: args["ip"] = field + else: + args["ip"] = None field = data.get("name", None) if field is not None: args["name"] = field + else: + args["name"] = None field = data.get("private_network", None) if field is not None: args["private_network"] = unmarshal_EndpointPrivateNetworkDetails(field) + else: + args["private_network"] = None field = data.get("load_balancer", None) if field is not None: args["load_balancer"] = unmarshal_EndpointLoadBalancerDetails(field) + else: + args["load_balancer"] = None field = data.get("direct_access", None) if field is not None: args["direct_access"] = unmarshal_EndpointDirectAccessDetails(field) + else: + args["direct_access"] = None field = data.get("hostname", None) if field is not None: args["hostname"] = field + else: + args["hostname"] = None return Endpoint(**args) @@ -198,18 +210,26 @@ def unmarshal_Maintenance(data: Any) -> Maintenance: field = data.get("starts_at", None) if field is not None: args["starts_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["starts_at"] = None field = data.get("stops_at", None) if field is not None: args["stops_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["stops_at"] = None field = data.get("closed_at", None) if field is not None: args["closed_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["closed_at"] = None field = data.get("forced_at", None) if field is not None: args["forced_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["forced_at"] = None return Maintenance(**args) @@ -301,14 +321,20 @@ def unmarshal_InstanceLog(data: Any) -> InstanceLog: field = data.get("download_url", None) if field is not None: args["download_url"] = field + else: + args["download_url"] = None field = data.get("expires_at", None) if field is not None: args["expires_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expires_at"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None return InstanceLog(**args) @@ -338,6 +364,8 @@ def unmarshal_BackupSchedule(data: Any) -> BackupSchedule: args["next_run_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["next_run_at"] = None return BackupSchedule(**args) @@ -372,10 +400,14 @@ def unmarshal_LogsPolicy(data: Any) -> LogsPolicy: field = data.get("max_age_retention", None) if field is not None: args["max_age_retention"] = field + else: + args["max_age_retention"] = None field = data.get("total_disk_retention", None) if field is not None: args["total_disk_retention"] = field + else: + args["total_disk_retention"] = None return LogsPolicy(**args) @@ -415,7 +447,7 @@ def unmarshal_Volume(data: Any) -> Volume: args: Dict[str, Any] = {} - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -423,7 +455,7 @@ def unmarshal_Volume(data: Any) -> Volume: if field is not None: args["size"] = field - field = data.get("class_", None) + field = data.get("class", None) if field is not None: args["class_"] = field @@ -457,10 +489,14 @@ def unmarshal_Instance(data: Any) -> Instance: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("volume", None) if field is not None: args["volume"] = unmarshal_Volume(field) + else: + args["volume"] = None field = data.get("project_id", None) if field is not None: @@ -499,10 +535,14 @@ def unmarshal_Instance(data: Any) -> Instance: field = data.get("endpoint", None) if field is not None: args["endpoint"] = unmarshal_Endpoint(field) + else: + args["endpoint"] = None field = data.get("backup_schedule", None) if field is not None: args["backup_schedule"] = unmarshal_BackupSchedule(field) + else: + args["backup_schedule"] = None field = data.get("read_replicas", None) if field is not None: @@ -539,6 +579,8 @@ def unmarshal_Instance(data: Any) -> Instance: field = data.get("logs_policy", None) if field is not None: args["logs_policy"] = unmarshal_LogsPolicy(field) + else: + args["logs_policy"] = None return Instance(**args) @@ -574,11 +616,11 @@ def unmarshal_SnapshotVolumeType(data: Any) -> SnapshotVolumeType: args: Dict[str, Any] = {} - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field - field = data.get("class_", None) + field = data.get("class", None) if field is not None: args["class_"] = field @@ -624,22 +666,32 @@ def unmarshal_Snapshot(data: Any) -> Snapshot: field = data.get("size", None) if field is not None: args["size"] = field + else: + args["size"] = None field = data.get("expires_at", None) if field is not None: args["expires_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expires_at"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("volume_type", None) if field is not None: args["volume_type"] = unmarshal_SnapshotVolumeType(field) + else: + args["volume_type"] = None return Snapshot(**args) @@ -694,6 +746,8 @@ def unmarshal_ACLRule(data: Any) -> ACLRule: field = data.get("port", None) if field is not None: args["port"] = field + else: + args["port"] = None return ACLRule(**args) @@ -818,26 +872,38 @@ def unmarshal_EngineSetting(data: Any) -> EngineSetting: field = data.get("unit", None) if field is not None: args["unit"] = field + else: + args["unit"] = None field = data.get("string_constraint", None) if field is not None: args["string_constraint"] = field + else: + args["string_constraint"] = None field = data.get("int_min", None) if field is not None: args["int_min"] = field + else: + args["int_min"] = None field = data.get("int_max", None) if field is not None: args["int_max"] = field + else: + args["int_max"] = None field = data.get("float_min", None) if field is not None: args["float_min"] = field + else: + args["float_min"] = None field = data.get("float_max", None) if field is not None: args["float_max"] = field + else: + args["float_max"] = None return EngineSetting(**args) @@ -883,6 +949,8 @@ def unmarshal_EngineVersion(data: Any) -> EngineVersion: args["end_of_life"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["end_of_life"] = None return EngineVersion(**args) @@ -1089,7 +1157,7 @@ def unmarshal_NodeTypeVolumeType(data: Any) -> NodeTypeVolumeType: args: Dict[str, Any] = {} - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -1109,7 +1177,7 @@ def unmarshal_NodeTypeVolumeType(data: Any) -> NodeTypeVolumeType: if field is not None: args["chunk_size"] = field - field = data.get("class_", None) + field = data.get("class", None) if field is not None: args["class_"] = field @@ -1155,10 +1223,14 @@ def unmarshal_NodeType(data: Any) -> NodeType: field = data.get("volume_constraint", None) if field is not None: args["volume_constraint"] = unmarshal_NodeTypeVolumeConstraintSizes(field) + else: + args["volume_constraint"] = None field = data.get("is_bssd_compatible", None) if field is not None: args["is_bssd_compatible"] = field + else: + args["is_bssd_compatible"] = None field = data.get("available_volume_types", None) if field is not None: diff --git a/scaleway-async/scaleway_async/domain/v2beta1/marshalling.py b/scaleway-async/scaleway_async/domain/v2beta1/marshalling.py index c198aad5..fdeab0c3 100644 --- a/scaleway-async/scaleway_async/domain/v2beta1/marshalling.py +++ b/scaleway-async/scaleway_async/domain/v2beta1/marshalling.py @@ -137,6 +137,8 @@ def unmarshal_ContactExtensionFRAssociationInfo( args["publication_jo"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["publication_jo"] = None return ContactExtensionFRAssociationInfo(**args) @@ -241,24 +243,34 @@ def unmarshal_ContactExtensionFR(data: Any) -> ContactExtensionFR: field = data.get("individual_info", None) if field is not None: args["individual_info"] = unmarshal_ContactExtensionFRIndividualInfo(field) + else: + args["individual_info"] = None field = data.get("duns_info", None) if field is not None: args["duns_info"] = unmarshal_ContactExtensionFRDunsInfo(field) + else: + args["duns_info"] = None field = data.get("association_info", None) if field is not None: args["association_info"] = unmarshal_ContactExtensionFRAssociationInfo(field) + else: + args["association_info"] = None field = data.get("trademark_info", None) if field is not None: args["trademark_info"] = unmarshal_ContactExtensionFRTrademarkInfo(field) + else: + args["trademark_info"] = None field = data.get("code_auth_afnic_info", None) if field is not None: args["code_auth_afnic_info"] = unmarshal_ContactExtensionFRCodeAuthAfnicInfo( field ) + else: + args["code_auth_afnic_info"] = None return ContactExtensionFR(**args) @@ -390,14 +402,20 @@ def unmarshal_Contact(data: Any) -> Contact: args["questions"] = ( [unmarshal_ContactQuestion(v) for v in field] if field is not None else None ) + else: + args["questions"] = None field = data.get("extension_fr", None) if field is not None: args["extension_fr"] = unmarshal_ContactExtensionFR(field) + else: + args["extension_fr"] = None field = data.get("extension_eu", None) if field is not None: args["extension_eu"] = unmarshal_ContactExtensionEU(field) + else: + args["extension_eu"] = None field = data.get("email_status", None) if field is not None: @@ -414,6 +432,8 @@ def unmarshal_Contact(data: Any) -> Contact: field = data.get("extension_nl", None) if field is not None: args["extension_nl"] = unmarshal_ContactExtensionNL(field) + else: + args["extension_nl"] = None return Contact(**args) @@ -463,10 +483,14 @@ def unmarshal_DNSZone(data: Any) -> DNSZone: field = data.get("message", None) if field is not None: args["message"] = field + else: + args["message"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return DNSZone(**args) @@ -529,10 +553,14 @@ def unmarshal_SSLCertificate(data: Any) -> SSLCertificate: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("expired_at", None) if field is not None: args["expired_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expired_at"] = None return SSLCertificate(**args) @@ -554,6 +582,8 @@ def unmarshal_CheckContactsCompatibilityResponseContactCheckResult( field = data.get("error_message", None) if field is not None: args["error_message"] = field + else: + args["error_message"] = None return CheckContactsCompatibilityResponseContactCheckResult(**args) @@ -577,18 +607,24 @@ def unmarshal_CheckContactsCompatibilityResponse( args["owner_check_result"] = ( unmarshal_CheckContactsCompatibilityResponseContactCheckResult(field) ) + else: + args["owner_check_result"] = None field = data.get("administrative_check_result", None) if field is not None: args["administrative_check_result"] = ( unmarshal_CheckContactsCompatibilityResponseContactCheckResult(field) ) + else: + args["administrative_check_result"] = None field = data.get("technical_check_result", None) if field is not None: args["technical_check_result"] = ( unmarshal_CheckContactsCompatibilityResponseContactCheckResult(field) ) + else: + args["technical_check_result"] = None return CheckContactsCompatibilityResponse(**args) @@ -660,7 +696,7 @@ def unmarshal_DSRecordDigest(data: Any) -> DSRecordDigest: args: Dict[str, Any] = {} - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -671,6 +707,8 @@ def unmarshal_DSRecordDigest(data: Any) -> DSRecordDigest: field = data.get("public_key", None) if field is not None: args["public_key"] = unmarshal_DSRecordPublicKey(field) + else: + args["public_key"] = None return DSRecordDigest(**args) @@ -694,10 +732,14 @@ def unmarshal_DSRecord(data: Any) -> DSRecord: field = data.get("digest", None) if field is not None: args["digest"] = unmarshal_DSRecordDigest(field) + else: + args["digest"] = None field = data.get("public_key", None) if field is not None: args["public_key"] = unmarshal_DSRecordPublicKey(field) + else: + args["public_key"] = None return DSRecord(**args) @@ -721,6 +763,8 @@ def unmarshal_TldOffer(data: Any) -> TldOffer: field = data.get("price", None) if field is not None: args["price"] = unmarshal_Money(field) + else: + args["price"] = None return TldOffer(**args) @@ -870,14 +914,20 @@ def unmarshal_Domain(data: Any) -> Domain: field = data.get("dnssec", None) if field is not None: args["dnssec"] = unmarshal_DomainDNSSEC(field) + else: + args["dnssec"] = None field = data.get("expired_at", None) if field is not None: args["expired_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expired_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("status", None) if field is not None: @@ -902,30 +952,42 @@ def unmarshal_Domain(data: Any) -> Domain: field = data.get("owner_contact", None) if field is not None: args["owner_contact"] = unmarshal_Contact(field) + else: + args["owner_contact"] = None field = data.get("technical_contact", None) if field is not None: args["technical_contact"] = unmarshal_Contact(field) + else: + args["technical_contact"] = None field = data.get("administrative_contact", None) if field is not None: args["administrative_contact"] = unmarshal_Contact(field) + else: + args["administrative_contact"] = None field = data.get("external_domain_registration_status", None) if field is not None: args["external_domain_registration_status"] = ( unmarshal_DomainRegistrationStatusExternalDomain(field) ) + else: + args["external_domain_registration_status"] = None field = data.get("transfer_registration_status", None) if field is not None: args["transfer_registration_status"] = ( unmarshal_DomainRegistrationStatusTransfer(field) ) + else: + args["transfer_registration_status"] = None field = data.get("tld", None) if field is not None: args["tld"] = unmarshal_Tld(field) + else: + args["tld"] = None return Domain(**args) @@ -1062,10 +1124,14 @@ def unmarshal_RecordHTTPServiceConfig(data: Any) -> RecordHTTPServiceConfig: field = data.get("must_contain", None) if field is not None: args["must_contain"] = field + else: + args["must_contain"] = None field = data.get("user_agent", None) if field is not None: args["user_agent"] = field + else: + args["user_agent"] = None return RecordHTTPServiceConfig(**args) @@ -1132,7 +1198,7 @@ def unmarshal_Record(data: Any) -> Record: if field is not None: args["ttl"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -1143,22 +1209,32 @@ def unmarshal_Record(data: Any) -> Record: field = data.get("comment", None) if field is not None: args["comment"] = field + else: + args["comment"] = None field = data.get("geo_ip_config", None) if field is not None: args["geo_ip_config"] = unmarshal_RecordGeoIPConfig(field) + else: + args["geo_ip_config"] = None field = data.get("http_service_config", None) if field is not None: args["http_service_config"] = unmarshal_RecordHTTPServiceConfig(field) + else: + args["http_service_config"] = None field = data.get("weighted_config", None) if field is not None: args["weighted_config"] = unmarshal_RecordWeightedConfig(field) + else: + args["weighted_config"] = None field = data.get("view_config", None) if field is not None: args["view_config"] = unmarshal_RecordViewConfig(field) + else: + args["view_config"] = None return Record(**args) @@ -1175,17 +1251,21 @@ def unmarshal_RecordIdentifier(data: Any) -> RecordIdentifier: if field is not None: args["name"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field field = data.get("data", None) if field is not None: args["data"] = field + else: + args["data"] = None field = data.get("ttl", None) if field is not None: args["ttl"] = field + else: + args["ttl"] = None return RecordIdentifier(**args) @@ -1229,10 +1309,14 @@ def unmarshal_RecordChangeDelete(data: Any) -> RecordChangeDelete: field = data.get("id", None) if field is not None: args["id"] = field + else: + args["id"] = None field = data.get("id_fields", None) if field is not None: args["id_fields"] = unmarshal_RecordIdentifier(field) + else: + args["id_fields"] = None return RecordChangeDelete(**args) @@ -1254,10 +1338,14 @@ def unmarshal_RecordChangeSet(data: Any) -> RecordChangeSet: field = data.get("id", None) if field is not None: args["id"] = field + else: + args["id"] = None field = data.get("id_fields", None) if field is not None: args["id_fields"] = unmarshal_RecordIdentifier(field) + else: + args["id_fields"] = None return RecordChangeSet(**args) @@ -1273,18 +1361,26 @@ def unmarshal_RecordChange(data: Any) -> RecordChange: field = data.get("add", None) if field is not None: args["add"] = unmarshal_RecordChangeAdd(field) + else: + args["add"] = None - field = data.get("set_", None) + field = data.get("set", None) if field is not None: args["set_"] = unmarshal_RecordChangeSet(field) + else: + args["set_"] = None field = data.get("delete", None) if field is not None: args["delete"] = unmarshal_RecordChangeDelete(field) + else: + args["delete"] = None field = data.get("clear", None) if field is not None: args["clear"] = unmarshal_RecordChangeClear(field) + else: + args["clear"] = None return RecordChange(**args) @@ -1397,6 +1493,8 @@ def unmarshal_ContactRoles(data: Any) -> ContactRoles: field = data.get("contact", None) if field is not None: args["contact"] = unmarshal_Contact(field) + else: + args["contact"] = None return ContactRoles(**args) @@ -1519,6 +1617,8 @@ def unmarshal_DNSZoneVersion(data: Any) -> DNSZoneVersion: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None return DNSZoneVersion(**args) @@ -1625,10 +1725,14 @@ def unmarshal_DomainSummary(data: Any) -> DomainSummary: field = data.get("expired_at", None) if field is not None: args["expired_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expired_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("status", None) if field is not None: @@ -1647,16 +1751,22 @@ def unmarshal_DomainSummary(data: Any) -> DomainSummary: args["external_domain_registration_status"] = ( unmarshal_DomainRegistrationStatusExternalDomain(field) ) + else: + args["external_domain_registration_status"] = None field = data.get("transfer_registration_status", None) if field is not None: args["transfer_registration_status"] = ( unmarshal_DomainRegistrationStatusTransfer(field) ) + else: + args["transfer_registration_status"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None return DomainSummary(**args) @@ -1709,32 +1819,44 @@ def unmarshal_RenewableDomain(data: Any) -> RenewableDomain: field = data.get("renewable_duration_in_years", None) if field is not None: args["renewable_duration_in_years"] = field + else: + args["renewable_duration_in_years"] = None field = data.get("expired_at", None) if field is not None: args["expired_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expired_at"] = None field = data.get("limit_renew_at", None) if field is not None: args["limit_renew_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["limit_renew_at"] = None field = data.get("limit_redemption_at", None) if field is not None: args["limit_redemption_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["limit_redemption_at"] = None field = data.get("estimated_delete_at", None) if field is not None: args["estimated_delete_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["estimated_delete_at"] = None field = data.get("tld", None) if field is not None: args["tld"] = unmarshal_Tld(field) + else: + args["tld"] = None return RenewableDomain(**args) @@ -1801,7 +1923,7 @@ def unmarshal_Task(data: Any) -> Task: if field is not None: args["organization_id"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -1812,22 +1934,32 @@ def unmarshal_Task(data: Any) -> Task: field = data.get("domain", None) if field is not None: args["domain"] = field + else: + args["domain"] = None field = data.get("started_at", None) if field is not None: args["started_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["started_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("message", None) if field is not None: args["message"] = field + else: + args["message"] = None field = data.get("contact_identifier", None) if field is not None: args["contact_identifier"] = field + else: + args["contact_identifier"] = None return Task(**args) @@ -1899,6 +2031,8 @@ def unmarshal_OrderResponse(data: Any) -> OrderResponse: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None return OrderResponse(**args) @@ -1949,6 +2083,8 @@ def unmarshal_RegisterExternalDomainResponse( field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None return RegisterExternalDomainResponse(**args) @@ -1983,6 +2119,8 @@ def unmarshal_AvailableDomain(data: Any) -> AvailableDomain: field = data.get("tld", None) if field is not None: args["tld"] = unmarshal_Tld(field) + else: + args["tld"] = None return AvailableDomain(**args) diff --git a/scaleway-async/scaleway_async/flexibleip/v1alpha1/marshalling.py b/scaleway-async/scaleway_async/flexibleip/v1alpha1/marshalling.py index 5f44ed7d..6f754d00 100644 --- a/scaleway-async/scaleway_async/flexibleip/v1alpha1/marshalling.py +++ b/scaleway-async/scaleway_async/flexibleip/v1alpha1/marshalling.py @@ -52,10 +52,14 @@ def unmarshal_MACAddress(data: Any) -> MACAddress: field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None return MACAddress(**args) @@ -99,6 +103,8 @@ def unmarshal_FlexibleIP(data: Any) -> FlexibleIP: field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("reverse", None) if field is not None: @@ -111,14 +117,20 @@ def unmarshal_FlexibleIP(data: Any) -> FlexibleIP: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("mac_address", None) if field is not None: args["mac_address"] = unmarshal_MACAddress(field) + else: + args["mac_address"] = None field = data.get("server_id", None) if field is not None: args["server_id"] = field + else: + args["server_id"] = None return FlexibleIP(**args) diff --git a/scaleway-async/scaleway_async/function/v1beta1/marshalling.py b/scaleway-async/scaleway_async/function/v1beta1/marshalling.py index 34ff2d4d..23c4b6ef 100644 --- a/scaleway-async/scaleway_async/function/v1beta1/marshalling.py +++ b/scaleway-async/scaleway_async/function/v1beta1/marshalling.py @@ -79,6 +79,8 @@ def unmarshal_Cron(data: Any) -> Cron: field = data.get("args", None) if field is not None: args["args"] = field + else: + args["args"] = None return Cron(**args) @@ -114,6 +116,8 @@ def unmarshal_Domain(data: Any) -> Domain: field = data.get("error_message", None) if field is not None: args["error_message"] = field + else: + args["error_message"] = None return Domain(**args) @@ -220,18 +224,26 @@ def unmarshal_Function(data: Any) -> Function: field = data.get("timeout", None) if field is not None: args["timeout"] = field + else: + args["timeout"] = None field = data.get("error_message", None) if field is not None: args["error_message"] = field + else: + args["error_message"] = None field = data.get("build_message", None) if field is not None: args["build_message"] = field + else: + args["build_message"] = None field = data.get("description", None) if field is not None: args["description"] = field + else: + args["description"] = None return Function(**args) @@ -291,10 +303,14 @@ def unmarshal_Namespace(data: Any) -> Namespace: field = data.get("error_message", None) if field is not None: args["error_message"] = field + else: + args["error_message"] = None field = data.get("description", None) if field is not None: args["description"] = field + else: + args["description"] = None return Namespace(**args) @@ -322,22 +338,32 @@ def unmarshal_Token(data: Any) -> Token: field = data.get("function_id", None) if field is not None: args["function_id"] = field + else: + args["function_id"] = None field = data.get("namespace_id", None) if field is not None: args["namespace_id"] = field + else: + args["namespace_id"] = None field = data.get("public_key", None) if field is not None: args["public_key"] = field + else: + args["public_key"] = None field = data.get("description", None) if field is not None: args["description"] = field + else: + args["description"] = None field = data.get("expires_at", None) if field is not None: args["expires_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expires_at"] = None return Token(**args) @@ -369,6 +395,8 @@ def unmarshal_TriggerMnqNatsClientConfig(data: Any) -> TriggerMnqNatsClientConfi field = data.get("mnq_credential_id", None) if field is not None: args["mnq_credential_id"] = field + else: + args["mnq_credential_id"] = None return TriggerMnqNatsClientConfig(**args) @@ -396,6 +424,8 @@ def unmarshal_TriggerMnqSqsClientConfig(data: Any) -> TriggerMnqSqsClientConfig: field = data.get("mnq_credential_id", None) if field is not None: args["mnq_credential_id"] = field + else: + args["mnq_credential_id"] = None return TriggerMnqSqsClientConfig(**args) @@ -462,18 +492,26 @@ def unmarshal_Trigger(data: Any) -> Trigger: field = data.get("error_message", None) if field is not None: args["error_message"] = field + else: + args["error_message"] = None field = data.get("scw_sqs_config", None) if field is not None: args["scw_sqs_config"] = unmarshal_TriggerMnqSqsClientConfig(field) + else: + args["scw_sqs_config"] = None field = data.get("scw_nats_config", None) if field is not None: args["scw_nats_config"] = unmarshal_TriggerMnqNatsClientConfig(field) + else: + args["scw_nats_config"] = None field = data.get("sqs_config", None) if field is not None: args["sqs_config"] = unmarshal_TriggerSqsClientConfig(field) + else: + args["sqs_config"] = None return Trigger(**args) diff --git a/scaleway-async/scaleway_async/iam/v1alpha1/marshalling.py b/scaleway-async/scaleway_async/iam/v1alpha1/marshalling.py index 9895c955..5f4410d9 100644 --- a/scaleway-async/scaleway_async/iam/v1alpha1/marshalling.py +++ b/scaleway-async/scaleway_async/iam/v1alpha1/marshalling.py @@ -87,14 +87,20 @@ def unmarshal_JWT(data: Any) -> JWT: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("expires_at", None) if field is not None: args["expires_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expires_at"] = None return JWT(**args) @@ -130,26 +136,38 @@ def unmarshal_APIKey(data: Any) -> APIKey: field = data.get("secret_key", None) if field is not None: args["secret_key"] = field + else: + args["secret_key"] = None field = data.get("application_id", None) if field is not None: args["application_id"] = field + else: + args["application_id"] = None field = data.get("user_id", None) if field is not None: args["user_id"] = field + else: + args["user_id"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("expires_at", None) if field is not None: args["expires_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expires_at"] = None return APIKey(**args) @@ -193,10 +211,14 @@ def unmarshal_Application(data: Any) -> Application: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return Application(**args) @@ -240,10 +262,14 @@ def unmarshal_Group(data: Any) -> Group: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return Group(**args) @@ -291,6 +317,8 @@ def unmarshal_Log(data: Any) -> Log: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None return Log(**args) @@ -322,10 +350,14 @@ def unmarshal_Policy(data: Any) -> Policy: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("editable", None) if field is not None: @@ -350,18 +382,26 @@ def unmarshal_Policy(data: Any) -> Policy: field = data.get("user_id", None) if field is not None: args["user_id"] = field + else: + args["user_id"] = None field = data.get("group_id", None) if field is not None: args["group_id"] = field + else: + args["group_id"] = None field = data.get("application_id", None) if field is not None: args["application_id"] = field + else: + args["application_id"] = None field = data.get("no_principal", None) if field is not None: args["no_principal"] = field + else: + args["no_principal"] = None return Policy(**args) @@ -393,10 +433,14 @@ def unmarshal_Quotum(data: Any) -> Quotum: field = data.get("limit", None) if field is not None: args["limit"] = field + else: + args["limit"] = None field = data.get("unlimited", None) if field is not None: args["unlimited"] = field + else: + args["unlimited"] = None return Quotum(**args) @@ -440,10 +484,14 @@ def unmarshal_SSHKey(data: Any) -> SSHKey: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return SSHKey(**args) @@ -472,7 +520,7 @@ def unmarshal_User(data: Any) -> User: if field is not None: args["deletable"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -483,6 +531,8 @@ def unmarshal_User(data: Any) -> User: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("mfa", None) if field is not None: @@ -499,16 +549,22 @@ def unmarshal_User(data: Any) -> User: field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("last_login_at", None) if field is not None: args["last_login_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["last_login_at"] = None field = data.get("two_factor_enabled", None) if field is not None: args["two_factor_enabled"] = field + else: + args["two_factor_enabled"] = None return User(**args) @@ -532,6 +588,8 @@ def unmarshal_EncodedJWT(data: Any) -> EncodedJWT: field = data.get("jwt", None) if field is not None: args["jwt"] = unmarshal_JWT(field) + else: + args["jwt"] = None return EncodedJWT(**args) @@ -664,6 +722,8 @@ def unmarshal_PermissionSet(data: Any) -> PermissionSet: field = data.get("categories", None) if field is not None: args["categories"] = field + else: + args["categories"] = None return PermissionSet(**args) @@ -750,18 +810,26 @@ def unmarshal_Rule(data: Any) -> Rule: field = data.get("permission_set_names", None) if field is not None: args["permission_set_names"] = field + else: + args["permission_set_names"] = None field = data.get("project_ids", None) if field is not None: args["project_ids"] = field + else: + args["project_ids"] = None field = data.get("organization_id", None) if field is not None: args["organization_id"] = field + else: + args["organization_id"] = None field = data.get("account_root_user_id", None) if field is not None: args["account_root_user_id"] = field + else: + args["account_root_user_id"] = None return Rule(**args) diff --git a/scaleway-async/scaleway_async/instance/v1/marshalling.py b/scaleway-async/scaleway_async/instance/v1/marshalling.py index e5fc59e0..24987fab 100644 --- a/scaleway-async/scaleway_async/instance/v1/marshalling.py +++ b/scaleway-async/scaleway_async/instance/v1/marshalling.py @@ -294,18 +294,24 @@ def unmarshal_Volume(data: Any) -> Volume: field = data.get("export_uri", None) if field is not None: args["export_uri"] = field + else: + args["export_uri"] = None field = data.get("creation_date", None) if field is not None: args["creation_date"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["creation_date"] = None field = data.get("modification_date", None) if field is not None: args["modification_date"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["modification_date"] = None field = data.get("tags", None) if field is not None: @@ -322,6 +328,8 @@ def unmarshal_Volume(data: Any) -> Volume: field = data.get("server", None) if field is not None: args["server"] = unmarshal_ServerSummary(field) + else: + args["server"] = None return Volume(**args) @@ -394,16 +402,22 @@ def unmarshal_Image(data: Any) -> Image: args["creation_date"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["creation_date"] = None field = data.get("modification_date", None) if field is not None: args["modification_date"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["modification_date"] = None field = data.get("default_bootscript", None) if field is not None: args["default_bootscript"] = unmarshal_Bootscript(field) + else: + args["default_bootscript"] = None field = data.get("public", None) if field is not None: @@ -428,6 +442,8 @@ def unmarshal_Image(data: Any) -> Image: field = data.get("root_volume", None) if field is not None: args["root_volume"] = unmarshal_VolumeSummary(field) + else: + args["root_volume"] = None return Image(**args) @@ -618,6 +634,8 @@ def unmarshal_ServerMaintenance(data: Any) -> ServerMaintenance: field = data.get("start_date", None) if field is not None: args["start_date"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["start_date"] = None return ServerMaintenance(**args) @@ -653,6 +671,8 @@ def unmarshal_VolumeServer(data: Any) -> VolumeServer: field = data.get("server", None) if field is not None: args["server"] = unmarshal_ServerSummary(field) + else: + args["server"] = None field = data.get("volume_type", None) if field is not None: @@ -679,12 +699,16 @@ def unmarshal_VolumeServer(data: Any) -> VolumeServer: args["creation_date"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["creation_date"] = None field = data.get("modification_date", None) if field is not None: args["modification_date"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["modification_date"] = None return VolumeServer(**args) @@ -732,6 +756,8 @@ def unmarshal_Server(data: Any) -> Server: args["creation_date"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["creation_date"] = None field = data.get("dynamic_ip_required", None) if field is not None: @@ -752,18 +778,26 @@ def unmarshal_Server(data: Any) -> Server: field = data.get("enable_ipv6", None) if field is not None: args["enable_ipv6"] = field + else: + args["enable_ipv6"] = None field = data.get("image", None) if field is not None: args["image"] = unmarshal_Image(field) + else: + args["image"] = None field = data.get("private_ip", None) if field is not None: args["private_ip"] = field + else: + args["private_ip"] = None field = data.get("public_ip", None) if field is not None: args["public_ip"] = unmarshal_ServerIp(field) + else: + args["public_ip"] = None field = data.get("public_ips", None) if field is not None: @@ -796,22 +830,32 @@ def unmarshal_Server(data: Any) -> Server: args["modification_date"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["modification_date"] = None field = data.get("location", None) if field is not None: args["location"] = unmarshal_ServerLocation(field) + else: + args["location"] = None field = data.get("ipv6", None) if field is not None: args["ipv6"] = unmarshal_ServerIpv6(field) + else: + args["ipv6"] = None field = data.get("bootscript", None) if field is not None: args["bootscript"] = unmarshal_Bootscript(field) + else: + args["bootscript"] = None field = data.get("security_group", None) if field is not None: args["security_group"] = unmarshal_SecurityGroupSummary(field) + else: + args["security_group"] = None field = data.get("maintenances", None) if field is not None: @@ -842,6 +886,8 @@ def unmarshal_Server(data: Any) -> Server: field = data.get("placement_group", None) if field is not None: args["placement_group"] = unmarshal_PlacementGroup(field) + else: + args["placement_group"] = None return Server(**args) @@ -857,6 +903,8 @@ def unmarshal_AttachServerVolumeResponse(data: Any) -> AttachServerVolumeRespons field = data.get("server", None) if field is not None: args["server"] = unmarshal_Server(field) + else: + args["server"] = None return AttachServerVolumeResponse(**args) @@ -872,6 +920,8 @@ def unmarshal_CreateImageResponse(data: Any) -> CreateImageResponse: field = data.get("image", None) if field is not None: args["image"] = unmarshal_Image(field) + else: + args["image"] = None return CreateImageResponse(**args) @@ -904,7 +954,7 @@ def unmarshal_Ip(data: Any) -> Ip: if field is not None: args["project"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -927,10 +977,14 @@ def unmarshal_Ip(data: Any) -> Ip: field = data.get("reverse", None) if field is not None: args["reverse"] = field + else: + args["reverse"] = None field = data.get("server", None) if field is not None: args["server"] = unmarshal_ServerSummary(field) + else: + args["server"] = None return Ip(**args) @@ -946,6 +1000,8 @@ def unmarshal_CreateIpResponse(data: Any) -> CreateIpResponse: field = data.get("ip", None) if field is not None: args["ip"] = unmarshal_Ip(field) + else: + args["ip"] = None return CreateIpResponse(**args) @@ -961,6 +1017,8 @@ def unmarshal_CreatePlacementGroupResponse(data: Any) -> CreatePlacementGroupRes field = data.get("placement_group", None) if field is not None: args["placement_group"] = unmarshal_PlacementGroup(field) + else: + args["placement_group"] = None return CreatePlacementGroupResponse(**args) @@ -976,6 +1034,8 @@ def unmarshal_CreatePrivateNICResponse(data: Any) -> CreatePrivateNICResponse: field = data.get("private_nic", None) if field is not None: args["private_nic"] = unmarshal_PrivateNIC(field) + else: + args["private_nic"] = None return CreatePrivateNICResponse(**args) @@ -1049,18 +1109,24 @@ def unmarshal_SecurityGroup(data: Any) -> SecurityGroup: field = data.get("organization_default", None) if field is not None: args["organization_default"] = field + else: + args["organization_default"] = None field = data.get("creation_date", None) if field is not None: args["creation_date"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["creation_date"] = None field = data.get("modification_date", None) if field is not None: args["modification_date"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["modification_date"] = None return SecurityGroup(**args) @@ -1076,6 +1142,8 @@ def unmarshal_CreateSecurityGroupResponse(data: Any) -> CreateSecurityGroupRespo field = data.get("security_group", None) if field is not None: args["security_group"] = unmarshal_SecurityGroup(field) + else: + args["security_group"] = None return CreateSecurityGroupResponse(**args) @@ -1123,10 +1191,14 @@ def unmarshal_SecurityGroupRule(data: Any) -> SecurityGroupRule: field = data.get("dest_port_from", None) if field is not None: args["dest_port_from"] = field + else: + args["dest_port_from"] = None field = data.get("dest_port_to", None) if field is not None: args["dest_port_to"] = field + else: + args["dest_port_to"] = None return SecurityGroupRule(**args) @@ -1144,6 +1216,8 @@ def unmarshal_CreateSecurityGroupRuleResponse( field = data.get("rule", None) if field is not None: args["rule"] = unmarshal_SecurityGroupRule(field) + else: + args["rule"] = None return CreateSecurityGroupRuleResponse(**args) @@ -1159,6 +1233,8 @@ def unmarshal_CreateServerResponse(data: Any) -> CreateServerResponse: field = data.get("server", None) if field is not None: args["server"] = unmarshal_Server(field) + else: + args["server"] = None return CreateServerResponse(**args) @@ -1229,22 +1305,30 @@ def unmarshal_Snapshot(data: Any) -> Snapshot: field = data.get("base_volume", None) if field is not None: args["base_volume"] = unmarshal_SnapshotBaseVolume(field) + else: + args["base_volume"] = None field = data.get("creation_date", None) if field is not None: args["creation_date"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["creation_date"] = None field = data.get("modification_date", None) if field is not None: args["modification_date"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["modification_date"] = None field = data.get("error_reason", None) if field is not None: args["error_reason"] = field + else: + args["error_reason"] = None return Snapshot(**args) @@ -1288,12 +1372,16 @@ def unmarshal_Task(data: Any) -> Task: field = data.get("started_at", None) if field is not None: args["started_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["started_at"] = None field = data.get("terminated_at", None) if field is not None: args["terminated_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["terminated_at"] = None return Task(**args) @@ -1309,10 +1397,14 @@ def unmarshal_CreateSnapshotResponse(data: Any) -> CreateSnapshotResponse: field = data.get("snapshot", None) if field is not None: args["snapshot"] = unmarshal_Snapshot(field) + else: + args["snapshot"] = None field = data.get("task", None) if field is not None: args["task"] = unmarshal_Task(field) + else: + args["task"] = None return CreateSnapshotResponse(**args) @@ -1328,6 +1420,8 @@ def unmarshal_CreateVolumeResponse(data: Any) -> CreateVolumeResponse: field = data.get("volume", None) if field is not None: args["volume"] = unmarshal_Volume(field) + else: + args["volume"] = None return CreateVolumeResponse(**args) @@ -1343,6 +1437,8 @@ def unmarshal_DetachServerVolumeResponse(data: Any) -> DetachServerVolumeRespons field = data.get("server", None) if field is not None: args["server"] = unmarshal_Server(field) + else: + args["server"] = None return DetachServerVolumeResponse(**args) @@ -1358,6 +1454,8 @@ def unmarshal_ExportSnapshotResponse(data: Any) -> ExportSnapshotResponse: field = data.get("task", None) if field is not None: args["task"] = unmarshal_Task(field) + else: + args["task"] = None return ExportSnapshotResponse(**args) @@ -1373,6 +1471,8 @@ def unmarshal_GetBootscriptResponse(data: Any) -> GetBootscriptResponse: field = data.get("bootscript", None) if field is not None: args["bootscript"] = unmarshal_Bootscript(field) + else: + args["bootscript"] = None return GetBootscriptResponse(**args) @@ -1459,6 +1559,8 @@ def unmarshal_GetDashboardResponse(data: Any) -> GetDashboardResponse: field = data.get("dashboard", None) if field is not None: args["dashboard"] = unmarshal_Dashboard(field) + else: + args["dashboard"] = None return GetDashboardResponse(**args) @@ -1474,6 +1576,8 @@ def unmarshal_GetImageResponse(data: Any) -> GetImageResponse: field = data.get("image", None) if field is not None: args["image"] = unmarshal_Image(field) + else: + args["image"] = None return GetImageResponse(**args) @@ -1489,6 +1593,8 @@ def unmarshal_GetIpResponse(data: Any) -> GetIpResponse: field = data.get("ip", None) if field is not None: args["ip"] = unmarshal_Ip(field) + else: + args["ip"] = None return GetIpResponse(**args) @@ -1504,6 +1610,8 @@ def unmarshal_GetPlacementGroupResponse(data: Any) -> GetPlacementGroupResponse: field = data.get("placement_group", None) if field is not None: args["placement_group"] = unmarshal_PlacementGroup(field) + else: + args["placement_group"] = None return GetPlacementGroupResponse(**args) @@ -1563,6 +1671,8 @@ def unmarshal_GetPrivateNICResponse(data: Any) -> GetPrivateNICResponse: field = data.get("private_nic", None) if field is not None: args["private_nic"] = unmarshal_PrivateNIC(field) + else: + args["private_nic"] = None return GetPrivateNICResponse(**args) @@ -1578,6 +1688,8 @@ def unmarshal_GetSecurityGroupResponse(data: Any) -> GetSecurityGroupResponse: field = data.get("security_group", None) if field is not None: args["security_group"] = unmarshal_SecurityGroup(field) + else: + args["security_group"] = None return GetSecurityGroupResponse(**args) @@ -1593,6 +1705,8 @@ def unmarshal_GetSecurityGroupRuleResponse(data: Any) -> GetSecurityGroupRuleRes field = data.get("rule", None) if field is not None: args["rule"] = unmarshal_SecurityGroupRule(field) + else: + args["rule"] = None return GetSecurityGroupRuleResponse(**args) @@ -1608,6 +1722,8 @@ def unmarshal_GetServerResponse(data: Any) -> GetServerResponse: field = data.get("server", None) if field is not None: args["server"] = unmarshal_Server(field) + else: + args["server"] = None return GetServerResponse(**args) @@ -1668,6 +1784,8 @@ def unmarshal_GetSnapshotResponse(data: Any) -> GetSnapshotResponse: field = data.get("snapshot", None) if field is not None: args["snapshot"] = unmarshal_Snapshot(field) + else: + args["snapshot"] = None return GetSnapshotResponse(**args) @@ -1683,6 +1801,8 @@ def unmarshal_GetVolumeResponse(data: Any) -> GetVolumeResponse: field = data.get("volume", None) if field is not None: args["volume"] = unmarshal_Volume(field) + else: + args["volume"] = None return GetVolumeResponse(**args) @@ -1900,10 +2020,14 @@ def unmarshal_ServerTypeNetworkInterface(data: Any) -> ServerTypeNetworkInterfac field = data.get("internal_bandwidth", None) if field is not None: args["internal_bandwidth"] = field + else: + args["internal_bandwidth"] = None field = data.get("internet_bandwidth", None) if field is not None: args["internet_bandwidth"] = field + else: + args["internet_bandwidth"] = None return ServerTypeNetworkInterface(**args) @@ -1944,6 +2068,8 @@ def unmarshal_ServerTypeCapabilities(data: Any) -> ServerTypeCapabilities: field = data.get("block_storage", None) if field is not None: args["block_storage"] = field + else: + args["block_storage"] = None return ServerTypeCapabilities(**args) @@ -1971,10 +2097,14 @@ def unmarshal_ServerTypeNetwork(data: Any) -> ServerTypeNetwork: field = data.get("sum_internal_bandwidth", None) if field is not None: args["sum_internal_bandwidth"] = field + else: + args["sum_internal_bandwidth"] = None field = data.get("sum_internet_bandwidth", None) if field is not None: args["sum_internet_bandwidth"] = field + else: + args["sum_internet_bandwidth"] = None return ServerTypeNetwork(**args) @@ -1992,6 +2122,8 @@ def unmarshal_ServerTypeVolumeConstraintsByType( field = data.get("l_ssd", None) if field is not None: args["l_ssd"] = unmarshal_ServerTypeVolumeConstraintSizes(field) + else: + args["l_ssd"] = None return ServerTypeVolumeConstraintsByType(**args) @@ -2007,6 +2139,8 @@ def unmarshal_ServerType(data: Any) -> ServerType: field = data.get("monthly_price", None) if field is not None: args["monthly_price"] = field + else: + args["monthly_price"] = None field = data.get("hourly_price", None) if field is not None: @@ -2037,26 +2171,38 @@ def unmarshal_ServerType(data: Any) -> ServerType: args["per_volume_constraint"] = unmarshal_ServerTypeVolumeConstraintsByType( field ) + else: + args["per_volume_constraint"] = None field = data.get("volumes_constraint", None) if field is not None: args["volumes_constraint"] = unmarshal_ServerTypeVolumeConstraintSizes(field) + else: + args["volumes_constraint"] = None field = data.get("gpu", None) if field is not None: args["gpu"] = field + else: + args["gpu"] = None field = data.get("network", None) if field is not None: args["network"] = unmarshal_ServerTypeNetwork(field) + else: + args["network"] = None field = data.get("capabilities", None) if field is not None: args["capabilities"] = unmarshal_ServerTypeCapabilities(field) + else: + args["capabilities"] = None field = data.get("scratch_storage_max_size", None) if field is not None: args["scratch_storage_max_size"] = field + else: + args["scratch_storage_max_size"] = None return ServerType(**args) @@ -2175,10 +2321,14 @@ def unmarshal_VolumeType(data: Any) -> VolumeType: field = data.get("capabilities", None) if field is not None: args["capabilities"] = unmarshal_VolumeTypeCapabilities(field) + else: + args["capabilities"] = None field = data.get("constraints", None) if field is not None: args["constraints"] = unmarshal_VolumeTypeConstraints(field) + else: + args["constraints"] = None return VolumeType(**args) @@ -2227,6 +2377,8 @@ def unmarshal_MigrationPlan(data: Any) -> MigrationPlan: field = data.get("volume", None) if field is not None: args["volume"] = unmarshal_Volume(field) + else: + args["volume"] = None return MigrationPlan(**args) @@ -2242,6 +2394,8 @@ def unmarshal_ServerActionResponse(data: Any) -> ServerActionResponse: field = data.get("task", None) if field is not None: args["task"] = unmarshal_Task(field) + else: + args["task"] = None return ServerActionResponse(**args) @@ -2257,6 +2411,8 @@ def unmarshal_SetPlacementGroupResponse(data: Any) -> SetPlacementGroupResponse: field = data.get("placement_group", None) if field is not None: args["placement_group"] = unmarshal_PlacementGroup(field) + else: + args["placement_group"] = None return SetPlacementGroupResponse(**args) @@ -2312,6 +2468,8 @@ def unmarshal_UpdateImageResponse(data: Any) -> UpdateImageResponse: field = data.get("image", None) if field is not None: args["image"] = unmarshal_Image(field) + else: + args["image"] = None return UpdateImageResponse(**args) @@ -2327,6 +2485,8 @@ def unmarshal_UpdateIpResponse(data: Any) -> UpdateIpResponse: field = data.get("ip", None) if field is not None: args["ip"] = unmarshal_Ip(field) + else: + args["ip"] = None return UpdateIpResponse(**args) @@ -2342,6 +2502,8 @@ def unmarshal_UpdatePlacementGroupResponse(data: Any) -> UpdatePlacementGroupRes field = data.get("placement_group", None) if field is not None: args["placement_group"] = unmarshal_PlacementGroup(field) + else: + args["placement_group"] = None return UpdatePlacementGroupResponse(**args) @@ -2378,6 +2540,8 @@ def unmarshal_UpdateSecurityGroupResponse(data: Any) -> UpdateSecurityGroupRespo field = data.get("security_group", None) if field is not None: args["security_group"] = unmarshal_SecurityGroup(field) + else: + args["security_group"] = None return UpdateSecurityGroupResponse(**args) @@ -2395,6 +2559,8 @@ def unmarshal_UpdateSecurityGroupRuleResponse( field = data.get("rule", None) if field is not None: args["rule"] = unmarshal_SecurityGroupRule(field) + else: + args["rule"] = None return UpdateSecurityGroupRuleResponse(**args) @@ -2410,6 +2576,8 @@ def unmarshal_UpdateServerResponse(data: Any) -> UpdateServerResponse: field = data.get("server", None) if field is not None: args["server"] = unmarshal_Server(field) + else: + args["server"] = None return UpdateServerResponse(**args) @@ -2425,6 +2593,8 @@ def unmarshal_UpdateSnapshotResponse(data: Any) -> UpdateSnapshotResponse: field = data.get("snapshot", None) if field is not None: args["snapshot"] = unmarshal_Snapshot(field) + else: + args["snapshot"] = None return UpdateSnapshotResponse(**args) @@ -2440,6 +2610,8 @@ def unmarshal_UpdateVolumeResponse(data: Any) -> UpdateVolumeResponse: field = data.get("volume", None) if field is not None: args["volume"] = unmarshal_Volume(field) + else: + args["volume"] = None return UpdateVolumeResponse(**args) @@ -2455,6 +2627,8 @@ def unmarshal__SetImageResponse(data: Any) -> _SetImageResponse: field = data.get("image", None) if field is not None: args["image"] = unmarshal_Image(field) + else: + args["image"] = None return _SetImageResponse(**args) @@ -2470,6 +2644,8 @@ def unmarshal__SetSecurityGroupResponse(data: Any) -> _SetSecurityGroupResponse: field = data.get("security_group", None) if field is not None: args["security_group"] = unmarshal_SecurityGroup(field) + else: + args["security_group"] = None return _SetSecurityGroupResponse(**args) @@ -2485,6 +2661,8 @@ def unmarshal__SetSecurityGroupRuleResponse(data: Any) -> _SetSecurityGroupRuleR field = data.get("rule", None) if field is not None: args["rule"] = unmarshal_SecurityGroupRule(field) + else: + args["rule"] = None return _SetSecurityGroupRuleResponse(**args) @@ -2500,6 +2678,8 @@ def unmarshal__SetServerResponse(data: Any) -> _SetServerResponse: field = data.get("server", None) if field is not None: args["server"] = unmarshal_Server(field) + else: + args["server"] = None return _SetServerResponse(**args) @@ -2515,6 +2695,8 @@ def unmarshal__SetSnapshotResponse(data: Any) -> _SetSnapshotResponse: field = data.get("snapshot", None) if field is not None: args["snapshot"] = unmarshal_Snapshot(field) + else: + args["snapshot"] = None return _SetSnapshotResponse(**args) diff --git a/scaleway-async/scaleway_async/iot/v1/marshalling.py b/scaleway-async/scaleway_async/iot/v1/marshalling.py index 97f75d2c..0397cfe7 100644 --- a/scaleway-async/scaleway_async/iot/v1/marshalling.py +++ b/scaleway-async/scaleway_async/iot/v1/marshalling.py @@ -75,6 +75,8 @@ def unmarshal_DeviceMessageFiltersRule(data: Any) -> DeviceMessageFiltersRule: field = data.get("topics", None) if field is not None: args["topics"] = field + else: + args["topics"] = None return DeviceMessageFiltersRule(**args) @@ -90,10 +92,14 @@ def unmarshal_DeviceMessageFilters(data: Any) -> DeviceMessageFilters: field = data.get("publish", None) if field is not None: args["publish"] = unmarshal_DeviceMessageFiltersRule(field) + else: + args["publish"] = None field = data.get("subscribe", None) if field is not None: args["subscribe"] = unmarshal_DeviceMessageFiltersRule(field) + else: + args["subscribe"] = None return DeviceMessageFilters(**args) @@ -131,6 +137,8 @@ def unmarshal_Device(data: Any) -> Device: args["last_activity_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["last_activity_at"] = None field = data.get("is_connected", None) if field is not None: @@ -151,14 +159,20 @@ def unmarshal_Device(data: Any) -> Device: field = data.get("message_filters", None) if field is not None: args["message_filters"] = unmarshal_DeviceMessageFilters(field) + else: + args["message_filters"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return Device(**args) @@ -179,7 +193,7 @@ def unmarshal_Network(data: Any) -> Network: if field is not None: args["name"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -198,6 +212,8 @@ def unmarshal_Network(data: Any) -> Network: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None return Network(**args) @@ -288,14 +304,20 @@ def unmarshal_Hub(data: Any) -> Hub: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("twins_graphite_config", None) if field is not None: args["twins_graphite_config"] = unmarshal_HubTwinsGraphiteConfig(field) + else: + args["twins_graphite_config"] = None return Hub(**args) @@ -330,10 +352,14 @@ def unmarshal_CreateDeviceResponse(data: Any) -> CreateDeviceResponse: field = data.get("device", None) if field is not None: args["device"] = unmarshal_Device(field) + else: + args["device"] = None field = data.get("certificate", None) if field is not None: args["certificate"] = unmarshal_Certificate(field) + else: + args["certificate"] = None return CreateDeviceResponse(**args) @@ -353,6 +379,8 @@ def unmarshal_CreateNetworkResponse(data: Any) -> CreateNetworkResponse: field = data.get("network", None) if field is not None: args["network"] = unmarshal_Network(field) + else: + args["network"] = None return CreateNetworkResponse(**args) @@ -372,6 +400,8 @@ def unmarshal_GetDeviceCertificateResponse(data: Any) -> GetDeviceCertificateRes field = data.get("device", None) if field is not None: args["device"] = unmarshal_Device(field) + else: + args["device"] = None return GetDeviceCertificateResponse(**args) @@ -510,17 +540,21 @@ def unmarshal_RouteSummary(data: Any) -> RouteSummary: if field is not None: args["topic"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return RouteSummary(**args) @@ -595,10 +629,14 @@ def unmarshal_RenewDeviceCertificateResponse( field = data.get("device", None) if field is not None: args["device"] = unmarshal_Device(field) + else: + args["device"] = None field = data.get("certificate", None) if field is not None: args["certificate"] = unmarshal_Certificate(field) + else: + args["certificate"] = None return RenewDeviceCertificateResponse(**args) @@ -716,29 +754,39 @@ def unmarshal_Route(data: Any) -> Route: if field is not None: args["topic"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("s3_config", None) if field is not None: args["s3_config"] = unmarshal_RouteS3Config(field) + else: + args["s3_config"] = None field = data.get("db_config", None) if field is not None: args["db_config"] = unmarshal_RouteDatabaseConfig(field) + else: + args["db_config"] = None field = data.get("rest_config", None) if field is not None: args["rest_config"] = unmarshal_RouteRestConfig(field) + else: + args["rest_config"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return Route(**args) @@ -758,6 +806,8 @@ def unmarshal_SetDeviceCertificateResponse(data: Any) -> SetDeviceCertificateRes field = data.get("device", None) if field is not None: args["device"] = unmarshal_Device(field) + else: + args["device"] = None return SetDeviceCertificateResponse(**args) @@ -785,6 +835,8 @@ def unmarshal_TwinDocument(data: Any) -> TwinDocument: field = data.get("data", None) if field is not None: args["data"] = field + else: + args["data"] = None return TwinDocument(**args) diff --git a/scaleway-async/scaleway_async/jobs/v1alpha1/marshalling.py b/scaleway-async/scaleway_async/jobs/v1alpha1/marshalling.py index ecb70454..71b680b6 100644 --- a/scaleway-async/scaleway_async/jobs/v1alpha1/marshalling.py +++ b/scaleway-async/scaleway_async/jobs/v1alpha1/marshalling.py @@ -78,10 +78,14 @@ def unmarshal_JobDefinition(data: Any) -> JobDefinition: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("environment_variables", None) if field is not None: @@ -102,10 +106,14 @@ def unmarshal_JobDefinition(data: Any) -> JobDefinition: field = data.get("job_timeout", None) if field is not None: args["job_timeout"] = field + else: + args["job_timeout"] = None field = data.get("cron_schedule", None) if field is not None: args["cron_schedule"] = unmarshal_CronSchedule(field) + else: + args["cron_schedule"] = None return JobDefinition(**args) @@ -149,24 +157,34 @@ def unmarshal_JobRun(data: Any) -> JobRun: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("terminated_at", None) if field is not None: args["terminated_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["terminated_at"] = None field = data.get("exit_code", None) if field is not None: args["exit_code"] = field + else: + args["exit_code"] = None field = data.get("run_duration", None) if field is not None: args["run_duration"] = field + else: + args["run_duration"] = None field = data.get("environment_variables", None) if field is not None: @@ -183,6 +201,8 @@ def unmarshal_JobRun(data: Any) -> JobRun: field = data.get("started_at", None) if field is not None: args["started_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["started_at"] = None return JobRun(**args) diff --git a/scaleway-async/scaleway_async/k8s/v1/marshalling.py b/scaleway-async/scaleway_async/k8s/v1/marshalling.py index 9f324c14..8f813da4 100644 --- a/scaleway-async/scaleway_async/k8s/v1/marshalling.py +++ b/scaleway-async/scaleway_async/k8s/v1/marshalling.py @@ -114,10 +114,14 @@ def unmarshal_Pool(data: Any) -> Pool: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("min_size", None) if field is not None: @@ -162,14 +166,20 @@ def unmarshal_Pool(data: Any) -> Pool: field = data.get("placement_group_id", None) if field is not None: args["placement_group_id"] = field + else: + args["placement_group_id"] = None field = data.get("upgrade_policy", None) if field is not None: args["upgrade_policy"] = unmarshal_PoolUpgradePolicy(field) + else: + args["upgrade_policy"] = None field = data.get("root_volume_size", None) if field is not None: args["root_volume_size"] = field + else: + args["root_volume_size"] = None return Pool(**args) @@ -253,6 +263,8 @@ def unmarshal_ClusterAutoUpgrade(data: Any) -> ClusterAutoUpgrade: field = data.get("maintenance_window", None) if field is not None: args["maintenance_window"] = unmarshal_MaintenanceWindow(field) + else: + args["maintenance_window"] = None return ClusterAutoUpgrade(**args) @@ -359,7 +371,7 @@ def unmarshal_Cluster(data: Any) -> Cluster: if field is not None: args["id"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -426,32 +438,52 @@ def unmarshal_Cluster(data: Any) -> Cluster: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("autoscaler_config", None) if field is not None: args["autoscaler_config"] = unmarshal_ClusterAutoscalerConfig(field) + else: + args["autoscaler_config"] = None field = data.get("auto_upgrade", None) if field is not None: args["auto_upgrade"] = unmarshal_ClusterAutoUpgrade(field) + else: + args["auto_upgrade"] = None field = data.get("open_id_connect_config", None) if field is not None: args["open_id_connect_config"] = unmarshal_ClusterOpenIDConnectConfig(field) + else: + args["open_id_connect_config"] = None field = data.get("private_network_id", None) if field is not None: args["private_network_id"] = field + else: + args["private_network_id"] = None field = data.get("commitment_ends_at", None) if field is not None: args["commitment_ends_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["commitment_ends_at"] = None + + field = data.get("routed_ip_enabled", None) + if field is not None: + args["routed_ip_enabled"] = field + else: + args["routed_ip_enabled"] = None field = data.get("routed_ip_enabled", None) if field is not None: @@ -495,14 +527,20 @@ def unmarshal_Node(data: Any) -> Node: field = data.get("public_ip_v4", None) if field is not None: args["public_ip_v4"] = field + else: + args["public_ip_v4"] = None field = data.get("public_ip_v6", None) if field is not None: args["public_ip_v6"] = field + else: + args["public_ip_v6"] = None field = data.get("conditions", None) if field is not None: args["conditions"] = field + else: + args["conditions"] = None field = data.get("status", None) if field is not None: @@ -511,14 +549,20 @@ def unmarshal_Node(data: Any) -> Node: field = data.get("error_message", None) if field is not None: args["error_message"] = field + else: + args["error_message"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return Node(**args) @@ -656,6 +700,8 @@ def unmarshal_ClusterType(data: Any) -> ClusterType: field = data.get("commitment_delay", None) if field is not None: args["commitment_delay"] = field + else: + args["commitment_delay"] = None return ClusterType(**args) diff --git a/scaleway-async/scaleway_async/lb/v1/marshalling.py b/scaleway-async/scaleway_async/lb/v1/marshalling.py index b68ee34b..f339251e 100644 --- a/scaleway-async/scaleway_async/lb/v1/marshalling.py +++ b/scaleway-async/scaleway_async/lb/v1/marshalling.py @@ -140,10 +140,14 @@ def unmarshal_Ip(data: Any) -> Ip: field = data.get("lb_id", None) if field is not None: args["lb_id"] = field + else: + args["lb_id"] = None field = data.get("region", None) if field is not None: args["region"] = field + else: + args["region"] = None return Ip(**args) @@ -197,10 +201,14 @@ def unmarshal_Subscriber(data: Any) -> Subscriber: field = data.get("email_config", None) if field is not None: args["email_config"] = unmarshal_SubscriberEmailConfig(field) + else: + args["email_config"] = None field = data.get("webhook_config", None) if field is not None: args["webhook_config"] = unmarshal_SubscriberWebhookConfig(field) + else: + args["webhook_config"] = None return Subscriber(**args) @@ -228,6 +236,8 @@ def unmarshal_HealthCheckHttpConfig(data: Any) -> HealthCheckHttpConfig: field = data.get("code", None) if field is not None: args["code"] = field + else: + args["code"] = None return HealthCheckHttpConfig(**args) @@ -259,6 +269,8 @@ def unmarshal_HealthCheckHttpsConfig(data: Any) -> HealthCheckHttpsConfig: field = data.get("code", None) if field is not None: args["code"] = field + else: + args["code"] = None return HealthCheckHttpsConfig(**args) @@ -345,18 +357,26 @@ def unmarshal_HealthCheck(data: Any) -> HealthCheck: field = data.get("check_delay", None) if field is not None: args["check_delay"] = field + else: + args["check_delay"] = None field = data.get("check_timeout", None) if field is not None: args["check_timeout"] = field + else: + args["check_timeout"] = None field = data.get("tcp_config", None) if field is not None: args["tcp_config"] = unmarshal_HealthCheckTcpConfig(field) + else: + args["tcp_config"] = None field = data.get("mysql_config", None) if field is not None: args["mysql_config"] = unmarshal_HealthCheckMysqlConfig(field) + else: + args["mysql_config"] = None field = data.get("check_send_proxy", None) if field is not None: @@ -365,26 +385,38 @@ def unmarshal_HealthCheck(data: Any) -> HealthCheck: field = data.get("pgsql_config", None) if field is not None: args["pgsql_config"] = unmarshal_HealthCheckPgsqlConfig(field) + else: + args["pgsql_config"] = None field = data.get("ldap_config", None) if field is not None: args["ldap_config"] = unmarshal_HealthCheckLdapConfig(field) + else: + args["ldap_config"] = None field = data.get("redis_config", None) if field is not None: args["redis_config"] = unmarshal_HealthCheckRedisConfig(field) + else: + args["redis_config"] = None field = data.get("http_config", None) if field is not None: args["http_config"] = unmarshal_HealthCheckHttpConfig(field) + else: + args["http_config"] = None field = data.get("https_config", None) if field is not None: args["https_config"] = unmarshal_HealthCheckHttpsConfig(field) + else: + args["https_config"] = None field = data.get("transient_check_delay", None) if field is not None: args["transient_check_delay"] = field + else: + args["transient_check_delay"] = None return HealthCheck(**args) @@ -416,14 +448,20 @@ def unmarshal_Instance(data: Any) -> Instance: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("region", None) if field is not None: args["region"] = field + else: + args["region"] = None return Instance(**args) @@ -482,7 +520,7 @@ def unmarshal_Lb(data: Any) -> Lb: if field is not None: args["backend_count"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -505,18 +543,26 @@ def unmarshal_Lb(data: Any) -> Lb: field = data.get("subscriber", None) if field is not None: args["subscriber"] = unmarshal_Subscriber(field) + else: + args["subscriber"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("region", None) if field is not None: args["region"] = field + else: + args["region"] = None return Lb(**args) @@ -572,62 +618,92 @@ def unmarshal_Backend(data: Any) -> Backend: field = data.get("health_check", None) if field is not None: args["health_check"] = unmarshal_HealthCheck(field) + else: + args["health_check"] = None field = data.get("lb", None) if field is not None: args["lb"] = unmarshal_Lb(field) + else: + args["lb"] = None field = data.get("send_proxy_v2", None) if field is not None: args["send_proxy_v2"] = field + else: + args["send_proxy_v2"] = None field = data.get("timeout_server", None) if field is not None: args["timeout_server"] = field + else: + args["timeout_server"] = None field = data.get("timeout_connect", None) if field is not None: args["timeout_connect"] = field + else: + args["timeout_connect"] = None field = data.get("timeout_tunnel", None) if field is not None: args["timeout_tunnel"] = field + else: + args["timeout_tunnel"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("failover_host", None) if field is not None: args["failover_host"] = field + else: + args["failover_host"] = None field = data.get("ssl_bridging", None) if field is not None: args["ssl_bridging"] = field + else: + args["ssl_bridging"] = None field = data.get("ignore_ssl_server_verify", None) if field is not None: args["ignore_ssl_server_verify"] = field + else: + args["ignore_ssl_server_verify"] = None field = data.get("redispatch_attempt_count", None) if field is not None: args["redispatch_attempt_count"] = field + else: + args["redispatch_attempt_count"] = None field = data.get("max_retries", None) if field is not None: args["max_retries"] = field + else: + args["max_retries"] = None field = data.get("max_connections", None) if field is not None: args["max_connections"] = field + else: + args["max_connections"] = None field = data.get("timeout_queue", None) if field is not None: args["timeout_queue"] = field + else: + args["timeout_queue"] = None return Backend(**args) @@ -640,7 +716,7 @@ def unmarshal_Certificate(data: Any) -> Certificate: args: Dict[str, Any] = {} - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -669,16 +745,22 @@ def unmarshal_Certificate(data: Any) -> Certificate: args["not_valid_before"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["not_valid_before"] = None field = data.get("not_valid_after", None) if field is not None: args["not_valid_after"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["not_valid_after"] = None field = data.get("lb", None) if field is not None: args["lb"] = unmarshal_Lb(field) + else: + args["lb"] = None field = data.get("name", None) if field is not None: @@ -687,14 +769,20 @@ def unmarshal_Certificate(data: Any) -> Certificate: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("status_details", None) if field is not None: args["status_details"] = field + else: + args["status_details"] = None return Certificate(**args) @@ -730,26 +818,38 @@ def unmarshal_Frontend(data: Any) -> Frontend: field = data.get("backend", None) if field is not None: args["backend"] = unmarshal_Backend(field) + else: + args["backend"] = None field = data.get("lb", None) if field is not None: args["lb"] = unmarshal_Lb(field) + else: + args["lb"] = None field = data.get("timeout_client", None) if field is not None: args["timeout_client"] = field + else: + args["timeout_client"] = None field = data.get("certificate", None) if field is not None: args["certificate"] = unmarshal_Certificate(field) + else: + args["certificate"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return Frontend(**args) @@ -762,7 +862,7 @@ def unmarshal_AclActionRedirect(data: Any) -> AclActionRedirect: args: Dict[str, Any] = {} - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -773,6 +873,8 @@ def unmarshal_AclActionRedirect(data: Any) -> AclActionRedirect: field = data.get("code", None) if field is not None: args["code"] = field + else: + args["code"] = None return AclActionRedirect(**args) @@ -785,13 +887,15 @@ def unmarshal_AclAction(data: Any) -> AclAction: args: Dict[str, Any] = {} - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field field = data.get("redirect", None) if field is not None: args["redirect"] = unmarshal_AclActionRedirect(field) + else: + args["redirect"] = None return AclAction(**args) @@ -823,6 +927,8 @@ def unmarshal_AclMatch(data: Any) -> AclMatch: field = data.get("http_filter_option", None) if field is not None: args["http_filter_option"] = field + else: + args["http_filter_option"] = None return AclMatch(**args) @@ -854,22 +960,32 @@ def unmarshal_Acl(data: Any) -> Acl: field = data.get("match", None) if field is not None: args["match"] = unmarshal_AclMatch(field) + else: + args["match"] = None field = data.get("action", None) if field is not None: args["action"] = unmarshal_AclAction(field) + else: + args["action"] = None field = data.get("frontend", None) if field is not None: args["frontend"] = unmarshal_Frontend(field) + else: + args["frontend"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return Acl(**args) @@ -885,6 +1001,8 @@ def unmarshal_PrivateNetworkDHCPConfig(data: Any) -> PrivateNetworkDHCPConfig: field = data.get("ip_id", None) if field is not None: args["ip_id"] = field + else: + args["ip_id"] = None return PrivateNetworkDHCPConfig(**args) @@ -911,6 +1029,8 @@ def unmarshal_PrivateNetworkStaticConfig(data: Any) -> PrivateNetworkStaticConfi field = data.get("ip_address", None) if field is not None: args["ip_address"] = field + else: + args["ip_address"] = None return PrivateNetworkStaticConfig(**args) @@ -938,26 +1058,38 @@ def unmarshal_PrivateNetwork(data: Any) -> PrivateNetwork: field = data.get("lb", None) if field is not None: args["lb"] = unmarshal_Lb(field) + else: + args["lb"] = None field = data.get("static_config", None) if field is not None: args["static_config"] = unmarshal_PrivateNetworkStaticConfig(field) + else: + args["static_config"] = None field = data.get("dhcp_config", None) if field is not None: args["dhcp_config"] = unmarshal_PrivateNetworkDHCPConfig(field) + else: + args["dhcp_config"] = None field = data.get("ipam_config", None) if field is not None: args["ipam_config"] = unmarshal_PrivateNetworkIpamConfig(field) + else: + args["ipam_config"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return PrivateNetwork(**args) @@ -973,10 +1105,14 @@ def unmarshal_RouteMatch(data: Any) -> RouteMatch: field = data.get("sni", None) if field is not None: args["sni"] = field + else: + args["sni"] = None field = data.get("host_header", None) if field is not None: args["host_header"] = field + else: + args["host_header"] = None return RouteMatch(**args) @@ -1004,14 +1140,20 @@ def unmarshal_Route(data: Any) -> Route: field = data.get("match", None) if field is not None: args["match"] = unmarshal_RouteMatch(field) + else: + args["match"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return Route(**args) @@ -1049,6 +1191,8 @@ def unmarshal_BackendServerStats(data: Any) -> BackendServerStats: args["server_state_changed_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["server_state_changed_at"] = None return BackendServerStats(**args) @@ -1244,6 +1388,8 @@ def unmarshal_LbType(data: Any) -> LbType: field = data.get("region", None) if field is not None: args["region"] = field + else: + args["region"] = None return LbType(**args) diff --git a/scaleway-async/scaleway_async/llm_inference/v1beta1/marshalling.py b/scaleway-async/scaleway_async/llm_inference/v1beta1/marshalling.py index e8146598..5fa39a3a 100644 --- a/scaleway-async/scaleway_async/llm_inference/v1beta1/marshalling.py +++ b/scaleway-async/scaleway_async/llm_inference/v1beta1/marshalling.py @@ -87,10 +87,14 @@ def unmarshal_Endpoint(data: Any) -> Endpoint: field = data.get("public_access", None) if field is not None: args["public_access"] = unmarshal_EndpointPublicAccessDetails(field) + else: + args["public_access"] = None field = data.get("private_network", None) if field is not None: args["private_network"] = unmarshal_EndpointPrivateNetworkDetails(field) + else: + args["private_network"] = None return Endpoint(**args) @@ -156,14 +160,20 @@ def unmarshal_Deployment(data: Any) -> Deployment: field = data.get("error_message", None) if field is not None: args["error_message"] = field + else: + args["error_message"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return Deployment(**args) @@ -187,10 +197,14 @@ def unmarshal_ModelS3Model(data: Any) -> ModelS3Model: field = data.get("node_type", None) if field is not None: args["node_type"] = field + else: + args["node_type"] = None field = data.get("triton_server_version", None) if field is not None: args["triton_server_version"] = field + else: + args["triton_server_version"] = None return ModelS3Model(**args) @@ -250,14 +264,20 @@ def unmarshal_Model(data: Any) -> Model: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("s3_model", None) if field is not None: args["s3_model"] = unmarshal_ModelS3Model(field) + else: + args["s3_model"] = None return Model(**args) @@ -433,10 +453,14 @@ def unmarshal_NodeType(data: Any) -> NodeType: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return NodeType(**args) diff --git a/scaleway-async/scaleway_async/marketplace/v2/marshalling.py b/scaleway-async/scaleway_async/marketplace/v2/marshalling.py index eb495e08..c3c22a3e 100644 --- a/scaleway-async/scaleway_async/marketplace/v2/marshalling.py +++ b/scaleway-async/scaleway_async/marketplace/v2/marshalling.py @@ -74,16 +74,22 @@ def unmarshal_Image(data: Any) -> Image: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("valid_until", None) if field is not None: args["valid_until"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["valid_until"] = None return Image(**args) @@ -116,7 +122,7 @@ def unmarshal_LocalImage(data: Any) -> LocalImage: if field is not None: args["label"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -142,16 +148,22 @@ def unmarshal_Version(data: Any) -> Version: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("published_at", None) if field is not None: args["published_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["published_at"] = None return Version(**args) diff --git a/scaleway-async/scaleway_async/mnq/v1beta1/marshalling.py b/scaleway-async/scaleway_async/mnq/v1beta1/marshalling.py index 1ffebec4..30fb4cff 100644 --- a/scaleway-async/scaleway_async/mnq/v1beta1/marshalling.py +++ b/scaleway-async/scaleway_async/mnq/v1beta1/marshalling.py @@ -64,10 +64,14 @@ def unmarshal_NatsAccount(data: Any) -> NatsAccount: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return NatsAccount(**args) @@ -118,14 +122,20 @@ def unmarshal_NatsCredentials(data: Any) -> NatsCredentials: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("credentials", None) if field is not None: args["credentials"] = unmarshal_File(field) + else: + args["credentials"] = None return NatsCredentials(**args) @@ -141,14 +151,20 @@ def unmarshal_SnsPermissions(data: Any) -> SnsPermissions: field = data.get("can_publish", None) if field is not None: args["can_publish"] = field + else: + args["can_publish"] = None field = data.get("can_receive", None) if field is not None: args["can_receive"] = field + else: + args["can_receive"] = None field = data.get("can_manage", None) if field is not None: args["can_manage"] = field + else: + args["can_manage"] = None return SnsPermissions(**args) @@ -192,14 +208,20 @@ def unmarshal_SnsCredentials(data: Any) -> SnsCredentials: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("permissions", None) if field is not None: args["permissions"] = unmarshal_SnsPermissions(field) + else: + args["permissions"] = None return SnsCredentials(**args) @@ -215,14 +237,20 @@ def unmarshal_SqsPermissions(data: Any) -> SqsPermissions: field = data.get("can_publish", None) if field is not None: args["can_publish"] = field + else: + args["can_publish"] = None field = data.get("can_receive", None) if field is not None: args["can_receive"] = field + else: + args["can_receive"] = None field = data.get("can_manage", None) if field is not None: args["can_manage"] = field + else: + args["can_manage"] = None return SqsPermissions(**args) @@ -266,14 +294,20 @@ def unmarshal_SqsCredentials(data: Any) -> SqsCredentials: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("permissions", None) if field is not None: args["permissions"] = unmarshal_SqsPermissions(field) + else: + args["permissions"] = None return SqsCredentials(**args) @@ -389,10 +423,14 @@ def unmarshal_SnsInfo(data: Any) -> SnsInfo: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return SnsInfo(**args) @@ -424,10 +462,14 @@ def unmarshal_SqsInfo(data: Any) -> SqsInfo: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return SqsInfo(**args) diff --git a/scaleway-async/scaleway_async/rdb/v1/marshalling.py b/scaleway-async/scaleway_async/rdb/v1/marshalling.py index 4d244064..0401c6c3 100644 --- a/scaleway-async/scaleway_async/rdb/v1/marshalling.py +++ b/scaleway-async/scaleway_async/rdb/v1/marshalling.py @@ -166,26 +166,38 @@ def unmarshal_Endpoint(data: Any) -> Endpoint: field = data.get("ip", None) if field is not None: args["ip"] = field + else: + args["ip"] = None field = data.get("name", None) if field is not None: args["name"] = field + else: + args["name"] = None field = data.get("private_network", None) if field is not None: args["private_network"] = unmarshal_EndpointPrivateNetworkDetails(field) + else: + args["private_network"] = None field = data.get("load_balancer", None) if field is not None: args["load_balancer"] = unmarshal_EndpointLoadBalancerDetails(field) + else: + args["load_balancer"] = None field = data.get("direct_access", None) if field is not None: args["direct_access"] = unmarshal_EndpointDirectAccessDetails(field) + else: + args["direct_access"] = None field = data.get("hostname", None) if field is not None: args["hostname"] = field + else: + args["hostname"] = None return Endpoint(**args) @@ -209,18 +221,26 @@ def unmarshal_Maintenance(data: Any) -> Maintenance: field = data.get("starts_at", None) if field is not None: args["starts_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["starts_at"] = None field = data.get("stops_at", None) if field is not None: args["stops_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["stops_at"] = None field = data.get("closed_at", None) if field is not None: args["closed_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["closed_at"] = None field = data.get("forced_at", None) if field is not None: args["forced_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["forced_at"] = None return Maintenance(**args) @@ -293,18 +313,26 @@ def unmarshal_DatabaseBackup(data: Any) -> DatabaseBackup: field = data.get("size", None) if field is not None: args["size"] = field + else: + args["size"] = None field = data.get("expires_at", None) if field is not None: args["expires_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expires_at"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("instance_name", None) if field is not None: @@ -321,12 +349,16 @@ def unmarshal_DatabaseBackup(data: Any) -> DatabaseBackup: field = data.get("download_url", None) if field is not None: args["download_url"] = field + else: + args["download_url"] = None field = data.get("download_url_expires_at", None) if field is not None: args["download_url_expires_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["download_url_expires_at"] = None return DatabaseBackup(**args) @@ -385,14 +417,20 @@ def unmarshal_InstanceLog(data: Any) -> InstanceLog: field = data.get("download_url", None) if field is not None: args["download_url"] = field + else: + args["download_url"] = None field = data.get("expires_at", None) if field is not None: args["expires_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expires_at"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None return InstanceLog(**args) @@ -422,6 +460,8 @@ def unmarshal_BackupSchedule(data: Any) -> BackupSchedule: args["next_run_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["next_run_at"] = None return BackupSchedule(**args) @@ -456,10 +496,14 @@ def unmarshal_LogsPolicy(data: Any) -> LogsPolicy: field = data.get("max_age_retention", None) if field is not None: args["max_age_retention"] = field + else: + args["max_age_retention"] = None field = data.get("total_disk_retention", None) if field is not None: args["total_disk_retention"] = field + else: + args["total_disk_retention"] = None return LogsPolicy(**args) @@ -499,7 +543,7 @@ def unmarshal_Volume(data: Any) -> Volume: args: Dict[str, Any] = {} - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -507,7 +551,7 @@ def unmarshal_Volume(data: Any) -> Volume: if field is not None: args["size"] = field - field = data.get("class_", None) + field = data.get("class", None) if field is not None: args["class_"] = field @@ -541,10 +585,14 @@ def unmarshal_Instance(data: Any) -> Instance: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("volume", None) if field is not None: args["volume"] = unmarshal_Volume(field) + else: + args["volume"] = None field = data.get("project_id", None) if field is not None: @@ -583,10 +631,14 @@ def unmarshal_Instance(data: Any) -> Instance: field = data.get("endpoint", None) if field is not None: args["endpoint"] = unmarshal_Endpoint(field) + else: + args["endpoint"] = None field = data.get("backup_schedule", None) if field is not None: args["backup_schedule"] = unmarshal_BackupSchedule(field) + else: + args["backup_schedule"] = None field = data.get("read_replicas", None) if field is not None: @@ -623,6 +675,8 @@ def unmarshal_Instance(data: Any) -> Instance: field = data.get("logs_policy", None) if field is not None: args["logs_policy"] = unmarshal_LogsPolicy(field) + else: + args["logs_policy"] = None return Instance(**args) @@ -658,11 +712,11 @@ def unmarshal_SnapshotVolumeType(data: Any) -> SnapshotVolumeType: args: Dict[str, Any] = {} - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field - field = data.get("class_", None) + field = data.get("class", None) if field is not None: args["class_"] = field @@ -708,22 +762,32 @@ def unmarshal_Snapshot(data: Any) -> Snapshot: field = data.get("size", None) if field is not None: args["size"] = field + else: + args["size"] = None field = data.get("expires_at", None) if field is not None: args["expires_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expires_at"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("volume_type", None) if field is not None: args["volume_type"] = unmarshal_SnapshotVolumeType(field) + else: + args["volume_type"] = None return Snapshot(**args) @@ -778,6 +842,8 @@ def unmarshal_ACLRule(data: Any) -> ACLRule: field = data.get("port", None) if field is not None: args["port"] = field + else: + args["port"] = None return ACLRule(**args) @@ -923,26 +989,38 @@ def unmarshal_EngineSetting(data: Any) -> EngineSetting: field = data.get("unit", None) if field is not None: args["unit"] = field + else: + args["unit"] = None field = data.get("string_constraint", None) if field is not None: args["string_constraint"] = field + else: + args["string_constraint"] = None field = data.get("int_min", None) if field is not None: args["int_min"] = field + else: + args["int_min"] = None field = data.get("int_max", None) if field is not None: args["int_max"] = field + else: + args["int_max"] = None field = data.get("float_min", None) if field is not None: args["float_min"] = field + else: + args["float_min"] = None field = data.get("float_max", None) if field is not None: args["float_max"] = field + else: + args["float_max"] = None return EngineSetting(**args) @@ -988,6 +1066,8 @@ def unmarshal_EngineVersion(data: Any) -> EngineVersion: args["end_of_life"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["end_of_life"] = None return EngineVersion(**args) @@ -1194,7 +1274,7 @@ def unmarshal_NodeTypeVolumeType(data: Any) -> NodeTypeVolumeType: args: Dict[str, Any] = {} - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -1214,7 +1294,7 @@ def unmarshal_NodeTypeVolumeType(data: Any) -> NodeTypeVolumeType: if field is not None: args["chunk_size"] = field - field = data.get("class_", None) + field = data.get("class", None) if field is not None: args["class_"] = field @@ -1260,10 +1340,14 @@ def unmarshal_NodeType(data: Any) -> NodeType: field = data.get("volume_constraint", None) if field is not None: args["volume_constraint"] = unmarshal_NodeTypeVolumeConstraintSizes(field) + else: + args["volume_constraint"] = None field = data.get("is_bssd_compatible", None) if field is not None: args["is_bssd_compatible"] = field + else: + args["is_bssd_compatible"] = None field = data.get("available_volume_types", None) if field is not None: diff --git a/scaleway-async/scaleway_async/redis/v1/marshalling.py b/scaleway-async/scaleway_async/redis/v1/marshalling.py index f72dabcb..0db4ab1a 100644 --- a/scaleway-async/scaleway_async/redis/v1/marshalling.py +++ b/scaleway-async/scaleway_async/redis/v1/marshalling.py @@ -64,10 +64,14 @@ def unmarshal_ACLRule(data: Any) -> ACLRule: field = data.get("ip_cidr", None) if field is not None: args["ip_cidr"] = field + else: + args["ip_cidr"] = None field = data.get("description", None) if field is not None: args["description"] = field + else: + args["description"] = None return ACLRule(**args) @@ -133,10 +137,14 @@ def unmarshal_Endpoint(data: Any) -> Endpoint: field = data.get("private_network", None) if field is not None: args["private_network"] = unmarshal_PrivateNetwork(field) + else: + args["private_network"] = None field = data.get("public_network", None) if field is not None: args["public_network"] = unmarshal_PublicNetwork(field) + else: + args["public_network"] = None return Endpoint(**args) @@ -215,10 +223,14 @@ def unmarshal_Cluster(data: Any) -> Cluster: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("acl_rules", None) if field is not None: @@ -333,7 +345,7 @@ def unmarshal_AvailableClusterSetting(data: Any) -> AvailableClusterSetting: if field is not None: args["name"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -348,18 +360,26 @@ def unmarshal_AvailableClusterSetting(data: Any) -> AvailableClusterSetting: field = data.get("default_value", None) if field is not None: args["default_value"] = field + else: + args["default_value"] = None field = data.get("max_value", None) if field is not None: args["max_value"] = field + else: + args["max_value"] = None field = data.get("min_value", None) if field is not None: args["min_value"] = field + else: + args["min_value"] = None field = data.get("regex", None) if field is not None: args["regex"] = field + else: + args["regex"] = None return AvailableClusterSetting(**args) @@ -397,6 +417,8 @@ def unmarshal_ClusterVersion(data: Any) -> ClusterVersion: args["end_of_life_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["end_of_life_at"] = None return ClusterVersion(**args) diff --git a/scaleway-async/scaleway_async/registry/v1/marshalling.py b/scaleway-async/scaleway_async/registry/v1/marshalling.py index d720c137..1ffa9c7f 100644 --- a/scaleway-async/scaleway_async/registry/v1/marshalling.py +++ b/scaleway-async/scaleway_async/registry/v1/marshalling.py @@ -61,14 +61,20 @@ def unmarshal_Image(data: Any) -> Image: field = data.get("status_message", None) if field is not None: args["status_message"] = field + else: + args["status_message"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return Image(**args) @@ -132,10 +138,14 @@ def unmarshal_Namespace(data: Any) -> Namespace: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return Namespace(**args) @@ -171,10 +181,14 @@ def unmarshal_Tag(data: Any) -> Tag: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return Tag(**args) diff --git a/scaleway-async/scaleway_async/secret/v1alpha1/marshalling.py b/scaleway-async/scaleway_async/secret/v1alpha1/marshalling.py index 6c6efd10..34a6622c 100644 --- a/scaleway-async/scaleway_async/secret/v1alpha1/marshalling.py +++ b/scaleway-async/scaleway_async/secret/v1alpha1/marshalling.py @@ -58,6 +58,8 @@ def unmarshal_Folder(data: Any) -> Folder: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None return Folder(**args) @@ -77,10 +79,14 @@ def unmarshal_EphemeralProperties(data: Any) -> EphemeralProperties: field = data.get("expires_at", None) if field is not None: args["expires_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expires_at"] = None field = data.get("expires_once_accessed", None) if field is not None: args["expires_once_accessed"] = field + else: + args["expires_once_accessed"] = None return EphemeralProperties(**args) @@ -112,18 +118,26 @@ def unmarshal_SecretVersion(data: Any) -> SecretVersion: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("description", None) if field is not None: args["description"] = field + else: + args["description"] = None field = data.get("ephemeral_properties", None) if field is not None: args["ephemeral_properties"] = unmarshal_EphemeralProperties(field) + else: + args["ephemeral_properties"] = None return SecretVersion(**args) @@ -143,10 +157,14 @@ def unmarshal_EphemeralPolicy(data: Any) -> EphemeralPolicy: field = data.get("time_to_live", None) if field is not None: args["time_to_live"] = field + else: + args["time_to_live"] = None field = data.get("expires_once_accessed", None) if field is not None: args["expires_once_accessed"] = field + else: + args["expires_once_accessed"] = None return EphemeralPolicy(**args) @@ -178,10 +196,14 @@ def unmarshal_Secret(data: Any) -> Secret: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("tags", None) if field is not None: @@ -199,7 +221,7 @@ def unmarshal_Secret(data: Any) -> Secret: if field is not None: args["is_protected"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -214,10 +236,14 @@ def unmarshal_Secret(data: Any) -> Secret: field = data.get("description", None) if field is not None: args["description"] = field + else: + args["description"] = None field = data.get("ephemeral_policy", None) if field is not None: args["ephemeral_policy"] = unmarshal_EphemeralPolicy(field) + else: + args["ephemeral_policy"] = None return Secret(**args) @@ -245,6 +271,8 @@ def unmarshal_AccessSecretVersionResponse(data: Any) -> AccessSecretVersionRespo field = data.get("data_crc32", None) if field is not None: args["data_crc32"] = field + else: + args["data_crc32"] = None return AccessSecretVersionResponse(**args) diff --git a/scaleway-async/scaleway_async/secret/v1beta1/marshalling.py b/scaleway-async/scaleway_async/secret/v1beta1/marshalling.py index 3dfc237a..a2bb8fb5 100644 --- a/scaleway-async/scaleway_async/secret/v1beta1/marshalling.py +++ b/scaleway-async/scaleway_async/secret/v1beta1/marshalling.py @@ -41,10 +41,14 @@ def unmarshal_EphemeralProperties(data: Any) -> EphemeralProperties: field = data.get("expires_at", None) if field is not None: args["expires_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expires_at"] = None field = data.get("expires_once_accessed", None) if field is not None: args["expires_once_accessed"] = field + else: + args["expires_once_accessed"] = None return EphemeralProperties(**args) @@ -76,18 +80,26 @@ def unmarshal_SecretVersion(data: Any) -> SecretVersion: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("description", None) if field is not None: args["description"] = field + else: + args["description"] = None field = data.get("ephemeral_properties", None) if field is not None: args["ephemeral_properties"] = unmarshal_EphemeralProperties(field) + else: + args["ephemeral_properties"] = None return SecretVersion(**args) @@ -107,10 +119,14 @@ def unmarshal_EphemeralPolicy(data: Any) -> EphemeralPolicy: field = data.get("time_to_live", None) if field is not None: args["time_to_live"] = field + else: + args["time_to_live"] = None field = data.get("expires_once_accessed", None) if field is not None: args["expires_once_accessed"] = field + else: + args["expires_once_accessed"] = None return EphemeralPolicy(**args) @@ -142,10 +158,14 @@ def unmarshal_Secret(data: Any) -> Secret: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("tags", None) if field is not None: @@ -163,7 +183,7 @@ def unmarshal_Secret(data: Any) -> Secret: if field is not None: args["protected"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -178,10 +198,14 @@ def unmarshal_Secret(data: Any) -> Secret: field = data.get("description", None) if field is not None: args["description"] = field + else: + args["description"] = None field = data.get("ephemeral_policy", None) if field is not None: args["ephemeral_policy"] = unmarshal_EphemeralPolicy(field) + else: + args["ephemeral_policy"] = None return Secret(**args) @@ -206,13 +230,15 @@ def unmarshal_AccessSecretVersionResponse(data: Any) -> AccessSecretVersionRespo if field is not None: args["data"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field field = data.get("data_crc32", None) if field is not None: args["data_crc32"] = field + else: + args["data_crc32"] = None return AccessSecretVersionResponse(**args) @@ -259,6 +285,8 @@ def unmarshal_BrowseSecretsResponseItemSecretDetails( field = data.get("ephemeral_policy", None) if field is not None: args["ephemeral_policy"] = unmarshal_EphemeralPolicy(field) + else: + args["ephemeral_policy"] = None return BrowseSecretsResponseItemSecretDetails(**args) @@ -278,18 +306,26 @@ def unmarshal_BrowseSecretsResponseItem(data: Any) -> BrowseSecretsResponseItem: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("secret", None) if field is not None: args["secret"] = unmarshal_BrowseSecretsResponseItemSecretDetails(field) + else: + args["secret"] = None field = data.get("folder", None) if field is not None: args["folder"] = unmarshal_BrowseSecretsResponseItemFolderDetails(field) + else: + args["folder"] = None return BrowseSecretsResponseItem(**args) diff --git a/scaleway-async/scaleway_async/serverless_sqldb/v1alpha1/marshalling.py b/scaleway-async/scaleway_async/serverless_sqldb/v1alpha1/marshalling.py index 88f441a6..f250a531 100644 --- a/scaleway-async/scaleway_async/serverless_sqldb/v1alpha1/marshalling.py +++ b/scaleway-async/scaleway_async/serverless_sqldb/v1alpha1/marshalling.py @@ -51,24 +51,34 @@ def unmarshal_DatabaseBackup(data: Any) -> DatabaseBackup: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("expires_at", None) if field is not None: args["expires_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expires_at"] = None field = data.get("size", None) if field is not None: args["size"] = field + else: + args["size"] = None field = data.get("download_url", None) if field is not None: args["download_url"] = field + else: + args["download_url"] = None field = data.get("download_url_expires_at", None) if field is not None: args["download_url_expires_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["download_url_expires_at"] = None return DatabaseBackup(**args) @@ -132,6 +142,8 @@ def unmarshal_Database(data: Any) -> Database: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None return Database(**args) diff --git a/scaleway-async/scaleway_async/tem/v1alpha1/marshalling.py b/scaleway-async/scaleway_async/tem/v1alpha1/marshalling.py index 5d15e237..f35ef730 100644 --- a/scaleway-async/scaleway_async/tem/v1alpha1/marshalling.py +++ b/scaleway-async/scaleway_async/tem/v1alpha1/marshalling.py @@ -53,6 +53,8 @@ def unmarshal_EmailTry(data: Any) -> EmailTry: field = data.get("tried_at", None) if field is not None: args["tried_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["tried_at"] = None return EmailTry(**args) @@ -88,6 +90,8 @@ def unmarshal_Email(data: Any) -> Email: field = data.get("rcpt_to", None) if field is not None: args["rcpt_to"] = field + else: + args["rcpt_to"] = None field = data.get("rcpt_type", None) if field is not None: @@ -118,14 +122,20 @@ def unmarshal_Email(data: Any) -> Email: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("status_details", None) if field is not None: args["status_details"] = field + else: + args["status_details"] = None return Email(**args) @@ -160,6 +170,8 @@ def unmarshal_DomainRecords(data: Any) -> DomainRecords: field = data.get("dmarc", None) if field is not None: args["dmarc"] = unmarshal_DomainRecordsDMARC(field) + else: + args["dmarc"] = None return DomainRecords(**args) @@ -183,16 +195,22 @@ def unmarshal_DomainReputation(data: Any) -> DomainReputation: field = data.get("scored_at", None) if field is not None: args["scored_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["scored_at"] = None field = data.get("previous_score", None) if field is not None: args["previous_score"] = field + else: + args["previous_score"] = None field = data.get("previous_scored_at", None) if field is not None: args["previous_scored_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["previous_scored_at"] = None return DomainReputation(**args) @@ -259,18 +277,24 @@ def unmarshal_Domain(data: Any) -> Domain: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("next_check_at", None) if field is not None: args["next_check_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["next_check_at"] = None field = data.get("last_valid_at", None) if field is not None: args["last_valid_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["last_valid_at"] = None field = data.get("dkim_config", None) if field is not None: @@ -283,22 +307,32 @@ def unmarshal_Domain(data: Any) -> Domain: field = data.get("revoked_at", None) if field is not None: args["revoked_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["revoked_at"] = None field = data.get("last_error", None) if field is not None: args["last_error"] = field + else: + args["last_error"] = None field = data.get("statistics", None) if field is not None: args["statistics"] = unmarshal_DomainStatistics(field) + else: + args["statistics"] = None field = data.get("reputation", None) if field is not None: args["reputation"] = unmarshal_DomainReputation(field) + else: + args["reputation"] = None field = data.get("records", None) if field is not None: args["records"] = unmarshal_DomainRecords(field) + else: + args["records"] = None return Domain(**args) @@ -337,10 +371,14 @@ def unmarshal_DomainLastStatusDkimRecord(data: Any) -> DomainLastStatusDkimRecor args["last_valid_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["last_valid_at"] = None field = data.get("error", None) if field is not None: args["error"] = field + else: + args["error"] = None return DomainLastStatusDkimRecord(**args) @@ -362,10 +400,14 @@ def unmarshal_DomainLastStatusDmarcRecord(data: Any) -> DomainLastStatusDmarcRec args["last_valid_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["last_valid_at"] = None field = data.get("error", None) if field is not None: args["error"] = field + else: + args["error"] = None return DomainLastStatusDmarcRecord(**args) @@ -387,10 +429,14 @@ def unmarshal_DomainLastStatusSpfRecord(data: Any) -> DomainLastStatusSpfRecord: args["last_valid_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["last_valid_at"] = None field = data.get("error", None) if field is not None: args["error"] = field + else: + args["error"] = None return DomainLastStatusSpfRecord(**args) @@ -414,14 +460,20 @@ def unmarshal_DomainLastStatus(data: Any) -> DomainLastStatus: field = data.get("spf_record", None) if field is not None: args["spf_record"] = unmarshal_DomainLastStatusSpfRecord(field) + else: + args["spf_record"] = None field = data.get("dkim_record", None) if field is not None: args["dkim_record"] = unmarshal_DomainLastStatusDkimRecord(field) + else: + args["dkim_record"] = None field = data.get("dmarc_record", None) if field is not None: args["dmarc_record"] = unmarshal_DomainLastStatusDmarcRecord(field) + else: + args["dmarc_record"] = None return DomainLastStatus(**args) diff --git a/scaleway-async/scaleway_async/test/v1/marshalling.py b/scaleway-async/scaleway_async/test/v1/marshalling.py index 357241bf..6c3c3e84 100644 --- a/scaleway-async/scaleway_async/test/v1/marshalling.py +++ b/scaleway-async/scaleway_async/test/v1/marshalling.py @@ -58,10 +58,14 @@ def unmarshal_Human(data: Any) -> Human: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("hair_count", None) if field is not None: diff --git a/scaleway-async/scaleway_async/vpc/v1/marshalling.py b/scaleway-async/scaleway_async/vpc/v1/marshalling.py index 32514e39..b67881a3 100644 --- a/scaleway-async/scaleway_async/vpc/v1/marshalling.py +++ b/scaleway-async/scaleway_async/vpc/v1/marshalling.py @@ -52,10 +52,14 @@ def unmarshal_PrivateNetwork(data: Any) -> PrivateNetwork: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return PrivateNetwork(**args) diff --git a/scaleway-async/scaleway_async/vpc/v2/marshalling.py b/scaleway-async/scaleway_async/vpc/v2/marshalling.py index 760ec692..fbbc5561 100644 --- a/scaleway-async/scaleway_async/vpc/v2/marshalling.py +++ b/scaleway-async/scaleway_async/vpc/v2/marshalling.py @@ -48,10 +48,14 @@ def unmarshal_Subnet(data: Any) -> Subnet: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return Subnet(**args) @@ -105,10 +109,14 @@ def unmarshal_PrivateNetwork(data: Any) -> PrivateNetwork: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return PrivateNetwork(**args) @@ -160,10 +168,14 @@ def unmarshal_VPC(data: Any) -> VPC: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return VPC(**args) diff --git a/scaleway-async/scaleway_async/vpcgw/v1/marshalling.py b/scaleway-async/scaleway_async/vpcgw/v1/marshalling.py index 80c04c1c..a3063988 100644 --- a/scaleway-async/scaleway_async/vpcgw/v1/marshalling.py +++ b/scaleway-async/scaleway_async/vpcgw/v1/marshalling.py @@ -83,10 +83,14 @@ def unmarshal_DHCP(data: Any) -> DHCP: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("pool_high", None) if field is not None: @@ -123,14 +127,20 @@ def unmarshal_DHCP(data: Any) -> DHCP: field = data.get("valid_lifetime", None) if field is not None: args["valid_lifetime"] = field + else: + args["valid_lifetime"] = None field = data.get("renew_timer", None) if field is not None: args["renew_timer"] = field + else: + args["renew_timer"] = None field = data.get("rebind_timer", None) if field is not None: args["rebind_timer"] = field + else: + args["rebind_timer"] = None return DHCP(**args) @@ -177,14 +187,20 @@ def unmarshal_GatewayNetwork(data: Any) -> GatewayNetwork: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("mac_address", None) if field is not None: args["mac_address"] = field + else: + args["mac_address"] = None field = data.get("enable_masquerade", None) if field is not None: @@ -205,14 +221,20 @@ def unmarshal_GatewayNetwork(data: Any) -> GatewayNetwork: field = data.get("dhcp", None) if field is not None: args["dhcp"] = unmarshal_DHCP(field) + else: + args["dhcp"] = None field = data.get("address", None) if field is not None: args["address"] = field + else: + args["address"] = None field = data.get("ipam_config", None) if field is not None: args["ipam_config"] = unmarshal_IpamConfig(field) + else: + args["ipam_config"] = None return GatewayNetwork(**args) @@ -252,18 +274,26 @@ def unmarshal_IP(data: Any) -> IP: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("reverse", None) if field is not None: args["reverse"] = field + else: + args["reverse"] = None field = data.get("gateway_id", None) if field is not None: args["gateway_id"] = field + else: + args["gateway_id"] = None return IP(**args) @@ -296,7 +326,7 @@ def unmarshal_DHCPEntry(data: Any) -> DHCPEntry: if field is not None: args["hostname"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -307,10 +337,14 @@ def unmarshal_DHCPEntry(data: Any) -> DHCPEntry: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return DHCPEntry(**args) @@ -361,14 +395,20 @@ def unmarshal_Gateway(data: Any) -> Gateway: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = unmarshal_GatewayType(field) + else: + args["type_"] = None field = data.get("status", None) if field is not None: @@ -399,14 +439,20 @@ def unmarshal_Gateway(data: Any) -> Gateway: field = data.get("ip", None) if field is not None: args["ip"] = unmarshal_IP(field) + else: + args["ip"] = None field = data.get("version", None) if field is not None: args["version"] = field + else: + args["version"] = None field = data.get("can_upgrade_to", None) if field is not None: args["can_upgrade_to"] = field + else: + args["can_upgrade_to"] = None field = data.get("bastion_port", None) if field is not None: @@ -470,10 +516,14 @@ def unmarshal_PATRule(data: Any) -> PATRule: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return PATRule(**args) diff --git a/scaleway-async/scaleway_async/webhosting/v1alpha1/marshalling.py b/scaleway-async/scaleway_async/webhosting/v1alpha1/marshalling.py index e6f39d9a..7329b7b2 100644 --- a/scaleway-async/scaleway_async/webhosting/v1alpha1/marshalling.py +++ b/scaleway-async/scaleway_async/webhosting/v1alpha1/marshalling.py @@ -113,14 +113,20 @@ def unmarshal_Hosting(data: Any) -> Hosting: field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("platform_number", None) if field is not None: args["platform_number"] = field + else: + args["platform_number"] = None field = data.get("options", None) if field is not None: @@ -171,6 +177,8 @@ def unmarshal_Hosting(data: Any) -> Hosting: field = data.get("cpanel_urls", None) if field is not None: args["cpanel_urls"] = unmarshal_HostingCpanelUrls(field) + else: + args["cpanel_urls"] = None return Hosting(**args) @@ -187,7 +195,7 @@ def unmarshal_DnsRecord(data: Any) -> DnsRecord: if field is not None: args["name"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -206,6 +214,8 @@ def unmarshal_DnsRecord(data: Any) -> DnsRecord: field = data.get("priority", None) if field is not None: args["priority"] = field + else: + args["priority"] = None return DnsRecord(**args) @@ -413,10 +423,14 @@ def unmarshal_Offer(data: Any) -> Offer: field = data.get("product", None) if field is not None: args["product"] = unmarshal_OfferProduct(field) + else: + args["product"] = None field = data.get("price", None) if field is not None: args["price"] = unmarshal_Money(field) + else: + args["price"] = None return Offer(**args) diff --git a/scaleway/scaleway/account/v2/marshalling.py b/scaleway/scaleway/account/v2/marshalling.py index 869668e9..c577c2d2 100644 --- a/scaleway/scaleway/account/v2/marshalling.py +++ b/scaleway/scaleway/account/v2/marshalling.py @@ -40,10 +40,14 @@ def unmarshal_Project(data: Any) -> Project: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return Project(**args) diff --git a/scaleway/scaleway/account/v3/marshalling.py b/scaleway/scaleway/account/v3/marshalling.py index 2725094d..adf14cd3 100644 --- a/scaleway/scaleway/account/v3/marshalling.py +++ b/scaleway/scaleway/account/v3/marshalling.py @@ -40,10 +40,14 @@ def unmarshal_Project(data: Any) -> Project: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return Project(**args) diff --git a/scaleway/scaleway/applesilicon/v1alpha1/marshalling.py b/scaleway/scaleway/applesilicon/v1alpha1/marshalling.py index 4524d1c5..9d92c06d 100644 --- a/scaleway/scaleway/applesilicon/v1alpha1/marshalling.py +++ b/scaleway/scaleway/applesilicon/v1alpha1/marshalling.py @@ -82,7 +82,7 @@ def unmarshal_ServerTypeDisk(data: Any) -> ServerTypeDisk: if field is not None: args["capacity"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -101,7 +101,7 @@ def unmarshal_ServerTypeMemory(data: Any) -> ServerTypeMemory: if field is not None: args["capacity"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -127,18 +127,26 @@ def unmarshal_ServerType(data: Any) -> ServerType: field = data.get("cpu", None) if field is not None: args["cpu"] = unmarshal_ServerTypeCPU(field) + else: + args["cpu"] = None field = data.get("disk", None) if field is not None: args["disk"] = unmarshal_ServerTypeDisk(field) + else: + args["disk"] = None field = data.get("memory", None) if field is not None: args["memory"] = unmarshal_ServerTypeMemory(field) + else: + args["memory"] = None field = data.get("minimum_lease_duration", None) if field is not None: args["minimum_lease_duration"] = field + else: + args["minimum_lease_duration"] = None return ServerType(**args) @@ -155,7 +163,7 @@ def unmarshal_Server(data: Any) -> Server: if field is not None: args["id"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -190,16 +198,22 @@ def unmarshal_Server(data: Any) -> Server: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("deletable_at", None) if field is not None: args["deletable_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["deletable_at"] = None return Server(**args) diff --git a/scaleway/scaleway/baremetal/v1/marshalling.py b/scaleway/scaleway/baremetal/v1/marshalling.py index 60471d4d..dc637d6c 100644 --- a/scaleway/scaleway/baremetal/v1/marshalling.py +++ b/scaleway/scaleway/baremetal/v1/marshalling.py @@ -111,6 +111,8 @@ def unmarshal_OSOSField(data: Any) -> OSOSField: field = data.get("default_value", None) if field is not None: args["default_value"] = field + else: + args["default_value"] = None return OSOSField(**args) @@ -154,22 +156,32 @@ def unmarshal_OS(data: Any) -> OS: field = data.get("ssh", None) if field is not None: args["ssh"] = unmarshal_OSOSField(field) + else: + args["ssh"] = None field = data.get("user", None) if field is not None: args["user"] = unmarshal_OSOSField(field) + else: + args["user"] = None field = data.get("password", None) if field is not None: args["password"] = unmarshal_OSOSField(field) + else: + args["password"] = None field = data.get("service_user", None) if field is not None: args["service_user"] = unmarshal_OSOSField(field) + else: + args["service_user"] = None field = data.get("service_password", None) if field is not None: args["service_password"] = unmarshal_OSOSField(field) + else: + args["service_password"] = None return OS(**args) @@ -217,7 +229,7 @@ def unmarshal_Disk(data: Any) -> Disk: if field is not None: args["capacity"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -236,7 +248,7 @@ def unmarshal_Memory(data: Any) -> Memory: if field is not None: args["capacity"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -282,10 +294,14 @@ def unmarshal_OfferOptionOffer(data: Any) -> OfferOptionOffer: field = data.get("price", None) if field is not None: args["price"] = unmarshal_Money(field) + else: + args["price"] = None field = data.get("os_id", None) if field is not None: args["os_id"] = field + else: + args["os_id"] = None return OfferOptionOffer(**args) @@ -302,7 +318,7 @@ def unmarshal_PersistentMemory(data: Any) -> PersistentMemory: if field is not None: args["capacity"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -373,10 +389,14 @@ def unmarshal_Offer(data: Any) -> Offer: field = data.get("price_per_hour", None) if field is not None: args["price_per_hour"] = unmarshal_Money(field) + else: + args["price_per_hour"] = None field = data.get("price_per_month", None) if field is not None: args["price_per_month"] = unmarshal_Money(field) + else: + args["price_per_month"] = None field = data.get("cpus", None) if field is not None: @@ -441,6 +461,8 @@ def unmarshal_Offer(data: Any) -> Offer: field = data.get("fee", None) if field is not None: args["fee"] = unmarshal_Money(field) + else: + args["fee"] = None return Offer(**args) @@ -499,14 +521,20 @@ def unmarshal_ServerPrivateNetwork(data: Any) -> ServerPrivateNetwork: field = data.get("vlan", None) if field is not None: args["vlan"] = field + else: + args["vlan"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return ServerPrivateNetwork(**args) @@ -577,6 +605,8 @@ def unmarshal_ServerOption(data: Any) -> ServerOption: field = data.get("expires_at", None) if field is not None: args["expires_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expires_at"] = None return ServerOption(**args) @@ -635,10 +665,14 @@ def unmarshal_Server(data: Any) -> Server: field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("offer_id", None) if field is not None: @@ -681,10 +715,14 @@ def unmarshal_Server(data: Any) -> Server: field = data.get("install", None) if field is not None: args["install"] = unmarshal_ServerInstall(field) + else: + args["install"] = None field = data.get("rescue_server", None) if field is not None: args["rescue_server"] = unmarshal_ServerRescueServer(field) + else: + args["rescue_server"] = None return Server(**args) @@ -701,7 +739,7 @@ def unmarshal_Setting(data: Any) -> Setting: if field is not None: args["id"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -739,6 +777,8 @@ def unmarshal_BMCAccess(data: Any) -> BMCAccess: field = data.get("expires_at", None) if field is not None: args["expires_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expires_at"] = None return BMCAccess(**args) @@ -754,6 +794,8 @@ def unmarshal_GetServerMetricsResponse(data: Any) -> GetServerMetricsResponse: field = data.get("pings", None) if field is not None: args["pings"] = unmarshal_TimeSeries(field) + else: + args["pings"] = None return GetServerMetricsResponse(**args) @@ -838,10 +880,14 @@ def unmarshal_ServerEvent(data: Any) -> ServerEvent: field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None return ServerEvent(**args) diff --git a/scaleway/scaleway/billing/v2alpha1/marshalling.py b/scaleway/scaleway/billing/v2alpha1/marshalling.py index 351e16f2..3fe90b66 100644 --- a/scaleway/scaleway/billing/v2alpha1/marshalling.py +++ b/scaleway/scaleway/billing/v2alpha1/marshalling.py @@ -48,6 +48,8 @@ def unmarshal_GetConsumptionResponseConsumption( field = data.get("value", None) if field is not None: args["value"] = unmarshal_Money(field) + else: + args["value"] = None return GetConsumptionResponseConsumption(**args) @@ -71,6 +73,8 @@ def unmarshal_GetConsumptionResponse(data: Any) -> GetConsumptionResponse: field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return GetConsumptionResponse(**args) @@ -86,6 +90,8 @@ def unmarshal_DiscountCoupon(data: Any) -> DiscountCoupon: field = data.get("description", None) if field is not None: args["description"] = field + else: + args["description"] = None return DiscountCoupon(**args) @@ -98,7 +104,7 @@ def unmarshal_DiscountFilter(data: Any) -> DiscountFilter: args: Dict[str, Any] = {} - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -156,18 +162,26 @@ def unmarshal_Discount(data: Any) -> Discount: args["creation_date"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["creation_date"] = None field = data.get("start_date", None) if field is not None: args["start_date"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["start_date"] = None field = data.get("stop_date", None) if field is not None: args["stop_date"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["stop_date"] = None field = data.get("coupon", None) if field is not None: args["coupon"] = unmarshal_DiscountCoupon(field) + else: + args["coupon"] = None return Discount(**args) @@ -216,24 +230,34 @@ def unmarshal_Invoice(data: Any) -> Invoice: field = data.get("start_date", None) if field is not None: args["start_date"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["start_date"] = None field = data.get("issued_date", None) if field is not None: args["issued_date"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["issued_date"] = None field = data.get("due_date", None) if field is not None: args["due_date"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["due_date"] = None field = data.get("total_untaxed", None) if field is not None: args["total_untaxed"] = unmarshal_Money(field) + else: + args["total_untaxed"] = None field = data.get("total_taxed", None) if field is not None: args["total_taxed"] = unmarshal_Money(field) + else: + args["total_taxed"] = None return Invoice(**args) diff --git a/scaleway/scaleway/billing/v2beta1/marshalling.py b/scaleway/scaleway/billing/v2beta1/marshalling.py index 48328d55..69debc7a 100644 --- a/scaleway/scaleway/billing/v2beta1/marshalling.py +++ b/scaleway/scaleway/billing/v2beta1/marshalling.py @@ -44,28 +44,38 @@ def unmarshal_Invoice(data: Any) -> Invoice: field = data.get("start_date", None) if field is not None: args["start_date"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["start_date"] = None field = data.get("stop_date", None) if field is not None: args["stop_date"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["stop_date"] = None field = data.get("billing_period", None) if field is not None: args["billing_period"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["billing_period"] = None field = data.get("issued_date", None) if field is not None: args["issued_date"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["issued_date"] = None field = data.get("due_date", None) if field is not None: args["due_date"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["due_date"] = None - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -84,22 +94,32 @@ def unmarshal_Invoice(data: Any) -> Invoice: field = data.get("total_untaxed", None) if field is not None: args["total_untaxed"] = unmarshal_Money(field) + else: + args["total_untaxed"] = None field = data.get("total_taxed", None) if field is not None: args["total_taxed"] = unmarshal_Money(field) + else: + args["total_taxed"] = None field = data.get("total_tax", None) if field is not None: args["total_tax"] = unmarshal_Money(field) + else: + args["total_tax"] = None field = data.get("total_discount", None) if field is not None: args["total_discount"] = unmarshal_Money(field) + else: + args["total_discount"] = None field = data.get("total_undiscount", None) if field is not None: args["total_undiscount"] = unmarshal_Money(field) + else: + args["total_undiscount"] = None return Invoice(**args) @@ -145,6 +165,8 @@ def unmarshal_ListConsumptionsResponseConsumption( field = data.get("value", None) if field is not None: args["value"] = unmarshal_Money(field) + else: + args["value"] = None return ListConsumptionsResponseConsumption(**args) @@ -176,6 +198,8 @@ def unmarshal_ListConsumptionsResponse(data: Any) -> ListConsumptionsResponse: field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return ListConsumptionsResponse(**args) @@ -191,6 +215,8 @@ def unmarshal_DiscountCoupon(data: Any) -> DiscountCoupon: field = data.get("description", None) if field is not None: args["description"] = field + else: + args["description"] = None return DiscountCoupon(**args) @@ -203,7 +229,7 @@ def unmarshal_DiscountFilter(data: Any) -> DiscountFilter: args: Dict[str, Any] = {} - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -261,18 +287,26 @@ def unmarshal_Discount(data: Any) -> Discount: args["creation_date"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["creation_date"] = None field = data.get("start_date", None) if field is not None: args["start_date"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["start_date"] = None field = data.get("stop_date", None) if field is not None: args["stop_date"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["stop_date"] = None field = data.get("coupon", None) if field is not None: args["coupon"] = unmarshal_DiscountCoupon(field) + else: + args["coupon"] = None return Discount(**args) @@ -338,10 +372,14 @@ def unmarshal_ListTaxesResponseTax(data: Any) -> ListTaxesResponseTax: field = data.get("rate", None) if field is not None: args["rate"] = field + else: + args["rate"] = None field = data.get("total_tax_value", None) if field is not None: args["total_tax_value"] = field + else: + args["total_tax_value"] = None return ListTaxesResponseTax(**args) @@ -369,5 +407,7 @@ def unmarshal_ListTaxesResponse(data: Any) -> ListTaxesResponse: field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return ListTaxesResponse(**args) diff --git a/scaleway/scaleway/block/v1alpha1/marshalling.py b/scaleway/scaleway/block/v1alpha1/marshalling.py index 4381f821..b7f7e70b 100644 --- a/scaleway/scaleway/block/v1alpha1/marshalling.py +++ b/scaleway/scaleway/block/v1alpha1/marshalling.py @@ -51,7 +51,7 @@ def unmarshal_Reference(data: Any) -> Reference: if field is not None: args["product_resource_id"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -62,6 +62,8 @@ def unmarshal_Reference(data: Any) -> Reference: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None return Reference(**args) @@ -82,7 +84,7 @@ def unmarshal_SnapshotParentVolume(data: Any) -> SnapshotParentVolume: if field is not None: args["name"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -135,21 +137,27 @@ def unmarshal_Snapshot(data: Any) -> Snapshot: if field is not None: args["zone"] = field - field = data.get("class_", None) + field = data.get("class", None) if field is not None: args["class_"] = field field = data.get("parent_volume", None) if field is not None: args["parent_volume"] = unmarshal_SnapshotParentVolume(field) + else: + args["parent_volume"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return Snapshot(**args) @@ -162,13 +170,15 @@ def unmarshal_VolumeSpecifications(data: Any) -> VolumeSpecifications: args: Dict[str, Any] = {} - field = data.get("class_", None) + field = data.get("class", None) if field is not None: args["class_"] = field field = data.get("perf_iops", None) if field is not None: args["perf_iops"] = field + else: + args["perf_iops"] = None return VolumeSpecifications(**args) @@ -189,7 +199,7 @@ def unmarshal_Volume(data: Any) -> Volume: if field is not None: args["name"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -210,14 +220,20 @@ def unmarshal_Volume(data: Any) -> Volume: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("parent_snapshot_id", None) if field is not None: args["parent_snapshot_id"] = field + else: + args["parent_snapshot_id"] = None field = data.get("status", None) if field is not None: @@ -234,12 +250,16 @@ def unmarshal_Volume(data: Any) -> Volume: field = data.get("specs", None) if field is not None: args["specs"] = unmarshal_VolumeSpecifications(field) + else: + args["specs"] = None field = data.get("last_detached_at", None) if field is not None: args["last_detached_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["last_detached_at"] = None return Volume(**args) @@ -273,21 +293,27 @@ def unmarshal_VolumeType(data: Any) -> VolumeType: args: Dict[str, Any] = {} - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field field = data.get("pricing", None) if field is not None: args["pricing"] = unmarshal_Money(field) + else: + args["pricing"] = None field = data.get("snapshot_pricing", None) if field is not None: args["snapshot_pricing"] = unmarshal_Money(field) + else: + args["snapshot_pricing"] = None field = data.get("specs", None) if field is not None: args["specs"] = unmarshal_VolumeSpecifications(field) + else: + args["specs"] = None return VolumeType(**args) diff --git a/scaleway/scaleway/cockpit/v1/marshalling.py b/scaleway/scaleway/cockpit/v1/marshalling.py index 12bc2dd4..ac633628 100644 --- a/scaleway/scaleway/cockpit/v1/marshalling.py +++ b/scaleway/scaleway/cockpit/v1/marshalling.py @@ -74,6 +74,8 @@ def unmarshal_ContactPoint(data: Any) -> ContactPoint: field = data.get("email", None) if field is not None: args["email"] = unmarshal_ContactPointEmail(field) + else: + args["email"] = None return ContactPoint(**args) @@ -102,7 +104,7 @@ def unmarshal_DataSource(data: Any) -> DataSource: if field is not None: args["url"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -121,10 +123,14 @@ def unmarshal_DataSource(data: Any) -> DataSource: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return DataSource(**args) @@ -183,6 +189,8 @@ def unmarshal_GrafanaUser(data: Any) -> GrafanaUser: field = data.get("password", None) if field is not None: args["password"] = field + else: + args["password"] = None return GrafanaUser(**args) @@ -218,14 +226,20 @@ def unmarshal_Plan(data: Any) -> Plan: field = data.get("retention_metrics_interval", None) if field is not None: args["retention_metrics_interval"] = field + else: + args["retention_metrics_interval"] = None field = data.get("retention_logs_interval", None) if field is not None: args["retention_logs_interval"] = field + else: + args["retention_logs_interval"] = None field = data.get("retention_traces_interval", None) if field is not None: args["retention_traces_interval"] = field + else: + args["retention_traces_interval"] = None return Plan(**args) @@ -261,14 +275,20 @@ def unmarshal_Token(data: Any) -> Token: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("secret_key", None) if field is not None: args["secret_key"] = field + else: + args["secret_key"] = None return Token(**args) @@ -296,6 +316,8 @@ def unmarshal_AlertManager(data: Any) -> AlertManager: field = data.get("alert_manager_url", None) if field is not None: args["alert_manager_url"] = field + else: + args["alert_manager_url"] = None return AlertManager(**args) @@ -488,10 +510,14 @@ def unmarshal_Usage(data: Any) -> Usage: field = data.get("data_source_id", None) if field is not None: args["data_source_id"] = field + else: + args["data_source_id"] = None field = data.get("interval", None) if field is not None: args["interval"] = field + else: + args["interval"] = None return Usage(**args) @@ -507,22 +533,32 @@ def unmarshal_UsageOverview(data: Any) -> UsageOverview: field = data.get("scaleway_metrics_usage", None) if field is not None: args["scaleway_metrics_usage"] = unmarshal_Usage(field) + else: + args["scaleway_metrics_usage"] = None field = data.get("scaleway_logs_usage", None) if field is not None: args["scaleway_logs_usage"] = unmarshal_Usage(field) + else: + args["scaleway_logs_usage"] = None field = data.get("external_metrics_usage", None) if field is not None: args["external_metrics_usage"] = unmarshal_Usage(field) + else: + args["external_metrics_usage"] = None field = data.get("external_logs_usage", None) if field is not None: args["external_logs_usage"] = unmarshal_Usage(field) + else: + args["external_logs_usage"] = None field = data.get("external_traces_usage", None) if field is not None: args["external_traces_usage"] = unmarshal_Usage(field) + else: + args["external_traces_usage"] = None return UsageOverview(**args) diff --git a/scaleway/scaleway/cockpit/v1beta1/marshalling.py b/scaleway/scaleway/cockpit/v1beta1/marshalling.py index edf291af..47df80c4 100644 --- a/scaleway/scaleway/cockpit/v1beta1/marshalling.py +++ b/scaleway/scaleway/cockpit/v1beta1/marshalling.py @@ -73,6 +73,8 @@ def unmarshal_ContactPoint(data: Any) -> ContactPoint: field = data.get("email", None) if field is not None: args["email"] = unmarshal_ContactPointEmail(field) + else: + args["email"] = None return ContactPoint(**args) @@ -101,7 +103,7 @@ def unmarshal_Datasource(data: Any) -> Datasource: if field is not None: args["url"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -166,6 +168,8 @@ def unmarshal_GrafanaUser(data: Any) -> GrafanaUser: field = data.get("password", None) if field is not None: args["password"] = field + else: + args["password"] = None return GrafanaUser(**args) @@ -240,18 +244,26 @@ def unmarshal_Token(data: Any) -> Token: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("scopes", None) if field is not None: args["scopes"] = unmarshal_TokenScopes(field) + else: + args["scopes"] = None field = data.get("secret_key", None) if field is not None: args["secret_key"] = field + else: + args["secret_key"] = None return Token(**args) @@ -322,14 +334,20 @@ def unmarshal_Plan(data: Any) -> Plan: field = data.get("retention_metrics_interval", None) if field is not None: args["retention_metrics_interval"] = field + else: + args["retention_metrics_interval"] = None field = data.get("retention_logs_interval", None) if field is not None: args["retention_logs_interval"] = field + else: + args["retention_logs_interval"] = None field = data.get("retention_traces_interval", None) if field is not None: args["retention_traces_interval"] = field + else: + args["retention_traces_interval"] = None return Plan(**args) @@ -357,18 +375,26 @@ def unmarshal_Cockpit(data: Any) -> Cockpit: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("endpoints", None) if field is not None: args["endpoints"] = unmarshal_CockpitEndpoints(field) + else: + args["endpoints"] = None field = data.get("plan", None) if field is not None: args["plan"] = unmarshal_Plan(field) + else: + args["plan"] = None return Cockpit(**args) diff --git a/scaleway/scaleway/container/v1beta1/marshalling.py b/scaleway/scaleway/container/v1beta1/marshalling.py index 224844ea..98c072c3 100644 --- a/scaleway/scaleway/container/v1beta1/marshalling.py +++ b/scaleway/scaleway/container/v1beta1/marshalling.py @@ -122,14 +122,20 @@ def unmarshal_Container(data: Any) -> Container: field = data.get("timeout", None) if field is not None: args["timeout"] = field + else: + args["timeout"] = None field = data.get("error_message", None) if field is not None: args["error_message"] = field + else: + args["error_message"] = None field = data.get("description", None) if field is not None: args["description"] = field + else: + args["description"] = None field = data.get("domain_name", None) if field is not None: @@ -193,6 +199,8 @@ def unmarshal_Cron(data: Any) -> Cron: field = data.get("args", None) if field is not None: args["args"] = field + else: + args["args"] = None return Cron(**args) @@ -228,6 +236,8 @@ def unmarshal_Domain(data: Any) -> Domain: field = data.get("error_message", None) if field is not None: args["error_message"] = field + else: + args["error_message"] = None return Domain(**args) @@ -287,10 +297,14 @@ def unmarshal_Namespace(data: Any) -> Namespace: field = data.get("error_message", None) if field is not None: args["error_message"] = field + else: + args["error_message"] = None field = data.get("description", None) if field is not None: args["description"] = field + else: + args["description"] = None return Namespace(**args) @@ -318,22 +332,32 @@ def unmarshal_Token(data: Any) -> Token: field = data.get("container_id", None) if field is not None: args["container_id"] = field + else: + args["container_id"] = None field = data.get("namespace_id", None) if field is not None: args["namespace_id"] = field + else: + args["namespace_id"] = None field = data.get("public_key", None) if field is not None: args["public_key"] = field + else: + args["public_key"] = None field = data.get("description", None) if field is not None: args["description"] = field + else: + args["description"] = None field = data.get("expires_at", None) if field is not None: args["expires_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expires_at"] = None return Token(**args) @@ -365,6 +389,8 @@ def unmarshal_TriggerMnqNatsClientConfig(data: Any) -> TriggerMnqNatsClientConfi field = data.get("mnq_credential_id", None) if field is not None: args["mnq_credential_id"] = field + else: + args["mnq_credential_id"] = None return TriggerMnqNatsClientConfig(**args) @@ -392,6 +418,8 @@ def unmarshal_TriggerMnqSqsClientConfig(data: Any) -> TriggerMnqSqsClientConfig: field = data.get("mnq_credential_id", None) if field is not None: args["mnq_credential_id"] = field + else: + args["mnq_credential_id"] = None return TriggerMnqSqsClientConfig(**args) @@ -458,18 +486,26 @@ def unmarshal_Trigger(data: Any) -> Trigger: field = data.get("error_message", None) if field is not None: args["error_message"] = field + else: + args["error_message"] = None field = data.get("scw_sqs_config", None) if field is not None: args["scw_sqs_config"] = unmarshal_TriggerMnqSqsClientConfig(field) + else: + args["scw_sqs_config"] = None field = data.get("scw_nats_config", None) if field is not None: args["scw_nats_config"] = unmarshal_TriggerMnqNatsClientConfig(field) + else: + args["scw_nats_config"] = None field = data.get("sqs_config", None) if field is not None: args["sqs_config"] = unmarshal_TriggerSqsClientConfig(field) + else: + args["sqs_config"] = None return Trigger(**args) diff --git a/scaleway/scaleway/dedibox/v1/marshalling.py b/scaleway/scaleway/dedibox/v1/marshalling.py index 4452a9a7..8bdd9b9b 100644 --- a/scaleway/scaleway/dedibox/v1/marshalling.py +++ b/scaleway/scaleway/dedibox/v1/marshalling.py @@ -222,7 +222,7 @@ def unmarshal_Disk(data: Any) -> Disk: if field is not None: args["capacity"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -241,7 +241,7 @@ def unmarshal_Memory(data: Any) -> Memory: if field is not None: args["capacity"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -306,7 +306,7 @@ def unmarshal_OfferAntiDosInfo(data: Any) -> OfferAntiDosInfo: args: Dict[str, Any] = {} - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -354,6 +354,8 @@ def unmarshal_OfferFailoverBlockInfo(data: Any) -> OfferFailoverBlockInfo: field = data.get("onetime_fees", None) if field is not None: args["onetime_fees"] = unmarshal_Offer(field) + else: + args["onetime_fees"] = None return OfferFailoverBlockInfo(**args) @@ -369,6 +371,8 @@ def unmarshal_OfferFailoverIpInfo(data: Any) -> OfferFailoverIpInfo: field = data.get("onetime_fees", None) if field is not None: args["onetime_fees"] = unmarshal_Offer(field) + else: + args["onetime_fees"] = None return OfferFailoverIpInfo(**args) @@ -497,10 +501,14 @@ def unmarshal_OfferServerInfo(data: Any) -> OfferServerInfo: field = data.get("rpn_version", None) if field is not None: args["rpn_version"] = field + else: + args["rpn_version"] = None field = data.get("onetime_fees", None) if field is not None: args["onetime_fees"] = unmarshal_Offer(field) + else: + args["onetime_fees"] = None return OfferServerInfo(**args) @@ -608,54 +616,80 @@ def unmarshal_Offer(data: Any) -> Offer: field = data.get("pricing", None) if field is not None: args["pricing"] = unmarshal_Money(field) + else: + args["pricing"] = None field = data.get("server_info", None) if field is not None: args["server_info"] = unmarshal_OfferServerInfo(field) + else: + args["server_info"] = None field = data.get("service_level_info", None) if field is not None: args["service_level_info"] = unmarshal_OfferServiceLevelInfo(field) + else: + args["service_level_info"] = None field = data.get("rpn_info", None) if field is not None: args["rpn_info"] = unmarshal_OfferRPNInfo(field) + else: + args["rpn_info"] = None field = data.get("san_info", None) if field is not None: args["san_info"] = unmarshal_OfferSANInfo(field) + else: + args["san_info"] = None field = data.get("antidos_info", None) if field is not None: args["antidos_info"] = unmarshal_OfferAntiDosInfo(field) + else: + args["antidos_info"] = None field = data.get("backup_info", None) if field is not None: args["backup_info"] = unmarshal_OfferBackupInfo(field) + else: + args["backup_info"] = None field = data.get("usb_storage_info", None) if field is not None: args["usb_storage_info"] = unmarshal_OfferStorageInfo(field) + else: + args["usb_storage_info"] = None field = data.get("storage_info", None) if field is not None: args["storage_info"] = unmarshal_OfferStorageInfo(field) + else: + args["storage_info"] = None field = data.get("license_info", None) if field is not None: args["license_info"] = unmarshal_OfferLicenseInfo(field) + else: + args["license_info"] = None field = data.get("failover_ip_info", None) if field is not None: args["failover_ip_info"] = unmarshal_OfferFailoverIpInfo(field) + else: + args["failover_ip_info"] = None field = data.get("failover_block_info", None) if field is not None: args["failover_block_info"] = unmarshal_OfferFailoverBlockInfo(field) + else: + args["failover_block_info"] = None field = data.get("bandwidth_info", None) if field is not None: args["bandwidth_info"] = unmarshal_OfferBandwidthInfo(field) + else: + args["bandwidth_info"] = None return Offer(**args) @@ -676,7 +710,7 @@ def unmarshal_OS(data: Any) -> OS: if field is not None: args["name"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -739,24 +773,34 @@ def unmarshal_OS(data: Any) -> OS: field = data.get("max_partitions", None) if field is not None: args["max_partitions"] = field + else: + args["max_partitions"] = None field = data.get("panel_password_regex", None) if field is not None: args["panel_password_regex"] = field + else: + args["panel_password_regex"] = None field = data.get("requires_valid_hostname", None) if field is not None: args["requires_valid_hostname"] = field + else: + args["requires_valid_hostname"] = None field = data.get("hostname_regex", None) if field is not None: args["hostname_regex"] = field + else: + args["hostname_regex"] = None field = data.get("released_at", None) if field is not None: args["released_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["released_at"] = None return OS(**args) @@ -800,6 +844,8 @@ def unmarshal_RpnSan(data: Any) -> RpnSan: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("offer_name", None) if field is not None: @@ -828,22 +874,30 @@ def unmarshal_RpnSan(data: Any) -> RpnSan: field = data.get("offer", None) if field is not None: args["offer"] = unmarshal_Offer(field) + else: + args["offer"] = None field = data.get("delivered_at", None) if field is not None: args["delivered_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["delivered_at"] = None field = data.get("terminated_at", None) if field is not None: args["terminated_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["terminated_at"] = None field = data.get("expires_at", None) if field is not None: args["expires_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expires_at"] = None return RpnSan(**args) @@ -864,7 +918,7 @@ def unmarshal_RpnGroup(data: Any) -> RpnGroup: if field is not None: args["name"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -891,6 +945,8 @@ def unmarshal_RpnGroup(data: Any) -> RpnGroup: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None return RpnGroup(**args) @@ -915,7 +971,7 @@ def unmarshal_NetworkInterface(data: Any) -> NetworkInterface: if field is not None: args["mac"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -966,18 +1022,26 @@ def unmarshal_ServerOption(data: Any) -> ServerOption: field = data.get("offer", None) if field is not None: args["offer"] = unmarshal_Offer(field) + else: + args["offer"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("expired_at", None) if field is not None: args["expired_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expired_at"] = None return ServerOption(**args) @@ -1030,6 +1094,8 @@ def unmarshal_Server(data: Any) -> Server: args["rebooted_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["rebooted_at"] = None field = data.get("status", None) if field is not None: @@ -1084,34 +1150,50 @@ def unmarshal_Server(data: Any) -> Server: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("expired_at", None) if field is not None: args["expired_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expired_at"] = None field = data.get("offer", None) if field is not None: args["offer"] = unmarshal_Offer(field) + else: + args["offer"] = None field = data.get("location", None) if field is not None: args["location"] = unmarshal_ServerLocation(field) + else: + args["location"] = None field = data.get("os", None) if field is not None: args["os"] = unmarshal_OS(field) + else: + args["os"] = None field = data.get("level", None) if field is not None: args["level"] = unmarshal_ServiceLevel(field) + else: + args["level"] = None field = data.get("rescue_os", None) if field is not None: args["rescue_os"] = unmarshal_OS(field) + else: + args["rescue_os"] = None return Server(**args) @@ -1163,7 +1245,7 @@ def unmarshal_RpnV2Group(data: Any) -> RpnV2Group: if field is not None: args["project_id"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -1186,10 +1268,14 @@ def unmarshal_RpnV2Group(data: Any) -> RpnV2Group: field = data.get("subnet", None) if field is not None: args["subnet"] = unmarshal_RpnV2GroupSubnet(field) + else: + args["subnet"] = None field = data.get("rpnv1_group", None) if field is not None: args["rpnv1_group"] = unmarshal_RpnGroup(field) + else: + args["rpnv1_group"] = None return RpnV2Group(**args) @@ -1210,37 +1296,49 @@ def unmarshal_Service(data: Any) -> Service: if field is not None: args["provisioning_status"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field field = data.get("resource_id", None) if field is not None: args["resource_id"] = field + else: + args["resource_id"] = None field = data.get("offer", None) if field is not None: args["offer"] = unmarshal_Offer(field) + else: + args["offer"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("delivered_at", None) if field is not None: args["delivered_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["delivered_at"] = None field = data.get("terminated_at", None) if field is not None: args["terminated_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["terminated_at"] = None field = data.get("expires_at", None) if field is not None: args["expires_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expires_at"] = None return Service(**args) @@ -1324,25 +1422,33 @@ def unmarshal_FailoverIP(data: Any) -> FailoverIP: if field is not None: args["status"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field field = data.get("mac", None) if field is not None: args["mac"] = field + else: + args["mac"] = None field = data.get("server_id", None) if field is not None: args["server_id"] = field + else: + args["server_id"] = None field = data.get("block", None) if field is not None: args["block"] = unmarshal_FailoverBlock(field) + else: + args["block"] = None field = data.get("server_zone", None) if field is not None: args["server_zone"] = field + else: + args["server_zone"] = None return FailoverIP(**args) @@ -1374,6 +1480,8 @@ def unmarshal_BMCAccess(data: Any) -> BMCAccess: field = data.get("expires_at", None) if field is not None: args["expires_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expires_at"] = None return BMCAccess(**args) @@ -1468,6 +1576,8 @@ def unmarshal_CanOrderResponse(data: Any) -> CanOrderResponse: field = data.get("message", None) if field is not None: args["message"] = field + else: + args["message"] = None return CanOrderResponse(**args) @@ -1579,6 +1689,8 @@ def unmarshal_GetRpnStatusResponse(data: Any) -> GetRpnStatusResponse: field = data.get("operations_left", None) if field is not None: args["operations_left"] = field + else: + args["operations_left"] = None return GetRpnStatusResponse(**args) @@ -1655,18 +1767,26 @@ def unmarshal_Invoice(data: Any) -> Invoice: field = data.get("total_with_taxes", None) if field is not None: args["total_with_taxes"] = unmarshal_Money(field) + else: + args["total_with_taxes"] = None field = data.get("total_without_taxes", None) if field is not None: args["total_without_taxes"] = unmarshal_Money(field) + else: + args["total_without_taxes"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("paid_at", None) if field is not None: args["paid_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["paid_at"] = None return Invoice(**args) @@ -1765,18 +1885,26 @@ def unmarshal_InvoiceSummary(data: Any) -> InvoiceSummary: field = data.get("total_with_taxes", None) if field is not None: args["total_with_taxes"] = unmarshal_Money(field) + else: + args["total_with_taxes"] = None field = data.get("total_without_taxes", None) if field is not None: args["total_without_taxes"] = unmarshal_Money(field) + else: + args["total_without_taxes"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("paid_at", None) if field is not None: args["paid_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["paid_at"] = None return InvoiceSummary(**args) @@ -1852,21 +1980,27 @@ def unmarshal_RpnSanIp(data: Any) -> RpnSanIp: args: Dict[str, Any] = {} - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field field = data.get("server", None) if field is not None: args["server"] = unmarshal_RpnSanIpServer(field) + else: + args["server"] = None field = data.get("rpnv2_group", None) if field is not None: args["rpnv2_group"] = unmarshal_RpnSanIpRpnV2Group(field) + else: + args["rpnv2_group"] = None field = data.get("ip", None) if field is not None: args["ip"] = unmarshal_IP(field) + else: + args["ip"] = None return RpnSanIp(**args) @@ -1955,20 +2089,28 @@ def unmarshal_RefundSummary(data: Any) -> RefundSummary: field = data.get("total_with_taxes", None) if field is not None: args["total_with_taxes"] = unmarshal_Money(field) + else: + args["total_with_taxes"] = None field = data.get("total_without_taxes", None) if field is not None: args["total_without_taxes"] = unmarshal_Money(field) + else: + args["total_without_taxes"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("refunded_at", None) if field is not None: args["refunded_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["refunded_at"] = None return RefundSummary(**args) @@ -2106,14 +2248,20 @@ def unmarshal_RpnGroupMember(data: Any) -> RpnGroupMember: field = data.get("san_server", None) if field is not None: args["san_server"] = unmarshal_RpnSanServer(field) + else: + args["san_server"] = None field = data.get("server", None) if field is not None: args["server"] = unmarshal_Server(field) + else: + args["server"] = None field = data.get("speed", None) if field is not None: args["speed"] = field + else: + args["speed"] = None return RpnGroupMember(**args) @@ -2220,6 +2368,8 @@ def unmarshal_RpnSanSummary(data: Any) -> RpnSanSummary: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("offer_name", None) if field is not None: @@ -2246,16 +2396,22 @@ def unmarshal_RpnSanSummary(data: Any) -> RpnSanSummary: args["delivered_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["delivered_at"] = None field = data.get("terminated_at", None) if field is not None: args["terminated_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["terminated_at"] = None field = data.get("expires_at", None) if field is not None: args["expires_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expires_at"] = None return RpnSanSummary(**args) @@ -2328,10 +2484,14 @@ def unmarshal_RpnServerCapability(data: Any) -> RpnServerCapability: field = data.get("ip_address", None) if field is not None: args["ip_address"] = field + else: + args["ip_address"] = None field = data.get("rpn_version", None) if field is not None: args["rpn_version"] = field + else: + args["rpn_version"] = None return RpnServerCapability(**args) @@ -2407,14 +2567,20 @@ def unmarshal_RpnV2Member(data: Any) -> RpnV2Member: field = data.get("server", None) if field is not None: args["server"] = unmarshal_Server(field) + else: + args["server"] = None field = data.get("rpnv1_group", None) if field is not None: args["rpnv1_group"] = unmarshal_RpnGroup(field) + else: + args["rpnv1_group"] = None field = data.get("speed", None) if field is not None: args["speed"] = field + else: + args["speed"] = None return RpnV2Member(**args) @@ -2442,20 +2608,28 @@ def unmarshal_Log(data: Any) -> Log: field = data.get("group", None) if field is not None: args["group"] = unmarshal_RpnV2Group(field) + else: + args["group"] = None field = data.get("member", None) if field is not None: args["member"] = unmarshal_RpnV2Member(field) + else: + args["member"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("finished_at", None) if field is not None: args["finished_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["finished_at"] = None return Log(**args) @@ -2537,7 +2711,7 @@ def unmarshal_ServerDisk(data: Any) -> ServerDisk: if field is not None: args["connector"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -2592,6 +2766,8 @@ def unmarshal_ServerEvent(data: Any) -> ServerEvent: field = data.get("date", None) if field is not None: args["date"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["date"] = None return ServerEvent(**args) @@ -2648,14 +2824,20 @@ def unmarshal_ServerSummary(data: Any) -> ServerSummary: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("expired_at", None) if field is not None: args["expired_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expired_at"] = None field = data.get("offer_id", None) if field is not None: @@ -2692,14 +2874,20 @@ def unmarshal_ServerSummary(data: Any) -> ServerSummary: field = data.get("os_id", None) if field is not None: args["os_id"] = field + else: + args["os_id"] = None field = data.get("level", None) if field is not None: args["level"] = unmarshal_ServiceLevel(field) + else: + args["level"] = None field = data.get("rpn_version", None) if field is not None: args["rpn_version"] = field + else: + args["rpn_version"] = None return ServerSummary(**args) @@ -2834,20 +3022,28 @@ def unmarshal_Refund(data: Any) -> Refund: field = data.get("total_with_taxes", None) if field is not None: args["total_with_taxes"] = unmarshal_Money(field) + else: + args["total_with_taxes"] = None field = data.get("total_without_taxes", None) if field is not None: args["total_without_taxes"] = unmarshal_Money(field) + else: + args["total_without_taxes"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("refunded_at", None) if field is not None: args["refunded_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["refunded_at"] = None return Refund(**args) @@ -2887,7 +3083,7 @@ def unmarshal_Partition(data: Any) -> Partition: args: Dict[str, Any] = {} - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -2910,6 +3106,8 @@ def unmarshal_Partition(data: Any) -> Partition: field = data.get("mount_point", None) if field is not None: args["mount_point"] = field + else: + args["mount_point"] = None return Partition(**args) @@ -2964,10 +3162,14 @@ def unmarshal_ServerInstall(data: Any) -> ServerInstall: field = data.get("user_login", None) if field is not None: args["user_login"] = field + else: + args["user_login"] = None field = data.get("panel_url", None) if field is not None: args["panel_url"] = field + else: + args["panel_url"] = None return ServerInstall(**args) diff --git a/scaleway/scaleway/document_db/v1beta1/marshalling.py b/scaleway/scaleway/document_db/v1beta1/marshalling.py index 8efeb6af..b4b876ca 100644 --- a/scaleway/scaleway/document_db/v1beta1/marshalling.py +++ b/scaleway/scaleway/document_db/v1beta1/marshalling.py @@ -155,26 +155,38 @@ def unmarshal_Endpoint(data: Any) -> Endpoint: field = data.get("ip", None) if field is not None: args["ip"] = field + else: + args["ip"] = None field = data.get("name", None) if field is not None: args["name"] = field + else: + args["name"] = None field = data.get("private_network", None) if field is not None: args["private_network"] = unmarshal_EndpointPrivateNetworkDetails(field) + else: + args["private_network"] = None field = data.get("load_balancer", None) if field is not None: args["load_balancer"] = unmarshal_EndpointLoadBalancerDetails(field) + else: + args["load_balancer"] = None field = data.get("direct_access", None) if field is not None: args["direct_access"] = unmarshal_EndpointDirectAccessDetails(field) + else: + args["direct_access"] = None field = data.get("hostname", None) if field is not None: args["hostname"] = field + else: + args["hostname"] = None return Endpoint(**args) @@ -198,18 +210,26 @@ def unmarshal_Maintenance(data: Any) -> Maintenance: field = data.get("starts_at", None) if field is not None: args["starts_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["starts_at"] = None field = data.get("stops_at", None) if field is not None: args["stops_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["stops_at"] = None field = data.get("closed_at", None) if field is not None: args["closed_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["closed_at"] = None field = data.get("forced_at", None) if field is not None: args["forced_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["forced_at"] = None return Maintenance(**args) @@ -301,14 +321,20 @@ def unmarshal_InstanceLog(data: Any) -> InstanceLog: field = data.get("download_url", None) if field is not None: args["download_url"] = field + else: + args["download_url"] = None field = data.get("expires_at", None) if field is not None: args["expires_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expires_at"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None return InstanceLog(**args) @@ -338,6 +364,8 @@ def unmarshal_BackupSchedule(data: Any) -> BackupSchedule: args["next_run_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["next_run_at"] = None return BackupSchedule(**args) @@ -372,10 +400,14 @@ def unmarshal_LogsPolicy(data: Any) -> LogsPolicy: field = data.get("max_age_retention", None) if field is not None: args["max_age_retention"] = field + else: + args["max_age_retention"] = None field = data.get("total_disk_retention", None) if field is not None: args["total_disk_retention"] = field + else: + args["total_disk_retention"] = None return LogsPolicy(**args) @@ -415,7 +447,7 @@ def unmarshal_Volume(data: Any) -> Volume: args: Dict[str, Any] = {} - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -423,7 +455,7 @@ def unmarshal_Volume(data: Any) -> Volume: if field is not None: args["size"] = field - field = data.get("class_", None) + field = data.get("class", None) if field is not None: args["class_"] = field @@ -457,10 +489,14 @@ def unmarshal_Instance(data: Any) -> Instance: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("volume", None) if field is not None: args["volume"] = unmarshal_Volume(field) + else: + args["volume"] = None field = data.get("project_id", None) if field is not None: @@ -499,10 +535,14 @@ def unmarshal_Instance(data: Any) -> Instance: field = data.get("endpoint", None) if field is not None: args["endpoint"] = unmarshal_Endpoint(field) + else: + args["endpoint"] = None field = data.get("backup_schedule", None) if field is not None: args["backup_schedule"] = unmarshal_BackupSchedule(field) + else: + args["backup_schedule"] = None field = data.get("read_replicas", None) if field is not None: @@ -539,6 +579,8 @@ def unmarshal_Instance(data: Any) -> Instance: field = data.get("logs_policy", None) if field is not None: args["logs_policy"] = unmarshal_LogsPolicy(field) + else: + args["logs_policy"] = None return Instance(**args) @@ -574,11 +616,11 @@ def unmarshal_SnapshotVolumeType(data: Any) -> SnapshotVolumeType: args: Dict[str, Any] = {} - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field - field = data.get("class_", None) + field = data.get("class", None) if field is not None: args["class_"] = field @@ -624,22 +666,32 @@ def unmarshal_Snapshot(data: Any) -> Snapshot: field = data.get("size", None) if field is not None: args["size"] = field + else: + args["size"] = None field = data.get("expires_at", None) if field is not None: args["expires_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expires_at"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("volume_type", None) if field is not None: args["volume_type"] = unmarshal_SnapshotVolumeType(field) + else: + args["volume_type"] = None return Snapshot(**args) @@ -694,6 +746,8 @@ def unmarshal_ACLRule(data: Any) -> ACLRule: field = data.get("port", None) if field is not None: args["port"] = field + else: + args["port"] = None return ACLRule(**args) @@ -818,26 +872,38 @@ def unmarshal_EngineSetting(data: Any) -> EngineSetting: field = data.get("unit", None) if field is not None: args["unit"] = field + else: + args["unit"] = None field = data.get("string_constraint", None) if field is not None: args["string_constraint"] = field + else: + args["string_constraint"] = None field = data.get("int_min", None) if field is not None: args["int_min"] = field + else: + args["int_min"] = None field = data.get("int_max", None) if field is not None: args["int_max"] = field + else: + args["int_max"] = None field = data.get("float_min", None) if field is not None: args["float_min"] = field + else: + args["float_min"] = None field = data.get("float_max", None) if field is not None: args["float_max"] = field + else: + args["float_max"] = None return EngineSetting(**args) @@ -883,6 +949,8 @@ def unmarshal_EngineVersion(data: Any) -> EngineVersion: args["end_of_life"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["end_of_life"] = None return EngineVersion(**args) @@ -1089,7 +1157,7 @@ def unmarshal_NodeTypeVolumeType(data: Any) -> NodeTypeVolumeType: args: Dict[str, Any] = {} - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -1109,7 +1177,7 @@ def unmarshal_NodeTypeVolumeType(data: Any) -> NodeTypeVolumeType: if field is not None: args["chunk_size"] = field - field = data.get("class_", None) + field = data.get("class", None) if field is not None: args["class_"] = field @@ -1155,10 +1223,14 @@ def unmarshal_NodeType(data: Any) -> NodeType: field = data.get("volume_constraint", None) if field is not None: args["volume_constraint"] = unmarshal_NodeTypeVolumeConstraintSizes(field) + else: + args["volume_constraint"] = None field = data.get("is_bssd_compatible", None) if field is not None: args["is_bssd_compatible"] = field + else: + args["is_bssd_compatible"] = None field = data.get("available_volume_types", None) if field is not None: diff --git a/scaleway/scaleway/domain/v2beta1/marshalling.py b/scaleway/scaleway/domain/v2beta1/marshalling.py index c198aad5..fdeab0c3 100644 --- a/scaleway/scaleway/domain/v2beta1/marshalling.py +++ b/scaleway/scaleway/domain/v2beta1/marshalling.py @@ -137,6 +137,8 @@ def unmarshal_ContactExtensionFRAssociationInfo( args["publication_jo"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["publication_jo"] = None return ContactExtensionFRAssociationInfo(**args) @@ -241,24 +243,34 @@ def unmarshal_ContactExtensionFR(data: Any) -> ContactExtensionFR: field = data.get("individual_info", None) if field is not None: args["individual_info"] = unmarshal_ContactExtensionFRIndividualInfo(field) + else: + args["individual_info"] = None field = data.get("duns_info", None) if field is not None: args["duns_info"] = unmarshal_ContactExtensionFRDunsInfo(field) + else: + args["duns_info"] = None field = data.get("association_info", None) if field is not None: args["association_info"] = unmarshal_ContactExtensionFRAssociationInfo(field) + else: + args["association_info"] = None field = data.get("trademark_info", None) if field is not None: args["trademark_info"] = unmarshal_ContactExtensionFRTrademarkInfo(field) + else: + args["trademark_info"] = None field = data.get("code_auth_afnic_info", None) if field is not None: args["code_auth_afnic_info"] = unmarshal_ContactExtensionFRCodeAuthAfnicInfo( field ) + else: + args["code_auth_afnic_info"] = None return ContactExtensionFR(**args) @@ -390,14 +402,20 @@ def unmarshal_Contact(data: Any) -> Contact: args["questions"] = ( [unmarshal_ContactQuestion(v) for v in field] if field is not None else None ) + else: + args["questions"] = None field = data.get("extension_fr", None) if field is not None: args["extension_fr"] = unmarshal_ContactExtensionFR(field) + else: + args["extension_fr"] = None field = data.get("extension_eu", None) if field is not None: args["extension_eu"] = unmarshal_ContactExtensionEU(field) + else: + args["extension_eu"] = None field = data.get("email_status", None) if field is not None: @@ -414,6 +432,8 @@ def unmarshal_Contact(data: Any) -> Contact: field = data.get("extension_nl", None) if field is not None: args["extension_nl"] = unmarshal_ContactExtensionNL(field) + else: + args["extension_nl"] = None return Contact(**args) @@ -463,10 +483,14 @@ def unmarshal_DNSZone(data: Any) -> DNSZone: field = data.get("message", None) if field is not None: args["message"] = field + else: + args["message"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return DNSZone(**args) @@ -529,10 +553,14 @@ def unmarshal_SSLCertificate(data: Any) -> SSLCertificate: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("expired_at", None) if field is not None: args["expired_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expired_at"] = None return SSLCertificate(**args) @@ -554,6 +582,8 @@ def unmarshal_CheckContactsCompatibilityResponseContactCheckResult( field = data.get("error_message", None) if field is not None: args["error_message"] = field + else: + args["error_message"] = None return CheckContactsCompatibilityResponseContactCheckResult(**args) @@ -577,18 +607,24 @@ def unmarshal_CheckContactsCompatibilityResponse( args["owner_check_result"] = ( unmarshal_CheckContactsCompatibilityResponseContactCheckResult(field) ) + else: + args["owner_check_result"] = None field = data.get("administrative_check_result", None) if field is not None: args["administrative_check_result"] = ( unmarshal_CheckContactsCompatibilityResponseContactCheckResult(field) ) + else: + args["administrative_check_result"] = None field = data.get("technical_check_result", None) if field is not None: args["technical_check_result"] = ( unmarshal_CheckContactsCompatibilityResponseContactCheckResult(field) ) + else: + args["technical_check_result"] = None return CheckContactsCompatibilityResponse(**args) @@ -660,7 +696,7 @@ def unmarshal_DSRecordDigest(data: Any) -> DSRecordDigest: args: Dict[str, Any] = {} - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -671,6 +707,8 @@ def unmarshal_DSRecordDigest(data: Any) -> DSRecordDigest: field = data.get("public_key", None) if field is not None: args["public_key"] = unmarshal_DSRecordPublicKey(field) + else: + args["public_key"] = None return DSRecordDigest(**args) @@ -694,10 +732,14 @@ def unmarshal_DSRecord(data: Any) -> DSRecord: field = data.get("digest", None) if field is not None: args["digest"] = unmarshal_DSRecordDigest(field) + else: + args["digest"] = None field = data.get("public_key", None) if field is not None: args["public_key"] = unmarshal_DSRecordPublicKey(field) + else: + args["public_key"] = None return DSRecord(**args) @@ -721,6 +763,8 @@ def unmarshal_TldOffer(data: Any) -> TldOffer: field = data.get("price", None) if field is not None: args["price"] = unmarshal_Money(field) + else: + args["price"] = None return TldOffer(**args) @@ -870,14 +914,20 @@ def unmarshal_Domain(data: Any) -> Domain: field = data.get("dnssec", None) if field is not None: args["dnssec"] = unmarshal_DomainDNSSEC(field) + else: + args["dnssec"] = None field = data.get("expired_at", None) if field is not None: args["expired_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expired_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("status", None) if field is not None: @@ -902,30 +952,42 @@ def unmarshal_Domain(data: Any) -> Domain: field = data.get("owner_contact", None) if field is not None: args["owner_contact"] = unmarshal_Contact(field) + else: + args["owner_contact"] = None field = data.get("technical_contact", None) if field is not None: args["technical_contact"] = unmarshal_Contact(field) + else: + args["technical_contact"] = None field = data.get("administrative_contact", None) if field is not None: args["administrative_contact"] = unmarshal_Contact(field) + else: + args["administrative_contact"] = None field = data.get("external_domain_registration_status", None) if field is not None: args["external_domain_registration_status"] = ( unmarshal_DomainRegistrationStatusExternalDomain(field) ) + else: + args["external_domain_registration_status"] = None field = data.get("transfer_registration_status", None) if field is not None: args["transfer_registration_status"] = ( unmarshal_DomainRegistrationStatusTransfer(field) ) + else: + args["transfer_registration_status"] = None field = data.get("tld", None) if field is not None: args["tld"] = unmarshal_Tld(field) + else: + args["tld"] = None return Domain(**args) @@ -1062,10 +1124,14 @@ def unmarshal_RecordHTTPServiceConfig(data: Any) -> RecordHTTPServiceConfig: field = data.get("must_contain", None) if field is not None: args["must_contain"] = field + else: + args["must_contain"] = None field = data.get("user_agent", None) if field is not None: args["user_agent"] = field + else: + args["user_agent"] = None return RecordHTTPServiceConfig(**args) @@ -1132,7 +1198,7 @@ def unmarshal_Record(data: Any) -> Record: if field is not None: args["ttl"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -1143,22 +1209,32 @@ def unmarshal_Record(data: Any) -> Record: field = data.get("comment", None) if field is not None: args["comment"] = field + else: + args["comment"] = None field = data.get("geo_ip_config", None) if field is not None: args["geo_ip_config"] = unmarshal_RecordGeoIPConfig(field) + else: + args["geo_ip_config"] = None field = data.get("http_service_config", None) if field is not None: args["http_service_config"] = unmarshal_RecordHTTPServiceConfig(field) + else: + args["http_service_config"] = None field = data.get("weighted_config", None) if field is not None: args["weighted_config"] = unmarshal_RecordWeightedConfig(field) + else: + args["weighted_config"] = None field = data.get("view_config", None) if field is not None: args["view_config"] = unmarshal_RecordViewConfig(field) + else: + args["view_config"] = None return Record(**args) @@ -1175,17 +1251,21 @@ def unmarshal_RecordIdentifier(data: Any) -> RecordIdentifier: if field is not None: args["name"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field field = data.get("data", None) if field is not None: args["data"] = field + else: + args["data"] = None field = data.get("ttl", None) if field is not None: args["ttl"] = field + else: + args["ttl"] = None return RecordIdentifier(**args) @@ -1229,10 +1309,14 @@ def unmarshal_RecordChangeDelete(data: Any) -> RecordChangeDelete: field = data.get("id", None) if field is not None: args["id"] = field + else: + args["id"] = None field = data.get("id_fields", None) if field is not None: args["id_fields"] = unmarshal_RecordIdentifier(field) + else: + args["id_fields"] = None return RecordChangeDelete(**args) @@ -1254,10 +1338,14 @@ def unmarshal_RecordChangeSet(data: Any) -> RecordChangeSet: field = data.get("id", None) if field is not None: args["id"] = field + else: + args["id"] = None field = data.get("id_fields", None) if field is not None: args["id_fields"] = unmarshal_RecordIdentifier(field) + else: + args["id_fields"] = None return RecordChangeSet(**args) @@ -1273,18 +1361,26 @@ def unmarshal_RecordChange(data: Any) -> RecordChange: field = data.get("add", None) if field is not None: args["add"] = unmarshal_RecordChangeAdd(field) + else: + args["add"] = None - field = data.get("set_", None) + field = data.get("set", None) if field is not None: args["set_"] = unmarshal_RecordChangeSet(field) + else: + args["set_"] = None field = data.get("delete", None) if field is not None: args["delete"] = unmarshal_RecordChangeDelete(field) + else: + args["delete"] = None field = data.get("clear", None) if field is not None: args["clear"] = unmarshal_RecordChangeClear(field) + else: + args["clear"] = None return RecordChange(**args) @@ -1397,6 +1493,8 @@ def unmarshal_ContactRoles(data: Any) -> ContactRoles: field = data.get("contact", None) if field is not None: args["contact"] = unmarshal_Contact(field) + else: + args["contact"] = None return ContactRoles(**args) @@ -1519,6 +1617,8 @@ def unmarshal_DNSZoneVersion(data: Any) -> DNSZoneVersion: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None return DNSZoneVersion(**args) @@ -1625,10 +1725,14 @@ def unmarshal_DomainSummary(data: Any) -> DomainSummary: field = data.get("expired_at", None) if field is not None: args["expired_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expired_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("status", None) if field is not None: @@ -1647,16 +1751,22 @@ def unmarshal_DomainSummary(data: Any) -> DomainSummary: args["external_domain_registration_status"] = ( unmarshal_DomainRegistrationStatusExternalDomain(field) ) + else: + args["external_domain_registration_status"] = None field = data.get("transfer_registration_status", None) if field is not None: args["transfer_registration_status"] = ( unmarshal_DomainRegistrationStatusTransfer(field) ) + else: + args["transfer_registration_status"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None return DomainSummary(**args) @@ -1709,32 +1819,44 @@ def unmarshal_RenewableDomain(data: Any) -> RenewableDomain: field = data.get("renewable_duration_in_years", None) if field is not None: args["renewable_duration_in_years"] = field + else: + args["renewable_duration_in_years"] = None field = data.get("expired_at", None) if field is not None: args["expired_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expired_at"] = None field = data.get("limit_renew_at", None) if field is not None: args["limit_renew_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["limit_renew_at"] = None field = data.get("limit_redemption_at", None) if field is not None: args["limit_redemption_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["limit_redemption_at"] = None field = data.get("estimated_delete_at", None) if field is not None: args["estimated_delete_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["estimated_delete_at"] = None field = data.get("tld", None) if field is not None: args["tld"] = unmarshal_Tld(field) + else: + args["tld"] = None return RenewableDomain(**args) @@ -1801,7 +1923,7 @@ def unmarshal_Task(data: Any) -> Task: if field is not None: args["organization_id"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -1812,22 +1934,32 @@ def unmarshal_Task(data: Any) -> Task: field = data.get("domain", None) if field is not None: args["domain"] = field + else: + args["domain"] = None field = data.get("started_at", None) if field is not None: args["started_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["started_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("message", None) if field is not None: args["message"] = field + else: + args["message"] = None field = data.get("contact_identifier", None) if field is not None: args["contact_identifier"] = field + else: + args["contact_identifier"] = None return Task(**args) @@ -1899,6 +2031,8 @@ def unmarshal_OrderResponse(data: Any) -> OrderResponse: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None return OrderResponse(**args) @@ -1949,6 +2083,8 @@ def unmarshal_RegisterExternalDomainResponse( field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None return RegisterExternalDomainResponse(**args) @@ -1983,6 +2119,8 @@ def unmarshal_AvailableDomain(data: Any) -> AvailableDomain: field = data.get("tld", None) if field is not None: args["tld"] = unmarshal_Tld(field) + else: + args["tld"] = None return AvailableDomain(**args) diff --git a/scaleway/scaleway/flexibleip/v1alpha1/marshalling.py b/scaleway/scaleway/flexibleip/v1alpha1/marshalling.py index 5f44ed7d..6f754d00 100644 --- a/scaleway/scaleway/flexibleip/v1alpha1/marshalling.py +++ b/scaleway/scaleway/flexibleip/v1alpha1/marshalling.py @@ -52,10 +52,14 @@ def unmarshal_MACAddress(data: Any) -> MACAddress: field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None return MACAddress(**args) @@ -99,6 +103,8 @@ def unmarshal_FlexibleIP(data: Any) -> FlexibleIP: field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("reverse", None) if field is not None: @@ -111,14 +117,20 @@ def unmarshal_FlexibleIP(data: Any) -> FlexibleIP: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("mac_address", None) if field is not None: args["mac_address"] = unmarshal_MACAddress(field) + else: + args["mac_address"] = None field = data.get("server_id", None) if field is not None: args["server_id"] = field + else: + args["server_id"] = None return FlexibleIP(**args) diff --git a/scaleway/scaleway/function/v1beta1/marshalling.py b/scaleway/scaleway/function/v1beta1/marshalling.py index 34ff2d4d..23c4b6ef 100644 --- a/scaleway/scaleway/function/v1beta1/marshalling.py +++ b/scaleway/scaleway/function/v1beta1/marshalling.py @@ -79,6 +79,8 @@ def unmarshal_Cron(data: Any) -> Cron: field = data.get("args", None) if field is not None: args["args"] = field + else: + args["args"] = None return Cron(**args) @@ -114,6 +116,8 @@ def unmarshal_Domain(data: Any) -> Domain: field = data.get("error_message", None) if field is not None: args["error_message"] = field + else: + args["error_message"] = None return Domain(**args) @@ -220,18 +224,26 @@ def unmarshal_Function(data: Any) -> Function: field = data.get("timeout", None) if field is not None: args["timeout"] = field + else: + args["timeout"] = None field = data.get("error_message", None) if field is not None: args["error_message"] = field + else: + args["error_message"] = None field = data.get("build_message", None) if field is not None: args["build_message"] = field + else: + args["build_message"] = None field = data.get("description", None) if field is not None: args["description"] = field + else: + args["description"] = None return Function(**args) @@ -291,10 +303,14 @@ def unmarshal_Namespace(data: Any) -> Namespace: field = data.get("error_message", None) if field is not None: args["error_message"] = field + else: + args["error_message"] = None field = data.get("description", None) if field is not None: args["description"] = field + else: + args["description"] = None return Namespace(**args) @@ -322,22 +338,32 @@ def unmarshal_Token(data: Any) -> Token: field = data.get("function_id", None) if field is not None: args["function_id"] = field + else: + args["function_id"] = None field = data.get("namespace_id", None) if field is not None: args["namespace_id"] = field + else: + args["namespace_id"] = None field = data.get("public_key", None) if field is not None: args["public_key"] = field + else: + args["public_key"] = None field = data.get("description", None) if field is not None: args["description"] = field + else: + args["description"] = None field = data.get("expires_at", None) if field is not None: args["expires_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expires_at"] = None return Token(**args) @@ -369,6 +395,8 @@ def unmarshal_TriggerMnqNatsClientConfig(data: Any) -> TriggerMnqNatsClientConfi field = data.get("mnq_credential_id", None) if field is not None: args["mnq_credential_id"] = field + else: + args["mnq_credential_id"] = None return TriggerMnqNatsClientConfig(**args) @@ -396,6 +424,8 @@ def unmarshal_TriggerMnqSqsClientConfig(data: Any) -> TriggerMnqSqsClientConfig: field = data.get("mnq_credential_id", None) if field is not None: args["mnq_credential_id"] = field + else: + args["mnq_credential_id"] = None return TriggerMnqSqsClientConfig(**args) @@ -462,18 +492,26 @@ def unmarshal_Trigger(data: Any) -> Trigger: field = data.get("error_message", None) if field is not None: args["error_message"] = field + else: + args["error_message"] = None field = data.get("scw_sqs_config", None) if field is not None: args["scw_sqs_config"] = unmarshal_TriggerMnqSqsClientConfig(field) + else: + args["scw_sqs_config"] = None field = data.get("scw_nats_config", None) if field is not None: args["scw_nats_config"] = unmarshal_TriggerMnqNatsClientConfig(field) + else: + args["scw_nats_config"] = None field = data.get("sqs_config", None) if field is not None: args["sqs_config"] = unmarshal_TriggerSqsClientConfig(field) + else: + args["sqs_config"] = None return Trigger(**args) diff --git a/scaleway/scaleway/iam/v1alpha1/marshalling.py b/scaleway/scaleway/iam/v1alpha1/marshalling.py index 9895c955..5f4410d9 100644 --- a/scaleway/scaleway/iam/v1alpha1/marshalling.py +++ b/scaleway/scaleway/iam/v1alpha1/marshalling.py @@ -87,14 +87,20 @@ def unmarshal_JWT(data: Any) -> JWT: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("expires_at", None) if field is not None: args["expires_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expires_at"] = None return JWT(**args) @@ -130,26 +136,38 @@ def unmarshal_APIKey(data: Any) -> APIKey: field = data.get("secret_key", None) if field is not None: args["secret_key"] = field + else: + args["secret_key"] = None field = data.get("application_id", None) if field is not None: args["application_id"] = field + else: + args["application_id"] = None field = data.get("user_id", None) if field is not None: args["user_id"] = field + else: + args["user_id"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("expires_at", None) if field is not None: args["expires_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expires_at"] = None return APIKey(**args) @@ -193,10 +211,14 @@ def unmarshal_Application(data: Any) -> Application: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return Application(**args) @@ -240,10 +262,14 @@ def unmarshal_Group(data: Any) -> Group: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return Group(**args) @@ -291,6 +317,8 @@ def unmarshal_Log(data: Any) -> Log: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None return Log(**args) @@ -322,10 +350,14 @@ def unmarshal_Policy(data: Any) -> Policy: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("editable", None) if field is not None: @@ -350,18 +382,26 @@ def unmarshal_Policy(data: Any) -> Policy: field = data.get("user_id", None) if field is not None: args["user_id"] = field + else: + args["user_id"] = None field = data.get("group_id", None) if field is not None: args["group_id"] = field + else: + args["group_id"] = None field = data.get("application_id", None) if field is not None: args["application_id"] = field + else: + args["application_id"] = None field = data.get("no_principal", None) if field is not None: args["no_principal"] = field + else: + args["no_principal"] = None return Policy(**args) @@ -393,10 +433,14 @@ def unmarshal_Quotum(data: Any) -> Quotum: field = data.get("limit", None) if field is not None: args["limit"] = field + else: + args["limit"] = None field = data.get("unlimited", None) if field is not None: args["unlimited"] = field + else: + args["unlimited"] = None return Quotum(**args) @@ -440,10 +484,14 @@ def unmarshal_SSHKey(data: Any) -> SSHKey: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return SSHKey(**args) @@ -472,7 +520,7 @@ def unmarshal_User(data: Any) -> User: if field is not None: args["deletable"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -483,6 +531,8 @@ def unmarshal_User(data: Any) -> User: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("mfa", None) if field is not None: @@ -499,16 +549,22 @@ def unmarshal_User(data: Any) -> User: field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("last_login_at", None) if field is not None: args["last_login_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["last_login_at"] = None field = data.get("two_factor_enabled", None) if field is not None: args["two_factor_enabled"] = field + else: + args["two_factor_enabled"] = None return User(**args) @@ -532,6 +588,8 @@ def unmarshal_EncodedJWT(data: Any) -> EncodedJWT: field = data.get("jwt", None) if field is not None: args["jwt"] = unmarshal_JWT(field) + else: + args["jwt"] = None return EncodedJWT(**args) @@ -664,6 +722,8 @@ def unmarshal_PermissionSet(data: Any) -> PermissionSet: field = data.get("categories", None) if field is not None: args["categories"] = field + else: + args["categories"] = None return PermissionSet(**args) @@ -750,18 +810,26 @@ def unmarshal_Rule(data: Any) -> Rule: field = data.get("permission_set_names", None) if field is not None: args["permission_set_names"] = field + else: + args["permission_set_names"] = None field = data.get("project_ids", None) if field is not None: args["project_ids"] = field + else: + args["project_ids"] = None field = data.get("organization_id", None) if field is not None: args["organization_id"] = field + else: + args["organization_id"] = None field = data.get("account_root_user_id", None) if field is not None: args["account_root_user_id"] = field + else: + args["account_root_user_id"] = None return Rule(**args) diff --git a/scaleway/scaleway/instance/v1/marshalling.py b/scaleway/scaleway/instance/v1/marshalling.py index e5fc59e0..24987fab 100644 --- a/scaleway/scaleway/instance/v1/marshalling.py +++ b/scaleway/scaleway/instance/v1/marshalling.py @@ -294,18 +294,24 @@ def unmarshal_Volume(data: Any) -> Volume: field = data.get("export_uri", None) if field is not None: args["export_uri"] = field + else: + args["export_uri"] = None field = data.get("creation_date", None) if field is not None: args["creation_date"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["creation_date"] = None field = data.get("modification_date", None) if field is not None: args["modification_date"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["modification_date"] = None field = data.get("tags", None) if field is not None: @@ -322,6 +328,8 @@ def unmarshal_Volume(data: Any) -> Volume: field = data.get("server", None) if field is not None: args["server"] = unmarshal_ServerSummary(field) + else: + args["server"] = None return Volume(**args) @@ -394,16 +402,22 @@ def unmarshal_Image(data: Any) -> Image: args["creation_date"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["creation_date"] = None field = data.get("modification_date", None) if field is not None: args["modification_date"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["modification_date"] = None field = data.get("default_bootscript", None) if field is not None: args["default_bootscript"] = unmarshal_Bootscript(field) + else: + args["default_bootscript"] = None field = data.get("public", None) if field is not None: @@ -428,6 +442,8 @@ def unmarshal_Image(data: Any) -> Image: field = data.get("root_volume", None) if field is not None: args["root_volume"] = unmarshal_VolumeSummary(field) + else: + args["root_volume"] = None return Image(**args) @@ -618,6 +634,8 @@ def unmarshal_ServerMaintenance(data: Any) -> ServerMaintenance: field = data.get("start_date", None) if field is not None: args["start_date"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["start_date"] = None return ServerMaintenance(**args) @@ -653,6 +671,8 @@ def unmarshal_VolumeServer(data: Any) -> VolumeServer: field = data.get("server", None) if field is not None: args["server"] = unmarshal_ServerSummary(field) + else: + args["server"] = None field = data.get("volume_type", None) if field is not None: @@ -679,12 +699,16 @@ def unmarshal_VolumeServer(data: Any) -> VolumeServer: args["creation_date"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["creation_date"] = None field = data.get("modification_date", None) if field is not None: args["modification_date"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["modification_date"] = None return VolumeServer(**args) @@ -732,6 +756,8 @@ def unmarshal_Server(data: Any) -> Server: args["creation_date"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["creation_date"] = None field = data.get("dynamic_ip_required", None) if field is not None: @@ -752,18 +778,26 @@ def unmarshal_Server(data: Any) -> Server: field = data.get("enable_ipv6", None) if field is not None: args["enable_ipv6"] = field + else: + args["enable_ipv6"] = None field = data.get("image", None) if field is not None: args["image"] = unmarshal_Image(field) + else: + args["image"] = None field = data.get("private_ip", None) if field is not None: args["private_ip"] = field + else: + args["private_ip"] = None field = data.get("public_ip", None) if field is not None: args["public_ip"] = unmarshal_ServerIp(field) + else: + args["public_ip"] = None field = data.get("public_ips", None) if field is not None: @@ -796,22 +830,32 @@ def unmarshal_Server(data: Any) -> Server: args["modification_date"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["modification_date"] = None field = data.get("location", None) if field is not None: args["location"] = unmarshal_ServerLocation(field) + else: + args["location"] = None field = data.get("ipv6", None) if field is not None: args["ipv6"] = unmarshal_ServerIpv6(field) + else: + args["ipv6"] = None field = data.get("bootscript", None) if field is not None: args["bootscript"] = unmarshal_Bootscript(field) + else: + args["bootscript"] = None field = data.get("security_group", None) if field is not None: args["security_group"] = unmarshal_SecurityGroupSummary(field) + else: + args["security_group"] = None field = data.get("maintenances", None) if field is not None: @@ -842,6 +886,8 @@ def unmarshal_Server(data: Any) -> Server: field = data.get("placement_group", None) if field is not None: args["placement_group"] = unmarshal_PlacementGroup(field) + else: + args["placement_group"] = None return Server(**args) @@ -857,6 +903,8 @@ def unmarshal_AttachServerVolumeResponse(data: Any) -> AttachServerVolumeRespons field = data.get("server", None) if field is not None: args["server"] = unmarshal_Server(field) + else: + args["server"] = None return AttachServerVolumeResponse(**args) @@ -872,6 +920,8 @@ def unmarshal_CreateImageResponse(data: Any) -> CreateImageResponse: field = data.get("image", None) if field is not None: args["image"] = unmarshal_Image(field) + else: + args["image"] = None return CreateImageResponse(**args) @@ -904,7 +954,7 @@ def unmarshal_Ip(data: Any) -> Ip: if field is not None: args["project"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -927,10 +977,14 @@ def unmarshal_Ip(data: Any) -> Ip: field = data.get("reverse", None) if field is not None: args["reverse"] = field + else: + args["reverse"] = None field = data.get("server", None) if field is not None: args["server"] = unmarshal_ServerSummary(field) + else: + args["server"] = None return Ip(**args) @@ -946,6 +1000,8 @@ def unmarshal_CreateIpResponse(data: Any) -> CreateIpResponse: field = data.get("ip", None) if field is not None: args["ip"] = unmarshal_Ip(field) + else: + args["ip"] = None return CreateIpResponse(**args) @@ -961,6 +1017,8 @@ def unmarshal_CreatePlacementGroupResponse(data: Any) -> CreatePlacementGroupRes field = data.get("placement_group", None) if field is not None: args["placement_group"] = unmarshal_PlacementGroup(field) + else: + args["placement_group"] = None return CreatePlacementGroupResponse(**args) @@ -976,6 +1034,8 @@ def unmarshal_CreatePrivateNICResponse(data: Any) -> CreatePrivateNICResponse: field = data.get("private_nic", None) if field is not None: args["private_nic"] = unmarshal_PrivateNIC(field) + else: + args["private_nic"] = None return CreatePrivateNICResponse(**args) @@ -1049,18 +1109,24 @@ def unmarshal_SecurityGroup(data: Any) -> SecurityGroup: field = data.get("organization_default", None) if field is not None: args["organization_default"] = field + else: + args["organization_default"] = None field = data.get("creation_date", None) if field is not None: args["creation_date"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["creation_date"] = None field = data.get("modification_date", None) if field is not None: args["modification_date"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["modification_date"] = None return SecurityGroup(**args) @@ -1076,6 +1142,8 @@ def unmarshal_CreateSecurityGroupResponse(data: Any) -> CreateSecurityGroupRespo field = data.get("security_group", None) if field is not None: args["security_group"] = unmarshal_SecurityGroup(field) + else: + args["security_group"] = None return CreateSecurityGroupResponse(**args) @@ -1123,10 +1191,14 @@ def unmarshal_SecurityGroupRule(data: Any) -> SecurityGroupRule: field = data.get("dest_port_from", None) if field is not None: args["dest_port_from"] = field + else: + args["dest_port_from"] = None field = data.get("dest_port_to", None) if field is not None: args["dest_port_to"] = field + else: + args["dest_port_to"] = None return SecurityGroupRule(**args) @@ -1144,6 +1216,8 @@ def unmarshal_CreateSecurityGroupRuleResponse( field = data.get("rule", None) if field is not None: args["rule"] = unmarshal_SecurityGroupRule(field) + else: + args["rule"] = None return CreateSecurityGroupRuleResponse(**args) @@ -1159,6 +1233,8 @@ def unmarshal_CreateServerResponse(data: Any) -> CreateServerResponse: field = data.get("server", None) if field is not None: args["server"] = unmarshal_Server(field) + else: + args["server"] = None return CreateServerResponse(**args) @@ -1229,22 +1305,30 @@ def unmarshal_Snapshot(data: Any) -> Snapshot: field = data.get("base_volume", None) if field is not None: args["base_volume"] = unmarshal_SnapshotBaseVolume(field) + else: + args["base_volume"] = None field = data.get("creation_date", None) if field is not None: args["creation_date"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["creation_date"] = None field = data.get("modification_date", None) if field is not None: args["modification_date"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["modification_date"] = None field = data.get("error_reason", None) if field is not None: args["error_reason"] = field + else: + args["error_reason"] = None return Snapshot(**args) @@ -1288,12 +1372,16 @@ def unmarshal_Task(data: Any) -> Task: field = data.get("started_at", None) if field is not None: args["started_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["started_at"] = None field = data.get("terminated_at", None) if field is not None: args["terminated_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["terminated_at"] = None return Task(**args) @@ -1309,10 +1397,14 @@ def unmarshal_CreateSnapshotResponse(data: Any) -> CreateSnapshotResponse: field = data.get("snapshot", None) if field is not None: args["snapshot"] = unmarshal_Snapshot(field) + else: + args["snapshot"] = None field = data.get("task", None) if field is not None: args["task"] = unmarshal_Task(field) + else: + args["task"] = None return CreateSnapshotResponse(**args) @@ -1328,6 +1420,8 @@ def unmarshal_CreateVolumeResponse(data: Any) -> CreateVolumeResponse: field = data.get("volume", None) if field is not None: args["volume"] = unmarshal_Volume(field) + else: + args["volume"] = None return CreateVolumeResponse(**args) @@ -1343,6 +1437,8 @@ def unmarshal_DetachServerVolumeResponse(data: Any) -> DetachServerVolumeRespons field = data.get("server", None) if field is not None: args["server"] = unmarshal_Server(field) + else: + args["server"] = None return DetachServerVolumeResponse(**args) @@ -1358,6 +1454,8 @@ def unmarshal_ExportSnapshotResponse(data: Any) -> ExportSnapshotResponse: field = data.get("task", None) if field is not None: args["task"] = unmarshal_Task(field) + else: + args["task"] = None return ExportSnapshotResponse(**args) @@ -1373,6 +1471,8 @@ def unmarshal_GetBootscriptResponse(data: Any) -> GetBootscriptResponse: field = data.get("bootscript", None) if field is not None: args["bootscript"] = unmarshal_Bootscript(field) + else: + args["bootscript"] = None return GetBootscriptResponse(**args) @@ -1459,6 +1559,8 @@ def unmarshal_GetDashboardResponse(data: Any) -> GetDashboardResponse: field = data.get("dashboard", None) if field is not None: args["dashboard"] = unmarshal_Dashboard(field) + else: + args["dashboard"] = None return GetDashboardResponse(**args) @@ -1474,6 +1576,8 @@ def unmarshal_GetImageResponse(data: Any) -> GetImageResponse: field = data.get("image", None) if field is not None: args["image"] = unmarshal_Image(field) + else: + args["image"] = None return GetImageResponse(**args) @@ -1489,6 +1593,8 @@ def unmarshal_GetIpResponse(data: Any) -> GetIpResponse: field = data.get("ip", None) if field is not None: args["ip"] = unmarshal_Ip(field) + else: + args["ip"] = None return GetIpResponse(**args) @@ -1504,6 +1610,8 @@ def unmarshal_GetPlacementGroupResponse(data: Any) -> GetPlacementGroupResponse: field = data.get("placement_group", None) if field is not None: args["placement_group"] = unmarshal_PlacementGroup(field) + else: + args["placement_group"] = None return GetPlacementGroupResponse(**args) @@ -1563,6 +1671,8 @@ def unmarshal_GetPrivateNICResponse(data: Any) -> GetPrivateNICResponse: field = data.get("private_nic", None) if field is not None: args["private_nic"] = unmarshal_PrivateNIC(field) + else: + args["private_nic"] = None return GetPrivateNICResponse(**args) @@ -1578,6 +1688,8 @@ def unmarshal_GetSecurityGroupResponse(data: Any) -> GetSecurityGroupResponse: field = data.get("security_group", None) if field is not None: args["security_group"] = unmarshal_SecurityGroup(field) + else: + args["security_group"] = None return GetSecurityGroupResponse(**args) @@ -1593,6 +1705,8 @@ def unmarshal_GetSecurityGroupRuleResponse(data: Any) -> GetSecurityGroupRuleRes field = data.get("rule", None) if field is not None: args["rule"] = unmarshal_SecurityGroupRule(field) + else: + args["rule"] = None return GetSecurityGroupRuleResponse(**args) @@ -1608,6 +1722,8 @@ def unmarshal_GetServerResponse(data: Any) -> GetServerResponse: field = data.get("server", None) if field is not None: args["server"] = unmarshal_Server(field) + else: + args["server"] = None return GetServerResponse(**args) @@ -1668,6 +1784,8 @@ def unmarshal_GetSnapshotResponse(data: Any) -> GetSnapshotResponse: field = data.get("snapshot", None) if field is not None: args["snapshot"] = unmarshal_Snapshot(field) + else: + args["snapshot"] = None return GetSnapshotResponse(**args) @@ -1683,6 +1801,8 @@ def unmarshal_GetVolumeResponse(data: Any) -> GetVolumeResponse: field = data.get("volume", None) if field is not None: args["volume"] = unmarshal_Volume(field) + else: + args["volume"] = None return GetVolumeResponse(**args) @@ -1900,10 +2020,14 @@ def unmarshal_ServerTypeNetworkInterface(data: Any) -> ServerTypeNetworkInterfac field = data.get("internal_bandwidth", None) if field is not None: args["internal_bandwidth"] = field + else: + args["internal_bandwidth"] = None field = data.get("internet_bandwidth", None) if field is not None: args["internet_bandwidth"] = field + else: + args["internet_bandwidth"] = None return ServerTypeNetworkInterface(**args) @@ -1944,6 +2068,8 @@ def unmarshal_ServerTypeCapabilities(data: Any) -> ServerTypeCapabilities: field = data.get("block_storage", None) if field is not None: args["block_storage"] = field + else: + args["block_storage"] = None return ServerTypeCapabilities(**args) @@ -1971,10 +2097,14 @@ def unmarshal_ServerTypeNetwork(data: Any) -> ServerTypeNetwork: field = data.get("sum_internal_bandwidth", None) if field is not None: args["sum_internal_bandwidth"] = field + else: + args["sum_internal_bandwidth"] = None field = data.get("sum_internet_bandwidth", None) if field is not None: args["sum_internet_bandwidth"] = field + else: + args["sum_internet_bandwidth"] = None return ServerTypeNetwork(**args) @@ -1992,6 +2122,8 @@ def unmarshal_ServerTypeVolumeConstraintsByType( field = data.get("l_ssd", None) if field is not None: args["l_ssd"] = unmarshal_ServerTypeVolumeConstraintSizes(field) + else: + args["l_ssd"] = None return ServerTypeVolumeConstraintsByType(**args) @@ -2007,6 +2139,8 @@ def unmarshal_ServerType(data: Any) -> ServerType: field = data.get("monthly_price", None) if field is not None: args["monthly_price"] = field + else: + args["monthly_price"] = None field = data.get("hourly_price", None) if field is not None: @@ -2037,26 +2171,38 @@ def unmarshal_ServerType(data: Any) -> ServerType: args["per_volume_constraint"] = unmarshal_ServerTypeVolumeConstraintsByType( field ) + else: + args["per_volume_constraint"] = None field = data.get("volumes_constraint", None) if field is not None: args["volumes_constraint"] = unmarshal_ServerTypeVolumeConstraintSizes(field) + else: + args["volumes_constraint"] = None field = data.get("gpu", None) if field is not None: args["gpu"] = field + else: + args["gpu"] = None field = data.get("network", None) if field is not None: args["network"] = unmarshal_ServerTypeNetwork(field) + else: + args["network"] = None field = data.get("capabilities", None) if field is not None: args["capabilities"] = unmarshal_ServerTypeCapabilities(field) + else: + args["capabilities"] = None field = data.get("scratch_storage_max_size", None) if field is not None: args["scratch_storage_max_size"] = field + else: + args["scratch_storage_max_size"] = None return ServerType(**args) @@ -2175,10 +2321,14 @@ def unmarshal_VolumeType(data: Any) -> VolumeType: field = data.get("capabilities", None) if field is not None: args["capabilities"] = unmarshal_VolumeTypeCapabilities(field) + else: + args["capabilities"] = None field = data.get("constraints", None) if field is not None: args["constraints"] = unmarshal_VolumeTypeConstraints(field) + else: + args["constraints"] = None return VolumeType(**args) @@ -2227,6 +2377,8 @@ def unmarshal_MigrationPlan(data: Any) -> MigrationPlan: field = data.get("volume", None) if field is not None: args["volume"] = unmarshal_Volume(field) + else: + args["volume"] = None return MigrationPlan(**args) @@ -2242,6 +2394,8 @@ def unmarshal_ServerActionResponse(data: Any) -> ServerActionResponse: field = data.get("task", None) if field is not None: args["task"] = unmarshal_Task(field) + else: + args["task"] = None return ServerActionResponse(**args) @@ -2257,6 +2411,8 @@ def unmarshal_SetPlacementGroupResponse(data: Any) -> SetPlacementGroupResponse: field = data.get("placement_group", None) if field is not None: args["placement_group"] = unmarshal_PlacementGroup(field) + else: + args["placement_group"] = None return SetPlacementGroupResponse(**args) @@ -2312,6 +2468,8 @@ def unmarshal_UpdateImageResponse(data: Any) -> UpdateImageResponse: field = data.get("image", None) if field is not None: args["image"] = unmarshal_Image(field) + else: + args["image"] = None return UpdateImageResponse(**args) @@ -2327,6 +2485,8 @@ def unmarshal_UpdateIpResponse(data: Any) -> UpdateIpResponse: field = data.get("ip", None) if field is not None: args["ip"] = unmarshal_Ip(field) + else: + args["ip"] = None return UpdateIpResponse(**args) @@ -2342,6 +2502,8 @@ def unmarshal_UpdatePlacementGroupResponse(data: Any) -> UpdatePlacementGroupRes field = data.get("placement_group", None) if field is not None: args["placement_group"] = unmarshal_PlacementGroup(field) + else: + args["placement_group"] = None return UpdatePlacementGroupResponse(**args) @@ -2378,6 +2540,8 @@ def unmarshal_UpdateSecurityGroupResponse(data: Any) -> UpdateSecurityGroupRespo field = data.get("security_group", None) if field is not None: args["security_group"] = unmarshal_SecurityGroup(field) + else: + args["security_group"] = None return UpdateSecurityGroupResponse(**args) @@ -2395,6 +2559,8 @@ def unmarshal_UpdateSecurityGroupRuleResponse( field = data.get("rule", None) if field is not None: args["rule"] = unmarshal_SecurityGroupRule(field) + else: + args["rule"] = None return UpdateSecurityGroupRuleResponse(**args) @@ -2410,6 +2576,8 @@ def unmarshal_UpdateServerResponse(data: Any) -> UpdateServerResponse: field = data.get("server", None) if field is not None: args["server"] = unmarshal_Server(field) + else: + args["server"] = None return UpdateServerResponse(**args) @@ -2425,6 +2593,8 @@ def unmarshal_UpdateSnapshotResponse(data: Any) -> UpdateSnapshotResponse: field = data.get("snapshot", None) if field is not None: args["snapshot"] = unmarshal_Snapshot(field) + else: + args["snapshot"] = None return UpdateSnapshotResponse(**args) @@ -2440,6 +2610,8 @@ def unmarshal_UpdateVolumeResponse(data: Any) -> UpdateVolumeResponse: field = data.get("volume", None) if field is not None: args["volume"] = unmarshal_Volume(field) + else: + args["volume"] = None return UpdateVolumeResponse(**args) @@ -2455,6 +2627,8 @@ def unmarshal__SetImageResponse(data: Any) -> _SetImageResponse: field = data.get("image", None) if field is not None: args["image"] = unmarshal_Image(field) + else: + args["image"] = None return _SetImageResponse(**args) @@ -2470,6 +2644,8 @@ def unmarshal__SetSecurityGroupResponse(data: Any) -> _SetSecurityGroupResponse: field = data.get("security_group", None) if field is not None: args["security_group"] = unmarshal_SecurityGroup(field) + else: + args["security_group"] = None return _SetSecurityGroupResponse(**args) @@ -2485,6 +2661,8 @@ def unmarshal__SetSecurityGroupRuleResponse(data: Any) -> _SetSecurityGroupRuleR field = data.get("rule", None) if field is not None: args["rule"] = unmarshal_SecurityGroupRule(field) + else: + args["rule"] = None return _SetSecurityGroupRuleResponse(**args) @@ -2500,6 +2678,8 @@ def unmarshal__SetServerResponse(data: Any) -> _SetServerResponse: field = data.get("server", None) if field is not None: args["server"] = unmarshal_Server(field) + else: + args["server"] = None return _SetServerResponse(**args) @@ -2515,6 +2695,8 @@ def unmarshal__SetSnapshotResponse(data: Any) -> _SetSnapshotResponse: field = data.get("snapshot", None) if field is not None: args["snapshot"] = unmarshal_Snapshot(field) + else: + args["snapshot"] = None return _SetSnapshotResponse(**args) diff --git a/scaleway/scaleway/iot/v1/marshalling.py b/scaleway/scaleway/iot/v1/marshalling.py index 97f75d2c..0397cfe7 100644 --- a/scaleway/scaleway/iot/v1/marshalling.py +++ b/scaleway/scaleway/iot/v1/marshalling.py @@ -75,6 +75,8 @@ def unmarshal_DeviceMessageFiltersRule(data: Any) -> DeviceMessageFiltersRule: field = data.get("topics", None) if field is not None: args["topics"] = field + else: + args["topics"] = None return DeviceMessageFiltersRule(**args) @@ -90,10 +92,14 @@ def unmarshal_DeviceMessageFilters(data: Any) -> DeviceMessageFilters: field = data.get("publish", None) if field is not None: args["publish"] = unmarshal_DeviceMessageFiltersRule(field) + else: + args["publish"] = None field = data.get("subscribe", None) if field is not None: args["subscribe"] = unmarshal_DeviceMessageFiltersRule(field) + else: + args["subscribe"] = None return DeviceMessageFilters(**args) @@ -131,6 +137,8 @@ def unmarshal_Device(data: Any) -> Device: args["last_activity_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["last_activity_at"] = None field = data.get("is_connected", None) if field is not None: @@ -151,14 +159,20 @@ def unmarshal_Device(data: Any) -> Device: field = data.get("message_filters", None) if field is not None: args["message_filters"] = unmarshal_DeviceMessageFilters(field) + else: + args["message_filters"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return Device(**args) @@ -179,7 +193,7 @@ def unmarshal_Network(data: Any) -> Network: if field is not None: args["name"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -198,6 +212,8 @@ def unmarshal_Network(data: Any) -> Network: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None return Network(**args) @@ -288,14 +304,20 @@ def unmarshal_Hub(data: Any) -> Hub: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("twins_graphite_config", None) if field is not None: args["twins_graphite_config"] = unmarshal_HubTwinsGraphiteConfig(field) + else: + args["twins_graphite_config"] = None return Hub(**args) @@ -330,10 +352,14 @@ def unmarshal_CreateDeviceResponse(data: Any) -> CreateDeviceResponse: field = data.get("device", None) if field is not None: args["device"] = unmarshal_Device(field) + else: + args["device"] = None field = data.get("certificate", None) if field is not None: args["certificate"] = unmarshal_Certificate(field) + else: + args["certificate"] = None return CreateDeviceResponse(**args) @@ -353,6 +379,8 @@ def unmarshal_CreateNetworkResponse(data: Any) -> CreateNetworkResponse: field = data.get("network", None) if field is not None: args["network"] = unmarshal_Network(field) + else: + args["network"] = None return CreateNetworkResponse(**args) @@ -372,6 +400,8 @@ def unmarshal_GetDeviceCertificateResponse(data: Any) -> GetDeviceCertificateRes field = data.get("device", None) if field is not None: args["device"] = unmarshal_Device(field) + else: + args["device"] = None return GetDeviceCertificateResponse(**args) @@ -510,17 +540,21 @@ def unmarshal_RouteSummary(data: Any) -> RouteSummary: if field is not None: args["topic"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return RouteSummary(**args) @@ -595,10 +629,14 @@ def unmarshal_RenewDeviceCertificateResponse( field = data.get("device", None) if field is not None: args["device"] = unmarshal_Device(field) + else: + args["device"] = None field = data.get("certificate", None) if field is not None: args["certificate"] = unmarshal_Certificate(field) + else: + args["certificate"] = None return RenewDeviceCertificateResponse(**args) @@ -716,29 +754,39 @@ def unmarshal_Route(data: Any) -> Route: if field is not None: args["topic"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("s3_config", None) if field is not None: args["s3_config"] = unmarshal_RouteS3Config(field) + else: + args["s3_config"] = None field = data.get("db_config", None) if field is not None: args["db_config"] = unmarshal_RouteDatabaseConfig(field) + else: + args["db_config"] = None field = data.get("rest_config", None) if field is not None: args["rest_config"] = unmarshal_RouteRestConfig(field) + else: + args["rest_config"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return Route(**args) @@ -758,6 +806,8 @@ def unmarshal_SetDeviceCertificateResponse(data: Any) -> SetDeviceCertificateRes field = data.get("device", None) if field is not None: args["device"] = unmarshal_Device(field) + else: + args["device"] = None return SetDeviceCertificateResponse(**args) @@ -785,6 +835,8 @@ def unmarshal_TwinDocument(data: Any) -> TwinDocument: field = data.get("data", None) if field is not None: args["data"] = field + else: + args["data"] = None return TwinDocument(**args) diff --git a/scaleway/scaleway/jobs/v1alpha1/marshalling.py b/scaleway/scaleway/jobs/v1alpha1/marshalling.py index ecb70454..71b680b6 100644 --- a/scaleway/scaleway/jobs/v1alpha1/marshalling.py +++ b/scaleway/scaleway/jobs/v1alpha1/marshalling.py @@ -78,10 +78,14 @@ def unmarshal_JobDefinition(data: Any) -> JobDefinition: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("environment_variables", None) if field is not None: @@ -102,10 +106,14 @@ def unmarshal_JobDefinition(data: Any) -> JobDefinition: field = data.get("job_timeout", None) if field is not None: args["job_timeout"] = field + else: + args["job_timeout"] = None field = data.get("cron_schedule", None) if field is not None: args["cron_schedule"] = unmarshal_CronSchedule(field) + else: + args["cron_schedule"] = None return JobDefinition(**args) @@ -149,24 +157,34 @@ def unmarshal_JobRun(data: Any) -> JobRun: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("terminated_at", None) if field is not None: args["terminated_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["terminated_at"] = None field = data.get("exit_code", None) if field is not None: args["exit_code"] = field + else: + args["exit_code"] = None field = data.get("run_duration", None) if field is not None: args["run_duration"] = field + else: + args["run_duration"] = None field = data.get("environment_variables", None) if field is not None: @@ -183,6 +201,8 @@ def unmarshal_JobRun(data: Any) -> JobRun: field = data.get("started_at", None) if field is not None: args["started_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["started_at"] = None return JobRun(**args) diff --git a/scaleway/scaleway/k8s/v1/marshalling.py b/scaleway/scaleway/k8s/v1/marshalling.py index 9f324c14..8f813da4 100644 --- a/scaleway/scaleway/k8s/v1/marshalling.py +++ b/scaleway/scaleway/k8s/v1/marshalling.py @@ -114,10 +114,14 @@ def unmarshal_Pool(data: Any) -> Pool: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("min_size", None) if field is not None: @@ -162,14 +166,20 @@ def unmarshal_Pool(data: Any) -> Pool: field = data.get("placement_group_id", None) if field is not None: args["placement_group_id"] = field + else: + args["placement_group_id"] = None field = data.get("upgrade_policy", None) if field is not None: args["upgrade_policy"] = unmarshal_PoolUpgradePolicy(field) + else: + args["upgrade_policy"] = None field = data.get("root_volume_size", None) if field is not None: args["root_volume_size"] = field + else: + args["root_volume_size"] = None return Pool(**args) @@ -253,6 +263,8 @@ def unmarshal_ClusterAutoUpgrade(data: Any) -> ClusterAutoUpgrade: field = data.get("maintenance_window", None) if field is not None: args["maintenance_window"] = unmarshal_MaintenanceWindow(field) + else: + args["maintenance_window"] = None return ClusterAutoUpgrade(**args) @@ -359,7 +371,7 @@ def unmarshal_Cluster(data: Any) -> Cluster: if field is not None: args["id"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -426,32 +438,52 @@ def unmarshal_Cluster(data: Any) -> Cluster: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("autoscaler_config", None) if field is not None: args["autoscaler_config"] = unmarshal_ClusterAutoscalerConfig(field) + else: + args["autoscaler_config"] = None field = data.get("auto_upgrade", None) if field is not None: args["auto_upgrade"] = unmarshal_ClusterAutoUpgrade(field) + else: + args["auto_upgrade"] = None field = data.get("open_id_connect_config", None) if field is not None: args["open_id_connect_config"] = unmarshal_ClusterOpenIDConnectConfig(field) + else: + args["open_id_connect_config"] = None field = data.get("private_network_id", None) if field is not None: args["private_network_id"] = field + else: + args["private_network_id"] = None field = data.get("commitment_ends_at", None) if field is not None: args["commitment_ends_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["commitment_ends_at"] = None + + field = data.get("routed_ip_enabled", None) + if field is not None: + args["routed_ip_enabled"] = field + else: + args["routed_ip_enabled"] = None field = data.get("routed_ip_enabled", None) if field is not None: @@ -495,14 +527,20 @@ def unmarshal_Node(data: Any) -> Node: field = data.get("public_ip_v4", None) if field is not None: args["public_ip_v4"] = field + else: + args["public_ip_v4"] = None field = data.get("public_ip_v6", None) if field is not None: args["public_ip_v6"] = field + else: + args["public_ip_v6"] = None field = data.get("conditions", None) if field is not None: args["conditions"] = field + else: + args["conditions"] = None field = data.get("status", None) if field is not None: @@ -511,14 +549,20 @@ def unmarshal_Node(data: Any) -> Node: field = data.get("error_message", None) if field is not None: args["error_message"] = field + else: + args["error_message"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return Node(**args) @@ -656,6 +700,8 @@ def unmarshal_ClusterType(data: Any) -> ClusterType: field = data.get("commitment_delay", None) if field is not None: args["commitment_delay"] = field + else: + args["commitment_delay"] = None return ClusterType(**args) diff --git a/scaleway/scaleway/lb/v1/marshalling.py b/scaleway/scaleway/lb/v1/marshalling.py index b68ee34b..f339251e 100644 --- a/scaleway/scaleway/lb/v1/marshalling.py +++ b/scaleway/scaleway/lb/v1/marshalling.py @@ -140,10 +140,14 @@ def unmarshal_Ip(data: Any) -> Ip: field = data.get("lb_id", None) if field is not None: args["lb_id"] = field + else: + args["lb_id"] = None field = data.get("region", None) if field is not None: args["region"] = field + else: + args["region"] = None return Ip(**args) @@ -197,10 +201,14 @@ def unmarshal_Subscriber(data: Any) -> Subscriber: field = data.get("email_config", None) if field is not None: args["email_config"] = unmarshal_SubscriberEmailConfig(field) + else: + args["email_config"] = None field = data.get("webhook_config", None) if field is not None: args["webhook_config"] = unmarshal_SubscriberWebhookConfig(field) + else: + args["webhook_config"] = None return Subscriber(**args) @@ -228,6 +236,8 @@ def unmarshal_HealthCheckHttpConfig(data: Any) -> HealthCheckHttpConfig: field = data.get("code", None) if field is not None: args["code"] = field + else: + args["code"] = None return HealthCheckHttpConfig(**args) @@ -259,6 +269,8 @@ def unmarshal_HealthCheckHttpsConfig(data: Any) -> HealthCheckHttpsConfig: field = data.get("code", None) if field is not None: args["code"] = field + else: + args["code"] = None return HealthCheckHttpsConfig(**args) @@ -345,18 +357,26 @@ def unmarshal_HealthCheck(data: Any) -> HealthCheck: field = data.get("check_delay", None) if field is not None: args["check_delay"] = field + else: + args["check_delay"] = None field = data.get("check_timeout", None) if field is not None: args["check_timeout"] = field + else: + args["check_timeout"] = None field = data.get("tcp_config", None) if field is not None: args["tcp_config"] = unmarshal_HealthCheckTcpConfig(field) + else: + args["tcp_config"] = None field = data.get("mysql_config", None) if field is not None: args["mysql_config"] = unmarshal_HealthCheckMysqlConfig(field) + else: + args["mysql_config"] = None field = data.get("check_send_proxy", None) if field is not None: @@ -365,26 +385,38 @@ def unmarshal_HealthCheck(data: Any) -> HealthCheck: field = data.get("pgsql_config", None) if field is not None: args["pgsql_config"] = unmarshal_HealthCheckPgsqlConfig(field) + else: + args["pgsql_config"] = None field = data.get("ldap_config", None) if field is not None: args["ldap_config"] = unmarshal_HealthCheckLdapConfig(field) + else: + args["ldap_config"] = None field = data.get("redis_config", None) if field is not None: args["redis_config"] = unmarshal_HealthCheckRedisConfig(field) + else: + args["redis_config"] = None field = data.get("http_config", None) if field is not None: args["http_config"] = unmarshal_HealthCheckHttpConfig(field) + else: + args["http_config"] = None field = data.get("https_config", None) if field is not None: args["https_config"] = unmarshal_HealthCheckHttpsConfig(field) + else: + args["https_config"] = None field = data.get("transient_check_delay", None) if field is not None: args["transient_check_delay"] = field + else: + args["transient_check_delay"] = None return HealthCheck(**args) @@ -416,14 +448,20 @@ def unmarshal_Instance(data: Any) -> Instance: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("region", None) if field is not None: args["region"] = field + else: + args["region"] = None return Instance(**args) @@ -482,7 +520,7 @@ def unmarshal_Lb(data: Any) -> Lb: if field is not None: args["backend_count"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -505,18 +543,26 @@ def unmarshal_Lb(data: Any) -> Lb: field = data.get("subscriber", None) if field is not None: args["subscriber"] = unmarshal_Subscriber(field) + else: + args["subscriber"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("region", None) if field is not None: args["region"] = field + else: + args["region"] = None return Lb(**args) @@ -572,62 +618,92 @@ def unmarshal_Backend(data: Any) -> Backend: field = data.get("health_check", None) if field is not None: args["health_check"] = unmarshal_HealthCheck(field) + else: + args["health_check"] = None field = data.get("lb", None) if field is not None: args["lb"] = unmarshal_Lb(field) + else: + args["lb"] = None field = data.get("send_proxy_v2", None) if field is not None: args["send_proxy_v2"] = field + else: + args["send_proxy_v2"] = None field = data.get("timeout_server", None) if field is not None: args["timeout_server"] = field + else: + args["timeout_server"] = None field = data.get("timeout_connect", None) if field is not None: args["timeout_connect"] = field + else: + args["timeout_connect"] = None field = data.get("timeout_tunnel", None) if field is not None: args["timeout_tunnel"] = field + else: + args["timeout_tunnel"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("failover_host", None) if field is not None: args["failover_host"] = field + else: + args["failover_host"] = None field = data.get("ssl_bridging", None) if field is not None: args["ssl_bridging"] = field + else: + args["ssl_bridging"] = None field = data.get("ignore_ssl_server_verify", None) if field is not None: args["ignore_ssl_server_verify"] = field + else: + args["ignore_ssl_server_verify"] = None field = data.get("redispatch_attempt_count", None) if field is not None: args["redispatch_attempt_count"] = field + else: + args["redispatch_attempt_count"] = None field = data.get("max_retries", None) if field is not None: args["max_retries"] = field + else: + args["max_retries"] = None field = data.get("max_connections", None) if field is not None: args["max_connections"] = field + else: + args["max_connections"] = None field = data.get("timeout_queue", None) if field is not None: args["timeout_queue"] = field + else: + args["timeout_queue"] = None return Backend(**args) @@ -640,7 +716,7 @@ def unmarshal_Certificate(data: Any) -> Certificate: args: Dict[str, Any] = {} - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -669,16 +745,22 @@ def unmarshal_Certificate(data: Any) -> Certificate: args["not_valid_before"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["not_valid_before"] = None field = data.get("not_valid_after", None) if field is not None: args["not_valid_after"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["not_valid_after"] = None field = data.get("lb", None) if field is not None: args["lb"] = unmarshal_Lb(field) + else: + args["lb"] = None field = data.get("name", None) if field is not None: @@ -687,14 +769,20 @@ def unmarshal_Certificate(data: Any) -> Certificate: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("status_details", None) if field is not None: args["status_details"] = field + else: + args["status_details"] = None return Certificate(**args) @@ -730,26 +818,38 @@ def unmarshal_Frontend(data: Any) -> Frontend: field = data.get("backend", None) if field is not None: args["backend"] = unmarshal_Backend(field) + else: + args["backend"] = None field = data.get("lb", None) if field is not None: args["lb"] = unmarshal_Lb(field) + else: + args["lb"] = None field = data.get("timeout_client", None) if field is not None: args["timeout_client"] = field + else: + args["timeout_client"] = None field = data.get("certificate", None) if field is not None: args["certificate"] = unmarshal_Certificate(field) + else: + args["certificate"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return Frontend(**args) @@ -762,7 +862,7 @@ def unmarshal_AclActionRedirect(data: Any) -> AclActionRedirect: args: Dict[str, Any] = {} - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -773,6 +873,8 @@ def unmarshal_AclActionRedirect(data: Any) -> AclActionRedirect: field = data.get("code", None) if field is not None: args["code"] = field + else: + args["code"] = None return AclActionRedirect(**args) @@ -785,13 +887,15 @@ def unmarshal_AclAction(data: Any) -> AclAction: args: Dict[str, Any] = {} - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field field = data.get("redirect", None) if field is not None: args["redirect"] = unmarshal_AclActionRedirect(field) + else: + args["redirect"] = None return AclAction(**args) @@ -823,6 +927,8 @@ def unmarshal_AclMatch(data: Any) -> AclMatch: field = data.get("http_filter_option", None) if field is not None: args["http_filter_option"] = field + else: + args["http_filter_option"] = None return AclMatch(**args) @@ -854,22 +960,32 @@ def unmarshal_Acl(data: Any) -> Acl: field = data.get("match", None) if field is not None: args["match"] = unmarshal_AclMatch(field) + else: + args["match"] = None field = data.get("action", None) if field is not None: args["action"] = unmarshal_AclAction(field) + else: + args["action"] = None field = data.get("frontend", None) if field is not None: args["frontend"] = unmarshal_Frontend(field) + else: + args["frontend"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return Acl(**args) @@ -885,6 +1001,8 @@ def unmarshal_PrivateNetworkDHCPConfig(data: Any) -> PrivateNetworkDHCPConfig: field = data.get("ip_id", None) if field is not None: args["ip_id"] = field + else: + args["ip_id"] = None return PrivateNetworkDHCPConfig(**args) @@ -911,6 +1029,8 @@ def unmarshal_PrivateNetworkStaticConfig(data: Any) -> PrivateNetworkStaticConfi field = data.get("ip_address", None) if field is not None: args["ip_address"] = field + else: + args["ip_address"] = None return PrivateNetworkStaticConfig(**args) @@ -938,26 +1058,38 @@ def unmarshal_PrivateNetwork(data: Any) -> PrivateNetwork: field = data.get("lb", None) if field is not None: args["lb"] = unmarshal_Lb(field) + else: + args["lb"] = None field = data.get("static_config", None) if field is not None: args["static_config"] = unmarshal_PrivateNetworkStaticConfig(field) + else: + args["static_config"] = None field = data.get("dhcp_config", None) if field is not None: args["dhcp_config"] = unmarshal_PrivateNetworkDHCPConfig(field) + else: + args["dhcp_config"] = None field = data.get("ipam_config", None) if field is not None: args["ipam_config"] = unmarshal_PrivateNetworkIpamConfig(field) + else: + args["ipam_config"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return PrivateNetwork(**args) @@ -973,10 +1105,14 @@ def unmarshal_RouteMatch(data: Any) -> RouteMatch: field = data.get("sni", None) if field is not None: args["sni"] = field + else: + args["sni"] = None field = data.get("host_header", None) if field is not None: args["host_header"] = field + else: + args["host_header"] = None return RouteMatch(**args) @@ -1004,14 +1140,20 @@ def unmarshal_Route(data: Any) -> Route: field = data.get("match", None) if field is not None: args["match"] = unmarshal_RouteMatch(field) + else: + args["match"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return Route(**args) @@ -1049,6 +1191,8 @@ def unmarshal_BackendServerStats(data: Any) -> BackendServerStats: args["server_state_changed_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["server_state_changed_at"] = None return BackendServerStats(**args) @@ -1244,6 +1388,8 @@ def unmarshal_LbType(data: Any) -> LbType: field = data.get("region", None) if field is not None: args["region"] = field + else: + args["region"] = None return LbType(**args) diff --git a/scaleway/scaleway/llm_inference/v1beta1/marshalling.py b/scaleway/scaleway/llm_inference/v1beta1/marshalling.py index e8146598..5fa39a3a 100644 --- a/scaleway/scaleway/llm_inference/v1beta1/marshalling.py +++ b/scaleway/scaleway/llm_inference/v1beta1/marshalling.py @@ -87,10 +87,14 @@ def unmarshal_Endpoint(data: Any) -> Endpoint: field = data.get("public_access", None) if field is not None: args["public_access"] = unmarshal_EndpointPublicAccessDetails(field) + else: + args["public_access"] = None field = data.get("private_network", None) if field is not None: args["private_network"] = unmarshal_EndpointPrivateNetworkDetails(field) + else: + args["private_network"] = None return Endpoint(**args) @@ -156,14 +160,20 @@ def unmarshal_Deployment(data: Any) -> Deployment: field = data.get("error_message", None) if field is not None: args["error_message"] = field + else: + args["error_message"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return Deployment(**args) @@ -187,10 +197,14 @@ def unmarshal_ModelS3Model(data: Any) -> ModelS3Model: field = data.get("node_type", None) if field is not None: args["node_type"] = field + else: + args["node_type"] = None field = data.get("triton_server_version", None) if field is not None: args["triton_server_version"] = field + else: + args["triton_server_version"] = None return ModelS3Model(**args) @@ -250,14 +264,20 @@ def unmarshal_Model(data: Any) -> Model: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("s3_model", None) if field is not None: args["s3_model"] = unmarshal_ModelS3Model(field) + else: + args["s3_model"] = None return Model(**args) @@ -433,10 +453,14 @@ def unmarshal_NodeType(data: Any) -> NodeType: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return NodeType(**args) diff --git a/scaleway/scaleway/marketplace/v2/marshalling.py b/scaleway/scaleway/marketplace/v2/marshalling.py index eb495e08..c3c22a3e 100644 --- a/scaleway/scaleway/marketplace/v2/marshalling.py +++ b/scaleway/scaleway/marketplace/v2/marshalling.py @@ -74,16 +74,22 @@ def unmarshal_Image(data: Any) -> Image: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("valid_until", None) if field is not None: args["valid_until"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["valid_until"] = None return Image(**args) @@ -116,7 +122,7 @@ def unmarshal_LocalImage(data: Any) -> LocalImage: if field is not None: args["label"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -142,16 +148,22 @@ def unmarshal_Version(data: Any) -> Version: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("published_at", None) if field is not None: args["published_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["published_at"] = None return Version(**args) diff --git a/scaleway/scaleway/mnq/v1beta1/marshalling.py b/scaleway/scaleway/mnq/v1beta1/marshalling.py index 1ffebec4..30fb4cff 100644 --- a/scaleway/scaleway/mnq/v1beta1/marshalling.py +++ b/scaleway/scaleway/mnq/v1beta1/marshalling.py @@ -64,10 +64,14 @@ def unmarshal_NatsAccount(data: Any) -> NatsAccount: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return NatsAccount(**args) @@ -118,14 +122,20 @@ def unmarshal_NatsCredentials(data: Any) -> NatsCredentials: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("credentials", None) if field is not None: args["credentials"] = unmarshal_File(field) + else: + args["credentials"] = None return NatsCredentials(**args) @@ -141,14 +151,20 @@ def unmarshal_SnsPermissions(data: Any) -> SnsPermissions: field = data.get("can_publish", None) if field is not None: args["can_publish"] = field + else: + args["can_publish"] = None field = data.get("can_receive", None) if field is not None: args["can_receive"] = field + else: + args["can_receive"] = None field = data.get("can_manage", None) if field is not None: args["can_manage"] = field + else: + args["can_manage"] = None return SnsPermissions(**args) @@ -192,14 +208,20 @@ def unmarshal_SnsCredentials(data: Any) -> SnsCredentials: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("permissions", None) if field is not None: args["permissions"] = unmarshal_SnsPermissions(field) + else: + args["permissions"] = None return SnsCredentials(**args) @@ -215,14 +237,20 @@ def unmarshal_SqsPermissions(data: Any) -> SqsPermissions: field = data.get("can_publish", None) if field is not None: args["can_publish"] = field + else: + args["can_publish"] = None field = data.get("can_receive", None) if field is not None: args["can_receive"] = field + else: + args["can_receive"] = None field = data.get("can_manage", None) if field is not None: args["can_manage"] = field + else: + args["can_manage"] = None return SqsPermissions(**args) @@ -266,14 +294,20 @@ def unmarshal_SqsCredentials(data: Any) -> SqsCredentials: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("permissions", None) if field is not None: args["permissions"] = unmarshal_SqsPermissions(field) + else: + args["permissions"] = None return SqsCredentials(**args) @@ -389,10 +423,14 @@ def unmarshal_SnsInfo(data: Any) -> SnsInfo: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return SnsInfo(**args) @@ -424,10 +462,14 @@ def unmarshal_SqsInfo(data: Any) -> SqsInfo: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return SqsInfo(**args) diff --git a/scaleway/scaleway/rdb/v1/marshalling.py b/scaleway/scaleway/rdb/v1/marshalling.py index 4d244064..0401c6c3 100644 --- a/scaleway/scaleway/rdb/v1/marshalling.py +++ b/scaleway/scaleway/rdb/v1/marshalling.py @@ -166,26 +166,38 @@ def unmarshal_Endpoint(data: Any) -> Endpoint: field = data.get("ip", None) if field is not None: args["ip"] = field + else: + args["ip"] = None field = data.get("name", None) if field is not None: args["name"] = field + else: + args["name"] = None field = data.get("private_network", None) if field is not None: args["private_network"] = unmarshal_EndpointPrivateNetworkDetails(field) + else: + args["private_network"] = None field = data.get("load_balancer", None) if field is not None: args["load_balancer"] = unmarshal_EndpointLoadBalancerDetails(field) + else: + args["load_balancer"] = None field = data.get("direct_access", None) if field is not None: args["direct_access"] = unmarshal_EndpointDirectAccessDetails(field) + else: + args["direct_access"] = None field = data.get("hostname", None) if field is not None: args["hostname"] = field + else: + args["hostname"] = None return Endpoint(**args) @@ -209,18 +221,26 @@ def unmarshal_Maintenance(data: Any) -> Maintenance: field = data.get("starts_at", None) if field is not None: args["starts_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["starts_at"] = None field = data.get("stops_at", None) if field is not None: args["stops_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["stops_at"] = None field = data.get("closed_at", None) if field is not None: args["closed_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["closed_at"] = None field = data.get("forced_at", None) if field is not None: args["forced_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["forced_at"] = None return Maintenance(**args) @@ -293,18 +313,26 @@ def unmarshal_DatabaseBackup(data: Any) -> DatabaseBackup: field = data.get("size", None) if field is not None: args["size"] = field + else: + args["size"] = None field = data.get("expires_at", None) if field is not None: args["expires_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expires_at"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("instance_name", None) if field is not None: @@ -321,12 +349,16 @@ def unmarshal_DatabaseBackup(data: Any) -> DatabaseBackup: field = data.get("download_url", None) if field is not None: args["download_url"] = field + else: + args["download_url"] = None field = data.get("download_url_expires_at", None) if field is not None: args["download_url_expires_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["download_url_expires_at"] = None return DatabaseBackup(**args) @@ -385,14 +417,20 @@ def unmarshal_InstanceLog(data: Any) -> InstanceLog: field = data.get("download_url", None) if field is not None: args["download_url"] = field + else: + args["download_url"] = None field = data.get("expires_at", None) if field is not None: args["expires_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expires_at"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None return InstanceLog(**args) @@ -422,6 +460,8 @@ def unmarshal_BackupSchedule(data: Any) -> BackupSchedule: args["next_run_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["next_run_at"] = None return BackupSchedule(**args) @@ -456,10 +496,14 @@ def unmarshal_LogsPolicy(data: Any) -> LogsPolicy: field = data.get("max_age_retention", None) if field is not None: args["max_age_retention"] = field + else: + args["max_age_retention"] = None field = data.get("total_disk_retention", None) if field is not None: args["total_disk_retention"] = field + else: + args["total_disk_retention"] = None return LogsPolicy(**args) @@ -499,7 +543,7 @@ def unmarshal_Volume(data: Any) -> Volume: args: Dict[str, Any] = {} - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -507,7 +551,7 @@ def unmarshal_Volume(data: Any) -> Volume: if field is not None: args["size"] = field - field = data.get("class_", None) + field = data.get("class", None) if field is not None: args["class_"] = field @@ -541,10 +585,14 @@ def unmarshal_Instance(data: Any) -> Instance: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("volume", None) if field is not None: args["volume"] = unmarshal_Volume(field) + else: + args["volume"] = None field = data.get("project_id", None) if field is not None: @@ -583,10 +631,14 @@ def unmarshal_Instance(data: Any) -> Instance: field = data.get("endpoint", None) if field is not None: args["endpoint"] = unmarshal_Endpoint(field) + else: + args["endpoint"] = None field = data.get("backup_schedule", None) if field is not None: args["backup_schedule"] = unmarshal_BackupSchedule(field) + else: + args["backup_schedule"] = None field = data.get("read_replicas", None) if field is not None: @@ -623,6 +675,8 @@ def unmarshal_Instance(data: Any) -> Instance: field = data.get("logs_policy", None) if field is not None: args["logs_policy"] = unmarshal_LogsPolicy(field) + else: + args["logs_policy"] = None return Instance(**args) @@ -658,11 +712,11 @@ def unmarshal_SnapshotVolumeType(data: Any) -> SnapshotVolumeType: args: Dict[str, Any] = {} - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field - field = data.get("class_", None) + field = data.get("class", None) if field is not None: args["class_"] = field @@ -708,22 +762,32 @@ def unmarshal_Snapshot(data: Any) -> Snapshot: field = data.get("size", None) if field is not None: args["size"] = field + else: + args["size"] = None field = data.get("expires_at", None) if field is not None: args["expires_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expires_at"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("volume_type", None) if field is not None: args["volume_type"] = unmarshal_SnapshotVolumeType(field) + else: + args["volume_type"] = None return Snapshot(**args) @@ -778,6 +842,8 @@ def unmarshal_ACLRule(data: Any) -> ACLRule: field = data.get("port", None) if field is not None: args["port"] = field + else: + args["port"] = None return ACLRule(**args) @@ -923,26 +989,38 @@ def unmarshal_EngineSetting(data: Any) -> EngineSetting: field = data.get("unit", None) if field is not None: args["unit"] = field + else: + args["unit"] = None field = data.get("string_constraint", None) if field is not None: args["string_constraint"] = field + else: + args["string_constraint"] = None field = data.get("int_min", None) if field is not None: args["int_min"] = field + else: + args["int_min"] = None field = data.get("int_max", None) if field is not None: args["int_max"] = field + else: + args["int_max"] = None field = data.get("float_min", None) if field is not None: args["float_min"] = field + else: + args["float_min"] = None field = data.get("float_max", None) if field is not None: args["float_max"] = field + else: + args["float_max"] = None return EngineSetting(**args) @@ -988,6 +1066,8 @@ def unmarshal_EngineVersion(data: Any) -> EngineVersion: args["end_of_life"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["end_of_life"] = None return EngineVersion(**args) @@ -1194,7 +1274,7 @@ def unmarshal_NodeTypeVolumeType(data: Any) -> NodeTypeVolumeType: args: Dict[str, Any] = {} - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -1214,7 +1294,7 @@ def unmarshal_NodeTypeVolumeType(data: Any) -> NodeTypeVolumeType: if field is not None: args["chunk_size"] = field - field = data.get("class_", None) + field = data.get("class", None) if field is not None: args["class_"] = field @@ -1260,10 +1340,14 @@ def unmarshal_NodeType(data: Any) -> NodeType: field = data.get("volume_constraint", None) if field is not None: args["volume_constraint"] = unmarshal_NodeTypeVolumeConstraintSizes(field) + else: + args["volume_constraint"] = None field = data.get("is_bssd_compatible", None) if field is not None: args["is_bssd_compatible"] = field + else: + args["is_bssd_compatible"] = None field = data.get("available_volume_types", None) if field is not None: diff --git a/scaleway/scaleway/redis/v1/marshalling.py b/scaleway/scaleway/redis/v1/marshalling.py index f72dabcb..0db4ab1a 100644 --- a/scaleway/scaleway/redis/v1/marshalling.py +++ b/scaleway/scaleway/redis/v1/marshalling.py @@ -64,10 +64,14 @@ def unmarshal_ACLRule(data: Any) -> ACLRule: field = data.get("ip_cidr", None) if field is not None: args["ip_cidr"] = field + else: + args["ip_cidr"] = None field = data.get("description", None) if field is not None: args["description"] = field + else: + args["description"] = None return ACLRule(**args) @@ -133,10 +137,14 @@ def unmarshal_Endpoint(data: Any) -> Endpoint: field = data.get("private_network", None) if field is not None: args["private_network"] = unmarshal_PrivateNetwork(field) + else: + args["private_network"] = None field = data.get("public_network", None) if field is not None: args["public_network"] = unmarshal_PublicNetwork(field) + else: + args["public_network"] = None return Endpoint(**args) @@ -215,10 +223,14 @@ def unmarshal_Cluster(data: Any) -> Cluster: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("acl_rules", None) if field is not None: @@ -333,7 +345,7 @@ def unmarshal_AvailableClusterSetting(data: Any) -> AvailableClusterSetting: if field is not None: args["name"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -348,18 +360,26 @@ def unmarshal_AvailableClusterSetting(data: Any) -> AvailableClusterSetting: field = data.get("default_value", None) if field is not None: args["default_value"] = field + else: + args["default_value"] = None field = data.get("max_value", None) if field is not None: args["max_value"] = field + else: + args["max_value"] = None field = data.get("min_value", None) if field is not None: args["min_value"] = field + else: + args["min_value"] = None field = data.get("regex", None) if field is not None: args["regex"] = field + else: + args["regex"] = None return AvailableClusterSetting(**args) @@ -397,6 +417,8 @@ def unmarshal_ClusterVersion(data: Any) -> ClusterVersion: args["end_of_life_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["end_of_life_at"] = None return ClusterVersion(**args) diff --git a/scaleway/scaleway/registry/v1/marshalling.py b/scaleway/scaleway/registry/v1/marshalling.py index d720c137..1ffa9c7f 100644 --- a/scaleway/scaleway/registry/v1/marshalling.py +++ b/scaleway/scaleway/registry/v1/marshalling.py @@ -61,14 +61,20 @@ def unmarshal_Image(data: Any) -> Image: field = data.get("status_message", None) if field is not None: args["status_message"] = field + else: + args["status_message"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return Image(**args) @@ -132,10 +138,14 @@ def unmarshal_Namespace(data: Any) -> Namespace: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return Namespace(**args) @@ -171,10 +181,14 @@ def unmarshal_Tag(data: Any) -> Tag: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return Tag(**args) diff --git a/scaleway/scaleway/secret/v1alpha1/marshalling.py b/scaleway/scaleway/secret/v1alpha1/marshalling.py index 6c6efd10..34a6622c 100644 --- a/scaleway/scaleway/secret/v1alpha1/marshalling.py +++ b/scaleway/scaleway/secret/v1alpha1/marshalling.py @@ -58,6 +58,8 @@ def unmarshal_Folder(data: Any) -> Folder: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None return Folder(**args) @@ -77,10 +79,14 @@ def unmarshal_EphemeralProperties(data: Any) -> EphemeralProperties: field = data.get("expires_at", None) if field is not None: args["expires_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expires_at"] = None field = data.get("expires_once_accessed", None) if field is not None: args["expires_once_accessed"] = field + else: + args["expires_once_accessed"] = None return EphemeralProperties(**args) @@ -112,18 +118,26 @@ def unmarshal_SecretVersion(data: Any) -> SecretVersion: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("description", None) if field is not None: args["description"] = field + else: + args["description"] = None field = data.get("ephemeral_properties", None) if field is not None: args["ephemeral_properties"] = unmarshal_EphemeralProperties(field) + else: + args["ephemeral_properties"] = None return SecretVersion(**args) @@ -143,10 +157,14 @@ def unmarshal_EphemeralPolicy(data: Any) -> EphemeralPolicy: field = data.get("time_to_live", None) if field is not None: args["time_to_live"] = field + else: + args["time_to_live"] = None field = data.get("expires_once_accessed", None) if field is not None: args["expires_once_accessed"] = field + else: + args["expires_once_accessed"] = None return EphemeralPolicy(**args) @@ -178,10 +196,14 @@ def unmarshal_Secret(data: Any) -> Secret: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("tags", None) if field is not None: @@ -199,7 +221,7 @@ def unmarshal_Secret(data: Any) -> Secret: if field is not None: args["is_protected"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -214,10 +236,14 @@ def unmarshal_Secret(data: Any) -> Secret: field = data.get("description", None) if field is not None: args["description"] = field + else: + args["description"] = None field = data.get("ephemeral_policy", None) if field is not None: args["ephemeral_policy"] = unmarshal_EphemeralPolicy(field) + else: + args["ephemeral_policy"] = None return Secret(**args) @@ -245,6 +271,8 @@ def unmarshal_AccessSecretVersionResponse(data: Any) -> AccessSecretVersionRespo field = data.get("data_crc32", None) if field is not None: args["data_crc32"] = field + else: + args["data_crc32"] = None return AccessSecretVersionResponse(**args) diff --git a/scaleway/scaleway/secret/v1beta1/marshalling.py b/scaleway/scaleway/secret/v1beta1/marshalling.py index 3dfc237a..a2bb8fb5 100644 --- a/scaleway/scaleway/secret/v1beta1/marshalling.py +++ b/scaleway/scaleway/secret/v1beta1/marshalling.py @@ -41,10 +41,14 @@ def unmarshal_EphemeralProperties(data: Any) -> EphemeralProperties: field = data.get("expires_at", None) if field is not None: args["expires_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expires_at"] = None field = data.get("expires_once_accessed", None) if field is not None: args["expires_once_accessed"] = field + else: + args["expires_once_accessed"] = None return EphemeralProperties(**args) @@ -76,18 +80,26 @@ def unmarshal_SecretVersion(data: Any) -> SecretVersion: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("description", None) if field is not None: args["description"] = field + else: + args["description"] = None field = data.get("ephemeral_properties", None) if field is not None: args["ephemeral_properties"] = unmarshal_EphemeralProperties(field) + else: + args["ephemeral_properties"] = None return SecretVersion(**args) @@ -107,10 +119,14 @@ def unmarshal_EphemeralPolicy(data: Any) -> EphemeralPolicy: field = data.get("time_to_live", None) if field is not None: args["time_to_live"] = field + else: + args["time_to_live"] = None field = data.get("expires_once_accessed", None) if field is not None: args["expires_once_accessed"] = field + else: + args["expires_once_accessed"] = None return EphemeralPolicy(**args) @@ -142,10 +158,14 @@ def unmarshal_Secret(data: Any) -> Secret: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("tags", None) if field is not None: @@ -163,7 +183,7 @@ def unmarshal_Secret(data: Any) -> Secret: if field is not None: args["protected"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -178,10 +198,14 @@ def unmarshal_Secret(data: Any) -> Secret: field = data.get("description", None) if field is not None: args["description"] = field + else: + args["description"] = None field = data.get("ephemeral_policy", None) if field is not None: args["ephemeral_policy"] = unmarshal_EphemeralPolicy(field) + else: + args["ephemeral_policy"] = None return Secret(**args) @@ -206,13 +230,15 @@ def unmarshal_AccessSecretVersionResponse(data: Any) -> AccessSecretVersionRespo if field is not None: args["data"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field field = data.get("data_crc32", None) if field is not None: args["data_crc32"] = field + else: + args["data_crc32"] = None return AccessSecretVersionResponse(**args) @@ -259,6 +285,8 @@ def unmarshal_BrowseSecretsResponseItemSecretDetails( field = data.get("ephemeral_policy", None) if field is not None: args["ephemeral_policy"] = unmarshal_EphemeralPolicy(field) + else: + args["ephemeral_policy"] = None return BrowseSecretsResponseItemSecretDetails(**args) @@ -278,18 +306,26 @@ def unmarshal_BrowseSecretsResponseItem(data: Any) -> BrowseSecretsResponseItem: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("secret", None) if field is not None: args["secret"] = unmarshal_BrowseSecretsResponseItemSecretDetails(field) + else: + args["secret"] = None field = data.get("folder", None) if field is not None: args["folder"] = unmarshal_BrowseSecretsResponseItemFolderDetails(field) + else: + args["folder"] = None return BrowseSecretsResponseItem(**args) diff --git a/scaleway/scaleway/serverless_sqldb/v1alpha1/marshalling.py b/scaleway/scaleway/serverless_sqldb/v1alpha1/marshalling.py index 88f441a6..f250a531 100644 --- a/scaleway/scaleway/serverless_sqldb/v1alpha1/marshalling.py +++ b/scaleway/scaleway/serverless_sqldb/v1alpha1/marshalling.py @@ -51,24 +51,34 @@ def unmarshal_DatabaseBackup(data: Any) -> DatabaseBackup: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("expires_at", None) if field is not None: args["expires_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["expires_at"] = None field = data.get("size", None) if field is not None: args["size"] = field + else: + args["size"] = None field = data.get("download_url", None) if field is not None: args["download_url"] = field + else: + args["download_url"] = None field = data.get("download_url_expires_at", None) if field is not None: args["download_url_expires_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["download_url_expires_at"] = None return DatabaseBackup(**args) @@ -132,6 +142,8 @@ def unmarshal_Database(data: Any) -> Database: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None return Database(**args) diff --git a/scaleway/scaleway/tem/v1alpha1/marshalling.py b/scaleway/scaleway/tem/v1alpha1/marshalling.py index 5d15e237..f35ef730 100644 --- a/scaleway/scaleway/tem/v1alpha1/marshalling.py +++ b/scaleway/scaleway/tem/v1alpha1/marshalling.py @@ -53,6 +53,8 @@ def unmarshal_EmailTry(data: Any) -> EmailTry: field = data.get("tried_at", None) if field is not None: args["tried_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["tried_at"] = None return EmailTry(**args) @@ -88,6 +90,8 @@ def unmarshal_Email(data: Any) -> Email: field = data.get("rcpt_to", None) if field is not None: args["rcpt_to"] = field + else: + args["rcpt_to"] = None field = data.get("rcpt_type", None) if field is not None: @@ -118,14 +122,20 @@ def unmarshal_Email(data: Any) -> Email: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("status_details", None) if field is not None: args["status_details"] = field + else: + args["status_details"] = None return Email(**args) @@ -160,6 +170,8 @@ def unmarshal_DomainRecords(data: Any) -> DomainRecords: field = data.get("dmarc", None) if field is not None: args["dmarc"] = unmarshal_DomainRecordsDMARC(field) + else: + args["dmarc"] = None return DomainRecords(**args) @@ -183,16 +195,22 @@ def unmarshal_DomainReputation(data: Any) -> DomainReputation: field = data.get("scored_at", None) if field is not None: args["scored_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["scored_at"] = None field = data.get("previous_score", None) if field is not None: args["previous_score"] = field + else: + args["previous_score"] = None field = data.get("previous_scored_at", None) if field is not None: args["previous_scored_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["previous_scored_at"] = None return DomainReputation(**args) @@ -259,18 +277,24 @@ def unmarshal_Domain(data: Any) -> Domain: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("next_check_at", None) if field is not None: args["next_check_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["next_check_at"] = None field = data.get("last_valid_at", None) if field is not None: args["last_valid_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["last_valid_at"] = None field = data.get("dkim_config", None) if field is not None: @@ -283,22 +307,32 @@ def unmarshal_Domain(data: Any) -> Domain: field = data.get("revoked_at", None) if field is not None: args["revoked_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["revoked_at"] = None field = data.get("last_error", None) if field is not None: args["last_error"] = field + else: + args["last_error"] = None field = data.get("statistics", None) if field is not None: args["statistics"] = unmarshal_DomainStatistics(field) + else: + args["statistics"] = None field = data.get("reputation", None) if field is not None: args["reputation"] = unmarshal_DomainReputation(field) + else: + args["reputation"] = None field = data.get("records", None) if field is not None: args["records"] = unmarshal_DomainRecords(field) + else: + args["records"] = None return Domain(**args) @@ -337,10 +371,14 @@ def unmarshal_DomainLastStatusDkimRecord(data: Any) -> DomainLastStatusDkimRecor args["last_valid_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["last_valid_at"] = None field = data.get("error", None) if field is not None: args["error"] = field + else: + args["error"] = None return DomainLastStatusDkimRecord(**args) @@ -362,10 +400,14 @@ def unmarshal_DomainLastStatusDmarcRecord(data: Any) -> DomainLastStatusDmarcRec args["last_valid_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["last_valid_at"] = None field = data.get("error", None) if field is not None: args["error"] = field + else: + args["error"] = None return DomainLastStatusDmarcRecord(**args) @@ -387,10 +429,14 @@ def unmarshal_DomainLastStatusSpfRecord(data: Any) -> DomainLastStatusSpfRecord: args["last_valid_at"] = ( parser.isoparse(field) if isinstance(field, str) else field ) + else: + args["last_valid_at"] = None field = data.get("error", None) if field is not None: args["error"] = field + else: + args["error"] = None return DomainLastStatusSpfRecord(**args) @@ -414,14 +460,20 @@ def unmarshal_DomainLastStatus(data: Any) -> DomainLastStatus: field = data.get("spf_record", None) if field is not None: args["spf_record"] = unmarshal_DomainLastStatusSpfRecord(field) + else: + args["spf_record"] = None field = data.get("dkim_record", None) if field is not None: args["dkim_record"] = unmarshal_DomainLastStatusDkimRecord(field) + else: + args["dkim_record"] = None field = data.get("dmarc_record", None) if field is not None: args["dmarc_record"] = unmarshal_DomainLastStatusDmarcRecord(field) + else: + args["dmarc_record"] = None return DomainLastStatus(**args) diff --git a/scaleway/scaleway/test/v1/marshalling.py b/scaleway/scaleway/test/v1/marshalling.py index 357241bf..6c3c3e84 100644 --- a/scaleway/scaleway/test/v1/marshalling.py +++ b/scaleway/scaleway/test/v1/marshalling.py @@ -58,10 +58,14 @@ def unmarshal_Human(data: Any) -> Human: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("hair_count", None) if field is not None: diff --git a/scaleway/scaleway/vpc/v1/marshalling.py b/scaleway/scaleway/vpc/v1/marshalling.py index 32514e39..b67881a3 100644 --- a/scaleway/scaleway/vpc/v1/marshalling.py +++ b/scaleway/scaleway/vpc/v1/marshalling.py @@ -52,10 +52,14 @@ def unmarshal_PrivateNetwork(data: Any) -> PrivateNetwork: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return PrivateNetwork(**args) diff --git a/scaleway/scaleway/vpc/v2/marshalling.py b/scaleway/scaleway/vpc/v2/marshalling.py index 760ec692..fbbc5561 100644 --- a/scaleway/scaleway/vpc/v2/marshalling.py +++ b/scaleway/scaleway/vpc/v2/marshalling.py @@ -48,10 +48,14 @@ def unmarshal_Subnet(data: Any) -> Subnet: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return Subnet(**args) @@ -105,10 +109,14 @@ def unmarshal_PrivateNetwork(data: Any) -> PrivateNetwork: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return PrivateNetwork(**args) @@ -160,10 +168,14 @@ def unmarshal_VPC(data: Any) -> VPC: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return VPC(**args) diff --git a/scaleway/scaleway/vpcgw/v1/marshalling.py b/scaleway/scaleway/vpcgw/v1/marshalling.py index 80c04c1c..a3063988 100644 --- a/scaleway/scaleway/vpcgw/v1/marshalling.py +++ b/scaleway/scaleway/vpcgw/v1/marshalling.py @@ -83,10 +83,14 @@ def unmarshal_DHCP(data: Any) -> DHCP: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("pool_high", None) if field is not None: @@ -123,14 +127,20 @@ def unmarshal_DHCP(data: Any) -> DHCP: field = data.get("valid_lifetime", None) if field is not None: args["valid_lifetime"] = field + else: + args["valid_lifetime"] = None field = data.get("renew_timer", None) if field is not None: args["renew_timer"] = field + else: + args["renew_timer"] = None field = data.get("rebind_timer", None) if field is not None: args["rebind_timer"] = field + else: + args["rebind_timer"] = None return DHCP(**args) @@ -177,14 +187,20 @@ def unmarshal_GatewayNetwork(data: Any) -> GatewayNetwork: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("mac_address", None) if field is not None: args["mac_address"] = field + else: + args["mac_address"] = None field = data.get("enable_masquerade", None) if field is not None: @@ -205,14 +221,20 @@ def unmarshal_GatewayNetwork(data: Any) -> GatewayNetwork: field = data.get("dhcp", None) if field is not None: args["dhcp"] = unmarshal_DHCP(field) + else: + args["dhcp"] = None field = data.get("address", None) if field is not None: args["address"] = field + else: + args["address"] = None field = data.get("ipam_config", None) if field is not None: args["ipam_config"] = unmarshal_IpamConfig(field) + else: + args["ipam_config"] = None return GatewayNetwork(**args) @@ -252,18 +274,26 @@ def unmarshal_IP(data: Any) -> IP: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("reverse", None) if field is not None: args["reverse"] = field + else: + args["reverse"] = None field = data.get("gateway_id", None) if field is not None: args["gateway_id"] = field + else: + args["gateway_id"] = None return IP(**args) @@ -296,7 +326,7 @@ def unmarshal_DHCPEntry(data: Any) -> DHCPEntry: if field is not None: args["hostname"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -307,10 +337,14 @@ def unmarshal_DHCPEntry(data: Any) -> DHCPEntry: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return DHCPEntry(**args) @@ -361,14 +395,20 @@ def unmarshal_Gateway(data: Any) -> Gateway: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = unmarshal_GatewayType(field) + else: + args["type_"] = None field = data.get("status", None) if field is not None: @@ -399,14 +439,20 @@ def unmarshal_Gateway(data: Any) -> Gateway: field = data.get("ip", None) if field is not None: args["ip"] = unmarshal_IP(field) + else: + args["ip"] = None field = data.get("version", None) if field is not None: args["version"] = field + else: + args["version"] = None field = data.get("can_upgrade_to", None) if field is not None: args["can_upgrade_to"] = field + else: + args["can_upgrade_to"] = None field = data.get("bastion_port", None) if field is not None: @@ -470,10 +516,14 @@ def unmarshal_PATRule(data: Any) -> PATRule: field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None return PATRule(**args) diff --git a/scaleway/scaleway/webhosting/v1alpha1/marshalling.py b/scaleway/scaleway/webhosting/v1alpha1/marshalling.py index e6f39d9a..7329b7b2 100644 --- a/scaleway/scaleway/webhosting/v1alpha1/marshalling.py +++ b/scaleway/scaleway/webhosting/v1alpha1/marshalling.py @@ -113,14 +113,20 @@ def unmarshal_Hosting(data: Any) -> Hosting: field = data.get("updated_at", None) if field is not None: args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None field = data.get("platform_number", None) if field is not None: args["platform_number"] = field + else: + args["platform_number"] = None field = data.get("options", None) if field is not None: @@ -171,6 +177,8 @@ def unmarshal_Hosting(data: Any) -> Hosting: field = data.get("cpanel_urls", None) if field is not None: args["cpanel_urls"] = unmarshal_HostingCpanelUrls(field) + else: + args["cpanel_urls"] = None return Hosting(**args) @@ -187,7 +195,7 @@ def unmarshal_DnsRecord(data: Any) -> DnsRecord: if field is not None: args["name"] = field - field = data.get("type_", None) + field = data.get("type", None) if field is not None: args["type_"] = field @@ -206,6 +214,8 @@ def unmarshal_DnsRecord(data: Any) -> DnsRecord: field = data.get("priority", None) if field is not None: args["priority"] = field + else: + args["priority"] = None return DnsRecord(**args) @@ -413,10 +423,14 @@ def unmarshal_Offer(data: Any) -> Offer: field = data.get("product", None) if field is not None: args["product"] = unmarshal_OfferProduct(field) + else: + args["product"] = None field = data.get("price", None) if field is not None: args["price"] = unmarshal_Money(field) + else: + args["price"] = None return Offer(**args)