class LidoapiList {
  LidoapiList({
    required this.briefingId,
    required this.leg,
    required this.lastGenerated,
    required this.readinessTimeStamp,
    required this.lidoBriefingData,
    required this.latestFuelOrder,
    required this.status,
    required this.previousStatus,
    required this.interfaceHistory,
    required this.bpRestrictions,
    required this.briefingPackageOrigin,
    required this.briefingPackageConfirmationHistory,
    required this.bplinkDecorator,
    required this.links,
  });

  final String? briefingId;
  static const String briefingIdKey = "briefingId";

  final Leg? leg;
  static const String legKey = "leg";

  final int? lastGenerated;
  static const String lastGeneratedKey = "lastGenerated";

  final int? readinessTimeStamp;
  static const String readinessTimeStampKey = "readinessTimeStamp";

  final LidoBriefingData? lidoBriefingData;
  static const String lidoBriefingDataKey = "lidoBriefingData";

  final dynamic latestFuelOrder;
  static const String latestFuelOrderKey = "latestFuelOrder";

  final String? status;
  static const String statusKey = "status";

  final String? previousStatus;
  static const String previousStatusKey = "previousStatus";

  final InterfaceHistory? interfaceHistory;
  static const String interfaceHistoryKey = "interfaceHistory";

  final List<dynamic> bpRestrictions;
  static const String bpRestrictionsKey = "bpRestrictions";

  final String? briefingPackageOrigin;
  static const String briefingPackageOriginKey = "briefingPackageOrigin";

  final List<BriefingPackageConfirmationHistory>
      briefingPackageConfirmationHistory;
  static const String briefingPackageConfirmationHistoryKey =
      "briefingPackageConfirmationHistory";

  final BplinkDecorator? bplinkDecorator;
  static const String bplinkDecoratorKey = "bplinkDecorator";

  final Links? links;
  static const String linksKey = "_links";

  LidoapiList copyWith({
    String? briefingId,
    Leg? leg,
    int? lastGenerated,
    int? readinessTimeStamp,
    LidoBriefingData? lidoBriefingData,
    dynamic latestFuelOrder,
    String? status,
    String? previousStatus,
    InterfaceHistory? interfaceHistory,
    List<dynamic>? bpRestrictions,
    String? briefingPackageOrigin,
    List<BriefingPackageConfirmationHistory>?
        briefingPackageConfirmationHistory,
    BplinkDecorator? bplinkDecorator,
    Links? links,
  }) {
    return LidoapiList(
      briefingId: briefingId ?? this.briefingId,
      leg: leg ?? this.leg,
      lastGenerated: lastGenerated ?? this.lastGenerated,
      readinessTimeStamp: readinessTimeStamp ?? this.readinessTimeStamp,
      lidoBriefingData: lidoBriefingData ?? this.lidoBriefingData,
      latestFuelOrder: latestFuelOrder ?? this.latestFuelOrder,
      status: status ?? this.status,
      previousStatus: previousStatus ?? this.previousStatus,
      interfaceHistory: interfaceHistory ?? this.interfaceHistory,
      bpRestrictions: bpRestrictions ?? this.bpRestrictions,
      briefingPackageOrigin:
          briefingPackageOrigin ?? this.briefingPackageOrigin,
      briefingPackageConfirmationHistory: briefingPackageConfirmationHistory ??
          this.briefingPackageConfirmationHistory,
      bplinkDecorator: bplinkDecorator ?? this.bplinkDecorator,
      links: links ?? this.links,
    );
  }

  factory LidoapiList.fromJson(Map<String, dynamic> json) {
    return LidoapiList(
      briefingId: json["briefingId"],
      leg: json["leg"] == null ? null : Leg.fromJson(json["leg"]),
      lastGenerated: json["lastGenerated"],
      readinessTimeStamp: json["readinessTimeStamp"],
      lidoBriefingData: json["lidoBriefingData"] == null
          ? null
          : LidoBriefingData.fromJson(json["lidoBriefingData"]),
      latestFuelOrder: json["latestFuelOrder"],
      status: json["status"],
      previousStatus: json["previousStatus"],
      interfaceHistory: json["interfaceHistory"] == null
          ? null
          : InterfaceHistory.fromJson(json["interfaceHistory"]),
      bpRestrictions: json["bpRestrictions"] == null
          ? []
          : List<dynamic>.from(json["bpRestrictions"]!.map((x) => x)),
      briefingPackageOrigin: json["briefingPackageOrigin"],
      briefingPackageConfirmationHistory:
          json["briefingPackageConfirmationHistory"] == null
              ? []
              : List<BriefingPackageConfirmationHistory>.from(
                  json["briefingPackageConfirmationHistory"]!.map(
                      (x) => BriefingPackageConfirmationHistory.fromJson(x))),
      bplinkDecorator: json["bplinkDecorator"] == null
          ? null
          : BplinkDecorator.fromJson(json["bplinkDecorator"]),
      links: json["_links"] == null ? null : Links.fromJson(json["_links"]),
    );
  }

