From 4a88c52fb50d4a892e454b8b94aec812d74267bb Mon Sep 17 00:00:00 2001 From: Sam Jaarsma Date: Tue, 19 Dec 2023 17:13:10 +0100 Subject: [PATCH 1/4] changed luggage to baggage and created types/baggage with enum --- .../transport/v1alpha1/trip_types.proto | 5 ++-- proto/cmp/types/v1alpha1/baggage.proto | 26 +++++++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 proto/cmp/types/v1alpha1/baggage.proto diff --git a/proto/cmp/services/transport/v1alpha1/trip_types.proto b/proto/cmp/services/transport/v1alpha1/trip_types.proto index 679fd24..752e534 100644 --- a/proto/cmp/services/transport/v1alpha1/trip_types.proto +++ b/proto/cmp/services/transport/v1alpha1/trip_types.proto @@ -6,6 +6,7 @@ import "cmp/types/v1alpha1/distance.proto"; import "cmp/types/v1alpha1/location.proto"; import "cmp/types/v1alpha1/price.proto"; import "cmp/types/v1alpha1/time.proto"; +import "cmp/types/v1alpha1/baggage.proto"; import "google/protobuf/timestamp.proto"; // ### Trip message type @@ -99,7 +100,7 @@ message TripSegment { // Luggage // // Ex: `3` - int32 luggage = 14; + cmp.types.v1alpha1.Baggage baggage = 14; // Price // @@ -116,4 +117,4 @@ message TransitEvent { // Event location cmp.types.v1alpha1.LocationCode location_code = 2; -} +} \ No newline at end of file diff --git a/proto/cmp/types/v1alpha1/baggage.proto b/proto/cmp/types/v1alpha1/baggage.proto new file mode 100644 index 0000000..d71d538 --- /dev/null +++ b/proto/cmp/types/v1alpha1/baggage.proto @@ -0,0 +1,26 @@ +syntax = "proto3"; + +package cmp.types.v1alpha1; + +// Baggage message type +// +// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/baggage.proto.dot.xs.svg) +// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/baggage.proto.dot.svg) +message Baggage { + // Baggage type + // + // Enum of allowed baggage types. + BaggageType baggage_type = 1; + + // maximum number of the specified bagage type allowed + int32 max_baggage = 2; +} + +// Meal plan code ENUM type +enum BaggageType { + BAGGAGE_TYPE_UNSPECIFIED = 0; // No Baggage type specified + BAGGAGE_TYPE_CARRY_ON = 1; // Carry-on + BAGGAGE_TYPE_CARRY_ON_OVERHEAD = 2; // Carry-on overhead + BAGGAGE_TYPE_CARRY_ON_PERSONAL = 3; // Carry-on personal item + BAGGAGE_TYPE_CHECKED = 4; // Checked +} \ No newline at end of file From 23b2582818549682b85cec101c55948d1cee5685 Mon Sep 17 00:00:00 2001 From: Sam Jaarsma Date: Tue, 19 Dec 2023 17:34:41 +0100 Subject: [PATCH 2/4] baggage sizes added --- proto/cmp/types/v1alpha1/baggage.proto | 27 +++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/proto/cmp/types/v1alpha1/baggage.proto b/proto/cmp/types/v1alpha1/baggage.proto index d71d538..262b8bf 100644 --- a/proto/cmp/types/v1alpha1/baggage.proto +++ b/proto/cmp/types/v1alpha1/baggage.proto @@ -14,13 +14,38 @@ message Baggage { // maximum number of the specified bagage type allowed int32 max_baggage = 2; + + // maximum weith of each of the specified bagage type allowed + int32 max_baggage_weight = 3; + + // Dimensions + // + // Dimensions unit specification for length, width and height (cm or inches) + DimensionType dimension_type = 5; + + // maximum height of the specified bagage type allowed + // maximum length, width and height of the specified bagage type allowed + int32 max_baggage_length = 6; + int32 max_baggage_width = 7; + int32 max_baggage_height = 8; } -// Meal plan code ENUM type +// Baggage type ENUM type enum BaggageType { BAGGAGE_TYPE_UNSPECIFIED = 0; // No Baggage type specified BAGGAGE_TYPE_CARRY_ON = 1; // Carry-on BAGGAGE_TYPE_CARRY_ON_OVERHEAD = 2; // Carry-on overhead BAGGAGE_TYPE_CARRY_ON_PERSONAL = 3; // Carry-on personal item BAGGAGE_TYPE_CHECKED = 4; // Checked + BAGGAGE_TYPE_ODD_SIZE = 5; // Odd size checked baggage + BAGGAGE_TYPE_SKI = 6; // Skis + BAGGAGE_TYPE_GOLF = 7; // Golf bags + BAGGAGE_TYPE_SURF = 8; // (wind)Surf or Kite boards +} + +// Baggage dimensions unit ENUM type +enum DimensionType { + DIMENSION_TYPE_UNSPECIFIED = 0; // No Baggage dimensions unit specified + DIMENSION_TYPE_CM = 1; // Centimeters + DIMENSION_TYPE_INCH = 2; // Inches } \ No newline at end of file From 75670646b2de9b8a7966a8165f3c1982ab0dc9e8 Mon Sep 17 00:00:00 2001 From: Sam Jaarsma Date: Wed, 20 Dec 2023 15:26:15 +0100 Subject: [PATCH 3/4] added segment_id for NDC compatibility --- .../v1alpha1/search_result_types.proto | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/proto/cmp/services/transport/v1alpha1/search_result_types.proto b/proto/cmp/services/transport/v1alpha1/search_result_types.proto index aff348f..ee275ee 100644 --- a/proto/cmp/services/transport/v1alpha1/search_result_types.proto +++ b/proto/cmp/services/transport/v1alpha1/search_result_types.proto @@ -24,40 +24,41 @@ message TransportSearchResult { // Option to carry through an offer identifier for other stateful provider systems // like NDC AirShopping RS string offer_id = 2; + string segment_id = 3; // Travellers - repeated cmp.types.v1alpha1.Traveller travellers = 3; + repeated cmp.types.v1alpha1.Traveller travellers = 4; // Travelling trip. See `search.proto` documentation - Trip travelling_trip = 4; + Trip travelling_trip = 5; // Returning trip. See `search.proto` documentation - Trip returning_trip = 5; + Trip returning_trip = 6; // Total Price - cmp.types.v1alpha1.PriceDetail total_price = 6; + cmp.types.v1alpha1.PriceDetail total_price = 7; // Services - repeated cmp.types.v1alpha1.ServiceFact included_services = 7; - repeated cmp.types.v1alpha1.ServiceFact compulsory_extras = 8; - repeated cmp.types.v1alpha1.ServiceFact optional_extras = 9; + repeated cmp.types.v1alpha1.ServiceFact included_services = 8; + repeated cmp.types.v1alpha1.ServiceFact compulsory_extras = 9; + repeated cmp.types.v1alpha1.ServiceFact optional_extras = 10; // Rate Rules - repeated cmp.types.v1alpha1.RateRule rate_rules = 10; + repeated cmp.types.v1alpha1.RateRule rate_rules = 11; // Fulfillment - repeated cmp.types.v1alpha1.Fulfillment fulfillments = 11; //FIXME: Can linktype be an ENUM? + repeated cmp.types.v1alpha1.Fulfillment fulfillments = 12; //FIXME: Can linktype be an ENUM? // Validity of the search option. // // `DateTimeRange` type with `start_date` and `end_date` in which the option can // be booked. If the start_date is omitted, the offer can be booked until the // end-date. - cmp.types.v1alpha1.DateTimeRange validity = 12; + cmp.types.v1alpha1.DateTimeRange validity = 13; // Cancel Policy - cmp.types.v1alpha1.CancelPolicy cancel_policy = 13; + cmp.types.v1alpha1.CancelPolicy cancel_policy = 14; // Observations - string observations = 14; -} + string observations = 15; +} \ No newline at end of file From 5333837417fb4bee94d61c4391164a08d3586bbd Mon Sep 17 00:00:00 2001 From: Sam Jaarsma Date: Thu, 21 Dec 2023 13:13:19 +0100 Subject: [PATCH 4/4] corrected segment_id --- .../v1alpha1/search_result_types.proto | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/proto/cmp/services/transport/v1alpha1/search_result_types.proto b/proto/cmp/services/transport/v1alpha1/search_result_types.proto index ee275ee..01f3c4d 100644 --- a/proto/cmp/services/transport/v1alpha1/search_result_types.proto +++ b/proto/cmp/services/transport/v1alpha1/search_result_types.proto @@ -24,41 +24,40 @@ message TransportSearchResult { // Option to carry through an offer identifier for other stateful provider systems // like NDC AirShopping RS string offer_id = 2; - string segment_id = 3; // Travellers - repeated cmp.types.v1alpha1.Traveller travellers = 4; + repeated cmp.types.v1alpha1.Traveller travellers = 3; // Travelling trip. See `search.proto` documentation - Trip travelling_trip = 5; + Trip travelling_trip = 4; // Returning trip. See `search.proto` documentation - Trip returning_trip = 6; + Trip returning_trip = 5; // Total Price - cmp.types.v1alpha1.PriceDetail total_price = 7; + cmp.types.v1alpha1.PriceDetail total_price = 6; // Services - repeated cmp.types.v1alpha1.ServiceFact included_services = 8; - repeated cmp.types.v1alpha1.ServiceFact compulsory_extras = 9; - repeated cmp.types.v1alpha1.ServiceFact optional_extras = 10; + repeated cmp.types.v1alpha1.ServiceFact included_services = 7; + repeated cmp.types.v1alpha1.ServiceFact compulsory_extras = 8; + repeated cmp.types.v1alpha1.ServiceFact optional_extras = 9; // Rate Rules - repeated cmp.types.v1alpha1.RateRule rate_rules = 11; + repeated cmp.types.v1alpha1.RateRule rate_rules = 10; // Fulfillment - repeated cmp.types.v1alpha1.Fulfillment fulfillments = 12; //FIXME: Can linktype be an ENUM? + repeated cmp.types.v1alpha1.Fulfillment fulfillments = 11; //FIXME: Can linktype be an ENUM? // Validity of the search option. // // `DateTimeRange` type with `start_date` and `end_date` in which the option can // be booked. If the start_date is omitted, the offer can be booked until the // end-date. - cmp.types.v1alpha1.DateTimeRange validity = 13; + cmp.types.v1alpha1.DateTimeRange validity = 12; // Cancel Policy - cmp.types.v1alpha1.CancelPolicy cancel_policy = 14; + cmp.types.v1alpha1.CancelPolicy cancel_policy = 13; // Observations - string observations = 15; + string observations = 14; } \ No newline at end of file