// @generated by protoc-gen-es v2.12.0 with parameter "target=ts"
// @generated from file entities/flight.proto (syntax proto3)
/* eslint-disable */

import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2";
import type { Timestamp } from "../common_pb";
import { file_common } from "../common_pb";
import type { Airline } from "./airline_pb";
import { file_entities_airline } from "./airline_pb";
import type { Airport } from "./airport_pb";
import { file_entities_airport } from "./airport_pb";
import type { Message } from "@bufbuild/protobuf";

/**
 * Describes the file entities/flight.proto.
 */
export const file_entities_flight: GenFile = /*@__PURE__*/
  fileDesc(" ", [file_common, file_entities_airline, file_entities_airport]);

/**
 * @generated from message Flight
 */
export type Flight = Message<"Flight"> & {
  /**
   * @generated from field: string id = 1;
   */
  id: string;

  /**
   * @generated from field: FlightCore core = 2;
   */
  core?: FlightCore | undefined;

  /**
   * @generated from field: bool is_archived = 3;
   */
  isArchived: boolean;

  /**
   * @generated from field: bool is_mind = 5;
   */
  isMind: boolean;

  /**
   * always 1?
   *
   * @generated from field: bool unknown_6 = 6;
   */
  unknown6: boolean;

  /**
   * [inferred] how flight was added (3=search)
   *
   * @generated from field: int32 import_source = 7;
   */
  importSource: number;

  /**
   * @generated from field: string user_id = 9;
   */
  userId: string;

  /**
   * @generated from field: string sharing_url = 10;
   */
  sharingUrl: string;

  /**
   * has nanos
   *
   * @generated from field: Timestamp created_at = 11;
   */
  createdAt?: Timestamp | undefined;

  /**
   * has nanos
   *
   * @generated from field: Timestamp updated_at = 12;
   */
  updatedAt?: Timestamp | undefined;

  /**
   * @generated from field: Timestamp deleted_at = 13;
   */
  deletedAt?: Timestamp | undefined;
};

/**
 * Describes the message Flight.
 * Use `create(FlightSchema)` to create a new message.
 */
export const FlightSchema: GenMessage<Flight> = /*@__PURE__*/
  messageDesc(file_entities_flight, 0);

/**
 * @generated from message FlightCore
 */
export type FlightCore = Message<"FlightCore"> & {
  /**
   * @generated from field: string id = 1;
   */
  id: string;

  /**
   * @generated from field: DepartureLeg departure = 2;
   */
  departure?: DepartureLeg | undefined;

  /**
   * @generated from field: ArrivalLeg arrival = 3;
   */
  arrival?: ArrivalLeg | undefined;

  /**
   * @generated from field: Airline airline = 4;
   */
  airline?: Airline | undefined;

  /**
   * @generated from field: bool is_cancelled = 5;
   */
  isCancelled: boolean;

  /**
   * @generated from field: repeated Codeshare codeshares = 6;
   */
  codeshares: Codeshare[];

  /**
   * @generated from field: Equipment equipment = 7;
   */
  equipment?: Equipment | undefined;

  /**
   * always 1?
   *
   * @generated from field: bool unknown_9 = 9;
   */
  unknown9: boolean;

  /**
   * @generated from field: repeated FlightCore inbound_flights = 10;
   */
  inboundFlights: FlightCore[];

  /**
   * @generated from field: repeated FlightEvent events = 11;
   */
  events: FlightEvent[];

  /**
   * @generated from field: DelayForecast delay_forecast = 12;
   */
  delayForecast?: DelayForecast | undefined;

  /**
   * @generated from field: Timestamp created = 13;
   */
  created?: Timestamp | undefined;

  /**
   * @generated from field: Timestamp last_updated = 14;
   */
  lastUpdated?: Timestamp | undefined;

  /**
   * e.g. "356" (no airline prefix)
   *
   * @generated from field: string number = 16;
   */
  number: string;

  /**
   * @generated from field: int32 distance_km = 17;
   */
  distanceKm: number;

  /**
   * @generated from field: FaaTmi faa_tmi = 18;
   */
  faaTmi?: FaaTmi | undefined;

  /**
   * @generated from field: string airline_id = 21;
   */
  airlineId: string;
};

/**
 * Describes the message FlightCore.
 * Use `create(FlightCoreSchema)` to create a new message.
 */
export const FlightCoreSchema: GenMessage<FlightCore> = /*@__PURE__*/
  messageDesc(file_entities_flight, 1);

/**
 * @generated from message DepartureLeg
 */
