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