From 352a1a3cbf806b8f02efc4ac6e3606b813a86c6e Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Tue, 1 Jul 2025 13:38:18 +0000 Subject: [PATCH] Generate iaas --- services/iaas/model_allowed_addresses_inner.go | 6 +++--- services/iaas/model_create_protocol.go | 12 ++++++------ .../iaas/model_create_server_payload_networking.go | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/services/iaas/model_allowed_addresses_inner.go b/services/iaas/model_allowed_addresses_inner.go index 4caed6179..1daa0092d 100644 --- a/services/iaas/model_allowed_addresses_inner.go +++ b/services/iaas/model_allowed_addresses_inner.go @@ -32,10 +32,10 @@ func (dst *AllowedAddressesInner) UnmarshalJSON(data []byte) error { var err error match := 0 // try to unmarshal data into String - err = newStrictDecoder(data).Decode(&dst.String) + err = json.Unmarshal(data, &dst.String) if err == nil { - jsonString, _ := json.Marshal(dst.String) - if string(jsonString) == "{}" { // empty struct + jsonstring, _ := json.Marshal(dst.String) + if string(jsonstring) == "{}" { // empty struct dst.String = nil } else { match++ diff --git a/services/iaas/model_create_protocol.go b/services/iaas/model_create_protocol.go index 215406e1b..5471dc8bf 100644 --- a/services/iaas/model_create_protocol.go +++ b/services/iaas/model_create_protocol.go @@ -40,10 +40,10 @@ func (dst *CreateProtocol) UnmarshalJSON(data []byte) error { var err error match := 0 // try to unmarshal data into Int64 - err = newStrictDecoder(data).Decode(&dst.Int64) + err = json.Unmarshal(data, &dst.Int64) if err == nil { - jsonInt64, _ := json.Marshal(dst.Int64) - if string(jsonInt64) == "{}" { // empty struct + jsonint64, _ := json.Marshal(dst.Int64) + if string(jsonint64) == "{}" { // empty struct dst.Int64 = nil } else { match++ @@ -53,10 +53,10 @@ func (dst *CreateProtocol) UnmarshalJSON(data []byte) error { } // try to unmarshal data into String - err = newStrictDecoder(data).Decode(&dst.String) + err = json.Unmarshal(data, &dst.String) if err == nil { - jsonString, _ := json.Marshal(dst.String) - if string(jsonString) == "{}" { // empty struct + jsonstring, _ := json.Marshal(dst.String) + if string(jsonstring) == "{}" { // empty struct dst.String = nil } else { match++ diff --git a/services/iaas/model_create_server_payload_networking.go b/services/iaas/model_create_server_payload_networking.go index d8cdf8e54..1896127ec 100644 --- a/services/iaas/model_create_server_payload_networking.go +++ b/services/iaas/model_create_server_payload_networking.go @@ -40,7 +40,7 @@ func (dst *CreateServerPayloadNetworking) UnmarshalJSON(data []byte) error { var err error match := 0 // try to unmarshal data into CreateServerNetworking - err = newStrictDecoder(data).Decode(&dst.CreateServerNetworking) + err = json.Unmarshal(data, &dst.CreateServerNetworking) if err == nil { jsonCreateServerNetworking, _ := json.Marshal(dst.CreateServerNetworking) if string(jsonCreateServerNetworking) == "{}" { // empty struct @@ -53,7 +53,7 @@ func (dst *CreateServerPayloadNetworking) UnmarshalJSON(data []byte) error { } // try to unmarshal data into CreateServerNetworkingWithNics - err = newStrictDecoder(data).Decode(&dst.CreateServerNetworkingWithNics) + err = json.Unmarshal(data, &dst.CreateServerNetworkingWithNics) if err == nil { jsonCreateServerNetworkingWithNics, _ := json.Marshal(dst.CreateServerNetworkingWithNics) if string(jsonCreateServerNetworkingWithNics) == "{}" { // empty struct