export type DepartureLeg = Message<"DepartureLeg"> & {
  /**
   * @generated from field: Airport airport = 1;
   */
  airport?: Airport | undefined;

  /**
   * @generated from field: string terminal = 2;
   */
  terminal: string;

  /**
   * @generated from field: string gate = 3;
   */
  gate: string;

  /**
   * @generated from field: FlightSchedule schedule = 4;
   */
  schedule?: FlightSchedule | undefined;

  /**
   * @generated from field: AirportDelays airport_delays = 6;
   */
  airportDelays?: AirportDelays | undefined;

  /**
   * check-in desk open/close
   *
   * @generated from field: CheckInSchedule check_in_schedule = 8;
   */
  checkInSchedule?: CheckInSchedule | undefined;

  /**
   * @generated from field: WeatherInfo weather = 9;
   */
  weather?: WeatherInfo | undefined;

  /**
   * field 10: [inferred] unknown
   *
   * reference to Airport.id
   *
   * @generated from field: string airport_id = 11;
   */
  airportId: string;
};

/**
 * Describes the message DepartureLeg.
 * Use `create(DepartureLegSchema)` to create a new message.
 */
export const DepartureLegSchema: GenMessage<DepartureLeg> = /*@__PURE__*/
  messageDesc(file_entities_flight, 2);

/**
 * @generated from message ArrivalLeg
 */
export type ArrivalLeg = Message<"ArrivalLeg"> & {
  /**
   * @generated from field: Airport scheduled_airport = 1;
   */
  scheduledAirport?: Airport | undefined;

  /**
   * @generated from field: Airport actual_airport = 2;
   */
  actualAirport?: Airport | undefined;

  /**
   * @generated from field: string terminal = 3;
   */
  terminal: string;

  /**
   * @generated from field: string gate = 4;
   */
  gate: string;

  /**
   * @generated from field: string baggage_belt = 5;
   */
  baggageBelt: string;

  /**
   * @generated from field: WeatherInfo weather = 6;
   */
  weather?: WeatherInfo | undefined;

  /**
   * @generated from field: FlightSchedule schedule = 7;
   */
  schedule?: FlightSchedule | undefined;

  /**
   * @generated from field: AirportDelays airport_delays = 9;
   */
  airportDelays?: AirportDelays | undefined;

  /**
   * original destination Airport.id
   *
   * @generated from field: string scheduled_arrival_airport_id = 13;
   */
  scheduledArrivalAirportId: string;

  /**
   * actual destination (differs if diverted)
   *
   * @generated from field: string actual_arrival_airport_id = 14;
   */
  actualArrivalAirportId: string;
};

/**
 * Describes the message ArrivalLeg.
 * Use `create(ArrivalLegSchema)` to create a new message.
 */
export const ArrivalLegSchema: GenMessage<ArrivalLeg> = /*@__PURE__*/
  messageDesc(file_entities_flight, 3);

/**
 * @generated from message Codeshare
 */
export type Codeshare = Message<"Codeshare"> & {
  /**
   * @generated from field: Airline airline = 1;
   */
  airline?: Airline | undefined;

  /**
   * e.g. "356"
   *
   * @generated from field: string number = 2;
   */
  number: string;

  /**
   * true if this airline operates the actual aircraft
   *
   * @generated from field: bool operates_aircraft = 3;
   */
  operatesAircraft: boolean;

  /**
   * reference to Airline.id
   *
   * @generated from field: string airline_id = 4;
   */
  airlineId: string;
};

/**
 * Describes the message Codeshare.
 * Use `create(CodeshareSchema)` to create a new message.
 */
export const CodeshareSchema: GenMessage<Codeshare> = /*@__PURE__*/
  messageDesc(file_entities_flight, 4);

/**
 * @generated from message Equipment
 */
