Skip to content

Commit a3a2dc6

Browse files
Google APIscopybara-github
authored andcommitted
feat: add Weight to common types for Shopping APIs to be used for accounts bundle
docs: A comment for field `amount_micros` in message `.google.shopping.type.Price` is changed PiperOrigin-RevId: 629159171
1 parent a1fd45b commit a3a2dc6

1 file changed

Lines changed: 26 additions & 2 deletions

File tree

google/shopping/type/types.proto

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,37 @@ option java_multiple_files = true;
2222
option java_outer_classname = "TypesProto";
2323
option java_package = "com.google.shopping.type";
2424

25+
// The weight represented as the value in string and the unit.
26+
message Weight {
27+
// The weight unit.
28+
enum WeightUnit {
29+
// unit unspecified
30+
WEIGHT_UNIT_UNSPECIFIED = 0;
31+
32+
// lb unit.
33+
POUND = 1;
34+
35+
// kg unit.
36+
KILOGRAM = 2;
37+
}
38+
39+
// Required. The weight represented as a number in micros (1 million micros is
40+
// an equivalent to one's currency standard unit, for example, 1 kg = 1000000
41+
// micros).
42+
// This field can also be set as infinity by setting to -1.
43+
// This field only support -1 and positive value.
44+
optional int64 amount_micros = 1;
45+
46+
// Required. The weight unit.
47+
// Acceptable values are: kg and lb
48+
WeightUnit unit = 2;
49+
}
50+
2551
// The price represented as a number and currency.
2652
message Price {
2753
// The price represented as a number in micros (1 million micros is an
2854
// equivalent to one's currency standard unit, for example, 1 USD = 1000000
2955
// micros).
30-
// This field can also be set as infinity by setting to -1.
31-
// This field only support -1 and positive value.
3256
optional int64 amount_micros = 1;
3357

3458
// The currency of the price using three-letter acronyms according to [ISO

0 commit comments

Comments
 (0)