From f67492f0d46edec20d9a2ca5a13e9e1f413cc466 Mon Sep 17 00:00:00 2001 From: Ekrem Seren Date: Sat, 13 Jan 2024 01:39:57 +0300 Subject: [PATCH 1/9] introduce search query concept, property product extended info --- .../v1alpha1/property_types.proto | 110 ++++++++++++++++++ .../accommodation/v1alpha1/search.proto | 55 +++------ .../v1alpha1/search_parameters_types.proto | 7 +- .../v1alpha1/search_query_types.proto | 29 +++++ .../v1alpha1/search_result_types.proto | 15 +-- .../accommodation/v1alpha1/unit_types.proto | 27 ++--- .../v1alpha1/search_result_types.proto | 7 +- .../services/transport/v1alpha1/search.proto | 32 +---- .../v1alpha1/search_parameters_types.proto | 51 ++++---- .../v1alpha1/search_query_types.proto | 37 ++++++ .../v1alpha1/search_result_types.proto | 10 +- .../transport/v1alpha1/trip_types.proto | 4 +- proto/cmp/types/v1alpha1/bed.proto | 15 +++ proto/cmp/types/v1alpha1/description.proto | 21 ++++ proto/cmp/types/v1alpha1/file.proto | 64 ++++++++++ proto/cmp/types/v1alpha1/meal_plan.proto | 4 +- proto/cmp/types/v1alpha1/phone.proto | 4 +- proto/cmp/types/v1alpha1/search.proto | 27 +++-- 18 files changed, 374 insertions(+), 145 deletions(-) create mode 100644 proto/cmp/services/accommodation/v1alpha1/search_query_types.proto create mode 100644 proto/cmp/services/transport/v1alpha1/search_query_types.proto create mode 100644 proto/cmp/types/v1alpha1/bed.proto create mode 100644 proto/cmp/types/v1alpha1/description.proto create mode 100644 proto/cmp/types/v1alpha1/file.proto diff --git a/proto/cmp/services/accommodation/v1alpha1/property_types.proto b/proto/cmp/services/accommodation/v1alpha1/property_types.proto index 755838f5..63055652 100644 --- a/proto/cmp/services/accommodation/v1alpha1/property_types.proto +++ b/proto/cmp/services/accommodation/v1alpha1/property_types.proto @@ -3,9 +3,17 @@ syntax = "proto3"; package cmp.services.accommodation.v1alpha1; import "cmp/types/v1alpha1/address.proto"; +import "cmp/types/v1alpha1/bed.proto"; +import "cmp/types/v1alpha1/cancel_policy.proto"; +import "cmp/types/v1alpha1/description.proto"; import "cmp/types/v1alpha1/email.proto"; +import "cmp/types/v1alpha1/file.proto"; import "cmp/types/v1alpha1/location.proto"; +import "cmp/types/v1alpha1/meal_plan.proto"; import "cmp/types/v1alpha1/phone.proto"; +import "cmp/types/v1alpha1/rate.proto"; +import "cmp/types/v1alpha1/service_fact.proto"; +import "cmp/types/v1alpha1/traveller.proto"; import "google/protobuf/timestamp.proto"; // ### Property message type @@ -92,3 +100,105 @@ enum CategoryUnit { CATEGORY_UNIT_STARS = 1; CATEGORY_UNIT_PALMS = 2; } + +// This message type contains extended info about a property +message PropertyExtendedInfo { + // Property + Property property = 1; + + // Images + repeated cmp.types.v1alpha1.Image images = 2; + + // Videos + repeated cmp.types.v1alpha1.Video videos = 3; + + // Segmentation classification + repeated string classification = 4; + + // Property descriptions + repeated cmp.types.v1alpha1.LocalizedDescriptionSet localized_descriptions = 5; + + // Room descriptions + repeated cmp.types.v1alpha1.LocalizedDescriptionSet localized_room_descriptions = 6; + + // Payment type. Ex: "MERCHANT" + string payment_type = 7; + + // Status. FIXME: This needs to be an enum!? + string status = 8; +} + +message Room { + string code = 1; + string name = 2; + repeated cmp.types.v1alpha1.Image images = 3; + repeated cmp.types.v1alpha1.Video videos = 4; + + // Room descriptions + repeated cmp.types.v1alpha1.LocalizedDescriptionSet descriptions = 5; + + // Meal plan (Board code) + cmp.types.v1alpha1.MealPlan meal_plan = 6; + + // FIXME: Need board description & amenities here + + // Rate plans + repeated cmp.types.v1alpha1.RatePlan rate_plans = 7; + + // Rate Rule + repeated cmp.types.v1alpha1.RateRule rate_rules = 8; + + // Beds + repeated cmp.types.v1alpha1.Bed beds = 9; + + // Occupancy + Occupancy occupancy = 10; + + // Services + repeated cmp.types.v1alpha1.ServiceFact included_services = 11; + repeated cmp.types.v1alpha1.ServiceFact compulsory_extras = 12; + repeated cmp.types.v1alpha1.ServiceFact optional_extras = 13; + + // This is a list so that various policies can be expressed. + // + // Ex: 10-5 days before arrival x€, 4-1 days before arrival y€ and 0 days before + // arrival z€ + repeated cmp.types.v1alpha1.CancelPolicy cancel_policies = 14; +} + +message Occupancy { + // Min guests + int32 min_guests = 1; + + // Max guests + int32 max_guests = 2; + + // Standard occupancy + int32 standard_occupancy = 3; + + // Full payers + int32 full_payers = 4; + + // If infants are counted in total guests or not + bool infant_counted_in_total_guests = 5; + + // Occupancy options + repeated OccupancyOption occupancy_options = 6; +} + +message OccupancyOption { + // Guest type like adult, child, infant. + cmp.types.v1alpha1.TravellerType guest_type = 1; + + // Min guests + int32 min = 2; + + // Max guests + int32 max = 3; + + // Min age + int32 min_age = 4; + + // Max age + int32 max_age = 5; +} diff --git a/proto/cmp/services/accommodation/v1alpha1/search.proto b/proto/cmp/services/accommodation/v1alpha1/search.proto index 21009c18..4ef04613 100644 --- a/proto/cmp/services/accommodation/v1alpha1/search.proto +++ b/proto/cmp/services/accommodation/v1alpha1/search.proto @@ -12,34 +12,28 @@ syntax = "proto3"; // This package is a **WIP**. package cmp.services.accommodation.v1alpha1; -import "cmp/services/accommodation/v1alpha1/search_parameters_types.proto"; +import "cmp/services/accommodation/v1alpha1/search_query_types.proto"; import "cmp/services/accommodation/v1alpha1/search_result_types.proto"; -import "cmp/services/accommodation/v1alpha1/unit_types.proto"; import "cmp/types/v1alpha1/common.proto"; import "cmp/types/v1alpha1/search.proto"; -import "cmp/types/v1alpha1/travel_period.proto"; -import "cmp/types/v1alpha1/traveller.proto"; -// ### Accommodation Search Request Message Type -// // The `Accommodation Search Request` message type facilitates the request for // accommodations like hotel and holiday home searches within the platform. In the -// request the market, language and currency are specified at the top-level. -// -// In the Unit we specify the details of the trip like dates, properties or locations or -// filters. The purpose of such a structure is to allow for multi-room and -// multi-property searches. -// This means that there is no grouping of different room, mealplan or rateplan options -// in single room or single property searches. Each AccommodationSearchResult is one -// bookable option. +// request the market, language and currency are specified at the top-level. +// +// In the Unit we specify the details of the trip like dates, properties or +// locations or filters. The purpose of such a structure is to allow for multi-room +// and multi-property searches. This means that there is no grouping of different +// room, mealplan or rateplan options in single room or single property searches. +// Each AccommodationSearchResult is one bookable option. // -// Several rooms or houses can be requested for the same dates and location or -// for the purpose of a tour or roadtrip, several accommodations or properties for -// sequential dates and different locations. This is done by specifying multiple Units -// for the same or different periods, the same or different accommodations or properties, -// specifying which travellers sleep in which unit. -// -//// Developers leveraging this message type should ensure proper validation and +// Several rooms or houses can be requested for the same dates and location or for +// the purpose of a tour or roadtrip, several accommodations or properties for +// sequential dates and different locations. This is done by specifying multiple +// Units for the same or different periods, the same or different accommodations or +// properties, specifying which travellers sleep in which unit. +// +// Developers leveraging this message type should ensure proper validation and // handling, especially considering fields that are still under review, like // `speech_request`. message AccommodationSearchRequest { @@ -54,22 +48,11 @@ message AccommodationSearchRequest { // only the cheapest or all options. cmp.types.v1alpha1.SearchParameters search_parameters_generic = 3; - // Accommodation specific search parameters Ex: Specific search parameters like - // geo location, meal plan, rate plan and rate rules. - AccommodationSearchParameters search_parameters_accommodation = 4; - - // Travel period - cmp.types.v1alpha1.TravelPeriod travel_period = 5; - - // Travellers - repeated cmp.types.v1alpha1.Traveller travellers = 6; - - // Unit Types - repeated UnitType unit_types = 7; + // This field represents a list of search queries that can be used to create + // multiroom multi location searches. + repeated AccommodationSearchQuery queries = 4; } -// ### Accommodation Search Response -// // The `Accommodation Search Response` message type facilitates the response for // accommodations like hotel and holiday home searches within the platform. // @@ -89,7 +72,7 @@ message AccommodationSearchResponse { repeated AccommodationSearchResult results = 3; } -// ### Accommodation Search Service definition +// Service definition for Accommodation search // // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1alpha1/search.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1alpha1/search.proto.dot.svg) diff --git a/proto/cmp/services/accommodation/v1alpha1/search_parameters_types.proto b/proto/cmp/services/accommodation/v1alpha1/search_parameters_types.proto index 421f39a2..ee25b243 100644 --- a/proto/cmp/services/accommodation/v1alpha1/search_parameters_types.proto +++ b/proto/cmp/services/accommodation/v1alpha1/search_parameters_types.proto @@ -4,10 +4,11 @@ package cmp.services.accommodation.v1alpha1; import "cmp/types/v1alpha1/location.proto"; import "cmp/types/v1alpha1/meal_plan.proto"; -import "cmp/types/v1alpha1/rate.proto"; import "cmp/types/v1alpha1/product_code.proto"; +import "cmp/types/v1alpha1/rate.proto"; -// ### Accommodation Search Parameters +// This type is used in search requests for parameters like location, meal plan +// codes etc. // // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1alpha1/search_parameters_types.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1alpha1/search_parameters_types.proto.dot.svg) @@ -46,4 +47,4 @@ message AccommodationSearchParameters { // Product code list // Here a list of property codes would be used repeated cmp.types.v1alpha1.ProductCode product_codes = 9; -} \ No newline at end of file +} diff --git a/proto/cmp/services/accommodation/v1alpha1/search_query_types.proto b/proto/cmp/services/accommodation/v1alpha1/search_query_types.proto new file mode 100644 index 00000000..2e4b21e8 --- /dev/null +++ b/proto/cmp/services/accommodation/v1alpha1/search_query_types.proto @@ -0,0 +1,29 @@ +syntax = "proto3"; + +package cmp.services.accommodation.v1alpha1; + +import "cmp/services/accommodation/v1alpha1/search_parameters_types.proto"; +import "cmp/services/accommodation/v1alpha1/unit_types.proto"; +import "cmp/types/v1alpha1/travel_period.proto"; +import "cmp/types/v1alpha1/traveller.proto"; + +message AccommodationSearchQuery { + // Integer query ID, unique per search request + int32 query_id = 1; + + // Accommodation specific search parameters Ex: Specific search parameters like + // geo location, meal plan, rate plan and rate rules. + AccommodationSearchParameters search_parameters_accommodation = 2; + + // Travel period + cmp.types.v1alpha1.TravelPeriod travel_period = 3; + + // Travellers + repeated cmp.types.v1alpha1.Traveller travellers = 4; + + // Total number of rooms / holiday homes + int32 unit_count = 5; + + // Type of the unit, like room or holiday home + UnitType unit_type = 6; +} diff --git a/proto/cmp/services/accommodation/v1alpha1/search_result_types.proto b/proto/cmp/services/accommodation/v1alpha1/search_result_types.proto index 9faf1c14..284fb2c1 100644 --- a/proto/cmp/services/accommodation/v1alpha1/search_result_types.proto +++ b/proto/cmp/services/accommodation/v1alpha1/search_result_types.proto @@ -7,8 +7,6 @@ import "cmp/types/v1alpha1/cancel_policy.proto"; import "cmp/types/v1alpha1/price.proto"; import "cmp/types/v1alpha1/rate.proto"; -// ### Search result type for Accommodation Search Service -// // This type represents a search result and is used in the // `AccommodationSearchResponse` message. // @@ -19,18 +17,21 @@ message AccommodationSearchResult { // increasing by 1 for every search result. int32 result_id = 1; + // This field represents the query ID associated with the search result. + int32 query_id = 2; + // Units for this search result - repeated Unit units = 2; + repeated Unit units = 3; // ## Total price in detail, with breakdowns - cmp.types.v1alpha1.PriceDetail total_price_detail = 3; + cmp.types.v1alpha1.PriceDetail total_price_detail = 4; // The RateRule specifies whether a search result is non-refundable or not - repeated cmp.types.v1alpha1.RateRule rate_rules = 4; + repeated cmp.types.v1alpha1.RateRule rate_rules = 5; // The cancellation conditions related to an option - cmp.types.v1alpha1.CancelPolicy cancel_policy = 5; + cmp.types.v1alpha1.CancelPolicy cancel_policy = 6; // Freetext remarks without any functionality - string remarks = 6; + string remarks = 7; } diff --git a/proto/cmp/services/accommodation/v1alpha1/unit_types.proto b/proto/cmp/services/accommodation/v1alpha1/unit_types.proto index de222de8..64788448 100644 --- a/proto/cmp/services/accommodation/v1alpha1/unit_types.proto +++ b/proto/cmp/services/accommodation/v1alpha1/unit_types.proto @@ -2,18 +2,19 @@ syntax = "proto3"; package cmp.services.accommodation.v1alpha1; +import "cmp/types/v1alpha1/bed.proto"; import "cmp/types/v1alpha1/cancel_policy.proto"; import "cmp/types/v1alpha1/meal_plan.proto"; import "cmp/types/v1alpha1/price.proto"; +import "cmp/types/v1alpha1/product_code.proto"; import "cmp/types/v1alpha1/rate.proto"; import "cmp/types/v1alpha1/service_fact.proto"; import "cmp/types/v1alpha1/travel_period.proto"; import "cmp/types/v1alpha1/traveller.proto"; -// ### Unit -// // A Unit can represent a room in a hotel. One search option can have multiple units // for multi-room requests Ex: one request for 2 rooms for 4 adults, 2 in each room. +// // A unit can also be a different property in a multi-property request for holiday // homes. Ex: 1 house for 4 persons and another house for 6 persons. // @@ -38,7 +39,7 @@ message Unit { repeated cmp.types.v1alpha1.Traveller travellers = 5; // Beds - repeated Bed beds = 6; + repeated cmp.types.v1alpha1.Bed beds = 6; // Price in detail with breakdowns etc cmp.types.v1alpha1.PriceDetail price_detail = 7; @@ -57,8 +58,8 @@ message Unit { // Rate Rule cmp.types.v1alpha1.RateRule rate_rule = 13; - // Cancel Policies - // This is a list so that various policies can be expressed + // This is a list so that various policies can be expressed. + // // Ex: 10-5 days before arrival x€, 4-1 days before arrival y€ and 0 days before // arrival z€ repeated cmp.types.v1alpha1.CancelPolicy cancel_policies = 14; @@ -66,26 +67,14 @@ message Unit { // Remaining units int32 remaining_units = 15; - // Propert code - string property_code = 16; + // Property code + cmp.types.v1alpha1.ProductCode property_code = 16; // Remarks // FIXME: Is this field "per Unit" or should it be "per search request"? string remarks = 17; } -message Bed { - BedType type = 1; - int32 count = 2; -} - -enum BedType { - BED_TYPE_UNSPECIFIED = 0; - BED_TYPE_SINGLE = 1; - BED_TYPE_DOUBLE = 2; - BED_TYPE_KING = 3; -} - enum UnitType { UNIT_TYPE_UNSPECIFIED = 0; UNIT_TYPE_ROOM = 1; diff --git a/proto/cmp/services/activity/v1alpha1/search_result_types.proto b/proto/cmp/services/activity/v1alpha1/search_result_types.proto index 69c325a5..6c52d004 100644 --- a/proto/cmp/services/activity/v1alpha1/search_result_types.proto +++ b/proto/cmp/services/activity/v1alpha1/search_result_types.proto @@ -8,10 +8,9 @@ import "cmp/types/v1alpha1/location.proto"; import "cmp/types/v1alpha1/price.proto"; import "google/protobuf/timestamp.proto"; -// ### Search option type for Activity Search Service +// This type represents a search result and is used in the `ActivitySearchResponse` +// message. // -// This type represents a search result and is used in the -// `ActivitySearchResponse` message. // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/activity/v1alpha1/search_option_types.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/activity/v1alpha1/search_option_types.proto.dot.svg) message ActivitySearchResult { @@ -115,7 +114,7 @@ message PickupDropoffEvent { // Ex: "OTHERS / Parking Varadero(bus stop css nº50)", string other_info = 4; - // Ex: "2023-07-15T09:05:00" + // Datetime of the pickup dropoff event as Unix timestamp google.protobuf.Timestamp date_time = 5; } diff --git a/proto/cmp/services/transport/v1alpha1/search.proto b/proto/cmp/services/transport/v1alpha1/search.proto index 9b928802..4409581a 100644 --- a/proto/cmp/services/transport/v1alpha1/search.proto +++ b/proto/cmp/services/transport/v1alpha1/search.proto @@ -11,13 +11,11 @@ syntax = "proto3"; // This package is a WIP. package cmp.services.transport.v1alpha1; -import "cmp/services/transport/v1alpha1/search_parameters_types.proto"; +import "cmp/services/transport/v1alpha1/search_query_types.proto"; import "cmp/services/transport/v1alpha1/search_result_types.proto"; import "cmp/services/transport/v1alpha1/source_types.proto"; -import "cmp/services/transport/v1alpha1/trip_types.proto"; import "cmp/types/v1alpha1/common.proto"; import "cmp/types/v1alpha1/search.proto"; -import "cmp/types/v1alpha1/traveller.proto"; // ### Transport Search Request message TransportSearchRequest { @@ -34,36 +32,16 @@ message TransportSearchRequest { // options. cmp.types.v1alpha1.SearchParameters search_parameters = 3; - // Transport specific search parameters - // - // Ex: ?? - TransportSearchParameters search_parameters_transport = 4; - // Content source types for this search request to specify which sources to // include. // // Ex: ContentSourceType.CONTENT_SOURCE_TYPE_GDS, // ContentSourceType.CONTENT_SOURCE_TYPE_NDC // ContentSourceType.CONTENT_SOURCE_TYPE_3RD_PARTY - repeated ContentSourceType conten_source_types = 5; - - // Travellers - repeated cmp.types.v1alpha1.Traveller travellers = 6; + repeated ContentSourceType conten_source_types = 4; - // Travelling trip - // - // To avoid confusion of the direction of travel that occurs with terms like - // "inbound" and "outbound". The travelling trip is also used for "one way" in - // which case the returning trip is omitted. For tours or roadtrips, multiple - // requests with just a travelling trip for sequential dates can be submitted to - // specific suppliers of each part of tour or roadtrip. - Trip travelling_trip = 7; - - // Returning trip - // - // In many cases our travel plans consist of going to a destination and return to - // the same place where we started - Trip returning_trip = 8; + // Multiple search queries for this search request + repeated TransportSearchQuery queries = 5; // Remarks string remarks = 9; @@ -88,7 +66,7 @@ message TransportSearchResponse { repeated TransportSearchResult results = 4; } -// ### Transport Search Service +// Transport Search Service definition. // // Takes `TransportSearchRequest` message type and returns `TransportSearchResponse` // message type. diff --git a/proto/cmp/services/transport/v1alpha1/search_parameters_types.proto b/proto/cmp/services/transport/v1alpha1/search_parameters_types.proto index abf1ca09..a63b6772 100644 --- a/proto/cmp/services/transport/v1alpha1/search_parameters_types.proto +++ b/proto/cmp/services/transport/v1alpha1/search_parameters_types.proto @@ -2,9 +2,9 @@ syntax = "proto3"; package cmp.services.transport.v1alpha1; -import "cmp/types/v1alpha1/time.proto"; import "cmp/types/v1alpha1/price.proto"; import "cmp/types/v1alpha1/product_code.proto"; +import "cmp/types/v1alpha1/time.proto"; // ### Transport Search Parameters // @@ -15,45 +15,48 @@ message TransportSearchParameters { // Ex: "SF" repeated cmp.types.v1alpha1.ProductCode product_codes = 1; - // Duration - // Specify the minimal and maximum duration of an activity to be included in the search response + // The minimum duration of a transport to be included in the search response cmp.types.v1alpha1.Time min_duration = 2; + + // The maximum duration of a transport to be included in the search response cmp.types.v1alpha1.Time max_duration = 3; - // Pricerange - // Specify the minimum and maximum price of an activity to be included in the search response + // The minimum price of a transport to be included in the search response cmp.types.v1alpha1.Price min_price = 4; + + // The maximum price of a transport to be included in the search response cmp.types.v1alpha1.Price max_price = 5; - // Brandcode - // Specify one or more brand codes or distribution channels for which assigned product is + // One or more brand codes or distribution channels for which assigned product is // to be included in the search response - repeated string brand_code = 6; + repeated cmp.types.v1alpha1.ProductCode brand_code = 6; - // Maximum number of segments - // Specify the maximum number of segments a trip might be containing - // if only a direct flight, transfer or train journey the maximum number of segments is set to one. - int32 max_segments = 7; + // The maximum number of segments a trip might be containing, if only a direct + // flight, transfer, or train journey the maximum number of segments is set to + // one. + int32 max_segments = 7; - // Travelling - // Specify the departure and/or arrival time of the trip + // Minimum departure time of the travelling trip cmp.types.v1alpha1.Time travelling_min_departure_time = 8; + + // Maximum departure time of the travelling trip cmp.types.v1alpha1.Time travelling_max_departure_time = 9; + + // Minimum arrival time of the travelling trip cmp.types.v1alpha1.Time travelling_min_arrival_time = 10; + + // Maximum arrival time of the travelling trip cmp.types.v1alpha1.Time travelling_max_arrival_time = 11; - // Returning - // Specify the departure and/or arrival time of the trip + // Minimum departure time of the returning trip cmp.types.v1alpha1.Time returning_min_departure_time = 12; + + // Maximum departure time of the returning trip cmp.types.v1alpha1.Time returning_max_departure_time = 13; + + // Minimum arrival time of the returning trip cmp.types.v1alpha1.Time returning_min_arrival_time = 14; - cmp.types.v1alpha1.Time returning_max_arrival_time = 15; - // using filters - // filters have a code, a type and a value. - // filters for business class, first class or economy flights can be set using filters and IATA codelist - // filters for private, shuttle, speedyshuttle can be based on GlobalTypes or OTA codelist - // filters for 1st or 2nd class train can be based UIC codes or OTA codelist - // filters can also be set for provider specific codes - // see filter.proto for more details + // Maximum arrival time of the returning trip + cmp.types.v1alpha1.Time returning_max_arrival_time = 15; } diff --git a/proto/cmp/services/transport/v1alpha1/search_query_types.proto b/proto/cmp/services/transport/v1alpha1/search_query_types.proto new file mode 100644 index 00000000..be137fd2 --- /dev/null +++ b/proto/cmp/services/transport/v1alpha1/search_query_types.proto @@ -0,0 +1,37 @@ +syntax = "proto3"; + +package cmp.services.transport.v1alpha1; + +import "cmp/services/transport/v1alpha1/search_parameters_types.proto"; +import "cmp/services/transport/v1alpha1/trip_types.proto"; +import "cmp/types/v1alpha1/traveller.proto"; + +// Transport search query +// +// ![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) +message TransportSearchQuery { + // ID + int32 query_id = 1; + + // Transport specific search parameters + TransportSearchParameters search_parameters_transport = 4; + + // Travellers + repeated cmp.types.v1alpha1.Traveller travellers = 6; + + // Travelling trip + // + // To avoid confusion of the direction of travel that occurs with terms like + // "inbound" and "outbound". The travelling trip is also used for "one way" in + // which case the returning trip is omitted. For tours or roadtrips, multiple + // requests with just a travelling trip for sequential dates can be submitted to + // specific suppliers of each part of tour or roadtrip. + Trip travelling_trip = 7; + + // Returning trip + // + // In many cases our travel plans consist of going to a destination and return to + // the same place where we started. + Trip returning_trip = 8; +} diff --git a/proto/cmp/services/transport/v1alpha1/search_result_types.proto b/proto/cmp/services/transport/v1alpha1/search_result_types.proto index 01f3c4db..711b027a 100644 --- a/proto/cmp/services/transport/v1alpha1/search_result_types.proto +++ b/proto/cmp/services/transport/v1alpha1/search_result_types.proto @@ -13,11 +13,11 @@ import "cmp/types/v1alpha1/traveller.proto"; // Transport search result // -// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/transport/v1alpha1/search_option_types.proto.dot.xs.svg) -// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/transport/v1alpha1/search_option_types.proto.dot.svg) +// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/transport/v1alpha1/search_result_types.proto.dot.xs.svg) +// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/transport/v1alpha1/search_result_types.proto.dot.svg) message TransportSearchResult { - // Unique option ID for this search - int32 option_id = 1; + // Unique result ID + int32 result_id = 1; // Offer ID. // @@ -60,4 +60,4 @@ message TransportSearchResult { // Observations string observations = 14; -} \ No newline at end of file +} diff --git a/proto/cmp/services/transport/v1alpha1/trip_types.proto b/proto/cmp/services/transport/v1alpha1/trip_types.proto index 23033c01..f3070270 100644 --- a/proto/cmp/services/transport/v1alpha1/trip_types.proto +++ b/proto/cmp/services/transport/v1alpha1/trip_types.proto @@ -9,8 +9,6 @@ import "cmp/types/v1alpha1/price.proto"; import "cmp/types/v1alpha1/time.proto"; import "google/protobuf/timestamp.proto"; -// ### Trip message type -// // This message type represents a one way trip, either travelling or returning. // // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/transport/v1alpha1/trip_types.proto.dot.xs.svg) @@ -95,7 +93,7 @@ message TripSegment { // Max PAX // // Ex: `3` - int32 max_max = 13; + int32 max_pax = 13; // Luggage // diff --git a/proto/cmp/types/v1alpha1/bed.proto b/proto/cmp/types/v1alpha1/bed.proto new file mode 100644 index 00000000..01868ed0 --- /dev/null +++ b/proto/cmp/types/v1alpha1/bed.proto @@ -0,0 +1,15 @@ +syntax = "proto3"; + +package cmp.types.v1alpha1; + +message Bed { + BedType type = 1; + int32 count = 2; +} + +enum BedType { + BED_TYPE_UNSPECIFIED = 0; + BED_TYPE_SINGLE = 1; + BED_TYPE_DOUBLE = 2; + BED_TYPE_KING = 3; +} diff --git a/proto/cmp/types/v1alpha1/description.proto b/proto/cmp/types/v1alpha1/description.proto new file mode 100644 index 00000000..d5015ab7 --- /dev/null +++ b/proto/cmp/types/v1alpha1/description.proto @@ -0,0 +1,21 @@ +syntax = "proto3"; + +package cmp.types.v1alpha1; + +import "cmp/types/v1alpha1/language.proto"; + +message LocalizedDescriptionSet { + // Language + Language language = 1; + + // Desctription set + repeated Description descriptions = 2; +} + +message Description { + // Category of the description like "General", "Amenities". + string category = 1; + + // Description text + string text = 2; +} diff --git a/proto/cmp/types/v1alpha1/file.proto b/proto/cmp/types/v1alpha1/file.proto new file mode 100644 index 00000000..ac9b93ab --- /dev/null +++ b/proto/cmp/types/v1alpha1/file.proto @@ -0,0 +1,64 @@ +syntax = "proto3"; + +package cmp.types.v1alpha1; + +import "google/protobuf/timestamp.proto"; + +message File { + // file name + string name = 1; + + // URL + string url = 2; + + // Last modification time + google.protobuf.Timestamp last_modified = 3; +} + +message Image { + // file + File file = 1; + + // Width + int32 width = 2; + + // Height + int32 height = 3; + + // Category + // + // FIXME: Enum? + string category = 6; +} + +message Video { + // File + File file = 1; + + // Codec of video + string codec = 2; + + // Bitrate in kbps + int32 bitrate = 3; + + // Framerate + int32 framerate = 4; + + // Aspect ratio as a string with format "int:int". Ex: "16:9" + string aspect_ratio = 5; + + // Resolution. Ex: "720p", "4K" + // + // FIXME: Why don't we just use width and height? + string resolution = 6; + + // Container format. Ex: "MP4" + // + // FIXME: Enum? + string format = 7; + + // Category + // + // FIXME: Enum? + string category = 8; +} diff --git a/proto/cmp/types/v1alpha1/meal_plan.proto b/proto/cmp/types/v1alpha1/meal_plan.proto index fcc0b1fb..3bcdbc53 100644 --- a/proto/cmp/types/v1alpha1/meal_plan.proto +++ b/proto/cmp/types/v1alpha1/meal_plan.proto @@ -4,8 +4,8 @@ package cmp.types.v1alpha1; // Meal Plan message type // -// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/mealplan.proto.dot.xs.svg) -// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/mealplan.proto.dot.svg) +// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/meal_plan.proto.dot.xs.svg) +// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/meal_plan.proto.dot.svg) message MealPlan { // Meal Plan Code // diff --git a/proto/cmp/types/v1alpha1/phone.proto b/proto/cmp/types/v1alpha1/phone.proto index 24d4e97b..73e4f6c3 100644 --- a/proto/cmp/types/v1alpha1/phone.proto +++ b/proto/cmp/types/v1alpha1/phone.proto @@ -2,9 +2,7 @@ syntax = "proto3"; package cmp.types.v1alpha1; -// Phone -// -// Phone type for hotels, holiday homes etc +// Phone type to be used in various types as hotels, holiday homes etc. // // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/phone.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/phone.proto.dot.svg) diff --git a/proto/cmp/types/v1alpha1/search.proto b/proto/cmp/types/v1alpha1/search.proto index 21be0fa5..f7b9dbed 100644 --- a/proto/cmp/types/v1alpha1/search.proto +++ b/proto/cmp/types/v1alpha1/search.proto @@ -52,33 +52,36 @@ message SearchParameters { string search_description_audio_url = 10; } -// Search Response Metadata +// This message type is used in every search request to contain the request metadata message SearchRequestMetadata { + // Request unique identifier + UUID request_id = 1; + // An identifier for external sessions, aiding in tracking and continuity across // sessions. - string external_session_id = 1; + string external_session_id = 2; } -// Search Response Metadata +// This message type is used in every search response to contain the response metadata message SearchResponseMetadata { + // Search_id to be used in the Validation Request. This must be a UUID according + // to RFC 4122 + UUID search_id = 1; + // Context for Inventory system communication. - string context = 1; + string context = 2; // Errors encountered in the generation of the response. Standardized error list // to be created. - string errors = 2; + string errors = 3; // Warnings encountered in the generation of the response. - string warnings = 3; + string warnings = 4; // Supplier code from the Inventory System for this search response. - string supplier_code = 4; + string supplier_code = 5; // An identifier for external sessions, aiding in tracking and continuity across // sessions. - string external_session_id = 5; - - // Search_id to be used in the Validation Request. This must be a UUID according - // to RFC 4122 - UUID search_id = 6; + string external_session_id = 6; } From 422372c25f27755fd87239ec2621a6bfe1145257 Mon Sep 17 00:00:00 2001 From: Ekrem Seren Date: Mon, 15 Jan 2024 11:20:38 +0300 Subject: [PATCH 2/9] property status to enum and remove cancel policy from room --- .../v1alpha1/property_types.proto | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/proto/cmp/services/accommodation/v1alpha1/property_types.proto b/proto/cmp/services/accommodation/v1alpha1/property_types.proto index 63055652..a1ea330b 100644 --- a/proto/cmp/services/accommodation/v1alpha1/property_types.proto +++ b/proto/cmp/services/accommodation/v1alpha1/property_types.proto @@ -4,7 +4,6 @@ package cmp.services.accommodation.v1alpha1; import "cmp/types/v1alpha1/address.proto"; import "cmp/types/v1alpha1/bed.proto"; -import "cmp/types/v1alpha1/cancel_policy.proto"; import "cmp/types/v1alpha1/description.proto"; import "cmp/types/v1alpha1/email.proto"; import "cmp/types/v1alpha1/file.proto"; @@ -124,8 +123,15 @@ message PropertyExtendedInfo { // Payment type. Ex: "MERCHANT" string payment_type = 7; - // Status. FIXME: This needs to be an enum!? - string status = 8; + // Status + PropertyStatus status = 8; +} + +enum PropertyStatus { + PROPERTY_STATUS_UNSPECIFIED = 0; + PROPERTY_STATUS_DRAFT = 1; + PROPERTY_STATUS_CONFIRMED = 2; + PROPERTY_STATUS_RETIRED = 3; } message Room { @@ -158,12 +164,6 @@ message Room { repeated cmp.types.v1alpha1.ServiceFact included_services = 11; repeated cmp.types.v1alpha1.ServiceFact compulsory_extras = 12; repeated cmp.types.v1alpha1.ServiceFact optional_extras = 13; - - // This is a list so that various policies can be expressed. - // - // Ex: 10-5 days before arrival x€, 4-1 days before arrival y€ and 0 days before - // arrival z€ - repeated cmp.types.v1alpha1.CancelPolicy cancel_policies = 14; } message Occupancy { From d5f9091c74ed7a59587a758454905caf0c643c3c Mon Sep 17 00:00:00 2001 From: Ekrem Seren Date: Mon, 15 Jan 2024 11:42:35 +0300 Subject: [PATCH 3/9] add accommodation info rq/rs and service --- .../accommodation/v1alpha1/info.proto | 39 +++++++++++++++++++ .../v1alpha1/property_types.proto | 3 ++ 2 files changed, 42 insertions(+) create mode 100644 proto/cmp/services/accommodation/v1alpha1/info.proto diff --git a/proto/cmp/services/accommodation/v1alpha1/info.proto b/proto/cmp/services/accommodation/v1alpha1/info.proto new file mode 100644 index 00000000..277217e8 --- /dev/null +++ b/proto/cmp/services/accommodation/v1alpha1/info.proto @@ -0,0 +1,39 @@ +syntax = "proto3"; + +package cmp.services.accommodation.v1alpha1; + +import "cmp/services/accommodation/v1alpha1/property_types.proto"; +import "cmp/types/v1alpha1/common.proto"; +import "cmp/types/v1alpha1/language.proto"; +import "google/protobuf/timestamp.proto"; + +message AccommodationProductInfoRequest { + // Message header + cmp.types.v1alpha1.Header header = 1; + + // Only respond with the products that are modified after this timestamp + google.protobuf.Timestamp modified_after = 2; + + // Languages + repeated cmp.types.v1alpha1.Language languages = 3; + + // Property codes + repeated string propert_codes = 4; +} + +message AccommodationProductInfoResponse { + // Message header + cmp.types.v1alpha1.Header header = 1; + + // Product list: Properties + repeated PropertyExtendedInfo properties = 2; +} + +// Accommodation product info service definition +// +// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1alpha1/info.proto.dot.xs.svg) +// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1alpha1/info.proto.dot.svg) +service AccommodationProductInfoService { + // Returns product list for accommodation (properties) + rpc AccommodationProductInfo(AccommodationProductInfoRequest) returns (AccommodationProductInfoResponse); +} diff --git a/proto/cmp/services/accommodation/v1alpha1/property_types.proto b/proto/cmp/services/accommodation/v1alpha1/property_types.proto index a1ea330b..a70f3031 100644 --- a/proto/cmp/services/accommodation/v1alpha1/property_types.proto +++ b/proto/cmp/services/accommodation/v1alpha1/property_types.proto @@ -125,6 +125,9 @@ message PropertyExtendedInfo { // Status PropertyStatus status = 8; + + // Rooms + repeated Room rooms = 9; } enum PropertyStatus { From 6aa0376111166751201c7dbad6f74c02ee09bc1c Mon Sep 17 00:00:00 2001 From: Ekrem Seren Date: Mon, 15 Jan 2024 18:35:51 +0300 Subject: [PATCH 4/9] implement multiple queries for transport, refactor service fact WIP accommodation product info --- .../accommodation/v1alpha1/list.proto | 2 +- .../v1alpha1/property_types.proto | 19 +++----- .../accommodation/v1alpha1/unit_types.proto | 20 ++++----- .../services/transport/v1alpha1/search.proto | 16 ++----- .../v1alpha1/search_parameters_types.proto | 28 ++++-------- .../v1alpha1/search_query_types.proto | 42 +++++++++-------- .../v1alpha1/search_result_types.proto | 14 +++--- .../transport/v1alpha1/trip_types.proto | 34 +++++--------- .../v1alpha1/content_source.proto} | 6 +-- proto/cmp/types/v1alpha1/search.proto | 9 ++++ proto/cmp/types/v1alpha1/service_fact.proto | 45 +++++++++---------- 11 files changed, 101 insertions(+), 134 deletions(-) rename proto/cmp/{services/transport/v1alpha1/source_types.proto => types/v1alpha1/content_source.proto} (68%) diff --git a/proto/cmp/services/accommodation/v1alpha1/list.proto b/proto/cmp/services/accommodation/v1alpha1/list.proto index 44977af6..5c7b0a73 100644 --- a/proto/cmp/services/accommodation/v1alpha1/list.proto +++ b/proto/cmp/services/accommodation/v1alpha1/list.proto @@ -22,7 +22,7 @@ message AccommodationProductListResponse { repeated Property properties = 2; } -// ### Accommodation Product List Service +// Accommodation product list service definition // // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1alpha1/list.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1alpha1/list.proto.dot.svg) diff --git a/proto/cmp/services/accommodation/v1alpha1/property_types.proto b/proto/cmp/services/accommodation/v1alpha1/property_types.proto index a70f3031..d5521a81 100644 --- a/proto/cmp/services/accommodation/v1alpha1/property_types.proto +++ b/proto/cmp/services/accommodation/v1alpha1/property_types.proto @@ -10,7 +10,6 @@ import "cmp/types/v1alpha1/file.proto"; import "cmp/types/v1alpha1/location.proto"; import "cmp/types/v1alpha1/meal_plan.proto"; import "cmp/types/v1alpha1/phone.proto"; -import "cmp/types/v1alpha1/rate.proto"; import "cmp/types/v1alpha1/service_fact.proto"; import "cmp/types/v1alpha1/traveller.proto"; import "google/protobuf/timestamp.proto"; @@ -134,7 +133,7 @@ enum PropertyStatus { PROPERTY_STATUS_UNSPECIFIED = 0; PROPERTY_STATUS_DRAFT = 1; PROPERTY_STATUS_CONFIRMED = 2; - PROPERTY_STATUS_RETIRED = 3; + PROPERTY_STATUS_EXPIRED = 3; } message Room { @@ -147,26 +146,18 @@ message Room { repeated cmp.types.v1alpha1.LocalizedDescriptionSet descriptions = 5; // Meal plan (Board code) - cmp.types.v1alpha1.MealPlan meal_plan = 6; + repeated cmp.types.v1alpha1.MealPlan meal_plan = 6; // FIXME: Need board description & amenities here - // Rate plans - repeated cmp.types.v1alpha1.RatePlan rate_plans = 7; - - // Rate Rule - repeated cmp.types.v1alpha1.RateRule rate_rules = 8; - // Beds - repeated cmp.types.v1alpha1.Bed beds = 9; + repeated cmp.types.v1alpha1.Bed beds = 7; // Occupancy - Occupancy occupancy = 10; + Occupancy total_occupancy = 8; // Services - repeated cmp.types.v1alpha1.ServiceFact included_services = 11; - repeated cmp.types.v1alpha1.ServiceFact compulsory_extras = 12; - repeated cmp.types.v1alpha1.ServiceFact optional_extras = 13; + repeated cmp.types.v1alpha1.ServiceFact services = 9; } message Occupancy { diff --git a/proto/cmp/services/accommodation/v1alpha1/unit_types.proto b/proto/cmp/services/accommodation/v1alpha1/unit_types.proto index 64788448..24386dd7 100644 --- a/proto/cmp/services/accommodation/v1alpha1/unit_types.proto +++ b/proto/cmp/services/accommodation/v1alpha1/unit_types.proto @@ -41,38 +41,36 @@ message Unit { // Beds repeated cmp.types.v1alpha1.Bed beds = 6; - // Price in detail with breakdowns etc + // Price in detail with breakdowns cmp.types.v1alpha1.PriceDetail price_detail = 7; // 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 services = 8; // Mealplan code - cmp.types.v1alpha1.MealPlan meal_plan_code = 11; + cmp.types.v1alpha1.MealPlan meal_plan_code = 9; // Rate plan - cmp.types.v1alpha1.RatePlan rate_plan = 12; + cmp.types.v1alpha1.RatePlan rate_plan = 10; // Rate Rule - cmp.types.v1alpha1.RateRule rate_rule = 13; + cmp.types.v1alpha1.RateRule rate_rule = 11; // This is a list so that various policies can be expressed. // // Ex: 10-5 days before arrival x€, 4-1 days before arrival y€ and 0 days before // arrival z€ - repeated cmp.types.v1alpha1.CancelPolicy cancel_policies = 14; + repeated cmp.types.v1alpha1.CancelPolicy cancel_policies = 12; // Remaining units - int32 remaining_units = 15; + int32 remaining_units = 13; // Property code - cmp.types.v1alpha1.ProductCode property_code = 16; + cmp.types.v1alpha1.ProductCode property_code = 14; // Remarks // FIXME: Is this field "per Unit" or should it be "per search request"? - string remarks = 17; + string remarks = 15; } enum UnitType { diff --git a/proto/cmp/services/transport/v1alpha1/search.proto b/proto/cmp/services/transport/v1alpha1/search.proto index 4409581a..096f4314 100644 --- a/proto/cmp/services/transport/v1alpha1/search.proto +++ b/proto/cmp/services/transport/v1alpha1/search.proto @@ -13,8 +13,8 @@ package cmp.services.transport.v1alpha1; import "cmp/services/transport/v1alpha1/search_query_types.proto"; import "cmp/services/transport/v1alpha1/search_result_types.proto"; -import "cmp/services/transport/v1alpha1/source_types.proto"; import "cmp/types/v1alpha1/common.proto"; +import "cmp/types/v1alpha1/content_source.proto"; import "cmp/types/v1alpha1/search.proto"; // ### Transport Search Request @@ -32,19 +32,11 @@ message TransportSearchRequest { // options. cmp.types.v1alpha1.SearchParameters search_parameters = 3; - // Content source types for this search request to specify which sources to - // include. - // - // Ex: ContentSourceType.CONTENT_SOURCE_TYPE_GDS, - // ContentSourceType.CONTENT_SOURCE_TYPE_NDC - // ContentSourceType.CONTENT_SOURCE_TYPE_3RD_PARTY - repeated ContentSourceType conten_source_types = 4; - // Multiple search queries for this search request - repeated TransportSearchQuery queries = 5; + repeated TransportSearchQuery queries = 4; // Remarks - string remarks = 9; + string remarks = 5; } message TransportSearchResponse { @@ -60,7 +52,7 @@ message TransportSearchResponse { // Ex: ContentSourceType.CONTENT_SOURCE_TYPE_GDS, // ContentSourceType.CONTENT_SOURCE_TYPE_NDC // ContentSourceType.CONTENT_SOURCE_TYPE_3RD_PARTY - repeated ContentSourceType conten_source_types = 3; + repeated cmp.types.v1alpha1.ContentSourceType conten_source_types = 3; // Transit search results repeated TransportSearchResult results = 4; diff --git a/proto/cmp/services/transport/v1alpha1/search_parameters_types.proto b/proto/cmp/services/transport/v1alpha1/search_parameters_types.proto index a63b6772..156eff81 100644 --- a/proto/cmp/services/transport/v1alpha1/search_parameters_types.proto +++ b/proto/cmp/services/transport/v1alpha1/search_parameters_types.proto @@ -36,27 +36,15 @@ message TransportSearchParameters { // one. int32 max_segments = 7; - // Minimum departure time of the travelling trip - cmp.types.v1alpha1.Time travelling_min_departure_time = 8; + // Minimum departure time of the trip + cmp.types.v1alpha1.Time trip_min_departure_time = 8; - // Maximum departure time of the travelling trip - cmp.types.v1alpha1.Time travelling_max_departure_time = 9; + // Maximum departure time of the trip + cmp.types.v1alpha1.Time trip_max_departure_time = 9; - // Minimum arrival time of the travelling trip - cmp.types.v1alpha1.Time travelling_min_arrival_time = 10; + // Minimum arrival time of the trip + cmp.types.v1alpha1.Time trip_min_arrival_time = 10; - // Maximum arrival time of the travelling trip - cmp.types.v1alpha1.Time travelling_max_arrival_time = 11; - - // Minimum departure time of the returning trip - cmp.types.v1alpha1.Time returning_min_departure_time = 12; - - // Maximum departure time of the returning trip - cmp.types.v1alpha1.Time returning_max_departure_time = 13; - - // Minimum arrival time of the returning trip - cmp.types.v1alpha1.Time returning_min_arrival_time = 14; - - // Maximum arrival time of the returning trip - cmp.types.v1alpha1.Time returning_max_arrival_time = 15; + // Maximum arrival time of the trip + cmp.types.v1alpha1.Time trip_max_arrival_time = 11; } diff --git a/proto/cmp/services/transport/v1alpha1/search_query_types.proto b/proto/cmp/services/transport/v1alpha1/search_query_types.proto index be137fd2..be4b379c 100644 --- a/proto/cmp/services/transport/v1alpha1/search_query_types.proto +++ b/proto/cmp/services/transport/v1alpha1/search_query_types.proto @@ -3,7 +3,8 @@ syntax = "proto3"; package cmp.services.transport.v1alpha1; import "cmp/services/transport/v1alpha1/search_parameters_types.proto"; -import "cmp/services/transport/v1alpha1/trip_types.proto"; +import "cmp/types/v1alpha1/date.proto"; +import "cmp/types/v1alpha1/location.proto"; import "cmp/types/v1alpha1/traveller.proto"; // Transport search query @@ -15,23 +16,28 @@ message TransportSearchQuery { int32 query_id = 1; // Transport specific search parameters - TransportSearchParameters search_parameters_transport = 4; + TransportSearchParameters search_parameters_transport = 2; // Travellers - repeated cmp.types.v1alpha1.Traveller travellers = 6; - - // Travelling trip - // - // To avoid confusion of the direction of travel that occurs with terms like - // "inbound" and "outbound". The travelling trip is also used for "one way" in - // which case the returning trip is omitted. For tours or roadtrips, multiple - // requests with just a travelling trip for sequential dates can be submitted to - // specific suppliers of each part of tour or roadtrip. - Trip travelling_trip = 7; - - // Returning trip - // - // In many cases our travel plans consist of going to a destination and return to - // the same place where we started. - Trip returning_trip = 8; + repeated cmp.types.v1alpha1.Traveller travellers = 3; + + // Trips + repeated QueryTrip trips = 4; +} + +message QueryTrip { + // Departure event + QueryTransitEvent departure = 1; + + // Arrival event + QueryTransitEvent arrival = 2; +} + +// Represents a departure or arrival event +message QueryTransitEvent { + // Date time of the event + cmp.types.v1alpha1.Date date = 1; + + // Event location + cmp.types.v1alpha1.LocationCode location_code = 2; } diff --git a/proto/cmp/services/transport/v1alpha1/search_result_types.proto b/proto/cmp/services/transport/v1alpha1/search_result_types.proto index 711b027a..b208da5c 100644 --- a/proto/cmp/services/transport/v1alpha1/search_result_types.proto +++ b/proto/cmp/services/transport/v1alpha1/search_result_types.proto @@ -38,26 +38,24 @@ message TransportSearchResult { cmp.types.v1alpha1.PriceDetail total_price = 6; // 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 services = 7; // Rate Rules - repeated cmp.types.v1alpha1.RateRule rate_rules = 10; + repeated cmp.types.v1alpha1.RateRule rate_rules = 8; // Fulfillment - repeated cmp.types.v1alpha1.Fulfillment fulfillments = 11; //FIXME: Can linktype be an ENUM? + repeated cmp.types.v1alpha1.Fulfillment fulfillments = 9; //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 = 10; // Cancel Policy - cmp.types.v1alpha1.CancelPolicy cancel_policy = 13; + cmp.types.v1alpha1.CancelPolicy cancel_policy = 11; // Observations - string observations = 14; + string observations = 12; } diff --git a/proto/cmp/services/transport/v1alpha1/trip_types.proto b/proto/cmp/services/transport/v1alpha1/trip_types.proto index f3070270..2a3650dc 100644 --- a/proto/cmp/services/transport/v1alpha1/trip_types.proto +++ b/proto/cmp/services/transport/v1alpha1/trip_types.proto @@ -14,24 +14,25 @@ import "google/protobuf/timestamp.proto"; // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/transport/v1alpha1/trip_types.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/transport/v1alpha1/trip_types.proto.dot.svg) message Trip { - // Departure min time - google.protobuf.Timestamp departure_min_time = 1; - - // Departure max time - google.protobuf.Timestamp departure_max_time = 2; - // Departure event - TransitEvent departure = 3; + TransitEvent departure = 1; // Arrival event - TransitEvent arrival = 4; + TransitEvent arrival = 2; // Trip segments - repeated TripSegment trip_segments = 5; + repeated TripSegment segments = 3; +} + +// Represents a departure or arrival event +message TransitEvent { + // Date time of the event + google.protobuf.Timestamp date_time = 1; + + // Event location + cmp.types.v1alpha1.LocationCode location_code = 2; } -// ### Trip Segment messag type -// // A segment of a trip message TripSegment { // Segment ID @@ -105,14 +106,3 @@ message TripSegment { // Ex: `Price(net=240, currency=Currency.CURRENCY_EUR) cmp.types.v1alpha1.Price price = 15; } - -// ### Transit Event message type -// -// Represents a departure or arrival event -message TransitEvent { - // Date tim of the event - google.protobuf.Timestamp date_time = 1; - - // Event location - cmp.types.v1alpha1.LocationCode location_code = 2; -} diff --git a/proto/cmp/services/transport/v1alpha1/source_types.proto b/proto/cmp/types/v1alpha1/content_source.proto similarity index 68% rename from proto/cmp/services/transport/v1alpha1/source_types.proto rename to proto/cmp/types/v1alpha1/content_source.proto index 58b18d4c..18f3bebb 100644 --- a/proto/cmp/services/transport/v1alpha1/source_types.proto +++ b/proto/cmp/types/v1alpha1/content_source.proto @@ -1,11 +1,11 @@ syntax = "proto3"; -package cmp.services.transport.v1alpha1; +package cmp.types.v1alpha1; // ### Content Source Type message type // -// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/transport/v1alpha1/source_types.proto.dot.xs.svg) -// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/transport/v1alpha1/source_types.proto.dot.svg) +// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/content_source.proto.dot.xs.svg) +// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/content_source.proto.dot.svg) enum ContentSourceType { CONTENT_SOURCE_TYPE_UNSPECIFIED = 0; CONTENT_SOURCE_TYPE_GDS = 1; diff --git a/proto/cmp/types/v1alpha1/search.proto b/proto/cmp/types/v1alpha1/search.proto index f7b9dbed..3f2d578e 100644 --- a/proto/cmp/types/v1alpha1/search.proto +++ b/proto/cmp/types/v1alpha1/search.proto @@ -2,6 +2,7 @@ syntax = "proto3"; package cmp.types.v1alpha1; +import "cmp/types/v1alpha1/content_source.proto"; import "cmp/types/v1alpha1/country.proto"; import "cmp/types/v1alpha1/currency.proto"; import "cmp/types/v1alpha1/filter.proto"; @@ -50,6 +51,14 @@ message SearchParameters { // personalization. This field can be provided in combination with a Geo location // or as stand-alone. string search_description_audio_url = 10; + + // Content source types for this search request to specify which sources to + // include. + // + // Ex: ContentSourceType.CONTENT_SOURCE_TYPE_GDS, + // ContentSourceType.CONTENT_SOURCE_TYPE_NDC + // ContentSourceType.CONTENT_SOURCE_TYPE_3RD_PARTY + repeated ContentSourceType content_source_types = 11; } // This message type is used in every search request to contain the request metadata diff --git a/proto/cmp/types/v1alpha1/service_fact.proto b/proto/cmp/types/v1alpha1/service_fact.proto index 4610522e..bf53eef9 100644 --- a/proto/cmp/types/v1alpha1/service_fact.proto +++ b/proto/cmp/types/v1alpha1/service_fact.proto @@ -4,35 +4,30 @@ package cmp.types.v1alpha1; import "cmp/types/v1alpha1/price.proto"; -// Service Fact +// Service fact message type // -// Example: -// -// ```json -// { -// "description" : "Electricity (price per kWh)", -// "price" : { -// "net": 100, -// "currency": Currency.CURRENCY_EURO -// }, -// }, -// { -// "description" : "Local tax (16+) (price per person/day)", -// "price" : { -// "net": 2, -// "currency": Currency.CURRENCY_EURO -// }, -// }, -// { -// "description" : "Laundry (initial supply of bed linen and towels)" -// }, -// { -// "description" : "Wireless internet access (WIFI)" -// }, -// ``` // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/service_fact.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/service_fact.proto.dot.svg) message ServiceFact { string description = 1; PriceDetail price_detail = 2; + ServiceAvailabilityType availability_type = 3; + ChargeBasisType charge_basis = 4; +} + +enum ServiceAvailabilityType { + SERVICE_AVAILABILITY_TYPE_UNSPECIFIED = 0; + SERVICE_AVAILABILITY_TYPE_INCLUDED = 1; + SERVICE_AVAILABILITY_TYPE_COMPULSORY = 2; + SERVICE_AVAILABILITY_TYPE_OPTIONAL = 3; +} + +enum ChargeBasisType { + CHARGE_BASIS_TYPE_UNSPECIFIED = 0; + CHARGE_BASIS_TYPE_PER_PAX = 1; + CHARGE_BASIS_TYPE_PER_PAX_PER_DAY = 2; + CHARGE_BASIS_TYPE_PER_UNIT = 3; + CHARGE_BASIS_TYPE_PER_UNIT_PER_DAY = 4; + CHARGE_BASIS_TYPE_PER_DAY = 5; + CHARGE_BASIS_TYPE_ONCE = 6; } From 1e2fa9add6756ed2f627effced0780a5faf487bf Mon Sep 17 00:00:00 2001 From: Ekrem Seren Date: Mon, 15 Jan 2024 21:26:54 +0300 Subject: [PATCH 5/9] Pull transport search parameters in QueryTrip --- .../v1alpha1/search_query_types.proto | 27 +++++++++++++------ proto/cmp/types/v1alpha1/bed.proto | 2 ++ proto/cmp/types/v1alpha1/currency.proto | 2 +- proto/cmp/types/v1alpha1/description.proto | 2 ++ proto/cmp/types/v1alpha1/file.proto | 2 ++ 5 files changed, 26 insertions(+), 9 deletions(-) diff --git a/proto/cmp/services/transport/v1alpha1/search_query_types.proto b/proto/cmp/services/transport/v1alpha1/search_query_types.proto index be4b379c..cd335238 100644 --- a/proto/cmp/services/transport/v1alpha1/search_query_types.proto +++ b/proto/cmp/services/transport/v1alpha1/search_query_types.proto @@ -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; diff --git a/proto/cmp/types/v1alpha1/bed.proto b/proto/cmp/types/v1alpha1/bed.proto index 01868ed0..1df5eacc 100644 --- a/proto/cmp/types/v1alpha1/bed.proto +++ b/proto/cmp/types/v1alpha1/bed.proto @@ -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; diff --git a/proto/cmp/types/v1alpha1/currency.proto b/proto/cmp/types/v1alpha1/currency.proto index 94e2abff..2d1ca941 100644 --- a/proto/cmp/types/v1alpha1/currency.proto +++ b/proto/cmp/types/v1alpha1/currency.proto @@ -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. diff --git a/proto/cmp/types/v1alpha1/description.proto b/proto/cmp/types/v1alpha1/description.proto index d5015ab7..e65dc289 100644 --- a/proto/cmp/types/v1alpha1/description.proto +++ b/proto/cmp/types/v1alpha1/description.proto @@ -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; diff --git a/proto/cmp/types/v1alpha1/file.proto b/proto/cmp/types/v1alpha1/file.proto index ac9b93ab..775b987d 100644 --- a/proto/cmp/types/v1alpha1/file.proto +++ b/proto/cmp/types/v1alpha1/file.proto @@ -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; From 9f834e5fca3c115b4609589efc73037d5bf2d8d4 Mon Sep 17 00:00:00 2001 From: Ekrem Seren Date: Mon, 15 Jan 2024 21:41:56 +0300 Subject: [PATCH 6/9] we need a query id in the result --- .../v1alpha1/search_result_types.proto | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/proto/cmp/services/transport/v1alpha1/search_result_types.proto b/proto/cmp/services/transport/v1alpha1/search_result_types.proto index b208da5c..689f4d94 100644 --- a/proto/cmp/services/transport/v1alpha1/search_result_types.proto +++ b/proto/cmp/services/transport/v1alpha1/search_result_types.proto @@ -19,43 +19,46 @@ message TransportSearchResult { // Unique result ID int32 result_id = 1; + // Query ID is the id of the query this result is generated for + int32 query_id = 2; + // Offer ID. // // Option to carry through an offer identifier for other stateful provider systems // like NDC AirShopping RS - string offer_id = 2; + string offer_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 services = 7; + repeated cmp.types.v1alpha1.ServiceFact services = 8; // Rate Rules - repeated cmp.types.v1alpha1.RateRule rate_rules = 8; + repeated cmp.types.v1alpha1.RateRule rate_rules = 9; // Fulfillment - repeated cmp.types.v1alpha1.Fulfillment fulfillments = 9; //FIXME: Can linktype be an ENUM? + repeated cmp.types.v1alpha1.Fulfillment fulfillments = 10; //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 = 10; + cmp.types.v1alpha1.DateTimeRange validity = 11; // Cancel Policy - cmp.types.v1alpha1.CancelPolicy cancel_policy = 11; + cmp.types.v1alpha1.CancelPolicy cancel_policy = 12; // Observations - string observations = 12; + string observations = 13; } From 1e426a262be38bf1b238a0d3b5af6d5fe025db3c Mon Sep 17 00:00:00 2001 From: Ekrem Seren Date: Mon, 15 Jan 2024 22:08:35 +0300 Subject: [PATCH 7/9] revert incorrect type for brand_code --- .../services/transport/v1alpha1/search_parameters_types.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/cmp/services/transport/v1alpha1/search_parameters_types.proto b/proto/cmp/services/transport/v1alpha1/search_parameters_types.proto index 156eff81..19640899 100644 --- a/proto/cmp/services/transport/v1alpha1/search_parameters_types.proto +++ b/proto/cmp/services/transport/v1alpha1/search_parameters_types.proto @@ -29,7 +29,7 @@ message TransportSearchParameters { // One or more brand codes or distribution channels for which assigned product is // to be included in the search response - repeated cmp.types.v1alpha1.ProductCode brand_code = 6; + repeated string brand_code = 6; // The maximum number of segments a trip might be containing, if only a direct // flight, transfer, or train journey the maximum number of segments is set to From c06235d822ee554471e3655143b46793ab5b8779 Mon Sep 17 00:00:00 2001 From: Ekrem Seren Date: Wed, 17 Jan 2024 16:56:14 +0300 Subject: [PATCH 8/9] add amenities to accomodation extended info's room type --- .../accommodation/v1alpha1/info.proto | 2 +- .../v1alpha1/property_types.proto | 6 +++-- proto/cmp/types/v1alpha1/amenity.proto | 26 +++++++++++++++++++ 3 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 proto/cmp/types/v1alpha1/amenity.proto diff --git a/proto/cmp/services/accommodation/v1alpha1/info.proto b/proto/cmp/services/accommodation/v1alpha1/info.proto index 277217e8..7b6734fa 100644 --- a/proto/cmp/services/accommodation/v1alpha1/info.proto +++ b/proto/cmp/services/accommodation/v1alpha1/info.proto @@ -18,7 +18,7 @@ message AccommodationProductInfoRequest { repeated cmp.types.v1alpha1.Language languages = 3; // Property codes - repeated string propert_codes = 4; + repeated string property_codes = 4; } message AccommodationProductInfoResponse { diff --git a/proto/cmp/services/accommodation/v1alpha1/property_types.proto b/proto/cmp/services/accommodation/v1alpha1/property_types.proto index d5521a81..5dc7ad85 100644 --- a/proto/cmp/services/accommodation/v1alpha1/property_types.proto +++ b/proto/cmp/services/accommodation/v1alpha1/property_types.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package cmp.services.accommodation.v1alpha1; import "cmp/types/v1alpha1/address.proto"; +import "cmp/types/v1alpha1/amenity.proto"; import "cmp/types/v1alpha1/bed.proto"; import "cmp/types/v1alpha1/description.proto"; import "cmp/types/v1alpha1/email.proto"; @@ -148,8 +149,6 @@ message Room { // Meal plan (Board code) repeated cmp.types.v1alpha1.MealPlan meal_plan = 6; - // FIXME: Need board description & amenities here - // Beds repeated cmp.types.v1alpha1.Bed beds = 7; @@ -158,6 +157,9 @@ message Room { // Services repeated cmp.types.v1alpha1.ServiceFact services = 9; + + // Amenities + repeated cmp.types.v1alpha1.Amenity amenities = 10; } message Occupancy { diff --git a/proto/cmp/types/v1alpha1/amenity.proto b/proto/cmp/types/v1alpha1/amenity.proto new file mode 100644 index 00000000..14120bd6 --- /dev/null +++ b/proto/cmp/types/v1alpha1/amenity.proto @@ -0,0 +1,26 @@ +syntax = "proto3"; + +package cmp.types.v1alpha1; + +// Amenity message type +// +// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/amenity.proto.dot.xs.svg) +// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/amenity.proto.dot.svg) +message Amenity { + // Amenity type like INTERNET, POOL, FOOD_BEVERAGE + AmenityType type = 1; + + // Attributes of the amenity + map attributes = 2; +} + +enum AmenityType { + AMENITY_TYPE_UNSPECIFIED = 0; + AMENITY_TYPE_FOOD_AND_DRINK = 1; + AMENITY_TYPE_POOL = 2; + AMENITY_TYPE_BEACH = 3; + AMENITY_TYPE_ATTRACTIONS = 4; + AMENITY_TYPE_THEMES = 5; + AMENITY_TYPE_INTERNET = 6; + AMENITY_TYPE_OTHER = 99; +} From c7dbeb68b23e6688dda1b2fd17dfc040e9a7d2f0 Mon Sep 17 00:00:00 2001 From: Ekrem Seren Date: Wed, 17 Jan 2024 22:22:48 +0300 Subject: [PATCH 9/9] add examples to amenity message --- proto/cmp/types/v1alpha1/amenity.proto | 27 ++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/proto/cmp/types/v1alpha1/amenity.proto b/proto/cmp/types/v1alpha1/amenity.proto index 14120bd6..0b38298a 100644 --- a/proto/cmp/types/v1alpha1/amenity.proto +++ b/proto/cmp/types/v1alpha1/amenity.proto @@ -4,6 +4,33 @@ package cmp.types.v1alpha1; // Amenity message type // +// Examples: +// +// - Amenity message with a single attribute +// +// ```python +// Amenity( +// type = AmenityType.AMENITY_TYPE_THEMES, +// attributes = { +// "theme": "Second-line beach hotel" +// } +// ) +// ``` +// +// - Amenity message with multiple attributes +// +// ```python +// Amenity( +// type = AmenityType.AMENITY_TYPE_INTERNET, +// attributes = { +// "lobby": "WiFi", +// "charge": "extra fee", +// "fee": "20", +// "fee_unit": "EUR" +// } +// ) +// ``` +// // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/amenity.proto.dot.xs.svg) // [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/amenity.proto.dot.svg) message Amenity {