export type Equipment = Message<"Equipment"> & {
  /**
   * e.g. "B-LBE"
   *
   * @generated from field: string tail_number = 1;
   */
  tailNumber: string;

  /**
   * e.g. "Airbus A330-300"
   *
   * @generated from field: string model_name = 2;
   */
  modelName: string;

  /**
   * type range
   *
   * @generated from field: int32 range = 3;
   */
  range: number;

  /**
   * type cruise speed
   *
   * @generated from field: int32 cruising_speed = 4;
   */
  cruisingSpeed: number;

  /**
   * e.g. "333"
   *
   * @generated from field: string model_iata = 5;
   */
  modelIata: string;

  /**
   * e.g. "A333"
   *
   * @generated from field: string model_icao = 6;
   */
  modelIcao: string;

  /**
   * ISO date e.g. "2014-05-19"
   *
   * @generated from field: string first_flight = 7;
   */
  firstFlight: string;

  /**
   * @generated from field: int32 age = 8;
   */
  age: number;

  /**
   * @generated from field: string name = 9;
   */
  name: string;

  /**
   * 2-letter e.g. "HK"
   *
   * @generated from field: string country_code = 10;
   */
  countryCode: string;

  /**
   * e.g. "Airbus"
   *
   * @generated from field: string manufacturer = 11;
   */
  manufacturer: string;

  /**
   * reference to AircraftType.id
   *
   * @generated from field: string model_id = 12;
   */
  modelId: string;

  /**
   * e.g. "Airbus A330-300"
   *
   * @generated from field: string stats_model_name = 13;
   */
  statsModelName: string;
};

/**
 * Describes the message Equipment.
 * Use `create(EquipmentSchema)` to create a new message.
 */
export const EquipmentSchema: GenMessage<Equipment> = /*@__PURE__*/
  messageDesc(file_entities_flight, 5);

/**
 * @generated from message DelayForecast
 */
export type DelayForecast = Message<"DelayForecast"> & {
  /**
   * @generated from field: int32 early = 1;
   */
  early: number;

  /**
   * @generated from field: int32 on_time = 2;
   */
  onTime: number;

  /**
   * @generated from field: int32 late_15m = 3;
   */
  late15m: number;

  /**
   * @generated from field: int32 late_30m = 4;
   */
  late30m: number;

  /**
   * @generated from field: int32 late_45m_or_more = 5;
   */
  late45mOrMore: number;

  /**
   * @generated from field: int32 canceled = 6;
   */
  canceled: number;

  /**
   * @generated from field: int32 diverted = 7;
   */
  diverted: number;

  /**
   * @generated from field: int32 mean_minutes = 8;
   */
  meanMinutes: number;
};

/**
 * Describes the message DelayForecast.
 * Use `create(DelayForecastSchema)` to create a new message.
 */
export const DelayForecastSchema: GenMessage<DelayForecast> = /*@__PURE__*/
  messageDesc(file_entities_flight, 6);

/**
 * @generated from message FaaTmi
 */
export type FaaTmi = Message<"FaaTmi"> & {
  /**
   * FAA Traffic Management Initiative
   *
   * @generated from field: int32 code = 1;
   */
  code: number;

  /**
   * @generated from field: Timestamp start = 2;
   */
  start?: Timestamp | undefined;

  /**
   * @generated from field: Timestamp end = 3;
   */
  end?: Timestamp | undefined;

  /**
   * e.g. "weather", "volume"
   *
   * @generated from field: string reason = 4;
   */
  reason: string;
};

/**
 * Describes the message FaaTmi.
 * Use `create(FaaTmiSchema)` to create a new message.
 */
export const FaaTmiSchema: GenMessage<FaaTmi> = /*@__PURE__*/
  messageDesc(file_entities_flight, 7);

/**
 * TODO
 *
 * @generated from message FlightSchedule
 */
export type FlightSchedule = Message<"FlightSchedule"> & {
  /**
   * @generated from field: Timestamp gate_original = 1;
   */
  gateOriginal?: Timestamp | undefined;

  /**
   * @generated from field: Timestamp gate_estimated = 2;
   */
  gateEstimated?: Timestamp | undefined;

  /**
   * @generated from field: Timestamp gate_actual = 3;
   */
  gateActual?: Timestamp | undefined;

  /**
   * @generated from field: Timestamp runway_original = 4;
   */
  runwayOriginal?: Timestamp | undefined;

  /**
   * @generated from field: Timestamp runway_estimated = 5;
   */
  runwayEstimated?: Timestamp | undefined;

  /**
   * @generated from field: Timestamp runway_actual = 6;
   */
  runwayActual?: Timestamp | undefined;

  /**
   * @generated from field: InitialGateTimeAlt initial_gate_time_3 = 7;
   */
  initialGateTime3?: InitialGateTimeAlt | undefined;

  /**
   * @generated from field: InitialGateTime initial_gate_time_2 = 8;
   */
  initialGateTime2?: InitialGateTime | undefined;

  /**
   * @generated from field: Timestamp initial_gate_time = 10;
   */
  initialGateTime?: Timestamp | undefined;
};

/**
 * Describes the message FlightSchedule.
 * Use `create(FlightScheduleSchema)` to create a new message.
 */
