4
4
5
5
import com .smartdevicelink .proxy .RPCStruct ;
6
6
import com .smartdevicelink .proxy .rpc .enums .VehicleDataEventStatus ;
7
- import com .smartdevicelink .util .DebugTool ;
8
7
9
8
public class AirbagStatus extends RPCStruct {
10
9
public static final String KEY_DRIVER_AIRBAG_DEPLOYED = "driverAirbagDeployed" ;
@@ -33,13 +32,7 @@ public VehicleDataEventStatus getDriverAirbagDeployed() {
33
32
if (obj instanceof VehicleDataEventStatus ) {
34
33
return (VehicleDataEventStatus ) obj ;
35
34
} else if (obj instanceof String ) {
36
- VehicleDataEventStatus theCode = null ;
37
- try {
38
- theCode = VehicleDataEventStatus .valueForString ((String ) obj );
39
- } catch (Exception e ) {
40
- DebugTool .logError ("Failed to parse " + getClass ().getSimpleName () + "." + KEY_DRIVER_AIRBAG_DEPLOYED , e );
41
- }
42
- return theCode ;
35
+ return VehicleDataEventStatus .valueForString ((String ) obj );
43
36
}
44
37
return null ;
45
38
}
@@ -55,13 +48,7 @@ public VehicleDataEventStatus getDriverSideAirbagDeployed() {
55
48
if (obj instanceof VehicleDataEventStatus ) {
56
49
return (VehicleDataEventStatus ) obj ;
57
50
} else if (obj instanceof String ) {
58
- VehicleDataEventStatus theCode = null ;
59
- try {
60
- theCode = VehicleDataEventStatus .valueForString ((String ) obj );
61
- } catch (Exception e ) {
62
- DebugTool .logError ("Failed to parse " + getClass ().getSimpleName () + "." + KEY_DRIVER_SIDE_AIRBAG_DEPLOYED , e );
63
- }
64
- return theCode ;
51
+ return VehicleDataEventStatus .valueForString ((String ) obj );
65
52
}
66
53
return null ;
67
54
}
@@ -77,13 +64,7 @@ public VehicleDataEventStatus getDriverCurtainAirbagDeployed() {
77
64
if (obj instanceof VehicleDataEventStatus ) {
78
65
return (VehicleDataEventStatus ) obj ;
79
66
} else if (obj instanceof String ) {
80
- VehicleDataEventStatus theCode = null ;
81
- try {
82
- theCode = VehicleDataEventStatus .valueForString ((String ) obj );
83
- } catch (Exception e ) {
84
- DebugTool .logError ("Failed to parse " + getClass ().getSimpleName () + "." + KEY_DRIVER_CURTAIN_AIRBAG_DEPLOYED , e );
85
- }
86
- return theCode ;
67
+ return VehicleDataEventStatus .valueForString ((String ) obj );
87
68
}
88
69
return null ;
89
70
}
@@ -99,13 +80,7 @@ public VehicleDataEventStatus getPassengerAirbagDeployed() {
99
80
if (obj instanceof VehicleDataEventStatus ) {
100
81
return (VehicleDataEventStatus ) obj ;
101
82
} else if (obj instanceof String ) {
102
- VehicleDataEventStatus theCode = null ;
103
- try {
104
- theCode = VehicleDataEventStatus .valueForString ((String ) obj );
105
- } catch (Exception e ) {
106
- DebugTool .logError ("Failed to parse " + getClass ().getSimpleName () + "." + KEY_PASSENGER_AIRBAG_DEPLOYED , e );
107
- }
108
- return theCode ;
83
+ return VehicleDataEventStatus .valueForString ((String ) obj );
109
84
}
110
85
return null ;
111
86
}
@@ -121,13 +96,7 @@ public VehicleDataEventStatus getPassengerCurtainAirbagDeployed() {
121
96
if (obj instanceof VehicleDataEventStatus ) {
122
97
return (VehicleDataEventStatus ) obj ;
123
98
} else if (obj instanceof String ) {
124
- VehicleDataEventStatus theCode = null ;
125
- try {
126
- theCode = VehicleDataEventStatus .valueForString ((String ) obj );
127
- } catch (Exception e ) {
128
- DebugTool .logError ("Failed to parse " + getClass ().getSimpleName () + "." + KEY_PASSENGER_CURTAIN_AIRBAG_DEPLOYED , e );
129
- }
130
- return theCode ;
99
+ return VehicleDataEventStatus .valueForString ((String ) obj );
131
100
}
132
101
return null ;
133
102
}
@@ -143,13 +112,7 @@ public VehicleDataEventStatus getDriverKneeAirbagDeployed() {
143
112
if (obj instanceof VehicleDataEventStatus ) {
144
113
return (VehicleDataEventStatus ) obj ;
145
114
} else if (obj instanceof String ) {
146
- VehicleDataEventStatus theCode = null ;
147
- try {
148
- theCode = VehicleDataEventStatus .valueForString ((String ) obj );
149
- } catch (Exception e ) {
150
- DebugTool .logError ("Failed to parse " + getClass ().getSimpleName () + "." + KEY_DRIVER_KNEE_AIRBAG_DEPLOYED , e );
151
- }
152
- return theCode ;
115
+ return VehicleDataEventStatus .valueForString ((String ) obj );
153
116
}
154
117
return null ;
155
118
}
@@ -165,13 +128,7 @@ public VehicleDataEventStatus getPassengerSideAirbagDeployed() {
165
128
if (obj instanceof VehicleDataEventStatus ) {
166
129
return (VehicleDataEventStatus ) obj ;
167
130
} else if (obj instanceof String ) {
168
- VehicleDataEventStatus theCode = null ;
169
- try {
170
- theCode = VehicleDataEventStatus .valueForString ((String ) obj );
171
- } catch (Exception e ) {
172
- DebugTool .logError ("Failed to parse " + getClass ().getSimpleName () + "." + KEY_PASSENGER_SIDE_AIRBAG_DEPLOYED , e );
173
- }
174
- return theCode ;
131
+ return VehicleDataEventStatus .valueForString ((String ) obj );
175
132
}
176
133
return null ;
177
134
}
@@ -187,13 +144,7 @@ public VehicleDataEventStatus getPassengerKneeAirbagDeployed() {
187
144
if (obj instanceof VehicleDataEventStatus ) {
188
145
return (VehicleDataEventStatus ) obj ;
189
146
} else if (obj instanceof String ) {
190
- VehicleDataEventStatus theCode = null ;
191
- try {
192
- theCode = VehicleDataEventStatus .valueForString ((String ) obj );
193
- } catch (Exception e ) {
194
- DebugTool .logError ("Failed to parse " + getClass ().getSimpleName () + "." + KEY_PASSENGER_KNEE_AIRBAG_DEPLOYED , e );
195
- }
196
- return theCode ;
147
+ return VehicleDataEventStatus .valueForString ((String ) obj );
197
148
}
198
149
return null ;
199
150
}
0 commit comments