  Map<String, dynamic> toJson() => {
        "briefingId": briefingId,
        "leg": leg?.toJson(),
        "lastGenerated": lastGenerated,
        "readinessTimeStamp": readinessTimeStamp,
        "lidoBriefingData": lidoBriefingData?.toJson(),
        "latestFuelOrder": latestFuelOrder,
        "status": status,
        "previousStatus": previousStatus,
        "interfaceHistory": interfaceHistory?.toJson(),
        "bpRestrictions": bpRestrictions.map((x) => x).toList(),
        "briefingPackageOrigin": briefingPackageOrigin,
        "briefingPackageConfirmationHistory":
            briefingPackageConfirmationHistory.map((x) => x.toJson()).toList(),
        "bplinkDecorator": bplinkDecorator?.toJson(),
        "_links": links?.toJson(),
      };

  @override
  String toString() {
    return "$briefingId, $leg, $lastGenerated, $readinessTimeStamp, $lidoBriefingData, $latestFuelOrder, $status, $previousStatus, $interfaceHistory, $bpRestrictions, $briefingPackageOrigin, $briefingPackageConfirmationHistory, $bplinkDecorator, $links, ";
  }
}

class BplinkDecorator {
  BplinkDecorator({
    required this.link,
    required this.pathParams,
    required this.queryParams,
  });

  final String? link;
  static const String linkKey = "link";

  final List<String> pathParams;
  static const String pathParamsKey = "pathParams";

  final QueryParams? queryParams;
  static const String queryParamsKey = "queryParams";

  BplinkDecorator copyWith({
    String? link,
    List<String>? pathParams,
    QueryParams? queryParams,
  }) {
    return BplinkDecorator(
      link: link ?? this.link,
      pathParams: pathParams ?? this.pathParams,
      queryParams: queryParams ?? this.queryParams,
    );
  }

  factory BplinkDecorator.fromJson(Map<String, dynamic> json) {
    return BplinkDecorator(
      link: json["link"],
      pathParams: json["pathParams"] == null
          ? []
          : List<String>.from(json["pathParams"]!.map((x) => x)),
      queryParams: json["queryParams"] == null
          ? null
          : QueryParams.fromJson(json["queryParams"]),
    );
  }

  Map<String, dynamic> toJson() => {
        "link": link,
        "pathParams": pathParams.map((x) => x).toList(),
        "queryParams": queryParams?.toJson(),
      };

  @override
  String toString() {
    return "$link, $pathParams, $queryParams, ";
  }
}

class QueryParams {
  QueryParams({required this.json});
  final Map<String, dynamic> json;

  factory QueryParams.fromJson(Map<String, dynamic> json) {
    return QueryParams(json: json);
  }

  Map<String, dynamic> toJson() => {};

  @override
  String toString() {
    return "";
  }
}

class BriefingPackageConfirmationHistory {
  BriefingPackageConfirmationHistory({
    required this.confirmedBy,
    required this.creationTime,
  });

  final String? confirmedBy;
  static const String confirmedByKey = "confirmedBy";

  final int? creationTime;
  static const String creationTimeKey = "creationTime";

  BriefingPackageConfirmationHistory copyWith({
    String? confirmedBy,
    int? creationTime,
  }) {
    return BriefingPackageConfirmationHistory(
      confirmedBy: confirmedBy ?? this.confirmedBy,
      creationTime: creationTime ?? this.creationTime,
    );
  }

  factory BriefingPackageConfirmationHistory.fromJson(
      Map<String, dynamic> json) {
    return BriefingPackageConfirmationHistory(
      confirmedBy: json["confirmedBy"],
      creationTime: json["creationTime"],
    );
  }

  Map<String, dynamic> toJson() => {
        "confirmedBy": confirmedBy,
        "creationTime": creationTime,
      };

  @override
  String toString() {
    return "$confirmedBy, $creationTime, ";
  }
}

class InterfaceHistory {
  InterfaceHistory({
    required this.interfaceTimestamp,
  });

  final int? interfaceTimestamp;
  static const String interfaceTimestampKey = "interfaceTimestamp";

  InterfaceHistory copyWith({
    int? interfaceTimestamp,
  }) {
    return InterfaceHistory(
      interfaceTimestamp: interfaceTimestamp ?? this.interfaceTimestamp,
    );
  }

  factory InterfaceHistory.fromJson(Map<String, dynamic> json) {
    return InterfaceHistory(
      interfaceTimestamp: json["interfaceTimestamp"],
    );
  }

