Skip to content

Commit

Permalink
feat: [common-protos] add Weight to common types for Shopping APIs …
Browse files Browse the repository at this point in the history
…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 <65933803+alicejli@users.noreply.github.com>
  • Loading branch information
3 people authored May 2, 2024
1 parent 32c9995 commit 5bb9770
Show file tree
Hide file tree
Showing 7 changed files with 1,069 additions and 53 deletions.
6 changes: 3 additions & 3 deletions java-common-protos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file:
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-common-protos</artifactId>
<version>2.37.1</version>
<version>2.38.0</version>
</dependency>
```

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

```Groovy
implementation 'com.google.api.grpc:proto-google-common-protos:2.37.1'
implementation 'com.google.api.grpc:proto-google-common-protos:2.38.0'
```

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

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

## Authentication
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
* The price represented as a number in micros (1 million micros is an
* equivalent to one's currency standard unit, for example, 1 USD = 1000000
* micros).
* This field can also be set as infinity by setting to -1.
* This field only support -1 and positive value.
* </pre>
*
* <code>optional int64 amount_micros = 1;</code>
Expand All @@ -91,8 +89,6 @@ public boolean hasAmountMicros() {
* The price represented as a number in micros (1 million micros is an
* equivalent to one's currency standard unit, for example, 1 USD = 1000000
* micros).
* This field can also be set as infinity by setting to -1.
* This field only support -1 and positive value.
* </pre>
*
* <code>optional int64 amount_micros = 1;</code>
Expand Down Expand Up @@ -554,8 +550,6 @@ public Builder mergeFrom(
* The price represented as a number in micros (1 million micros is an
* equivalent to one's currency standard unit, for example, 1 USD = 1000000
* micros).
* This field can also be set as infinity by setting to -1.
* This field only support -1 and positive value.
* </pre>
*
* <code>optional int64 amount_micros = 1;</code>
Expand All @@ -573,8 +567,6 @@ public boolean hasAmountMicros() {
* The price represented as a number in micros (1 million micros is an
* equivalent to one's currency standard unit, for example, 1 USD = 1000000
* micros).
* This field can also be set as infinity by setting to -1.
* This field only support -1 and positive value.
* </pre>
*
* <code>optional int64 amount_micros = 1;</code>
Expand All @@ -592,8 +584,6 @@ public long getAmountMicros() {
* The price represented as a number in micros (1 million micros is an
* equivalent to one's currency standard unit, for example, 1 USD = 1000000
* micros).
* This field can also be set as infinity by setting to -1.
* This field only support -1 and positive value.
* </pre>
*
* <code>optional int64 amount_micros = 1;</code>
Expand All @@ -615,8 +605,6 @@ public Builder setAmountMicros(long value) {
* The price represented as a number in micros (1 million micros is an
* equivalent to one's currency standard unit, for example, 1 USD = 1000000
* micros).
* This field can also be set as infinity by setting to -1.
* This field only support -1 and positive value.
* </pre>
*
* <code>optional int64 amount_micros = 1;</code>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ public interface PriceOrBuilder
* The price represented as a number in micros (1 million micros is an
* equivalent to one's currency standard unit, for example, 1 USD = 1000000
* micros).
* This field can also be set as infinity by setting to -1.
* This field only support -1 and positive value.
* </pre>
*
* <code>optional int64 amount_micros = 1;</code>
Expand All @@ -47,8 +45,6 @@ public interface PriceOrBuilder
* The price represented as a number in micros (1 million micros is an
* equivalent to one's currency standard unit, for example, 1 USD = 1000000
* micros).
* This field can also be set as infinity by setting to -1.
* This field only support -1 and positive value.
* </pre>
*
* <code>optional int64 amount_micros = 1;</code>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r
registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry);
}

static final com.google.protobuf.Descriptors.Descriptor
internal_static_google_shopping_type_Weight_descriptor;
static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_google_shopping_type_Weight_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_google_shopping_type_Price_descriptor;
static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
Expand Down Expand Up @@ -58,66 +62,79 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
static {
java.lang.String[] descriptorData = {
"\n google/shopping/type/types.proto\022\024goog"
+ "le.shopping.type\"c\n\005Price\022\032\n\ramount_micr"
+ "os\030\001 \001(\003H\000\210\001\001\022\032\n\rcurrency_code\030\002 \001(\tH\001\210\001"
+ "\001B\020\n\016_amount_microsB\020\n\016_currency_code\"\210\001"
+ "\n\017CustomAttribute\022\021\n\004name\030\001 \001(\tH\000\210\001\001\022\022\n\005"
+ "value\030\002 \001(\tH\001\210\001\001\022;\n\014group_values\030\003 \003(\0132%"
+ ".google.shopping.type.CustomAttributeB\007\n"
+ "\005_nameB\010\n\006_value\"\301\001\n\013Destination\"\261\001\n\017Des"
+ "tinationEnum\022 \n\034DESTINATION_ENUM_UNSPECI"
+ "FIED\020\000\022\020\n\014SHOPPING_ADS\020\001\022\017\n\013DISPLAY_ADS\020"
+ "\002\022\027\n\023LOCAL_INVENTORY_ADS\020\003\022\021\n\rFREE_LISTI"
+ "NGS\020\004\022\027\n\023FREE_LOCAL_LISTINGS\020\005\022\024\n\020YOUTUB"
+ "E_SHOPPING\020\006\"\226\003\n\020ReportingContext\"\201\003\n\024Re"
+ "portingContextEnum\022&\n\"REPORTING_CONTEXT_"
+ "ENUM_UNSPECIFIED\020\000\022\020\n\014SHOPPING_ADS\020\001\022\025\n\r"
+ "DISCOVERY_ADS\020\002\032\002\010\001\022\022\n\016DEMAND_GEN_ADS\020\r\022"
+ "#\n\037DEMAND_GEN_ADS_DISCOVER_SURFACE\020\016\022\r\n\t"
+ "VIDEO_ADS\020\003\022\017\n\013DISPLAY_ADS\020\004\022\027\n\023LOCAL_IN"
+ "VENTORY_ADS\020\005\022\031\n\025VEHICLE_INVENTORY_ADS\020\006"
+ "\022\021\n\rFREE_LISTINGS\020\007\022\027\n\023FREE_LOCAL_LISTIN"
+ "GS\020\010\022\037\n\033FREE_LOCAL_VEHICLE_LISTINGS\020\t\022\024\n"
+ "\020YOUTUBE_SHOPPING\020\n\022\020\n\014CLOUD_RETAIL\020\013\022\026\n"
+ "\022LOCAL_CLOUD_RETAIL\020\014\"M\n\007Channel\"B\n\013Chan"
+ "nelEnum\022\034\n\030CHANNEL_ENUM_UNSPECIFIED\020\000\022\n\n"
+ "\006ONLINE\020\001\022\t\n\005LOCAL\020\002Bp\n\030com.google.shopp"
+ "ing.typeB\nTypesProtoP\001Z/cloud.google.com"
+ "/go/shopping/type/typepb;typepb\252\002\024Google"
+ ".Shopping.Typeb\006proto3"
+ "le.shopping.type\"\261\001\n\006Weight\022\032\n\ramount_mi"
+ "cros\030\001 \001(\003H\000\210\001\001\0225\n\004unit\030\002 \001(\0162\'.google.s"
+ "hopping.type.Weight.WeightUnit\"B\n\nWeight"
+ "Unit\022\033\n\027WEIGHT_UNIT_UNSPECIFIED\020\000\022\t\n\005POU"
+ "ND\020\001\022\014\n\010KILOGRAM\020\002B\020\n\016_amount_micros\"c\n\005"
+ "Price\022\032\n\ramount_micros\030\001 \001(\003H\000\210\001\001\022\032\n\rcur"
+ "rency_code\030\002 \001(\tH\001\210\001\001B\020\n\016_amount_microsB"
+ "\020\n\016_currency_code\"\210\001\n\017CustomAttribute\022\021\n"
+ "\004name\030\001 \001(\tH\000\210\001\001\022\022\n\005value\030\002 \001(\tH\001\210\001\001\022;\n\014"
+ "group_values\030\003 \003(\0132%.google.shopping.typ"
+ "e.CustomAttributeB\007\n\005_nameB\010\n\006_value\"\301\001\n"
+ "\013Destination\"\261\001\n\017DestinationEnum\022 \n\034DEST"
+ "INATION_ENUM_UNSPECIFIED\020\000\022\020\n\014SHOPPING_A"
+ "DS\020\001\022\017\n\013DISPLAY_ADS\020\002\022\027\n\023LOCAL_INVENTORY"
+ "_ADS\020\003\022\021\n\rFREE_LISTINGS\020\004\022\027\n\023FREE_LOCAL_"
+ "LISTINGS\020\005\022\024\n\020YOUTUBE_SHOPPING\020\006\"\226\003\n\020Rep"
+ "ortingContext\"\201\003\n\024ReportingContextEnum\022&"
+ "\n\"REPORTING_CONTEXT_ENUM_UNSPECIFIED\020\000\022\020"
+ "\n\014SHOPPING_ADS\020\001\022\025\n\rDISCOVERY_ADS\020\002\032\002\010\001\022"
+ "\022\n\016DEMAND_GEN_ADS\020\r\022#\n\037DEMAND_GEN_ADS_DI"
+ "SCOVER_SURFACE\020\016\022\r\n\tVIDEO_ADS\020\003\022\017\n\013DISPL"
+ "AY_ADS\020\004\022\027\n\023LOCAL_INVENTORY_ADS\020\005\022\031\n\025VEH"
+ "ICLE_INVENTORY_ADS\020\006\022\021\n\rFREE_LISTINGS\020\007\022"
+ "\027\n\023FREE_LOCAL_LISTINGS\020\010\022\037\n\033FREE_LOCAL_V"
+ "EHICLE_LISTINGS\020\t\022\024\n\020YOUTUBE_SHOPPING\020\n\022"
+ "\020\n\014CLOUD_RETAIL\020\013\022\026\n\022LOCAL_CLOUD_RETAIL\020"
+ "\014\"M\n\007Channel\"B\n\013ChannelEnum\022\034\n\030CHANNEL_E"
+ "NUM_UNSPECIFIED\020\000\022\n\n\006ONLINE\020\001\022\t\n\005LOCAL\020\002"
+ "Bp\n\030com.google.shopping.typeB\nTypesProto"
+ "P\001Z/cloud.google.com/go/shopping/type/ty"
+ "pepb;typepb\252\002\024Google.Shopping.Typeb\006prot"
+ "o3"
};
descriptor =
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {});
internal_static_google_shopping_type_Price_descriptor =
internal_static_google_shopping_type_Weight_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_google_shopping_type_Weight_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_shopping_type_Weight_descriptor,
new java.lang.String[] {
"AmountMicros", "Unit",
});
internal_static_google_shopping_type_Price_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_google_shopping_type_Price_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_shopping_type_Price_descriptor,
new java.lang.String[] {
"AmountMicros", "CurrencyCode",
});
internal_static_google_shopping_type_CustomAttribute_descriptor =
getDescriptor().getMessageTypes().get(1);
getDescriptor().getMessageTypes().get(2);
internal_static_google_shopping_type_CustomAttribute_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_shopping_type_CustomAttribute_descriptor,
new java.lang.String[] {
"Name", "Value", "GroupValues",
});
internal_static_google_shopping_type_Destination_descriptor =
getDescriptor().getMessageTypes().get(2);
getDescriptor().getMessageTypes().get(3);
internal_static_google_shopping_type_Destination_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_shopping_type_Destination_descriptor, new java.lang.String[] {});
internal_static_google_shopping_type_ReportingContext_descriptor =
getDescriptor().getMessageTypes().get(3);
getDescriptor().getMessageTypes().get(4);
internal_static_google_shopping_type_ReportingContext_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_shopping_type_ReportingContext_descriptor,
new java.lang.String[] {});
internal_static_google_shopping_type_Channel_descriptor =
getDescriptor().getMessageTypes().get(4);
getDescriptor().getMessageTypes().get(5);
internal_static_google_shopping_type_Channel_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_shopping_type_Channel_descriptor, new java.lang.String[] {});
Expand Down
Loading

0 comments on commit 5bb9770

Please sign in to comment.