@@ -21,6 +21,7 @@ import "google/api/client.proto";
2121import "google/api/field_behavior.proto" ;
2222import "google/api/resource.proto" ;
2323import "google/protobuf/empty.proto" ;
24+ import "google/protobuf/field_mask.proto" ;
2425import "google/shopping/merchant/products/v1beta/products_common.proto" ;
2526import "google/shopping/type/types.proto" ;
2627
@@ -48,6 +49,18 @@ service ProductInputsService {
4849 };
4950 }
5051
52+ // Updates the existing product input in your Merchant Center account.
53+ //
54+ // After inserting, updating, or deleting a product input, it may take several
55+ // minutes before the processed product can be retrieved.
56+ rpc UpdateProductInput (UpdateProductInputRequest ) returns (ProductInput ) {
57+ option (google.api.http ) = {
58+ patch : "/products/v1beta/{product_input.name=accounts/*/productInputs/*}"
59+ body : "product_input"
60+ };
61+ option (google.api.method_signature ) = "product_input,update_mask" ;
62+ }
63+
5164 // Deletes a product input from your Merchant Center account.
5265 //
5366 // After inserting, updating, or deleting a product input, it may take several
@@ -62,26 +75,26 @@ service ProductInputsService {
6275}
6376
6477// This resource represents input data you submit for a product, not the
65- // processed product that you see in Merchant Center, in Shopping ads, or across
66- // Google surfaces. Product inputs, rules and supplemental data source data are
67- // combined to create the processed
68- // [Product][google.shopping.merchant.products.v1beta.Product].
78+ // processed product that you see in Merchant Center, in Shopping ads, or
79+ // across Google surfaces. Product inputs, rules and supplemental data source
80+ // data are combined to create the processed
81+ // [Product][google.shopping.merchant.products.v1beta.Product].
6982//
70- // Required product input attributes to pass data validation checks are
71- // primarily defined in the [Products Data
72- // Specification](https://support.google.com/merchants/answer/188494).
83+ // Required product input attributes to pass data validation checks are
84+ // primarily defined in the [Products Data
85+ // Specification](https://support.google.com/merchants/answer/188494).
7386//
74- // The following attributes are required:
75- // [feedLabel][google.shopping.merchant.products.v1beta.Product.feed_label],
76- // [contentLanguage][google.shopping.merchant.products.v1beta.Product.content_language]
77- // and [offerId][google.shopping.merchant.products.v1beta.Product.offer_id].
87+ // The following attributes are required:
88+ // [feedLabel][google.shopping.merchant.products.v1beta.Product.feed_label],
89+ // [contentLanguage][google.shopping.merchant.products.v1beta.Product.content_language]
90+ // and [offerId][google.shopping.merchant.products.v1beta.Product.offer_id].
7891//
79- // After inserting, updating, or deleting a product input, it may take several
80- // minutes before the processed product can be retrieved.
92+ // After inserting, updating, or deleting a product input, it may take several
93+ // minutes before the processed product can be retrieved.
8194//
82- // All fields in the product input and its sub-messages match the English name
83- // of their corresponding attribute in the vertical spec with [some
84- // exceptions](https://support.google.com/merchants/answer/7052112).
95+ // All fields in the product input and its sub-messages match the English name
96+ // of their corresponding attribute in the vertical spec with [some
97+ // exceptions](https://support.google.com/merchants/answer/7052112).
8598message ProductInput {
8699 option (google.api.resource ) = {
87100 type : "merchantapi.googleapis.com/ProductInput"
@@ -104,13 +117,11 @@ message ProductInput {
104117 // `"{product.name=accounts/{account}/products/{product}}"`
105118 string product = 2 [(google.api.field_behavior ) = OUTPUT_ONLY ];
106119
107- // Required. Immutable. The
120+ // Immutable. The
108121 // [channel](https://support.google.com/merchants/answer/7361332) of the
109122 // product.
110- google.shopping.type.Channel.ChannelEnum channel = 3 [
111- (google.api.field_behavior ) = REQUIRED ,
112- (google.api.field_behavior ) = IMMUTABLE
113- ];
123+ google.shopping.type.Channel.ChannelEnum channel = 3
124+ [(google.api.field_behavior ) = IMMUTABLE ];
114125
115126 // Required. Immutable. Your unique identifier for the product. This is the
116127 // same for the product input and processed product. Leading and trailing
@@ -188,8 +199,47 @@ message InsertProductInputRequest {
188199
189200 // Required. The primary or supplemental product data source name. If the
190201 // product already exists and data source provided is different, then the
191- // product will be moved to a new data source. Format:
192- // `accounts/{account}/dataSources/{datasource}`.
202+ // product will be moved to a new data source.
203+ //
204+ // Only API data sources are supported.
205+ //
206+ // Format: `accounts/{account}/dataSources/{datasource}`.
207+ string data_source = 3 [(google.api.field_behavior ) = REQUIRED ];
208+ }
209+
210+ // Request message for the UpdateProductInput method.
211+ // The product (primary input) must exist for the update to succeed.
212+ // If the update is for a primary product input, the existing primary product
213+ // input must be from the same data source.
214+ message UpdateProductInputRequest {
215+ // Required. The product input resource to update. Information you submit will
216+ // be applied to the processed product as well.
217+ ProductInput product_input = 1 [(google.api.field_behavior ) = REQUIRED ];
218+
219+ // Optional. The list of product attributes to be updated.
220+ //
221+ // If the update mask is omitted, then it is treated as implied field mask
222+ // equivalent to all fields that are populated (have a non-empty value).
223+ //
224+ // Attributes specified in the update mask without a value specified in the
225+ // body will be deleted from the product.
226+ //
227+ // Update mask can only be specified for top level fields in
228+ // attributes and custom attributes.
229+ //
230+ // To specify the update mask for custom attributes you need to add the
231+ // `custom_attribute.` prefix.
232+ //
233+ // Providing special "*" value for full product replacement is not supported.
234+ google.protobuf.FieldMask update_mask = 2
235+ [(google.api.field_behavior ) = OPTIONAL ];
236+
237+ // Required. The primary or supplemental product data source where
238+ // `data_source` name identifies the product input to be updated.
239+ //
240+ // Only API data sources are supported.
241+ //
242+ // Format: `accounts/{account}/dataSources/{datasource}`.
193243 string data_source = 3 [(google.api.field_behavior ) = REQUIRED ];
194244}
195245
0 commit comments