Skip to content

Commit

Permalink
Pull transport search parameters in QueryTrip
Browse files Browse the repository at this point in the history
  • Loading branch information
havan committed Jan 15, 2024
1 parent 6aa0376 commit 1e2fa9a
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 9 deletions.
27 changes: 19 additions & 8 deletions proto/cmp/services/transport/v1alpha1/search_query_types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,44 @@ import "cmp/types/v1alpha1/date.proto";
import "cmp/types/v1alpha1/location.proto";
import "cmp/types/v1alpha1/traveller.proto";

// Transport search query
// Transport search query. Multiple trips can be send, each representing multi-leg
// journey.
//
// Ex:
// - 1 trip in trips : One way journey from PMI to BCN.
// - 2 trips in trips: Roundtrip journey from PMI to BCN and then BCN to PMI.
// - 3 trips in trips: PMI->BCN + BCN->BER + BER->PMI (1 two legged flight (connection) and 1 direct (return) flight)
//
// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/transport/v1alpha1/search_query_types.proto.dot.xs.svg)
// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/transport/v1alpha1/search_query_types.proto.dot.svg)
// [Open Message
// Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/transport/v1alpha1/search_query_types.proto.dot.svg)
message TransportSearchQuery {
// ID
int32 query_id = 1;

// Transport specific search parameters
TransportSearchParameters search_parameters_transport = 2;

// Travellers
repeated cmp.types.v1alpha1.Traveller travellers = 3;
repeated cmp.types.v1alpha1.Traveller travellers = 2;

// Trips
repeated QueryTrip trips = 4;
repeated QueryTrip trips = 3;
}

// Version of `Trip` object in `trip_types.prot` for search request's queries. It
// contains only departure and arrival objects, lacking the segments field.
message QueryTrip {
// Departure event
QueryTransitEvent departure = 1;

// Arrival event
QueryTransitEvent arrival = 2;

// Transport specific search parameters
TransportSearchParameters search_parameters_transport = 3;
}

// Represents a departure or arrival event
// Represents a departure or arrival event for search request's query. This type is
// different from `TransitEvent` in `trip_types.proto` by having a `date` object
// instead of a `datetime` object.
message QueryTransitEvent {
// Date time of the event
cmp.types.v1alpha1.Date date = 1;
Expand Down
2 changes: 2 additions & 0 deletions proto/cmp/types/v1alpha1/bed.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ syntax = "proto3";

package cmp.types.v1alpha1;

// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/bed.proto.dot.xs.svg)
// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/bed.proto.dot.svg)
message Bed {
BedType type = 1;
int32 count = 2;
Expand Down
2 changes: 1 addition & 1 deletion proto/cmp/types/v1alpha1/currency.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package cmp.types.v1alpha1;

// ### Currency list of ISO 4217 standard
// Currency list of ISO 4217 standard
//
// First 20 currencies are the most traded currencies in the world. This is done to
// optimize the size of the protobuf message size.
Expand Down
2 changes: 2 additions & 0 deletions proto/cmp/types/v1alpha1/description.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ package cmp.types.v1alpha1;

import "cmp/types/v1alpha1/language.proto";

// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/description.proto.dot.xs.svg)
// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/description.proto.dot.svg)
message LocalizedDescriptionSet {
// Language
Language language = 1;
Expand Down
2 changes: 2 additions & 0 deletions proto/cmp/types/v1alpha1/file.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ package cmp.types.v1alpha1;

import "google/protobuf/timestamp.proto";

// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/file.proto.dot.xs.svg)
// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/file.proto.dot.svg)
message File {
// file name
string name = 1;
Expand Down

0 comments on commit 1e2fa9a

Please sign in to comment.