| 1 | // |
| 2 | // AUTO-GENERATED FILE, DO NOT MODIFY! |
| 3 | // |
| 4 | |
| 5 | // ignore_for_file: unused_element |
| 6 | import 'package:built_collection/built_collection.dart'; |
| 7 | import 'package:built_value/json_object.dart'; |
| 8 | import 'package:built_value/built_value.dart'; |
| 9 | import 'package:built_value/serializer.dart'; |
| 10 | |
| 11 | part 'update_flight_booking_dto.g.dart'; |
| 12 | |
| 13 | /// UpdateFlightBookingDTO |
| 14 | /// |
| 15 | /// Properties: |
| 16 | /// * [bookingCode] - Booking code/confirmation code (e.g., \"ABC123\"). Set to null to clear. |
| 17 | /// * [seatNumber] - Seat number (e.g., \"12A\", \"1F\"). Set to null to clear. |
| 18 | /// * [seatType] - Type of seat position. Set to null to clear. |
| 19 | /// * [seatingClass] - Class of service. Set to null to clear. |
| 20 | /// * [reason] - Reason for the flight. Set to null to clear. |
| 21 | /// * [notes] - Additional notes about the booking. Set to null to clear. |
| 22 | @BuiltValue() |
| 23 | abstract class UpdateFlightBookingDTO implements |
| 24 | /// Booking code/confirmation code (e.g., \"ABC123\"). Set to null to clear. |
| 25 | @BuiltValueField(wireName: r'bookingCode') |
| 26 | JsonObject? get bookingCode; |
| 27 | |
| 28 | /// Seat number (e.g., \"12A\", \"1F\"). Set to null to clear. |
| 29 | @BuiltValueField(wireName: r'seatNumber') |
| 30 | JsonObject? get seatNumber; |
| 31 | |
| 32 | /// Type of seat position. Set to null to clear. |
| 33 | @BuiltValueField(wireName: r'seatType') |
| 34 | UpdateFlightBookingDTOSeatTypeEnum? get seatType; |
| 35 | // enum seatTypeEnum { window, middle, aisle, jumpseat, captain, pilot, copilot, flight_engineer, flight_attendant, observer, other, }; |
| 36 | |
| 37 | /// Class of service. Set to null to clear. |
| 38 | @BuiltValueField(wireName: r'seatingClass') |
| 39 | UpdateFlightBookingDTOSeatingClassEnum? get seatingClass; |
| 40 | // enum seatingClassEnum { economy, premium_economy, business, first, private, other, }; |
| 41 | |
| 42 | /// Reason for the flight. Set to null to clear. |
| 43 | @BuiltValueField(wireName: r'reason') |
| 44 | UpdateFlightBookingDTOReasonEnum? get reason; |
| 45 | // enum reasonEnum { personal, business, crew, training, repositioning, other, }; |
| 46 | |
| 47 | /// Additional notes about the booking. Set to null to clear. |
| 48 | @BuiltValueField(wireName: r'notes') |
| 49 | JsonObject? get notes; |
| 50 | |
| 51 | UpdateFlightBookingDTO._(); |
| 52 | |
| 53 | factory UpdateFlightBookingDTO([void |
| 54 | |
| 55 | @BuiltValueHook(initializeBuilder: true) |
| 56 | static void _defaults |
| 57 | |
| 58 | @BuiltValueSerializer(custom: true) |
| 59 | static Serializer<UpdateFlightBookingDTO |
| 60 | } |
| 61 | |
| 62 | class _$UpdateFlightBookingDTOSerializer implements PrimitiveSerializer |
| 63 | @override |
| 64 | final Iterable<Type |
| 65 | |
| 66 | @override |
| 67 | final String wireName = |
| 68 | |
| 69 | Iterable<Object?> _serializeProperties |
| 70 | Serializers serializers, |
| 71 | UpdateFlightBookingDTO object, { |
| 72 | FullType specifiedType = FullType. |
| 73 | }) sync* { |
| 74 | if (object.bookingCode != null) { |
| 75 | yield r'bookingCode'; |
| 76 | yield serializers.serialize( |
| 77 | object.bookingCode, |
| 78 | specifiedType: const FullType. |
| 79 | ); |
| 80 | } |
| 81 | if (object.seatNumber != null) { |
| 82 | yield r'seatNumber'; |
| 83 | yield serializers.serialize( |
| 84 | object.seatNumber, |
| 85 | specifiedType: const FullType. |
| 86 | ); |
| 87 | } |
| 88 | if (object.seatType != null) { |
| 89 | yield r'seatType'; |
| 90 | yield serializers.serialize( |
| 91 | object.seatType, |
| 92 | specifiedType: const FullType. |
| 93 | ); |
| 94 | } |
| 95 | if (object.seatingClass != null) { |
| 96 | yield r'seatingClass'; |
| 97 | yield serializers.serialize( |
| 98 | object.seatingClass, |
| 99 | specifiedType: const FullType. |
| 100 | ); |
| 101 | } |
| 102 | if (object.reason != null) { |
| 103 | yield r'reason'; |
| 104 | yield serializers.serialize( |
| 105 | object.reason, |
| 106 | specifiedType: const FullType. |
| 107 | ); |
| 108 | } |
| 109 | if (object.notes != null) { |
| 110 | yield r'notes'; |
| 111 | yield serializers.serialize( |
| 112 | object.notes, |
| 113 | specifiedType: const FullType. |
| 114 | ); |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | @override |
| 119 | Object serialize( |
| 120 | Serializers serializers, |
| 121 | UpdateFlightBookingDTO object, { |
| 122 | FullType specifiedType = FullType. |
| 123 | }) { |
| 124 | return _serializeProperties(serializers, object |
| 125 | } |
| 126 | |
| 127 | void _deserializeProperties( |
| 128 | Serializers serializers, |
| 129 | Object serialized, { |
| 130 | FullType specifiedType = FullType. |
| 131 | required List<Object |
| 132 | required UpdateFlightBookingDTOBuilder result, |
| 133 | required List<Object |
| 134 | }) { |
| 135 | for (var i = 0 |
| 136 | final key = serializedList[i] as String |
| 137 | final value = serializedList[i + 1 |
| 138 | switch (key) { |
| 139 | case r'bookingCode': |
| 140 | final valueDes = serializers.deserialize |
| 141 | value, |
| 142 | specifiedType: const FullType. |
| 143 | ) as JsonObject?; |
| 144 | if (valueDes == null) continue; |
| 145 | result.bookingCode = valueDes; |
| 146 | break; |
| 147 | case r'seatNumber': |
| 148 | final valueDes = serializers.deserialize |
| 149 | value, |
| 150 | specifiedType: const FullType. |
| 151 | ) as JsonObject?; |
| 152 | if (valueDes == null) continue; |
| 153 | result.seatNumber = valueDes; |
| 154 | break; |
| 155 | case r'seatType': |
| 156 | final valueDes = serializers.deserialize |
| 157 | value, |
| 158 | specifiedType: const FullType. |
| 159 | ) as UpdateFlightBookingDTOSeatTypeEnum?; |
| 160 | if (valueDes == null) continue; |
| 161 | result.seatType = valueDes; |
| 162 | break; |
| 163 | case r'seatingClass': |
| 164 | final valueDes = serializers.deserialize |
| 165 | value, |
| 166 | specifiedType: const FullType. |
| 167 | ) as UpdateFlightBookingDTOSeatingClassEnum?; |
| 168 | if (valueDes == null) continue; |
| 169 | result.seatingClass = valueDes; |
| 170 | break; |
| 171 | case r'reason': |
| 172 | final valueDes = serializers.deserialize |
| 173 | value, |
| 174 | specifiedType: const FullType. |
| 175 | ) as UpdateFlightBookingDTOReasonEnum?; |
| 176 | if (valueDes == null) continue; |
| 177 | result.reason = valueDes; |
| 178 | break; |
| 179 | case r'notes': |
| 180 | final valueDes = serializers.deserialize |
| 181 | value, |
| 182 | specifiedType: const FullType. |
| 183 | ) as JsonObject?; |
| 184 | if (valueDes == null) continue; |
| 185 | result.notes = valueDes; |
| 186 | break; |
| 187 | default: |
| 188 | unhandled.add(key); |
| 189 | unhandled.add(value); |
| 190 | break; |
| 191 | } |
| 192 | } |
| 193 | } |
| 194 | |
| 195 | @override |
| 196 | UpdateFlightBookingDTO deserialize( |
| 197 | Serializers serializers, |
| 198 | Object serialized, { |
| 199 | FullType specifiedType = FullType. |
| 200 | }) { |
| 201 | final result = UpdateFlightBookingDTOBuilder() |
| 202 | final serializedList = (serialized as Iterable |
| 203 | final unhandled = <Object |
| 204 | _deserializeProperties( |
| 205 | serializers, |
| 206 | serialized, |
| 207 | specifiedType: specifiedType, |
| 208 | serializedList: serializedList, |
| 209 | unhandled: unhandled, |
| 210 | result: result, |
| 211 | ); |
| 212 | return result.build(); |
| 213 | } |
| 214 | } |
| 215 | |
| 216 | class UpdateFlightBookingDTOSeatTypeEnum extends EnumClass |
| 217 | |
| 218 | /// Type of seat position. Set to null to clear. |
| 219 | @BuiltValueEnumConst(wireName: r'window') |
| 220 | static const UpdateFlightBookingDTOSeatTypeEnum |
| 221 | /// Type of seat position. Set to null to clear. |
| 222 | @BuiltValueEnumConst(wireName: r'middle') |
| 223 | static const UpdateFlightBookingDTOSeatTypeEnum |
| 224 | /// Type of seat position. Set to null to clear. |
| 225 | @BuiltValueEnumConst(wireName: r'aisle') |
| 226 | static const UpdateFlightBookingDTOSeatTypeEnum |
| 227 | /// Type of seat position. Set to null to clear. |
| 228 | @BuiltValueEnumConst(wireName: r'jumpseat') |
| 229 | static const UpdateFlightBookingDTOSeatTypeEnum |
| 230 | /// Type of seat position. Set to null to clear. |
| 231 | @BuiltValueEnumConst(wireName: r'captain') |
| 232 | static const UpdateFlightBookingDTOSeatTypeEnum |
| 233 | /// Type of seat position. Set to null to clear. |
| 234 | @BuiltValueEnumConst(wireName: r'pilot') |
| 235 | static const UpdateFlightBookingDTOSeatTypeEnum |
| 236 | /// Type of seat position. Set to null to clear. |
| 237 | @BuiltValueEnumConst(wireName: r'copilot') |
| 238 | static const UpdateFlightBookingDTOSeatTypeEnum |
| 239 | /// Type of seat position. Set to null to clear. |
| 240 | @BuiltValueEnumConst(wireName: r'flight_engineer') |
| 241 | static const UpdateFlightBookingDTOSeatTypeEnum |
| 242 | /// Type of seat position. Set to null to clear. |
| 243 | @BuiltValueEnumConst(wireName: r'flight_attendant') |
| 244 | static const UpdateFlightBookingDTOSeatTypeEnum |
| 245 | /// Type of seat position. Set to null to clear. |
| 246 | @BuiltValueEnumConst(wireName: r'observer') |
| 247 | static const UpdateFlightBookingDTOSeatTypeEnum |
| 248 | /// Type of seat position. Set to null to clear. |
| 249 | @BuiltValueEnumConst(wireName: r'other') |
| 250 | static const UpdateFlightBookingDTOSeatTypeEnum |
| 251 | |
| 252 | static Serializer<UpdateFlightBookingDTOSeatTypeEnum |
| 253 | |
| 254 | const UpdateFlightBookingDTOSeatTypeEnum._(String |
| 255 | |
| 256 | static BuiltSet<UpdateFlightBookingDTOSeatTypeEnum |
| 257 | static UpdateFlightBookingDTOSeatTypeEnum valueOf |
| 258 | } |
| 259 | |
| 260 | class UpdateFlightBookingDTOSeatingClassEnum extends EnumClass |
| 261 | |
| 262 | /// Class of service. Set to null to clear. |
| 263 | @BuiltValueEnumConst(wireName: r'economy') |
| 264 | static const UpdateFlightBookingDTOSeatingClassEnum |
| 265 | /// Class of service. Set to null to clear. |
| 266 | @BuiltValueEnumConst(wireName: r'premium_economy') |
| 267 | static const UpdateFlightBookingDTOSeatingClassEnum |
| 268 | /// Class of service. Set to null to clear. |
| 269 | @BuiltValueEnumConst(wireName: r'business') |
| 270 | static const UpdateFlightBookingDTOSeatingClassEnum |
| 271 | /// Class of service. Set to null to clear. |
| 272 | @BuiltValueEnumConst(wireName: r'first') |
| 273 | static const UpdateFlightBookingDTOSeatingClassEnum |
| 274 | /// Class of service. Set to null to clear. |
| 275 | @BuiltValueEnumConst(wireName: r'private') |
| 276 | static const UpdateFlightBookingDTOSeatingClassEnum |
| 277 | /// Class of service. Set to null to clear. |
| 278 | @BuiltValueEnumConst(wireName: r'other') |
| 279 | static const UpdateFlightBookingDTOSeatingClassEnum |
| 280 | |
| 281 | static Serializer<UpdateFlightBookingDTOSeatingClassEnum |
| 282 | |
| 283 | const UpdateFlightBookingDTOSeatingClassEnum._(String |
| 284 | |
| 285 | static BuiltSet<UpdateFlightBookingDTOSeatingClassEnum |
| 286 | static UpdateFlightBookingDTOSeatingClassEnum valueOf |
| 287 | } |
| 288 | |
| 289 | class UpdateFlightBookingDTOReasonEnum extends EnumClass |
| 290 | |
| 291 | /// Reason for the flight. Set to null to clear. |
| 292 | @BuiltValueEnumConst(wireName: r'personal') |
| 293 | static const UpdateFlightBookingDTOReasonEnum |
| 294 | /// Reason for the flight. Set to null to clear. |
| 295 | @BuiltValueEnumConst(wireName: r'business') |
| 296 | static const UpdateFlightBookingDTOReasonEnum |
| 297 | /// Reason for the flight. Set to null to clear. |
| 298 | @BuiltValueEnumConst(wireName: r'crew') |
| 299 | static const UpdateFlightBookingDTOReasonEnum |
| 300 | /// Reason for the flight. Set to null to clear. |
| 301 | @BuiltValueEnumConst(wireName: r'training') |
| 302 | static const UpdateFlightBookingDTOReasonEnum |
| 303 | /// Reason for the flight. Set to null to clear. |
| 304 | @BuiltValueEnumConst(wireName: r'repositioning') |
| 305 | static const UpdateFlightBookingDTOReasonEnum |
| 306 | /// Reason for the flight. Set to null to clear. |
| 307 | @BuiltValueEnumConst(wireName: r'other') |
| 308 | static const UpdateFlightBookingDTOReasonEnum |
| 309 | |
| 310 | static Serializer<UpdateFlightBookingDTOReasonEnum |
| 311 | |
| 312 | const UpdateFlightBookingDTOReasonEnum._(String |
| 313 | |
| 314 | static BuiltSet<UpdateFlightBookingDTOReasonEnum |
| 315 | static UpdateFlightBookingDTOReasonEnum valueOf |
| 316 | } |
| 317 | |