syntax = "proto3"; package matcher; service MatcherService { rpc Match(MatchRequest) returns (Matches); } message MatchRequest { string id = 1; bool driver = 2; bool passenger = 3; Frequency frequency = 4; string fromDate = 5; string toDate = 6; repeated ScheduleItem schedule = 7; bool strict = 8; repeated Waypoint waypoints = 9; string excludedAdId = 10; AlgorithmType algorithmType = 11; int32 remoteness = 12; bool useProportion = 13; float proportion = 14; bool useAzimuth = 15; int32 azimuthMargin = 16; float maxDetourDistanceRatio = 17; float maxDetourDurationRatio = 18; optional int32 page = 19; optional int32 perPage = 20; } message ScheduleItem { int32 day = 1; string time = 2; int32 margin = 3; } message Waypoint { int32 position = 1; double lon = 2; double lat = 3; string name = 4; string houseNumber = 5; string street = 6; string locality = 7; string postalCode = 8; string country = 9; } enum Frequency { PUNCTUAL = 1; RECURRENT = 2; } enum AlgorithmType { PASSENGER_ORIENTED = 0; } message Match { string adId = 1; string role = 2; Frequency frequency = 3; int32 distance = 4; int32 duration = 5; int32 initialDistance = 6; int32 initialDuration = 7; int32 distanceDetour = 8; int32 durationDetour = 9; double distanceDetourPercentage = 10; double durationDetourPercentage = 11; repeated Journey journeys = 12; } message Journey { int32 day = 1; string firstDate = 2; string lastDate = 3; repeated Step steps = 4; } message Step { int32 distance = 1; int32 duration = 2; double lon = 3; double lat = 4; string time = 5; repeated Actor actors = 6; } message Actor { string role = 1; string target = 2; } message Matches { string id = 1; repeated Match data = 2; int32 total = 3; int32 page = 4; int32 perPage = 5; }