  Map<String, dynamic> toJson() => {
        "interfaceTimestamp": interfaceTimestamp,
      };

  @override
  String toString() {
    return "$interfaceTimestamp, ";
  }
}

class Leg {
  Leg({
    required this.legidentifier,
    required this.commercialAirlineIata,
    required this.commercialAirlineIcao,
    required this.flightNumber,
    required this.operationalSuffix,
    required this.aircraftOperatorIata,
    required this.aircraftOperatorIcao,
    required this.departureAirport,
    required this.destinationAirport,
    required this.ofpNumber,
    required this.aircraftDetails,
    required this.dispatcherInformation,
    required this.ctot,
    required this.slotAction,
    required this.estimatedDepartureTime,
    required this.scheduledDepartureTime,
    required this.estimatedTimeOfArrival,
    required this.scheduledTimeOfArrival,
    required this.crewMembers,
    required this.fuel,
    required this.weight,
    required this.reclearanceIndicator,
    required this.dateOfOrigin,
    required this.dateOfOperation,
    required this.masterOffice,
    required this.responsibleOffice,
    required this.flightDuplicationNumber,
    required this.destinationAirportIcao,
    required this.departureAirportIcao,
    required this.flightRoute,
  });

  final String? legidentifier;
  static const String legidentifierKey = "legidentifier";

  final String? commercialAirlineIata;
  static const String commercialAirlineIataKey = "commercialAirlineIATA";

  final String? commercialAirlineIcao;
  static const String commercialAirlineIcaoKey = "commercialAirlineICAO";

  final String? flightNumber;
  static const String flightNumberKey = "flightNumber";

  final String? operationalSuffix;
  static const String operationalSuffixKey = "operationalSuffix";

  final String? aircraftOperatorIata;
  static const String aircraftOperatorIataKey = "aircraftOperatorIATA";

  final String? aircraftOperatorIcao;
  static const String aircraftOperatorIcaoKey = "aircraftOperatorICAO";

  final String? departureAirport;
  static const String departureAirportKey = "departureAirport";

  final String? destinationAirport;
  static const String destinationAirportKey = "destinationAirport";

  final String? ofpNumber;
  static const String ofpNumberKey = "ofpNumber";

  final AircraftDetails? aircraftDetails;
  static const String aircraftDetailsKey = "aircraftDetails";

  final DispatcherInformation? dispatcherInformation;
  static const String dispatcherInformationKey = "dispatcherInformation";

  final dynamic ctot;
  static const String ctotKey = "ctot";

  final dynamic slotAction;
  static const String slotActionKey = "slotAction";

  final int? estimatedDepartureTime;
  static const String estimatedDepartureTimeKey = "estimatedDepartureTime";

  final int? scheduledDepartureTime;
  static const String scheduledDepartureTimeKey = "scheduledDepartureTime";

  final int? estimatedTimeOfArrival;
  static const String estimatedTimeOfArrivalKey = "estimatedTimeOfArrival";

  final int? scheduledTimeOfArrival;
  static const String scheduledTimeOfArrivalKey = "scheduledTimeOfArrival";

  final List<CrewMember> crewMembers;
  static const String crewMembersKey = "crewMembers";

  final Fuel? fuel;
  static const String fuelKey = "fuel";

  final Weight? weight;
  static const String weightKey = "weight";

  final bool? reclearanceIndicator;
  static const String reclearanceIndicatorKey = "reclearanceIndicator";

  final int? dateOfOrigin;
  static const String dateOfOriginKey = "dateOfOrigin";

  final int? dateOfOperation;
  static const String dateOfOperationKey = "dateOfOperation";

  final String? masterOffice;
  static const String masterOfficeKey = "masterOffice";

  final String? responsibleOffice;
  static const String responsibleOfficeKey = "responsibleOffice";

  final dynamic flightDuplicationNumber;
  static const String flightDuplicationNumberKey = "flightDuplicationNumber";

  final String? destinationAirportIcao;
  static const String destinationAirportIcaoKey = "destinationAirportICAO";

  final String? departureAirportIcao;
  static const String departureAirportIcaoKey = "departureAirportICAO";

  final String? flightRoute;
  static const String flightRouteKey = "flightRoute";

