@@ -101,8 +101,31 @@ func vehicleSpecificationToProto(
101101 if vehicleData .Emissionstandard != nil && vehicleData .Emissionstandard .Text != "" {
102102 protoSpec .SetEmissionStandard (vehicleData .Emissionstandard .Text )
103103 }
104- if vehicleData .Weight != nil && vehicleData .Weight .Total != nil && * vehicleData .Weight .Total > 0 {
105- protoSpec .SetTotalWeightKg (* vehicleData .Weight .Total )
104+ if vehicleData .Weight != nil && vehicleData .Weight .VehicleMassKg != nil && * vehicleData .Weight .VehicleMassKg > 0 {
105+ protoSpec .SetVehicleMassKg (* vehicleData .Weight .VehicleMassKg )
106+ }
107+ if vehicleData .LongType != "" {
108+ protoSpec .SetLongType (vehicleData .LongType )
109+ }
110+ if vehicleData .Body != nil {
111+ if vehicleData .Body .Code != "" {
112+ protoSpec .SetBodyCode (vehicleData .Body .Code )
113+ }
114+ if vehicleData .Body .Text != "" {
115+ protoSpec .SetBodyText (vehicleData .Body .Text )
116+ }
117+ }
118+ if vehicleData .Numberofdoors != nil && * vehicleData .Numberofdoors > 0 {
119+ protoSpec .SetDoorCount (* vehicleData .Numberofdoors )
120+ }
121+ if vehicleData .Numberofseats != nil && * vehicleData .Numberofseats > 0 {
122+ protoSpec .SetSeatCount (* vehicleData .Numberofseats )
123+ }
124+ if vehicleData .Wheelbase != nil && * vehicleData .Wheelbase > 0 {
125+ protoSpec .SetWheelbaseMm (* vehicleData .Wheelbase )
126+ }
127+ if vehicleData .Wheelform != "" {
128+ protoSpec .SetWheelform (vehicleData .Wheelform )
106129 }
107130 if vehicleData .PrimaryEngine != nil {
108131 if engine := parseEngine (vehicleData .PrimaryEngine ); engine != nil {
0 commit comments