encode<V> static method
Implementation
static V encode<V>(
AuthorizationSegmentsItem instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.arrivalAirportCode != null) {
container.encodeString(
'arrival_airport_code',
instance.arrivalAirportCode!,
);
}
if (instance.carrier != null) {
container.encodeString(
'carrier',
instance.carrier!,
);
}
if (instance.departureAirportCode != null) {
container.encodeString(
'departure_airport_code',
instance.departureAirportCode!,
);
}
if (instance.flightNumber != null) {
container.encodeString(
'flight_number',
instance.flightNumber!,
);
}
if (instance.serviceClass != null) {
container.encodeString(
'service_class',
instance.serviceClass!,
);
}
if (instance.stopoverAllowed != null) {
container.encodeBool(
'stopover_allowed',
instance.stopoverAllowed!,
);
}
return container.value;
}