  Leg copyWith({
    String? legidentifier,
    String? commercialAirlineIata,
    String? commercialAirlineIcao,
    String? flightNumber,
    String? operationalSuffix,
    String? aircraftOperatorIata,
    String? aircraftOperatorIcao,
    String? departureAirport,
    String? destinationAirport,
    String? ofpNumber,
    AircraftDetails? aircraftDetails,
    DispatcherInformation? dispatcherInformation,
    dynamic ctot,
    dynamic slotAction,
    int? estimatedDepartureTime,
    int? scheduledDepartureTime,
    int? estimatedTimeOfArrival,
    int? scheduledTimeOfArrival,
    List<CrewMember>? crewMembers,
    Fuel? fuel,
    Weight? weight,
    bool? reclearanceIndicator,
    int? dateOfOrigin,
    int? dateOfOperation,
    String? masterOffice,
    String? responsibleOffice,
    dynamic flightDuplicationNumber,
    String? destinationAirportIcao,
    String? departureAirportIcao,
    String? flightRoute,
  }) {
    return Leg(
      legidentifier: legidentifier ?? this.legidentifier,
      commercialAirlineIata:
          commercialAirlineIata ?? this.commercialAirlineIata,
      commercialAirlineIcao:
          commercialAirlineIcao ?? this.commercialAirlineIcao,
      flightNumber: flightNumber ?? this.flightNumber,
      operationalSuffix: operationalSuffix ?? this.operationalSuffix,
      aircraftOperatorIata: aircraftOperatorIata ?? this.aircraftOperatorIata,
      aircraftOperatorIcao: aircraftOperatorIcao ?? this.aircraftOperatorIcao,
      departureAirport: departureAirport ?? this.departureAirport,
      destinationAirport: destinationAirport ?? this.destinationAirport,
      ofpNumber: ofpNumber ?? this.ofpNumber,
      aircraftDetails: aircraftDetails ?? this.aircraftDetails,
      dispatcherInformation:
          dispatcherInformation ?? this.dispatcherInformation,
      ctot: ctot ?? this.ctot,
      slotAction: slotAction ?? this.slotAction,
      estimatedDepartureTime:
          estimatedDepartureTime ?? this.estimatedDepartureTime,
      scheduledDepartureTime:
          scheduledDepartureTime ?? this.scheduledDepartureTime,
      estimatedTimeOfArrival:
          estimatedTimeOfArrival ?? this.estimatedTimeOfArrival,
      scheduledTimeOfArrival:
          scheduledTimeOfArrival ?? this.scheduledTimeOfArrival,
      crewMembers: crewMembers ?? this.crewMembers,
      fuel: fuel ?? this.fuel,
      weight: weight ?? this.weight,
      reclearanceIndicator: reclearanceIndicator ?? this.reclearanceIndicator,
      dateOfOrigin: dateOfOrigin ?? this.dateOfOrigin,
      dateOfOperation: dateOfOperation ?? this.dateOfOperation,
      masterOffice: masterOffice ?? this.masterOffice,
      responsibleOffice: responsibleOffice ?? this.responsibleOffice,
      flightDuplicationNumber:
          flightDuplicationNumber ?? this.flightDuplicationNumber,
      destinationAirportIcao:
          destinationAirportIcao ?? this.destinationAirportIcao,
      departureAirportIcao: departureAirportIcao ?? this.departureAirportIcao,
      flightRoute: flightRoute ?? this.flightRoute,
    );
  }

  factory Leg.fromJson(Map<String, dynamic> json) {
    return Leg(
      legidentifier: json["legidentifier"],
      commercialAirlineIata: json["commercialAirlineIATA"],
      commercialAirlineIcao: json["commercialAirlineICAO"],
      flightNumber: json["flightNumber"],
      operationalSuffix: json["operationalSuffix"],
      aircraftOperatorIata: json["aircraftOperatorIATA"],
      aircraftOperatorIcao: json["aircraftOperatorICAO"],
      departureAirport: json["departureAirport"],
      destinationAirport: json["destinationAirport"],
      ofpNumber: json["ofpNumber"],
      aircraftDetails: json["aircraftDetails"] == null
          ? null
          : AircraftDetails.fromJson(json["aircraftDetails"]),
      dispatcherInformation: json["dispatcherInformation"] == null
          ? null
          : DispatcherInformation.fromJson(json["dispatcherInformation"]),
      ctot: json["ctot"],
      slotAction: json["slotAction"],
      estimatedDepartureTime: json["estimatedDepartureTime"],
      scheduledDepartureTime: json["scheduledDepartureTime"],
      estimatedTimeOfArrival: json["estimatedTimeOfArrival"],
      scheduledTimeOfArrival: json["scheduledTimeOfArrival"],
      crewMembers: json["crewMembers"] == null
          ? []
          : List<CrewMember>.from(
              json["crewMembers"]!.map((x) => CrewMember.fromJson(x))),
      fuel: json["fuel"] == null ? null : Fuel.fromJson(json["fuel"]),
      weight: json["weight"] == null ? null : Weight.fromJson(json["weight"]),
      reclearanceIndicator: json["reclearanceIndicator"],
      dateOfOrigin: json["dateOfOrigin"],
      dateOfOperation: json["dateOfOperation"],
      masterOffice: json["masterOffice"],
      responsibleOffice: json["responsibleOffice"],
      flightDuplicationNumber: json["flightDuplicationNumber"],
      destinationAirportIcao: json["destinationAirportICAO"],
      departureAirportIcao: json["departureAirportICAO"],
      flightRoute: json["flightRoute"],
    );
  }

