94 lines
1.6 KiB
Protocol Buffer
94 lines
1.6 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package matcher;
|
|
|
|
service MatcherService {
|
|
rpc Match(MatchRequest) returns (Matches);
|
|
}
|
|
|
|
message MatchRequest {
|
|
bool driver = 1;
|
|
bool passenger = 2;
|
|
Frequency frequency = 3;
|
|
string fromDate = 4;
|
|
string toDate = 5;
|
|
repeated ScheduleItem schedule = 6;
|
|
bool strict = 7;
|
|
repeated Waypoint waypoints = 8;
|
|
AlgorithmType algorithmType = 9;
|
|
int32 remoteness = 10;
|
|
bool useProportion = 11;
|
|
int32 proportion = 12;
|
|
bool useAzimuth = 13;
|
|
int32 azimuthMargin = 14;
|
|
float maxDetourDistanceRatio = 15;
|
|
float maxDetourDurationRatio = 16;
|
|
int32 identifier = 22;
|
|
}
|
|
|
|
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 id = 1;
|
|
string adId = 2;
|
|
string role = 3;
|
|
int32 duration = 4;
|
|
int32 distance = 5;
|
|
repeated Journey journeys = 6;
|
|
}
|
|
|
|
message Journey {
|
|
string firstDate = 1;
|
|
string lastDate = 2;
|
|
repeated Step steps = 3;
|
|
}
|
|
|
|
message Step {
|
|
int32 duration = 1;
|
|
int32 distance = 2;
|
|
double lon = 3;
|
|
double lat = 4;
|
|
repeated Actor actors = 5;
|
|
}
|
|
|
|
message Actor {
|
|
string role = 1;
|
|
string target = 2;
|
|
string firstDatetime = 3;
|
|
string firstMinDatetime = 4;
|
|
string firstMaxDatetime = 5;
|
|
string lastDatetime = 6;
|
|
string lastMinDatetime = 7;
|
|
string lastMaxDatetime = 8;
|
|
}
|
|
|
|
message Matches {
|
|
repeated Match data = 1;
|
|
int32 total = 2;
|
|
}
|