export const FlightScheduleSchema: GenMessage<FlightSchedule> = /*@__PURE__*/
  messageDesc(file_entities_flight, 8);

/**
 * @generated from message InitialGateTimeAlt
 */
export type InitialGateTimeAlt = Message<"InitialGateTimeAlt"> & {
  /**
   * @generated from field: InitialGateTime value = 8;
   */
  value?: InitialGateTime | undefined;
};

/**
 * Describes the message InitialGateTimeAlt.
 * Use `create(InitialGateTimeAltSchema)` to create a new message.
 */
export const InitialGateTimeAltSchema: GenMessage<InitialGateTimeAlt> = /*@__PURE__*/
  messageDesc(file_entities_flight, 9);

/**
 * @generated from message InitialGateTime
 */
export type InitialGateTime = Message<"InitialGateTime"> & {
  /**
   * @generated from field: Timestamp value = 10;
   */
  value?: Timestamp | undefined;
};

/**
 * Describes the message InitialGateTime.
 * Use `create(InitialGateTimeSchema)` to create a new message.
 */
export const InitialGateTimeSchema: GenMessage<InitialGateTime> = /*@__PURE__*/
  messageDesc(file_entities_flight, 10);

/**
 * @generated from message AirportDelays
 */
export type AirportDelays = Message<"AirportDelays"> & {
  /**
   * @generated from field: int32 average_delay_minutes = 1;
   */
  averageDelayMinutes: number;

  /**
   * @generated from field: Timestamp expiration_time = 3;
   */
  expirationTime?: Timestamp | undefined;

  /**
   * 0=increasing, 1=decreasing
   *
   * @generated from field: int32 trend = 4;
   */
  trend: number;

  /**
   * @generated from field: Timestamp last_updated = 5;
   */
  lastUpdated?: Timestamp | undefined;
};

/**
 * Describes the message AirportDelays.
 * Use `create(AirportDelaysSchema)` to create a new message.
 */
export const AirportDelaysSchema: GenMessage<AirportDelays> = /*@__PURE__*/
  messageDesc(file_entities_flight, 11);

/**
 * @generated from message CheckInSchedule
 */
export type CheckInSchedule = Message<"CheckInSchedule"> & {
  /**
   * @generated from field: Timestamp open = 1;
   */
  open?: Timestamp | undefined;

  /**
   * @generated from field: Timestamp close = 2;
   */
  close?: Timestamp | undefined;
};

/**
 * Describes the message CheckInSchedule.
 * Use `create(CheckInScheduleSchema)` to create a new message.
 */
export const CheckInScheduleSchema: GenMessage<CheckInSchedule> = /*@__PURE__*/
  messageDesc(file_entities_flight, 12);

/**
 * @generated from message WeatherInfo
 */
export type WeatherInfo = Message<"WeatherInfo"> & {
  /**
   * celcius
   *
   * @generated from field: int32 temperature = 1;
   */
  temperature: number;

  /**
   * OpenWeatherMap code e.g. 802
   *
   * @generated from field: int32 condition = 2;
   */
  condition: number;

  /**
   * @generated from field: bool night = 3;
   */
  night: boolean;

  /**
   * ?
   *
   * @generated from field: int32 condition_icon = 4;
   */
  conditionIcon: number;

  /**
   * e.g. "Scattered Clouds"
   *
   * @generated from field: string condition_name = 5;
   */
  conditionName: string;

  /**
   * present when severe weather active
   *
   * @generated from field: repeated WeatherWarning warnings = 6;
   */
  warnings: WeatherWarning[];

  /**
   * always 0?
   *
   * @generated from field: int32 unknown_7 = 7;
   */
  unknown7: number;

  /**
   * @generated from field: Timestamp last_updated = 8;
   */
  lastUpdated?: Timestamp | undefined;
};

/**
 * Describes the message WeatherInfo.
 * Use `create(WeatherInfoSchema)` to create a new message.
 */
export const WeatherInfoSchema: GenMessage<WeatherInfo> = /*@__PURE__*/
  messageDesc(file_entities_flight, 13);

/**
 * @generated from message WeatherWarning
 */
export type WeatherWarning = Message<"WeatherWarning"> & {
  /**
   * e.g. "Lightning Nearby"
   *
   * @generated from field: string title = 1;
   */
  title: string;

  /**
   * full advisory text
   *
   * @generated from field: string description = 2;
   */
  description: string;

  /**
   * @generated from field: int32 icon = 3;
   */
  icon: number;
};

