-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
separate search parameters to generic and specific
- Loading branch information
Showing
3 changed files
with
66 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
proto/cmp/services/accommodation/v1alpha1/search_parameters_types.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
syntax = "proto3"; | ||
|
||
package cmp.services.accommodation.v1alpha1; | ||
|
||
import "cmp/types/v1alpha1/location.proto"; | ||
import "cmp/types/v1alpha1/meal_plan.proto"; | ||
import "cmp/types/v1alpha1/rate.proto"; | ||
|
||
// ![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) | ||
message AccommodationSearchParameters { | ||
// Geo Location for search, set only one of the fields at once. | ||
// | ||
// This "one of" field enforces only one of the fields below. They all share memory, | ||
// setting one will remove the others. | ||
oneof geo_location { | ||
// FIXME: Do we need a list of location code here? Other fields are not lists. | ||
cmp.types.v1alpha1.LocationCodes location_codes = 1; | ||
|
||
// Single geographic point represented by two double fields. | ||
cmp.types.v1alpha1.Coordinate location_coordinate = 2; | ||
|
||
// Geo tree type, representted by Country, Region, and City_or_Resort. | ||
cmp.types.v1alpha1.GeoTree location_geo_tree = 3; | ||
|
||
// Geo circle. Represented by a coordinate and a distance for radius | ||
cmp.types.v1alpha1.GeoCircle location_geo_circle = 4; | ||
|
||
// Geo polygon. Represented by a list of coordinate points. | ||
cmp.types.v1alpha1.GeoPolygon location_geo_polygon = 5; | ||
} | ||
|
||
// Mealplan codes | ||
repeated cmp.types.v1alpha1.MealPlan meal_plan_codes = 6; | ||
|
||
// Rate plans | ||
repeated cmp.types.v1alpha1.RatePlan rate_plan = 7; | ||
|
||
// Rate Rules | ||
// FIXME: Did we decided to remove this from SearchParameters? | ||
// FIXME: Maybe some users/distributors would want to search for only | ||
// FIXME: RESELLABLE offers? | ||
repeated cmp.types.v1alpha1.RateRule rate_rules = 8; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters