syntax = "proto3";
package trip;

import "google/protobuf/wrappers.proto";
import "google/protobuf/empty.proto";

import "core_shared.proto";

option go_package = "com.github/quabynah-bilson/proche;core";

// TripService is the service that handles trip related operations
service TripService {
  // trip related operations
  rpc book_trip (core.BookTripRequest) returns (google.protobuf.StringValue);
  rpc get_trip (google.protobuf.StringValue) returns (core.Trip);
  rpc get_trips (google.protobuf.StringValue) returns (stream core.TripList);
  rpc delete_trip (google.protobuf.StringValue) returns (google.protobuf.Empty);

  // trip event related operations
  rpc cancel_trip_event (google.protobuf.StringValue) returns (google.protobuf.Empty);
  rpc start_trip_event (google.protobuf.StringValue) returns (google.protobuf.Empty);
  rpc complete_trip_event (google.protobuf.StringValue) returns (google.protobuf.Empty);
  rpc get_trip_events (google.protobuf.StringValue) returns (stream core.TripEventList);
  rpc get_trip_event (google.protobuf.StringValue) returns (stream core.TripEvent);
  // candidates
  rpc get_candidates_for_trip(google.protobuf.StringValue) returns (stream core.TripCandidateList);
}