diff --git a/proto/cmp/services/transport/v1/list.proto b/proto/cmp/services/transport/v1/list.proto index e996b265..fa0b03ab 100644 --- a/proto/cmp/services/transport/v1/list.proto +++ b/proto/cmp/services/transport/v1/list.proto @@ -19,7 +19,7 @@ message TransportProductListResponse { cmp.types.v1.ResponseHeader header = 1; // Product list: Trips - repeated cmp.services.transport.v3.Trip trips = 2; + repeated cmp.services.transport.v3.TripSchedule trips = 2; } // This service is used to get a product list for transportation. diff --git a/proto/cmp/services/transport/v3/trip_types.proto b/proto/cmp/services/transport/v3/trip_types.proto index 3a3c1f96..a4b6b42b 100644 --- a/proto/cmp/services/transport/v3/trip_types.proto +++ b/proto/cmp/services/transport/v3/trip_types.proto @@ -47,6 +47,57 @@ message TransitEvent { // A segment of a trip message TripSegment { + // Segment Info + cmp.services.transport.v3.SegmentInfo info = 1; + + // Flights, trains and transfers often offer different service types + // for a product. Think about economy or business for flights, first and second + // class on trains and a shared shuttle or a private transfer. + // + // Service type code examples: + // flight: "Y", "J", "F". + // train: "1st", "2nd" or "S", "C", "P" + // transfer: "S", "P", "VIP", "SS" + string service_type_code = 2; + + // Service type description examples: + // flight: "Economy Class", "Business Class", "First Class" + // train: "First Class", "Second Class" or "standard", "comfort", and "premium",.. + // transfer: "Shuttle", "Private", "VIP Limosine", "Speedy Shuttle",... + string service_type_description = 3; + + // Included, optional or compulsary services for this segment or leg. Just a code and + // description can be included if it is a package (seat, priority, large carry-on). + // or a price detail can be included for optionally pre-ordered meals for example. + repeated cmp.types.v2.ServiceFact services = 4; + + // Min PAX + // + // Ex: `1` + int32 min_pax = 5; + + // Max PAX + // + // Ex: `3` + int32 max_pax = 6; +} + +// A whole trip schedule from the first segment till the last one +message TripSchedule { + // Carrier Code + string carrier_code = 1; + + // Carrier Type. Ex: airline, transfer company, train company, .. etc + string carrier_type = 2; + + // Start and end datetime for the trip + cmp.types.v1.DateTimeRange period = 3; + + // Schedule for each segment of the trip + repeated cmp.services.transport.v3.SegmentInfo segments = 4; +} + +message SegmentInfo { // Segment ID // Ex: "SEG1234" string segment_id = 1; @@ -90,54 +141,11 @@ message TripSegment { // Arrival cmp.services.transport.v3.TransitEvent arrival = 8; - // Flights, trains and transfers often offer different service types - // for a product. Think about economy or business for flights, first and second - // class on trains and a shared shuttle or a private transfer. - // - // Service type code examples: - // flight: "Y", "J", "F". - // train: "1st", "2nd" or "S", "C", "P" - // transfer: "S", "P", "VIP", "SS" - string service_type_code = 9; - - // Service type description examples: - // flight: "Economy Class", "Business Class", "First Class" - // train: "First Class", "Second Class" or "standard", "comfort", and "premium",.. - // transfer: "Shuttle", "Private", "VIP Limosine", "Speedy Shuttle",... - string service_type_description = 10; - - // Included, optional or compulsary services for this segment or leg. Just a code and - // description can be included if it is a package (seat, priority, large carry-on). - // or a price detail can be included for optionally pre-ordered meals for example. - repeated cmp.types.v2.ServiceFact services = 11; - // Segment duration in minutes - cmp.types.v1.Duration segment_duration = 12; + cmp.types.v1.Duration segment_duration = 9; // Segment Distance // // Ex: `Length(value=15, unit=LengthUnit.DISTANCE_UNIT_KILOMETERS)` - cmp.types.v1.Length segment_distance = 13; - - // Min PAX - // - // Ex: `1` - int32 min_pax = 14; - - // Max PAX - // - // Ex: `3` - int32 max_pax = 15; -} - -// A whole trip schedule from the first segment till the last one -message TripSchedule { - // Carrier Code - string carrier_code = 1; - - // Carrier Type. Ex: airline, transfer company, train company, .. etc - string carrier_type = 2; - - // Start and end datetime for the trip - cmp.types.v1.DateTimeRange period = 3; + cmp.types.v1.Length segment_distance = 10; }