/**
 * Describes the message WeatherWarning.
 * Use `create(WeatherWarningSchema)` to create a new message.
 */
export const WeatherWarningSchema: GenMessage<WeatherWarning> = /*@__PURE__*/
  messageDesc(file_entities_flight, 14);

/**
 * @generated from message FlightEvent
 */
export type FlightEvent = Message<"FlightEvent"> & {
  /**
   * @generated from field: Timestamp recorded_at = 1;
   */
  recordedAt?: Timestamp | undefined;

  /**
   * @generated from field: BaggageBeltChange baggage_belt_change = 2;
   */
  baggageBeltChange?: BaggageBeltChange | undefined;

  /**
   * fields 2–4: [inferred] unknown
   *
   * gate-out or gate-in timestamp
   *
   * @generated from field: OoiEvent ooi_event = 5;
   */
  ooiEvent?: OoiEvent | undefined;

  /**
   * terminal / gate reassignment
   *
   * @generated from field: GateChange gate_change = 6;
   */
  gateChange?: GateChange | undefined;

  /**
   * fields 7–8: [inferred] unknown
   *
   * @generated from field: TimingChange timing_change = 9;
   */
  timingChange?: TimingChange | undefined;

  /**
   * @generated from field: TailAssignment tail_assignment = 10;
   */
  tailAssignment?: TailAssignment | undefined;
};

/**
 * Describes the message FlightEvent.
 * Use `create(FlightEventSchema)` to create a new message.
 */
export const FlightEventSchema: GenMessage<FlightEvent> = /*@__PURE__*/
  messageDesc(file_entities_flight, 15);

/**
 * @generated from message BaggageBeltChange
 */
export type BaggageBeltChange = Message<"BaggageBeltChange"> & {
  /**
   * @generated from field: string baggage_belt = 1;
   */
  baggageBelt: string;
};

/**
 * Describes the message BaggageBeltChange.
 * Use `create(BaggageBeltChangeSchema)` to create a new message.
 */
export const BaggageBeltChangeSchema: GenMessage<BaggageBeltChange> = /*@__PURE__*/
  messageDesc(file_entities_flight, 16);

/**
 * @generated from message OoiEvent
 */
export type OoiEvent = Message<"OoiEvent"> & {
  /**
   * 1 = actualGateOut, 4 = actualGateIn
   *
   * @generated from field: int32 which = 1;
   */
  which: number;

  /**
   * @generated from field: Timestamp at = 2;
   */
  at?: Timestamp | undefined;
};

/**
 * Describes the message OoiEvent.
 * Use `create(OoiEventSchema)` to create a new message.
 */
export const OoiEventSchema: GenMessage<OoiEvent> = /*@__PURE__*/
  messageDesc(file_entities_flight, 17);

/**
 * @generated from message GateChange
 */
export type GateChange = Message<"GateChange"> & {
  /**
   * @generated from field: bool is_arrival = 1;
   */
  isArrival: boolean;

  /**
   * @generated from field: string terminal = 2;
   */
  terminal: string;

  /**
   * @generated from field: string gate = 3;
   */
  gate: string;
};

/**
 * Describes the message GateChange.
 * Use `create(GateChangeSchema)` to create a new message.
 */
export const GateChangeSchema: GenMessage<GateChange> = /*@__PURE__*/
  messageDesc(file_entities_flight, 18);

/**
 * @generated from message TimingChange
 */
export type TimingChange = Message<"TimingChange"> & {
  /**
   * @generated from field: bool is_arrival = 1;
   */
  isArrival: boolean;

  /**
   * @generated from field: bool is_runway = 2;
   */
  isRunway: boolean;

  /**
   * @generated from field: bool is_estimated = 3;
   */
  isEstimated: boolean;

  /**
   * @generated from field: Timestamp at = 4;
   */
  at?: Timestamp | undefined;
};

/**
 * Describes the message TimingChange.
 * Use `create(TimingChangeSchema)` to create a new message.
 */
export const TimingChangeSchema: GenMessage<TimingChange> = /*@__PURE__*/
  messageDesc(file_entities_flight, 19);

/**
 * @generated from message TailAssignment
 */
export type TailAssignment = Message<"TailAssignment"> & {
  /**
   * @generated from field: string tail_number = 1;
   */
  tailNumber: string;
};

/**
 * Describes the message TailAssignment.
 * Use `create(TailAssignmentSchema)` to create a new message.
 */
export const TailAssignmentSchema: GenMessage<TailAssignment> = /*@__PURE__*/
  messageDesc(file_entities_flight, 20);

