Skip to content

Commit 5fa0268

Browse files
Google APIscopybara-github
authored andcommitted
feat: Added the product_id_base64_url_encoded field to ListLocalInventoriesRequest, InsertLocalInventoryRequest, DeleteLocalInventoryRequest, ListRegionalInventoriesRequest, InsertRegionalInventoryRequest, and DeleteRegionalInventoryRequest. This allows for product IDs containing special characters to be correctly handled when unpadded base64url-encoded
PiperOrigin-RevId: 830781196
1 parent b98f8c9 commit 5fa0268

File tree

2 files changed

+78
-0
lines changed

2 files changed

+78
-0
lines changed

google/shopping/merchant/inventories/v1/localinventory.proto

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,19 @@ message ListLocalInventoriesRequest {
147147
// [nextPageToken][google.shopping.merchant.inventories.v1.ListLocalInventoriesResponse.next_page_token]
148148
// in the response to the previous request.
149149
string page_token = 3;
150+
151+
// Optional. If true, the `{product}` in the `parent` field of the request
152+
// will be interpreted as unpadded base64url-encoded and decoded during
153+
// request processing to match the decoded value. Default value is `false`.
154+
// Use this if your `{product}` contains special characters, such as forward
155+
// slash `/` or other characters that are unpadded base64url-encoded (as per
156+
// RFC 7515: https://datatracker.ietf.org/doc/html/rfc7515#section-2).
157+
//
158+
// Note that future versions of the API will only accept unpadded
159+
// base64url-encoded product ids, so we strongly recommend proactively setting
160+
// this to `true` and encoding the product ids.
161+
bool product_id_base64_url_encoded = 4
162+
[(google.api.field_behavior) = OPTIONAL];
150163
}
151164

152165
// Response message for the `ListLocalInventories` method.
@@ -175,6 +188,19 @@ message InsertLocalInventoryRequest {
175188
// already has a `LocalInventory` resource for the same `storeCode`, full
176189
// replacement of the `LocalInventory` resource is performed.
177190
LocalInventory local_inventory = 2 [(google.api.field_behavior) = REQUIRED];
191+
192+
// Optional. If true, the `{product}` in the `parent` field of the request
193+
// will be interpreted as unpadded base64url-encoded and decoded during
194+
// request processing to match the decoded value. Default value is `false`.
195+
// Use this if your `{product}` contains special characters, such as forward
196+
// slash `/` or other characters that are unpadded base64url-encoded (as per
197+
// RFC 7515: https://datatracker.ietf.org/doc/html/rfc7515#section-2).
198+
//
199+
// Note that future versions of the API will only accept unpadded
200+
// base64url-encoded product ids, so we strongly recommend proactively setting
201+
// this to `true` and encoding the product ids.
202+
bool product_id_base64_url_encoded = 3
203+
[(google.api.field_behavior) = OPTIONAL];
178204
}
179205

180206
// Request message for the `DeleteLocalInventory` method.
@@ -188,4 +214,17 @@ message DeleteLocalInventoryRequest {
188214
type: "merchantapi.googleapis.com/LocalInventory"
189215
}
190216
];
217+
218+
// Optional. If true, the `{product}` in the `name` field of the request will
219+
// be interpreted as unpadded base64url-encoded and decoded during request
220+
// processing to match the decoded value. Default value is `false`. Use this
221+
// if your `{product}` contains special characters, such as forward slash `/`
222+
// or other characters that are unpadded base64url-encoded (as per RFC 7515:
223+
// https://datatracker.ietf.org/doc/html/rfc7515#section-2).
224+
//
225+
// Note that future versions of the API will only accept unpadded
226+
// base64url-encoded product ids, so we strongly recommend proactively setting
227+
// this to `true` and encoding the product ids.
228+
bool product_id_base64_url_encoded = 2
229+
[(google.api.field_behavior) = OPTIONAL];
191230
}

google/shopping/merchant/inventories/v1/regionalinventory.proto

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,19 @@ message ListRegionalInventoriesRequest {
143143
// [nextPageToken][google.shopping.merchant.inventories.v1.ListRegionalInventoriesResponse.next_page_token]
144144
// in the response to the previous request.
145145
string page_token = 3;
146+
147+
// Optional. If true, the `{product}` in the `parent` field of the request
148+
// will be interpreted as unpadded base64url-encoded and decoded during
149+
// request processing to match the decoded value. Default value is `false`.
150+
// Use this if your `{product}` contains special characters, such as forward
151+
// slash `/` or other characters that are unpadded base64url-encoded (as per
152+
// RFC 7515: https://datatracker.ietf.org/doc/html/rfc7515#section-2).
153+
//
154+
// Note that future versions of the API will only accept unpadded
155+
// base64url-encoded product ids, so we strongly recommend proactively setting
156+
// this to `true` and encoding the product ids.
157+
bool product_id_base64_url_encoded = 4
158+
[(google.api.field_behavior) = OPTIONAL];
146159
}
147160

148161
// Response message for the `ListRegionalInventories` method.
@@ -172,6 +185,19 @@ message InsertRegionalInventoryRequest {
172185
// full replacement of the `RegionalInventory` resource is performed.
173186
RegionalInventory regional_inventory = 2
174187
[(google.api.field_behavior) = REQUIRED];
188+
189+
// Optional. If true, the `{product}` in the `parent` field of the request
190+
// will be interpreted as unpadded base64url-encoded and decoded during
191+
// request processing to match the decoded value. Default value is `false`.
192+
// Use this if your `{product}` contains special characters, such as forward
193+
// slash `/` or other characters that are unpadded base64url-encoded (as per
194+
// RFC 7515: https://datatracker.ietf.org/doc/html/rfc7515#section-2).
195+
//
196+
// Note that future versions of the API will only accept unpadded
197+
// base64url-encoded product ids, so we strongly recommend proactively setting
198+
// this to `true` and encoding the product ids.
199+
bool product_id_base64_url_encoded = 3
200+
[(google.api.field_behavior) = OPTIONAL];
175201
}
176202

177203
// Request message for the `DeleteRegionalInventory` method.
@@ -185,4 +211,17 @@ message DeleteRegionalInventoryRequest {
185211
type: "merchantapi.googleapis.com/RegionalInventory"
186212
}
187213
];
214+
215+
// Optional. If true, the `{product}` in the `name` field of the request will
216+
// be interpreted as unpadded base64url-encoded and decoded during request
217+
// processing to match the decoded value. Default value is `false`. Use this
218+
// if your `{product}` contains special characters, such as forward slash `/`
219+
// or other characters that are unpadded base64url-encoded (as per RFC 7515:
220+
// https://datatracker.ietf.org/doc/html/rfc7515#section-2).
221+
//
222+
// Note that future versions of the API will only accept unpadded
223+
// base64url-encoded product ids, so we strongly recommend proactively setting
224+
// this to `true` and encoding the product ids.
225+
bool product_id_base64_url_encoded = 2
226+
[(google.api.field_behavior) = OPTIONAL];
188227
}

0 commit comments

Comments
 (0)