  Map<String, dynamic> toJson() => {
        "legidentifier": legidentifier,
        "commercialAirlineIATA": commercialAirlineIata,
        "commercialAirlineICAO": commercialAirlineIcao,
        "flightNumber": flightNumber,
        "operationalSuffix": operationalSuffix,
        "aircraftOperatorIATA": aircraftOperatorIata,
        "aircraftOperatorICAO": aircraftOperatorIcao,
        "departureAirport": departureAirport,
        "destinationAirport": destinationAirport,
        "ofpNumber": ofpNumber,
        "aircraftDetails": aircraftDetails?.toJson(),
        "dispatcherInformation": dispatcherInformation?.toJson(),
        "ctot": ctot,
        "slotAction": slotAction,
        "estimatedDepartureTime": estimatedDepartureTime,
        "scheduledDepartureTime": scheduledDepartureTime,
        "estimatedTimeOfArrival": estimatedTimeOfArrival,
        "scheduledTimeOfArrival": scheduledTimeOfArrival,
        "crewMembers": crewMembers.map((x) => x.toJson()).toList(),
        "fuel": fuel?.toJson(),
        "weight": weight?.toJson(),
        "reclearanceIndicator": reclearanceIndicator,
        "dateOfOrigin": dateOfOrigin,
        "dateOfOperation": dateOfOperation,
        "masterOffice": masterOffice,
        "responsibleOffice": responsibleOffice,
        "flightDuplicationNumber": flightDuplicationNumber,
        "destinationAirportICAO": destinationAirportIcao,
        "departureAirportICAO": departureAirportIcao,
        "flightRoute": flightRoute,
      };

  @override
  String toString() {
    return "$legidentifier, $commercialAirlineIata, $commercialAirlineIcao, $flightNumber, $operationalSuffix, $aircraftOperatorIata, $aircraftOperatorIcao, $departureAirport, $destinationAirport, $ofpNumber, $aircraftDetails, $dispatcherInformation, $ctot, $slotAction, $estimatedDepartureTime, $scheduledDepartureTime, $estimatedTimeOfArrival, $scheduledTimeOfArrival, $crewMembers, $fuel, $weight, $reclearanceIndicator, $dateOfOrigin, $dateOfOperation, $masterOffice, $responsibleOffice, $flightDuplicationNumber, $destinationAirportIcao, $departureAirportIcao, $flightRoute, ";
  }
}

class AircraftDetails {
  AircraftDetails({
    required this.aircraftRegistration,
    required this.aircraftModel,
    required this.aircraftIcaoType,
  });

  final String? aircraftRegistration;
  static const String aircraftRegistrationKey = "aircraftRegistration";

  final String? aircraftModel;
  static const String aircraftModelKey = "aircraftModel";

  final String? aircraftIcaoType;
  static const String aircraftIcaoTypeKey = "aircraftICAOType";

  AircraftDetails copyWith({
    String? aircraftRegistration,
    String? aircraftModel,
    String? aircraftIcaoType,
  }) {
    return AircraftDetails(
      aircraftRegistration: aircraftRegistration ?? this.aircraftRegistration,
      aircraftModel: aircraftModel ?? this.aircraftModel,
      aircraftIcaoType: aircraftIcaoType ?? this.aircraftIcaoType,
    );
  }

  factory AircraftDetails.fromJson(Map<String, dynamic> json) {
    return AircraftDetails(
      aircraftRegistration: json["aircraftRegistration"],
      aircraftModel: json["aircraftModel"],
      aircraftIcaoType: json["aircraftICAOType"],
    );
  }

  Map<String, dynamic> toJson() => {
        "aircraftRegistration": aircraftRegistration,
        "aircraftModel": aircraftModel,
        "aircraftICAOType": aircraftIcaoType,
      };

  @override
  String toString() {
    return "$aircraftRegistration, $aircraftModel, $aircraftIcaoType, ";
  }
}

class CrewMember {
  CrewMember({
    required this.position,
    required this.name,
    required this.crewId,
  });

  final String? position;
  static const String positionKey = "position";

  final String? name;
  static const String nameKey = "name";

  final String? crewId;
  static const String crewIdKey = "crewId";

  CrewMember copyWith({
    String? position,
    String? name,
    String? crewId,
  }) {
    return CrewMember(
      position: position ?? this.position,
      name: name ?? this.name,
      crewId: crewId ?? this.crewId,
    );
  }

