Skip to content

Commit 5bb9770

Browse files
feat: [common-protos] add Weight to common types for Shopping APIs to be used for accounts bundle (#2699)
- [ ] Regenerate this pull request now. docs: A comment for field `amount_micros` in message `.google.shopping.type.Price` is changed PiperOrigin-RevId: 629159171 Source-Link: googleapis/googleapis@a3a2dc6 Source-Link: https://github.com/googleapis/googleapis-gen/commit/7a598761f9021328bc2dea46ec0c0852adc26d83 Copy-Tag: eyJwIjoiamF2YS1jb21tb24tcHJvdG9zLy5Pd2xCb3QueWFtbCIsImgiOiI3YTU5ODc2MWY5MDIxMzI4YmMyZGVhNDZlYzBjMDg1MmFkYzI2ZDgzIn0= --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Alice <[email protected]>
1 parent 32c9995 commit 5bb9770

File tree

7 files changed

+1069
-53
lines changed

7 files changed

+1069
-53
lines changed

java-common-protos/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file:
1919
<dependency>
2020
<groupId>com.google.api.grpc</groupId>
2121
<artifactId>proto-google-common-protos</artifactId>
22-
<version>2.37.1</version>
22+
<version>2.38.0</version>
2323
</dependency>
2424
```
2525

2626
If you are using Gradle without BOM, add this to your dependencies:
2727

2828
```Groovy
29-
implementation 'com.google.api.grpc:proto-google-common-protos:2.37.1'
29+
implementation 'com.google.api.grpc:proto-google-common-protos:2.38.0'
3030
```
3131

3232
If you are using SBT, add this to your dependencies:
3333

3434
```Scala
35-
libraryDependencies += "com.google.api.grpc" % "proto-google-common-protos" % "2.37.1"
35+
libraryDependencies += "com.google.api.grpc" % "proto-google-common-protos" % "2.38.0"
3636
```
3737

3838
## Authentication

java-common-protos/proto-google-common-protos/src/main/java/com/google/shopping/type/Price.java

-12
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,6 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
7272
* The price represented as a number in micros (1 million micros is an
7373
* equivalent to one's currency standard unit, for example, 1 USD = 1000000
7474
* micros).
75-
* This field can also be set as infinity by setting to -1.
76-
* This field only support -1 and positive value.
7775
* </pre>
7876
*
7977
* <code>optional int64 amount_micros = 1;</code>
@@ -91,8 +89,6 @@ public boolean hasAmountMicros() {
9189
* The price represented as a number in micros (1 million micros is an
9290
* equivalent to one's currency standard unit, for example, 1 USD = 1000000
9391
* micros).
94-
* This field can also be set as infinity by setting to -1.
95-
* This field only support -1 and positive value.
9692
* </pre>
9793
*
9894
* <code>optional int64 amount_micros = 1;</code>
@@ -554,8 +550,6 @@ public Builder mergeFrom(
554550
* The price represented as a number in micros (1 million micros is an
555551
* equivalent to one's currency standard unit, for example, 1 USD = 1000000
556552
* micros).
557-
* This field can also be set as infinity by setting to -1.
558-
* This field only support -1 and positive value.
559553
* </pre>
560554
*
561555
* <code>optional int64 amount_micros = 1;</code>
@@ -573,8 +567,6 @@ public boolean hasAmountMicros() {
573567
* The price represented as a number in micros (1 million micros is an
574568
* equivalent to one's currency standard unit, for example, 1 USD = 1000000
575569
* micros).
576-
* This field can also be set as infinity by setting to -1.
577-
* This field only support -1 and positive value.
578570
* </pre>
579571
*
580572
* <code>optional int64 amount_micros = 1;</code>
@@ -592,8 +584,6 @@ public long getAmountMicros() {
592584
* The price represented as a number in micros (1 million micros is an
593585
* equivalent to one's currency standard unit, for example, 1 USD = 1000000
594586
* micros).
595-
* This field can also be set as infinity by setting to -1.
596-
* This field only support -1 and positive value.
597587
* </pre>
598588
*
599589
* <code>optional int64 amount_micros = 1;</code>
@@ -615,8 +605,6 @@ public Builder setAmountMicros(long value) {
615605
* The price represented as a number in micros (1 million micros is an
616606
* equivalent to one's currency standard unit, for example, 1 USD = 1000000
617607
* micros).
618-
* This field can also be set as infinity by setting to -1.
619-
* This field only support -1 and positive value.
620608
* </pre>
621609
*
622610
* <code>optional int64 amount_micros = 1;</code>

java-common-protos/proto-google-common-protos/src/main/java/com/google/shopping/type/PriceOrBuilder.java

-4
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ public interface PriceOrBuilder
3131
* The price represented as a number in micros (1 million micros is an
3232
* equivalent to one's currency standard unit, for example, 1 USD = 1000000
3333
* micros).
34-
* This field can also be set as infinity by setting to -1.
35-
* This field only support -1 and positive value.
3634
* </pre>
3735
*
3836
* <code>optional int64 amount_micros = 1;</code>
@@ -47,8 +45,6 @@ public interface PriceOrBuilder
4745
* The price represented as a number in micros (1 million micros is an
4846
* equivalent to one's currency standard unit, for example, 1 USD = 1000000
4947
* micros).
50-
* This field can also be set as infinity by setting to -1.
51-
* This field only support -1 and positive value.
5248
* </pre>
5349
*
5450
* <code>optional int64 amount_micros = 1;</code>

java-common-protos/proto-google-common-protos/src/main/java/com/google/shopping/type/TypesProto.java

+49-32
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r
2828
registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry);
2929
}
3030

31+
static final com.google.protobuf.Descriptors.Descriptor
32+
internal_static_google_shopping_type_Weight_descriptor;
33+
static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
34+
internal_static_google_shopping_type_Weight_fieldAccessorTable;
3135
static final com.google.protobuf.Descriptors.Descriptor
3236
internal_static_google_shopping_type_Price_descriptor;
3337
static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
@@ -58,66 +62,79 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
5862
static {
5963
java.lang.String[] descriptorData = {
6064
"\n google/shopping/type/types.proto\022\024goog"
61-
+ "le.shopping.type\"c\n\005Price\022\032\n\ramount_micr"
62-
+ "os\030\001 \001(\003H\000\210\001\001\022\032\n\rcurrency_code\030\002 \001(\tH\001\210\001"
63-
+ "\001B\020\n\016_amount_microsB\020\n\016_currency_code\"\210\001"
64-
+ "\n\017CustomAttribute\022\021\n\004name\030\001 \001(\tH\000\210\001\001\022\022\n\005"
65-
+ "value\030\002 \001(\tH\001\210\001\001\022;\n\014group_values\030\003 \003(\0132%"
66-
+ ".google.shopping.type.CustomAttributeB\007\n"
67-
+ "\005_nameB\010\n\006_value\"\301\001\n\013Destination\"\261\001\n\017Des"
68-
+ "tinationEnum\022 \n\034DESTINATION_ENUM_UNSPECI"
69-
+ "FIED\020\000\022\020\n\014SHOPPING_ADS\020\001\022\017\n\013DISPLAY_ADS\020"
70-
+ "\002\022\027\n\023LOCAL_INVENTORY_ADS\020\003\022\021\n\rFREE_LISTI"
71-
+ "NGS\020\004\022\027\n\023FREE_LOCAL_LISTINGS\020\005\022\024\n\020YOUTUB"
72-
+ "E_SHOPPING\020\006\"\226\003\n\020ReportingContext\"\201\003\n\024Re"
73-
+ "portingContextEnum\022&\n\"REPORTING_CONTEXT_"
74-
+ "ENUM_UNSPECIFIED\020\000\022\020\n\014SHOPPING_ADS\020\001\022\025\n\r"
75-
+ "DISCOVERY_ADS\020\002\032\002\010\001\022\022\n\016DEMAND_GEN_ADS\020\r\022"
76-
+ "#\n\037DEMAND_GEN_ADS_DISCOVER_SURFACE\020\016\022\r\n\t"
77-
+ "VIDEO_ADS\020\003\022\017\n\013DISPLAY_ADS\020\004\022\027\n\023LOCAL_IN"
78-
+ "VENTORY_ADS\020\005\022\031\n\025VEHICLE_INVENTORY_ADS\020\006"
79-
+ "\022\021\n\rFREE_LISTINGS\020\007\022\027\n\023FREE_LOCAL_LISTIN"
80-
+ "GS\020\010\022\037\n\033FREE_LOCAL_VEHICLE_LISTINGS\020\t\022\024\n"
81-
+ "\020YOUTUBE_SHOPPING\020\n\022\020\n\014CLOUD_RETAIL\020\013\022\026\n"
82-
+ "\022LOCAL_CLOUD_RETAIL\020\014\"M\n\007Channel\"B\n\013Chan"
83-
+ "nelEnum\022\034\n\030CHANNEL_ENUM_UNSPECIFIED\020\000\022\n\n"
84-
+ "\006ONLINE\020\001\022\t\n\005LOCAL\020\002Bp\n\030com.google.shopp"
85-
+ "ing.typeB\nTypesProtoP\001Z/cloud.google.com"
86-
+ "/go/shopping/type/typepb;typepb\252\002\024Google"
87-
+ ".Shopping.Typeb\006proto3"
65+
+ "le.shopping.type\"\261\001\n\006Weight\022\032\n\ramount_mi"
66+
+ "cros\030\001 \001(\003H\000\210\001\001\0225\n\004unit\030\002 \001(\0162\'.google.s"
67+
+ "hopping.type.Weight.WeightUnit\"B\n\nWeight"
68+
+ "Unit\022\033\n\027WEIGHT_UNIT_UNSPECIFIED\020\000\022\t\n\005POU"
69+
+ "ND\020\001\022\014\n\010KILOGRAM\020\002B\020\n\016_amount_micros\"c\n\005"
70+
+ "Price\022\032\n\ramount_micros\030\001 \001(\003H\000\210\001\001\022\032\n\rcur"
71+
+ "rency_code\030\002 \001(\tH\001\210\001\001B\020\n\016_amount_microsB"
72+
+ "\020\n\016_currency_code\"\210\001\n\017CustomAttribute\022\021\n"
73+
+ "\004name\030\001 \001(\tH\000\210\001\001\022\022\n\005value\030\002 \001(\tH\001\210\001\001\022;\n\014"
74+
+ "group_values\030\003 \003(\0132%.google.shopping.typ"
75+
+ "e.CustomAttributeB\007\n\005_nameB\010\n\006_value\"\301\001\n"
76+
+ "\013Destination\"\261\001\n\017DestinationEnum\022 \n\034DEST"
77+
+ "INATION_ENUM_UNSPECIFIED\020\000\022\020\n\014SHOPPING_A"
78+
+ "DS\020\001\022\017\n\013DISPLAY_ADS\020\002\022\027\n\023LOCAL_INVENTORY"
79+
+ "_ADS\020\003\022\021\n\rFREE_LISTINGS\020\004\022\027\n\023FREE_LOCAL_"
80+
+ "LISTINGS\020\005\022\024\n\020YOUTUBE_SHOPPING\020\006\"\226\003\n\020Rep"
81+
+ "ortingContext\"\201\003\n\024ReportingContextEnum\022&"
82+
+ "\n\"REPORTING_CONTEXT_ENUM_UNSPECIFIED\020\000\022\020"
83+
+ "\n\014SHOPPING_ADS\020\001\022\025\n\rDISCOVERY_ADS\020\002\032\002\010\001\022"
84+
+ "\022\n\016DEMAND_GEN_ADS\020\r\022#\n\037DEMAND_GEN_ADS_DI"
85+
+ "SCOVER_SURFACE\020\016\022\r\n\tVIDEO_ADS\020\003\022\017\n\013DISPL"
86+
+ "AY_ADS\020\004\022\027\n\023LOCAL_INVENTORY_ADS\020\005\022\031\n\025VEH"
87+
+ "ICLE_INVENTORY_ADS\020\006\022\021\n\rFREE_LISTINGS\020\007\022"
88+
+ "\027\n\023FREE_LOCAL_LISTINGS\020\010\022\037\n\033FREE_LOCAL_V"
89+
+ "EHICLE_LISTINGS\020\t\022\024\n\020YOUTUBE_SHOPPING\020\n\022"
90+
+ "\020\n\014CLOUD_RETAIL\020\013\022\026\n\022LOCAL_CLOUD_RETAIL\020"
91+
+ "\014\"M\n\007Channel\"B\n\013ChannelEnum\022\034\n\030CHANNEL_E"
92+
+ "NUM_UNSPECIFIED\020\000\022\n\n\006ONLINE\020\001\022\t\n\005LOCAL\020\002"
93+
+ "Bp\n\030com.google.shopping.typeB\nTypesProto"
94+
+ "P\001Z/cloud.google.com/go/shopping/type/ty"
95+
+ "pepb;typepb\252\002\024Google.Shopping.Typeb\006prot"
96+
+ "o3"
8897
};
8998
descriptor =
9099
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
91100
descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {});
92-
internal_static_google_shopping_type_Price_descriptor =
101+
internal_static_google_shopping_type_Weight_descriptor =
93102
getDescriptor().getMessageTypes().get(0);
103+
internal_static_google_shopping_type_Weight_fieldAccessorTable =
104+
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
105+
internal_static_google_shopping_type_Weight_descriptor,
106+
new java.lang.String[] {
107+
"AmountMicros", "Unit",
108+
});
109+
internal_static_google_shopping_type_Price_descriptor =
110+
getDescriptor().getMessageTypes().get(1);
94111
internal_static_google_shopping_type_Price_fieldAccessorTable =
95112
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
96113
internal_static_google_shopping_type_Price_descriptor,
97114
new java.lang.String[] {
98115
"AmountMicros", "CurrencyCode",
99116
});
100117
internal_static_google_shopping_type_CustomAttribute_descriptor =
101-
getDescriptor().getMessageTypes().get(1);
118+
getDescriptor().getMessageTypes().get(2);
102119
internal_static_google_shopping_type_CustomAttribute_fieldAccessorTable =
103120
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
104121
internal_static_google_shopping_type_CustomAttribute_descriptor,
105122
new java.lang.String[] {
106123
"Name", "Value", "GroupValues",
107124
});
108125
internal_static_google_shopping_type_Destination_descriptor =
109-
getDescriptor().getMessageTypes().get(2);
126+
getDescriptor().getMessageTypes().get(3);
110127
internal_static_google_shopping_type_Destination_fieldAccessorTable =
111128
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
112129
internal_static_google_shopping_type_Destination_descriptor, new java.lang.String[] {});
113130
internal_static_google_shopping_type_ReportingContext_descriptor =
114-
getDescriptor().getMessageTypes().get(3);
131+
getDescriptor().getMessageTypes().get(4);
115132
internal_static_google_shopping_type_ReportingContext_fieldAccessorTable =
116133
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
117134
internal_static_google_shopping_type_ReportingContext_descriptor,
118135
new java.lang.String[] {});
119136
internal_static_google_shopping_type_Channel_descriptor =
120-
getDescriptor().getMessageTypes().get(4);
137+
getDescriptor().getMessageTypes().get(5);
121138
internal_static_google_shopping_type_Channel_fieldAccessorTable =
122139
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
123140
internal_static_google_shopping_type_Channel_descriptor, new java.lang.String[] {});

0 commit comments

Comments
 (0)