Skip to content

Commit

Permalink
update baggage type to use new measurement types
Browse files Browse the repository at this point in the history
  • Loading branch information
havan committed Dec 21, 2023
1 parent 04cc8a4 commit 7c329f9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 22 deletions.
29 changes: 8 additions & 21 deletions proto/cmp/types/v1alpha1/baggage.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand All @@ -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
}
11 changes: 10 additions & 1 deletion proto/cmp/types/v1alpha1/measurement.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ message Length {
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;
Expand All @@ -26,7 +34,7 @@ enum LengthUnit {

// Weight type
//
// Used for weight
// Ex: Used for weight in baggage message type
message Weight {
int32 value = 1;
WeightUnit unit = 2;
Expand All @@ -37,4 +45,5 @@ enum WeightUnit {
WEIGHT_UNIT_UNSPECIFIED = 0;
WEIGHT_UNIT_GRAM = 1;
WEIGHT_UNIT_KILOGRAM = 2;
WEIGHT_UNIT_POUND = 3;
}

0 comments on commit 7c329f9

Please sign in to comment.