  factory CrewMember.fromJson(Map<String, dynamic> json) {
    return CrewMember(
      position: json["position"],
      name: json["name"],
      crewId: json["crewId"],
    );
  }

  Map<String, dynamic> toJson() => {
        "position": position,
        "name": name,
        "crewId": crewId,
      };

  @override
  String toString() {
    return "$position, $name, $crewId, ";
  }
}

class DispatcherInformation {
  DispatcherInformation({
    required this.dispatchOffice,
    required this.dispatcherName,
    required this.dispatcherTelephoneNumber,
    required this.dispatcherRemarks,
  });

  final String? dispatchOffice;
  static const String dispatchOfficeKey = "dispatchOffice";

  final String? dispatcherName;
  static const String dispatcherNameKey = "dispatcherName";

  final String? dispatcherTelephoneNumber;
  static const String dispatcherTelephoneNumberKey =
      "dispatcherTelephoneNumber";

  final dynamic dispatcherRemarks;
  static const String dispatcherRemarksKey = "dispatcherRemarks";

  DispatcherInformation copyWith({
    String? dispatchOffice,
    String? dispatcherName,
    String? dispatcherTelephoneNumber,
    dynamic dispatcherRemarks,
  }) {
    return DispatcherInformation(
      dispatchOffice: dispatchOffice ?? this.dispatchOffice,
      dispatcherName: dispatcherName ?? this.dispatcherName,
      dispatcherTelephoneNumber:
          dispatcherTelephoneNumber ?? this.dispatcherTelephoneNumber,
      dispatcherRemarks: dispatcherRemarks ?? this.dispatcherRemarks,
    );
  }

  factory DispatcherInformation.fromJson(Map<String, dynamic> json) {
    return DispatcherInformation(
      dispatchOffice: json["dispatchOffice"],
      dispatcherName: json["dispatcherName"],
      dispatcherTelephoneNumber: json["dispatcherTelephoneNumber"],
      dispatcherRemarks: json["dispatcherRemarks"],
    );
  }

  Map<String, dynamic> toJson() => {
        "dispatchOffice": dispatchOffice,
        "dispatcherName": dispatcherName,
        "dispatcherTelephoneNumber": dispatcherTelephoneNumber,
        "dispatcherRemarks": dispatcherRemarks,
      };

  @override
  String toString() {
    return "$dispatchOffice, $dispatcherName, $dispatcherTelephoneNumber, $dispatcherRemarks, ";
  }
}

class Fuel {
  Fuel({
    required this.unitOfMeasure,
    required this.tankCapacity,
    required this.averageFuelFlow,
    required this.taxiFuel,
    required this.tripFuel,
    required this.blockFuel,
    required this.possibleExtra,
    required this.totalTripTimeMinutes,
    required this.taxiTimeMinutes,
    required this.estimTotalFlightTime,
    required this.takeOffFuel,
    required this.takeOffFuelTime,
    required this.averageTaxiFuelFlow,
    required this.fuelOnBoard,
  });

  final String? unitOfMeasure;
  static const String unitOfMeasureKey = "unitOfMeasure";

  final int? tankCapacity;
  static const String tankCapacityKey = "tankCapacity";

  final int? averageFuelFlow;
  static const String averageFuelFlowKey = "averageFuelFlow";

  final int? taxiFuel;
  static const String taxiFuelKey = "taxiFuel";

  final int? tripFuel;
  static const String tripFuelKey = "tripFuel";

  final int? blockFuel;
  static const String blockFuelKey = "blockFuel";

  final int? possibleExtra;
  static const String possibleExtraKey = "possibleExtra";

  final int? totalTripTimeMinutes;
  static const String totalTripTimeMinutesKey = "totalTripTimeMinutes";

  final int? taxiTimeMinutes;
  static const String taxiTimeMinutesKey = "taxiTimeMinutes";

  final int? estimTotalFlightTime;
  static const String estimTotalFlightTimeKey = "estimTotalFlightTime";

  final int? takeOffFuel;
  static const String takeOffFuelKey = "takeOffFuel";

  final int? takeOffFuelTime;
  static const String takeOffFuelTimeKey = "takeOffFuelTime";

  final int? averageTaxiFuelFlow;
  static const String averageTaxiFuelFlowKey = "averageTaxiFuelFlow";

  final FuelOnBoard? fuelOnBoard;
  static const String fuelOnBoardKey = "fuelOnBoard";

