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

import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2";
import type { Pagination } from "../common_pb";
import { file_common } from "../common_pb";
import type { FlightCore } from "../entities/flight_pb";
import { file_entities_flight } from "../entities/flight_pb";
import type { Message } from "@bufbuild/protobuf";

/**
 * Describes the file services/search.proto.
 */
export const file_services_search: GenFile = /*@__PURE__*/
  fileDesc("ChVzZXJ2aWNlcy9zZWFyY2gucHJvdG8iXwoNU2VhcmNoUmVxdWVzdBIZCgZudW1iZXIYASABKAsyCS5CeU51bWJlchIXCgVyb3V0ZRgCIAEoCzIILkJ5Um91dGUSDAoEZGF0ZRgDIAEoCRIMCgRtb2RlGAQgASgJIi4KCEJ5TnVtYmVyEhIKCmFpcmxpbmVfaWQYASABKAkSDgoGbnVtYmVyGAIgASgJIk0KB0J5Um91dGUSIQoJZGVwYXJ0dXJlGAEgASgLMg4uUm91dGVFbmRwb2ludBIfCgdhcnJpdmFsGAIgASgLMg4uUm91dGVFbmRwb2ludCJUCg1Sb3V0ZUVuZHBvaW50EiIKB2FpcnBvcnQYASABKAsyES5Sb3V0ZUVuZHBvaW50UmVmEh8KBGNpdHkYAiABKAsyES5Sb3V0ZUVuZHBvaW50UmVmIh4KEFJvdXRlRW5kcG9pbnRSZWYSCgoCaWQYASABKAkiUAoOU2VhcmNoUmVzcG9uc2USHwoKcGFnaW5hdGlvbhgBIAEoCzILLlBhZ2luYXRpb24SHQoGcmVzdWx0GAIgASgLMg0uU2VhcmNoUmVzdWx0IlMKDFNlYXJjaFJlc3VsdBIcCgdmbGlnaHRzGAEgAygLMgsuRmxpZ2h0Q29yZRIlCg5mbGlnaHRfcmVzdWx0cxgCIAMoCzINLkZsaWdodFJlc3VsdCIrCgxGbGlnaHRSZXN1bHQSCgoCaWQYASABKAkSDwoHaXNfcGFzdBgCIAEoCGIGcHJvdG8z", [file_common, file_entities_flight]);

/**
 * @generated from message SearchRequest
 */
export type SearchRequest = Message<"SearchRequest"> & {
  /**
   * @generated from field: ByNumber number = 1;
   */
  number?: ByNumber | undefined;

  /**
   * @generated from field: ByRoute route = 2;
   */
  route?: ByRoute | undefined;

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

  /**
   * ROUTE_GUIDED (if city involved?), FLIGHT_NUMBER, ROUTE
   *
   * @generated from field: string mode = 4;
   */
  mode: string;
};

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

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

  /**
   * @generated from field: string number = 2;
   */
  number: string;
};

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

/**
 * @generated from message ByRoute
 */
export type ByRoute = Message<"ByRoute"> & {
  /**
   * @generated from field: RouteEndpoint departure = 1;
   */
  departure?: RouteEndpoint | undefined;

  /**
   * @generated from field: RouteEndpoint arrival = 2;
   */
  arrival?: RouteEndpoint | undefined;
};

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

/**
 * @generated from message RouteEndpoint
 */
export type RouteEndpoint = Message<"RouteEndpoint"> & {
  /**
   * id only
   *
   * @generated from field: RouteEndpointRef airport = 1;
   */
  airport?: RouteEndpointRef | undefined;

  /**
   * @generated from field: RouteEndpointRef city = 2;
   */
  city?: RouteEndpointRef | undefined;
};

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

/**
 * @generated from message RouteEndpointRef
 */
export type RouteEndpointRef = Message<"RouteEndpointRef"> & {
  /**
   * uuid for airport, 3-character id for city
   *
   * @generated from field: string id = 1;
   */
  id: string;
};

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

/**
 * @generated from message SearchResponse
 */
export type SearchResponse = Message<"SearchResponse"> & {
  /**
   * extractNextUrl: root.sub(1).str(1)
   *
   * @generated from field: Pagination pagination = 1;
   */
  pagination?: Pagination | undefined;

  /**
   * @generated from field: SearchResult result = 2;
   */
  result?: SearchResult | undefined;
};

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

/**
 * @generated from message SearchResult
 */
export type SearchResult = Message<"SearchResult"> & {
  /**
   * @generated from field: repeated FlightCore flights = 1;
   */
  flights: FlightCore[];

  /**
   * @generated from field: repeated FlightResult flight_results = 2;
   */
  flightResults: FlightResult[];
};

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

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

  /**
   * ?
   *
   * @generated from field: bool is_past = 2;
   */
  isPast: boolean;
};

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

