import TravelAgent.messages.*;

protocol ReserveTravel {
  role Client, Agent, Provider[1..num_providers];

  query(Services) from Client to Agent;
  Services_info from Agent to Client;

  rec X {
    choice from Client to Agent {
      more_info(): 
        query(Services) from Client to Agent;
        Services_info from Agent to Client;
        #X;
      reserve():
        query(Services) from Agent to Provider[1..num_providers];
        Services_info from Provider[1..num_providers] to Agent;
        choice from Agent to Client {
          all_available():
            reserve(Services) from Agent to Provider[1..num_providers];
            run PurchaseTravel(num_providers);
          altern_services():
            Altern_services_info from Agent to Client; 
            #X;
          restart(): end;
        }
      quit(): end;
    }
  }
}