  Fuel copyWith({
    String? unitOfMeasure,
    int? tankCapacity,
    int? averageFuelFlow,
    int? taxiFuel,
    int? tripFuel,
    int? blockFuel,
    int? possibleExtra,
    int? totalTripTimeMinutes,
    int? taxiTimeMinutes,
    int? estimTotalFlightTime,
    int? takeOffFuel,
    int? takeOffFuelTime,
    int? averageTaxiFuelFlow,
    FuelOnBoard? fuelOnBoard,
  }) {
    return Fuel(
      unitOfMeasure: unitOfMeasure ?? this.unitOfMeasure,
      tankCapacity: tankCapacity ?? this.tankCapacity,
      averageFuelFlow: averageFuelFlow ?? this.averageFuelFlow,
      taxiFuel: taxiFuel ?? this.taxiFuel,
      tripFuel: tripFuel ?? this.tripFuel,
      blockFuel: blockFuel ?? this.blockFuel,
      possibleExtra: possibleExtra ?? this.possibleExtra,
      totalTripTimeMinutes: totalTripTimeMinutes ?? this.totalTripTimeMinutes,
      taxiTimeMinutes: taxiTimeMinutes ?? this.taxiTimeMinutes,
      estimTotalFlightTime: estimTotalFlightTime ?? this.estimTotalFlightTime,
      takeOffFuel: takeOffFuel ?? this.takeOffFuel,
      takeOffFuelTime: takeOffFuelTime ?? this.takeOffFuelTime,
      averageTaxiFuelFlow: averageTaxiFuelFlow ?? this.averageTaxiFuelFlow,
      fuelOnBoard: fuelOnBoard ?? this.fuelOnBoard,
    );
  }

  factory Fuel.fromJson(Map<String, dynamic> json) {
    return Fuel(
      unitOfMeasure: json["unitOfMeasure"],
      tankCapacity: json["tankCapacity"],
      averageFuelFlow: json["averageFuelFlow"],
      taxiFuel: json["taxiFuel"],
      tripFuel: json["tripFuel"],
      blockFuel: json["blockFuel"],
      possibleExtra: json["possibleExtra"],
      totalTripTimeMinutes: json["totalTripTimeMinutes"],
      taxiTimeMinutes: json["taxiTimeMinutes"],
      estimTotalFlightTime: json["estimTotalFlightTime"],
      takeOffFuel: json["takeOffFuel"],
      takeOffFuelTime: json["takeOffFuelTime"],
      averageTaxiFuelFlow: json["averageTaxiFuelFlow"],
      fuelOnBoard: json["fuelOnBoard"] == null
          ? null
          : FuelOnBoard.fromJson(json["fuelOnBoard"]),
    );
  }

  Map<String, dynamic> toJson() => {
        "unitOfMeasure": unitOfMeasure,
        "tankCapacity": tankCapacity,
        "averageFuelFlow": averageFuelFlow,
        "taxiFuel": taxiFuel,
        "tripFuel": tripFuel,
        "blockFuel": blockFuel,
        "possibleExtra": possibleExtra,
        "totalTripTimeMinutes": totalTripTimeMinutes,
        "taxiTimeMinutes": taxiTimeMinutes,
        "estimTotalFlightTime": estimTotalFlightTime,
        "takeOffFuel": takeOffFuel,
        "takeOffFuelTime": takeOffFuelTime,
        "averageTaxiFuelFlow": averageTaxiFuelFlow,
        "fuelOnBoard": fuelOnBoard?.toJson(),
      };

  @override
  String toString() {
    return "$unitOfMeasure, $tankCapacity, $averageFuelFlow, $taxiFuel, $tripFuel, $blockFuel, $possibleExtra, $totalTripTimeMinutes, $taxiTimeMinutes, $estimTotalFlightTime, $takeOffFuel, $takeOffFuelTime, $averageTaxiFuelFlow, $fuelOnBoard, ";
  }
}

class FuelOnBoard {
  FuelOnBoard({
    required this.remainingFuel,
    required this.unitOfMeasure,
    required this.remainingFuelIndicator,
  });

  final int? remainingFuel;
  static const String remainingFuelKey = "remainingFuel";

  final String? unitOfMeasure;
  static const String unitOfMeasureKey = "unitOfMeasure";

  final dynamic remainingFuelIndicator;
  static const String remainingFuelIndicatorKey = "remainingFuelIndicator";

  FuelOnBoard copyWith({
    int? remainingFuel,
    String? unitOfMeasure,
    dynamic remainingFuelIndicator,
  }) {
    return FuelOnBoard(
      remainingFuel: remainingFuel ?? this.remainingFuel,
      unitOfMeasure: unitOfMeasure ?? this.unitOfMeasure,
      remainingFuelIndicator:
          remainingFuelIndicator ?? this.remainingFuelIndicator,
    );
  }

  factory FuelOnBoard.fromJson(Map<String, dynamic> json) {
    return FuelOnBoard(
      remainingFuel: json["remainingFuel"],
      unitOfMeasure: json["unitOfMeasure"],
      remainingFuelIndicator: json["remainingFuelIndicator"],
    );
  }

