diff --git a/products/dataplatform/client.go b/products/dataplatform/client.go index 76cfa70..ab510fd 100644 --- a/products/dataplatform/client.go +++ b/products/dataplatform/client.go @@ -52,7 +52,7 @@ const ( RequestStatusFailed = "FAILED" RequestStatusDone = "DONE" - Version = "products/dataplatform/v2.0.0" + Version = "products/dataplatform/v2.0.1" ) // APIClient manages communication with the IONOS Cloud - Managed Stackable Data Platform API API v1.1.0 diff --git a/products/dataplatform/go.mod b/products/dataplatform/go.mod index 4288f98..8e45582 100644 --- a/products/dataplatform/go.mod +++ b/products/dataplatform/go.mod @@ -3,15 +3,7 @@ module github.com/ionos-cloud/sdk-go-bundle/products/dataplatform/v2 go 1.21 require ( - github.com/ionos-cloud/sdk-go-bundle/shared v0.1.0 - golang.org/x/oauth2 v0.6.0 + golang.org/x/oauth2 v0.21.0 + github.com/ionos-cloud/sdk-go-bundle/shared v0.1.1 ) -require ( - github.com/golang/protobuf v1.5.2 // indirect - golang.org/x/net v0.8.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/protobuf v1.28.0 // indirect -) - -replace github.com/ionos-cloud/sdk-go-bundle/shared => ../../shared diff --git a/products/dataplatform/go.sum b/products/dataplatform/go.sum index 1a2ed39..e4315ee 100644 --- a/products/dataplatform/go.sum +++ b/products/dataplatform/go.sum @@ -1,32 +1,15 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +github.com/ionos-cloud/sdk-go-bundle/shared v0.1.1 h1:NWobgIhmUJKG6ohFXefMj+KmpEEvLYEDUgGzpns6HQE= +github.com/ionos-cloud/sdk-go-bundle/shared v0.1.1/go.mod h1:cLIl4zmB1yMdPSNgTzaRmXeuusEAY1O3Lp/iXSc/R6E= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= -golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/oauth2 v0.6.0 h1:Lh8GPgSKBfWSwFvtuWOfeI3aAAnbXTSutYxJiOJFgIw= -golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw= +golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= +golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= diff --git a/products/dataplatform/model_cluster.go b/products/dataplatform/model_cluster.go index 2d15ab9..81acb50 100644 --- a/products/dataplatform/model_cluster.go +++ b/products/dataplatform/model_cluster.go @@ -208,14 +208,6 @@ func (o *Cluster) SetLans(v []Lan) { o.Lans = v } -func (o Cluster) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - func (o Cluster) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !IsNil(o.Name) { diff --git a/products/dataplatform/model_cluster_list_response_data.go b/products/dataplatform/model_cluster_list_response_data.go index dac96ba..f8e0425 100644 --- a/products/dataplatform/model_cluster_list_response_data.go +++ b/products/dataplatform/model_cluster_list_response_data.go @@ -166,14 +166,6 @@ func (o *ClusterListResponseData) SetItems(v []ClusterResponseData) { o.Items = v } -func (o ClusterListResponseData) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - func (o ClusterListResponseData) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !IsNil(o.Id) { @@ -185,9 +177,7 @@ func (o ClusterListResponseData) ToMap() (map[string]interface{}, error) { if !IsNil(o.Href) { toSerialize["href"] = o.Href } - if !IsZero(o.Items) { - toSerialize["items"] = o.Items - } + toSerialize["items"] = o.Items return toSerialize, nil } diff --git a/products/dataplatform/model_cluster_response_data.go b/products/dataplatform/model_cluster_response_data.go index 6512024..4d42d3f 100644 --- a/products/dataplatform/model_cluster_response_data.go +++ b/products/dataplatform/model_cluster_response_data.go @@ -187,31 +187,17 @@ func (o *ClusterResponseData) SetProperties(v Cluster) { o.Properties = v } -func (o ClusterResponseData) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - func (o ClusterResponseData) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsZero(o.Id) { - toSerialize["id"] = o.Id - } + toSerialize["id"] = o.Id if !IsNil(o.Type) { toSerialize["type"] = o.Type } if !IsNil(o.Href) { toSerialize["href"] = o.Href } - if !IsZero(o.Metadata) { - toSerialize["metadata"] = o.Metadata - } - if !IsZero(o.Properties) { - toSerialize["properties"] = o.Properties - } + toSerialize["metadata"] = o.Metadata + toSerialize["properties"] = o.Properties return toSerialize, nil } diff --git a/products/dataplatform/model_create_cluster_properties.go b/products/dataplatform/model_create_cluster_properties.go index db9a5af..cfbb6c7 100644 --- a/products/dataplatform/model_create_cluster_properties.go +++ b/products/dataplatform/model_create_cluster_properties.go @@ -195,25 +195,13 @@ func (o *CreateClusterProperties) SetLans(v []Lan) { o.Lans = v } -func (o CreateClusterProperties) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - func (o CreateClusterProperties) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsZero(o.Name) { - toSerialize["name"] = o.Name - } + toSerialize["name"] = o.Name if !IsNil(o.DataPlatformVersion) { toSerialize["dataPlatformVersion"] = o.DataPlatformVersion } - if !IsZero(o.DatacenterId) { - toSerialize["datacenterId"] = o.DatacenterId - } + toSerialize["datacenterId"] = o.DatacenterId if !IsNil(o.MaintenanceWindow) { toSerialize["maintenanceWindow"] = o.MaintenanceWindow } diff --git a/products/dataplatform/model_create_cluster_request.go b/products/dataplatform/model_create_cluster_request.go index 14adff3..54768c3 100644 --- a/products/dataplatform/model_create_cluster_request.go +++ b/products/dataplatform/model_create_cluster_request.go @@ -66,19 +66,9 @@ func (o *CreateClusterRequest) SetProperties(v CreateClusterProperties) { o.Properties = v } -func (o CreateClusterRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - func (o CreateClusterRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsZero(o.Properties) { - toSerialize["properties"] = o.Properties - } + toSerialize["properties"] = o.Properties return toSerialize, nil } diff --git a/products/dataplatform/model_create_node_pool_properties.go b/products/dataplatform/model_create_node_pool_properties.go index 662921f..a8c9e1d 100644 --- a/products/dataplatform/model_create_node_pool_properties.go +++ b/products/dataplatform/model_create_node_pool_properties.go @@ -421,22 +421,10 @@ func (o *CreateNodePoolProperties) SetAnnotations(v map[string]interface{}) { o.Annotations = v } -func (o CreateNodePoolProperties) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - func (o CreateNodePoolProperties) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsZero(o.Name) { - toSerialize["name"] = o.Name - } - if !IsZero(o.NodeCount) { - toSerialize["nodeCount"] = o.NodeCount - } + toSerialize["name"] = o.Name + toSerialize["nodeCount"] = o.NodeCount if !IsNil(o.CpuFamily) { toSerialize["cpuFamily"] = o.CpuFamily } diff --git a/products/dataplatform/model_create_node_pool_request.go b/products/dataplatform/model_create_node_pool_request.go index 59d9822..3fb223e 100644 --- a/products/dataplatform/model_create_node_pool_request.go +++ b/products/dataplatform/model_create_node_pool_request.go @@ -66,19 +66,9 @@ func (o *CreateNodePoolRequest) SetProperties(v CreateNodePoolProperties) { o.Properties = v } -func (o CreateNodePoolRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - func (o CreateNodePoolRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsZero(o.Properties) { - toSerialize["properties"] = o.Properties - } + toSerialize["properties"] = o.Properties return toSerialize, nil } diff --git a/products/dataplatform/model_error_message.go b/products/dataplatform/model_error_message.go index dc66108..de382d7 100644 --- a/products/dataplatform/model_error_message.go +++ b/products/dataplatform/model_error_message.go @@ -107,14 +107,6 @@ func (o *ErrorMessage) SetMessage(v string) { o.Message = &v } -func (o ErrorMessage) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - func (o ErrorMessage) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !IsNil(o.ErrorCode) { diff --git a/products/dataplatform/model_error_response.go b/products/dataplatform/model_error_response.go index dcfc854..585989c 100644 --- a/products/dataplatform/model_error_response.go +++ b/products/dataplatform/model_error_response.go @@ -106,14 +106,6 @@ func (o *ErrorResponse) SetMessages(v []ErrorMessage) { o.Messages = v } -func (o ErrorResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - func (o ErrorResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !IsNil(o.HttpStatus) { diff --git a/products/dataplatform/model_lan.go b/products/dataplatform/model_lan.go index 5480ec4..e0d1c44 100644 --- a/products/dataplatform/model_lan.go +++ b/products/dataplatform/model_lan.go @@ -135,19 +135,9 @@ func (o *Lan) SetRoutes(v []Route) { o.Routes = v } -func (o Lan) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - func (o Lan) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsZero(o.LanId) { - toSerialize["lanId"] = o.LanId - } + toSerialize["lanId"] = o.LanId if !IsNil(o.Dhcp) { toSerialize["dhcp"] = o.Dhcp } diff --git a/products/dataplatform/model_maintenance_window.go b/products/dataplatform/model_maintenance_window.go index f174704..39ab588 100644 --- a/products/dataplatform/model_maintenance_window.go +++ b/products/dataplatform/model_maintenance_window.go @@ -93,22 +93,10 @@ func (o *MaintenanceWindow) SetDayOfTheWeek(v string) { o.DayOfTheWeek = v } -func (o MaintenanceWindow) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - func (o MaintenanceWindow) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsZero(o.Time) { - toSerialize["time"] = o.Time - } - if !IsZero(o.DayOfTheWeek) { - toSerialize["dayOfTheWeek"] = o.DayOfTheWeek - } + toSerialize["time"] = o.Time + toSerialize["dayOfTheWeek"] = o.DayOfTheWeek return toSerialize, nil } diff --git a/products/dataplatform/model_metadata.go b/products/dataplatform/model_metadata.go index fa2fb2a..886f726 100644 --- a/products/dataplatform/model_metadata.go +++ b/products/dataplatform/model_metadata.go @@ -449,14 +449,6 @@ func (o *Metadata) SetState(v string) { o.State = &v } -func (o Metadata) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - func (o Metadata) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !IsNil(o.ETag) { diff --git a/products/dataplatform/model_node_pool.go b/products/dataplatform/model_node_pool.go index 7bd5037..0ca24e7 100644 --- a/products/dataplatform/model_node_pool.go +++ b/products/dataplatform/model_node_pool.go @@ -503,14 +503,6 @@ func (o *NodePool) SetAnnotations(v map[string]interface{}) { o.Annotations = v } -func (o NodePool) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - func (o NodePool) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !IsNil(o.Name) { diff --git a/products/dataplatform/model_node_pool_list_response_data.go b/products/dataplatform/model_node_pool_list_response_data.go index d661ccc..07af481 100644 --- a/products/dataplatform/model_node_pool_list_response_data.go +++ b/products/dataplatform/model_node_pool_list_response_data.go @@ -166,14 +166,6 @@ func (o *NodePoolListResponseData) SetItems(v []NodePoolResponseData) { o.Items = v } -func (o NodePoolListResponseData) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - func (o NodePoolListResponseData) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !IsNil(o.Id) { @@ -185,9 +177,7 @@ func (o NodePoolListResponseData) ToMap() (map[string]interface{}, error) { if !IsNil(o.Href) { toSerialize["href"] = o.Href } - if !IsZero(o.Items) { - toSerialize["items"] = o.Items - } + toSerialize["items"] = o.Items return toSerialize, nil } diff --git a/products/dataplatform/model_node_pool_response_data.go b/products/dataplatform/model_node_pool_response_data.go index 9207821..6743589 100644 --- a/products/dataplatform/model_node_pool_response_data.go +++ b/products/dataplatform/model_node_pool_response_data.go @@ -187,31 +187,17 @@ func (o *NodePoolResponseData) SetProperties(v NodePool) { o.Properties = v } -func (o NodePoolResponseData) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - func (o NodePoolResponseData) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsZero(o.Id) { - toSerialize["id"] = o.Id - } + toSerialize["id"] = o.Id if !IsNil(o.Type) { toSerialize["type"] = o.Type } if !IsNil(o.Href) { toSerialize["href"] = o.Href } - if !IsZero(o.Metadata) { - toSerialize["metadata"] = o.Metadata - } - if !IsZero(o.Properties) { - toSerialize["properties"] = o.Properties - } + toSerialize["metadata"] = o.Metadata + toSerialize["properties"] = o.Properties return toSerialize, nil } diff --git a/products/dataplatform/model_patch_cluster_properties.go b/products/dataplatform/model_patch_cluster_properties.go index 640949b..1bb7580 100644 --- a/products/dataplatform/model_patch_cluster_properties.go +++ b/products/dataplatform/model_patch_cluster_properties.go @@ -175,14 +175,6 @@ func (o *PatchClusterProperties) SetLans(v []Lan) { o.Lans = v } -func (o PatchClusterProperties) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - func (o PatchClusterProperties) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !IsNil(o.Name) { diff --git a/products/dataplatform/model_patch_cluster_request.go b/products/dataplatform/model_patch_cluster_request.go index 55fb1d7..9ac6092 100644 --- a/products/dataplatform/model_patch_cluster_request.go +++ b/products/dataplatform/model_patch_cluster_request.go @@ -66,19 +66,9 @@ func (o *PatchClusterRequest) SetProperties(v PatchClusterProperties) { o.Properties = v } -func (o PatchClusterRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - func (o PatchClusterRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsZero(o.Properties) { - toSerialize["properties"] = o.Properties - } + toSerialize["properties"] = o.Properties return toSerialize, nil } diff --git a/products/dataplatform/model_patch_node_pool_properties.go b/products/dataplatform/model_patch_node_pool_properties.go index a65aec0..96a8b51 100644 --- a/products/dataplatform/model_patch_node_pool_properties.go +++ b/products/dataplatform/model_patch_node_pool_properties.go @@ -174,14 +174,6 @@ func (o *PatchNodePoolProperties) SetAnnotations(v map[string]interface{}) { o.Annotations = v } -func (o PatchNodePoolProperties) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - func (o PatchNodePoolProperties) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !IsNil(o.NodeCount) { diff --git a/products/dataplatform/model_patch_node_pool_request.go b/products/dataplatform/model_patch_node_pool_request.go index 05fa660..1075e8a 100644 --- a/products/dataplatform/model_patch_node_pool_request.go +++ b/products/dataplatform/model_patch_node_pool_request.go @@ -66,19 +66,9 @@ func (o *PatchNodePoolRequest) SetProperties(v PatchNodePoolProperties) { o.Properties = v } -func (o PatchNodePoolRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - func (o PatchNodePoolRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsZero(o.Properties) { - toSerialize["properties"] = o.Properties - } + toSerialize["properties"] = o.Properties return toSerialize, nil } diff --git a/products/dataplatform/model_route.go b/products/dataplatform/model_route.go index 3524d8c..6620507 100644 --- a/products/dataplatform/model_route.go +++ b/products/dataplatform/model_route.go @@ -94,22 +94,10 @@ func (o *Route) SetGateway(v string) { o.Gateway = v } -func (o Route) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - func (o Route) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsZero(o.Network) { - toSerialize["network"] = o.Network - } - if !IsZero(o.Gateway) { - toSerialize["gateway"] = o.Gateway - } + toSerialize["network"] = o.Network + toSerialize["gateway"] = o.Gateway return toSerialize, nil } diff --git a/products/dataplatform/model_versions_get_200_response.go b/products/dataplatform/model_versions_get_200_response.go index e574418..a8c8ef5 100644 --- a/products/dataplatform/model_versions_get_200_response.go +++ b/products/dataplatform/model_versions_get_200_response.go @@ -166,14 +166,6 @@ func (o *VersionsGet200Response) SetItems(v []string) { o.Items = v } -func (o VersionsGet200Response) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - func (o VersionsGet200Response) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !IsNil(o.Id) { @@ -185,9 +177,7 @@ func (o VersionsGet200Response) ToMap() (map[string]interface{}, error) { if !IsNil(o.Href) { toSerialize["href"] = o.Href } - if !IsZero(o.Items) { - toSerialize["items"] = o.Items - } + toSerialize["items"] = o.Items return toSerialize, nil }