diff --git a/proto/cmp/services/accommodation/v1alpha1/list.proto b/proto/cmp/services/accommodation/v1alpha1/list.proto index d5a9c958..44977af6 100644 --- a/proto/cmp/services/accommodation/v1alpha1/list.proto +++ b/proto/cmp/services/accommodation/v1alpha1/list.proto @@ -24,8 +24,8 @@ message AccommodationProductListResponse { // ### Accommodation Product List Service // -// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/list.proto.dot.xs.svg) -// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/list.proto.dot.svg) +// ![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) service AccommodationProductListService { // Returns product list for accommodation (properties) rpc AccommodationProductList(AccommodationProductListRequest) returns (AccommodationProductListResponse); diff --git a/proto/cmp/services/transport/v1alpha1/trip_types.proto b/proto/cmp/services/transport/v1alpha1/trip_types.proto index 752e534f..23033c01 100644 --- a/proto/cmp/services/transport/v1alpha1/trip_types.proto +++ b/proto/cmp/services/transport/v1alpha1/trip_types.proto @@ -2,11 +2,11 @@ syntax = "proto3"; package cmp.services.transport.v1alpha1; -import "cmp/types/v1alpha1/distance.proto"; +import "cmp/types/v1alpha1/baggage.proto"; import "cmp/types/v1alpha1/location.proto"; +import "cmp/types/v1alpha1/measurement.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 @@ -84,8 +84,8 @@ message TripSegment { // Trip Distance // - // Ex: `Distance(value=15, unit=DistanceType.DISTANCE_UNIT_KILOMETERS)` - cmp.types.v1alpha1.Distance trip_distance = 11; + // Ex: `Length(value=15, unit=LengthUnit.DISTANCE_UNIT_KILOMETERS)` + cmp.types.v1alpha1.Length trip_distance = 11; // Min PAX // @@ -117,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 index 262b8bf4..b5b9293e 100644 --- a/proto/cmp/types/v1alpha1/baggage.proto +++ b/proto/cmp/types/v1alpha1/baggage.proto @@ -2,6 +2,8 @@ syntax = "proto3"; package cmp.types.v1alpha1; +import "cmp/types/v1alpha1/measurement.proto"; + // Baggage message type // // ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/baggage.proto.dot.xs.svg) @@ -12,22 +14,14 @@ message Baggage { // Enum of allowed baggage types. BaggageType baggage_type = 1; - // 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; + // Maximum number of the specified baggage count allowed for this type + int32 max_count = 2; - // Dimensions - // - // Dimensions unit specification for length, width and height (cm or inches) - DimensionType dimension_type = 5; + // Maximum weith of each of the specified bagage type allowed + Weight max_weight = 3; - // 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; + // Maximum length, width and height of the specified bagage type allowed + Dimension max_dimension = 4; } // Baggage type ENUM type @@ -42,10 +36,3 @@ enum BaggageType { 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 diff --git a/proto/cmp/types/v1alpha1/distance.proto b/proto/cmp/types/v1alpha1/distance.proto deleted file mode 100644 index 2d2a8167..00000000 --- a/proto/cmp/types/v1alpha1/distance.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; - -package cmp.types.v1alpha1; - -// Distance unit and value pair -// -// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/distance.proto.dot.xs.svg) -// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/distance.proto.dot.svg) -message Distance { - int32 value = 1; - DistanceUnit distance_unit = 2; -} - -// Distance Unit -enum DistanceUnit { - DISTANCE_UNIT_UNSPECIFIED = 0; - DISTANCE_UNIT_METERS = 1; - DISTANCE_UNIT_KILOMETERS = 2; - DISTANCE_UNIT_MILES = 3; - DISTANCE_UNIT_FEET = 4; - DISTANCE_UNIT_YARDS = 5; -} diff --git a/proto/cmp/types/v1alpha1/location.proto b/proto/cmp/types/v1alpha1/location.proto index 263488f1..b9c4db5a 100644 --- a/proto/cmp/types/v1alpha1/location.proto +++ b/proto/cmp/types/v1alpha1/location.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package cmp.types.v1alpha1; import "cmp/types/v1alpha1/country.proto"; -import "cmp/types/v1alpha1/distance.proto"; +import "cmp/types/v1alpha1/measurement.proto"; // ### Coordinate // @@ -21,7 +21,7 @@ message Coordinate { // Geo Circle message GeoCircle { cmp.types.v1alpha1.Coordinate center = 1; - cmp.types.v1alpha1.Distance radius = 2; + cmp.types.v1alpha1.Length radius = 2; } // Geo Polygon diff --git a/proto/cmp/types/v1alpha1/measurement.proto b/proto/cmp/types/v1alpha1/measurement.proto new file mode 100644 index 00000000..3c18d7a8 --- /dev/null +++ b/proto/cmp/types/v1alpha1/measurement.proto @@ -0,0 +1,49 @@ +syntax = "proto3"; + +package cmp.types.v1alpha1; + +// Length +// +// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/measurement.proto.dot.xs.svg) +// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/measurement.proto.dot.svg) +message Length { + int32 value = 1; + LengthUnit unit = 2; +} + +// Represents a dimension type, for example, to be used in baggage message type +message Dimension { + int32 length = 1; + int32 width = 2; + int32 height = 3; + LengthUnit unit = 4; +} + +// Length Unit +enum LengthUnit { + LENGTH_UNIT_UNSPECIFIED = 0; + LENGTH_UNIT_MILLIMETER = 1; + LENGTH_UNIT_CENTIMETER = 2; + LENGTH_UNIT_METER = 3; + LENGTH_UNIT_KILOMETER = 4; + LENGTH_UNIT_INCH = 5; + LENGTH_UNIT_FEET = 6; + LENGTH_UNIT_YARD = 7; + LENGTH_UNIT_MILE = 8; +} + +// Weight type +// +// Ex: Used for weight in baggage message type +message Weight { + int32 value = 1; + WeightUnit unit = 2; +} + +// Weight Unit +enum WeightUnit { + WEIGHT_UNIT_UNSPECIFIED = 0; + WEIGHT_UNIT_GRAM = 1; + WEIGHT_UNIT_KILOGRAM = 2; + WEIGHT_UNIT_POUND = 3; +}