  Map<String, dynamic> toJson() => {
        "remainingFuel": remainingFuel,
        "unitOfMeasure": unitOfMeasure,
        "remainingFuelIndicator": remainingFuelIndicator,
      };

  @override
  String toString() {
    return "$remainingFuel, $unitOfMeasure, $remainingFuelIndicator, ";
  }
}

class Weight {
  Weight({
    required this.maxZfw,
    required this.maxTaxiWeight,
    required this.maxTakeOffWeight,
    required this.plannedZfw,
    required this.restrictedTakeOffWeight,
    required this.maxLandingWeight,
  });

  final int? maxZfw;
  static const String maxZfwKey = "maxZfw";

  final int? maxTaxiWeight;
  static const String maxTaxiWeightKey = "maxTaxiWeight";

  final int? maxTakeOffWeight;
  static const String maxTakeOffWeightKey = "maxTakeOffWeight";

  final int? plannedZfw;
  static const String plannedZfwKey = "plannedZfw";

  final int? restrictedTakeOffWeight;
  static const String restrictedTakeOffWeightKey = "restrictedTakeOffWeight";

  final int? maxLandingWeight;
  static const String maxLandingWeightKey = "maxLandingWeight";

  Weight copyWith({
    int? maxZfw,
    int? maxTaxiWeight,
    int? maxTakeOffWeight,
    int? plannedZfw,
    int? restrictedTakeOffWeight,
    int? maxLandingWeight,
  }) {
    return Weight(
      maxZfw: maxZfw ?? this.maxZfw,
      maxTaxiWeight: maxTaxiWeight ?? this.maxTaxiWeight,
      maxTakeOffWeight: maxTakeOffWeight ?? this.maxTakeOffWeight,
      plannedZfw: plannedZfw ?? this.plannedZfw,
      restrictedTakeOffWeight:
          restrictedTakeOffWeight ?? this.restrictedTakeOffWeight,
      maxLandingWeight: maxLandingWeight ?? this.maxLandingWeight,
    );
  }

  factory Weight.fromJson(Map<String, dynamic> json) {
    return Weight(
      maxZfw: json["maxZfw"],
      maxTaxiWeight: json["maxTaxiWeight"],
      maxTakeOffWeight: json["maxTakeOffWeight"],
      plannedZfw: json["plannedZfw"],
      restrictedTakeOffWeight: json["restrictedTakeOffWeight"],
      maxLandingWeight: json["maxLandingWeight"],
    );
  }

  Map<String, dynamic> toJson() => {
        "maxZfw": maxZfw,
        "maxTaxiWeight": maxTaxiWeight,
        "maxTakeOffWeight": maxTakeOffWeight,
        "plannedZfw": plannedZfw,
        "restrictedTakeOffWeight": restrictedTakeOffWeight,
        "maxLandingWeight": maxLandingWeight,
      };

  @override
  String toString() {
    return "$maxZfw, $maxTaxiWeight, $maxTakeOffWeight, $plannedZfw, $restrictedTakeOffWeight, $maxLandingWeight, ";
  }
}

class LidoBriefingData {
  LidoBriefingData({
    required this.briefingStatus,
  });

  final String? briefingStatus;
  static const String briefingStatusKey = "briefingStatus";

  LidoBriefingData copyWith({
    String? briefingStatus,
  }) {
    return LidoBriefingData(
      briefingStatus: briefingStatus ?? this.briefingStatus,
    );
  }

  factory LidoBriefingData.fromJson(Map<String, dynamic> json) {
    return LidoBriefingData(
      briefingStatus: json["briefingStatus"],
    );
  }

  Map<String, dynamic> toJson() => {
        "briefingStatus": briefingStatus,
      };

  @override
  String toString() {
    return "$briefingStatus, ";
  }
}

class Links {
  Links({
    required this.self,
  });

  final Self? self;
  static const String selfKey = "self";

  Links copyWith({
    Self? self,
  }) {
    return Links(
      self: self ?? this.self,
    );
  }

  factory Links.fromJson(Map<String, dynamic> json) {
    return Links(
      self: json["self"] == null ? null : Self.fromJson(json["self"]),
    );
  }

  Map<String, dynamic> toJson() => {
        "self": self?.toJson(),
      };

  @override
  String toString() {
    return "$self, ";
  }
}

class Self {
  Self({
    required this.href,
  });

  final String? href;
  static const String hrefKey = "href";

  Self copyWith({
    String? href,
  }) {
    return Self(
      href: href ?? this.href,
    );
  }

  factory Self.fromJson(Map<String, dynamic> json) {
    return Self(
      href: json["href"],
    );
  }

  Map<String, dynamic> toJson() => {
        "href": href,
      };

  @override
  String toString() {
    return "$href, ";
  }
}
