@@ -59,6 +59,16 @@ service RegionsService {
5959 option (google.api.method_signature ) = "parent,region,region_id" ;
6060 }
6161
62+ // Creates one or more regions in your Merchant Center account.
63+ // Executing this method requires admin access.
64+ rpc BatchCreateRegions (BatchCreateRegionsRequest )
65+ returns (BatchCreateRegionsResponse ) {
66+ option (google.api.http ) = {
67+ post : "/accounts/v1/{parent=accounts/*}/regions:batchCreate"
68+ body : "*"
69+ };
70+ }
71+
6272 // Updates a region definition in your Merchant Center account.
6373 // Executing this method requires admin access.
6474 rpc UpdateRegion (UpdateRegionRequest ) returns (Region ) {
@@ -69,6 +79,16 @@ service RegionsService {
6979 option (google.api.method_signature ) = "region,update_mask" ;
7080 }
7181
82+ // Updates one or more regions in your Merchant Center account.
83+ // Executing this method requires admin access.
84+ rpc BatchUpdateRegions (BatchUpdateRegionsRequest )
85+ returns (BatchUpdateRegionsResponse ) {
86+ option (google.api.http ) = {
87+ post : "/accounts/v1/{parent=accounts/*}/regions:batchUpdate"
88+ body : "*"
89+ };
90+ }
91+
7292 // Deletes a region definition from your Merchant Center account. Executing
7393 // this method requires admin access.
7494 rpc DeleteRegion (DeleteRegionRequest ) returns (google.protobuf.Empty ) {
@@ -78,6 +98,16 @@ service RegionsService {
7898 option (google.api.method_signature ) = "name" ;
7999 }
80100
101+ // Deletes multiple regions by name from your Merchant Center account.
102+ // Executing this method requires admin access.
103+ rpc BatchDeleteRegions (BatchDeleteRegionsRequest )
104+ returns (google.protobuf.Empty ) {
105+ option (google.api.http ) = {
106+ post : "/accounts/v1/{parent=accounts/*}/regions:batchDelete"
107+ body : "*"
108+ };
109+ }
110+
81111 // Lists the regions in your Merchant Center account.
82112 rpc ListRegions (ListRegionsRequest ) returns (ListRegionsResponse ) {
83113 option (google.api.http ) = {
@@ -118,6 +148,29 @@ message CreateRegionRequest {
118148 Region region = 3 [(google.api.field_behavior ) = REQUIRED ];
119149}
120150
151+ // Request message for the `BatchCreateRegions` method.
152+ message BatchCreateRegionsRequest {
153+ // Required. The account to create one or more regions for.
154+ // Format: `accounts/{account}`
155+ string parent = 1 [
156+ (google.api.field_behavior ) = REQUIRED ,
157+ (google.api.resource_reference ) = {
158+ type : "merchantapi.googleapis.com/Account"
159+ }
160+ ];
161+
162+ // Required. The region(s) to create.
163+ // The maximum number of regions that can be created in a batch is 100.
164+ repeated CreateRegionRequest requests = 2
165+ [(google.api.field_behavior ) = REQUIRED ];
166+ }
167+
168+ // Response message for the `BatchCreateRegions` method.
169+ message BatchCreateRegionsResponse {
170+ // The created region(s).
171+ repeated Region regions = 1 ;
172+ }
173+
121174// Request message for the `UpdateRegion` method.
122175message UpdateRegionRequest {
123176 // Required. The updated region.
@@ -130,6 +183,29 @@ message UpdateRegionRequest {
130183 [(google.api.field_behavior ) = OPTIONAL ];
131184}
132185
186+ // Request message for the `BatchUpdateRegions` method.
187+ message BatchUpdateRegionsRequest {
188+ // Required. The account to update one or more regions for.
189+ // Format: `accounts/{account}`
190+ string parent = 1 [
191+ (google.api.field_behavior ) = REQUIRED ,
192+ (google.api.resource_reference ) = {
193+ type : "merchantapi.googleapis.com/Account"
194+ }
195+ ];
196+
197+ // Required. The region(s) to update.
198+ // The maximum number of regions that can be updated in a batch is 100.
199+ repeated UpdateRegionRequest requests = 2
200+ [(google.api.field_behavior ) = REQUIRED ];
201+ }
202+
203+ // Response message for the `BatchUpdateRegions` method.
204+ message BatchUpdateRegionsResponse {
205+ // The updated region(s).
206+ repeated Region regions = 1 ;
207+ }
208+
133209// Request message for the `DeleteRegion` method.
134210message DeleteRegionRequest {
135211 // Required. The name of the region to delete.
@@ -142,6 +218,23 @@ message DeleteRegionRequest {
142218 ];
143219}
144220
221+ // Request message for the `BatchDeleteRegions` method.
222+ message BatchDeleteRegionsRequest {
223+ // Required. The account to delete one or more regions from.
224+ // Format: `accounts/{account}`
225+ string parent = 1 [
226+ (google.api.field_behavior ) = REQUIRED ,
227+ (google.api.resource_reference ) = {
228+ type : "merchantapi.googleapis.com/Account"
229+ }
230+ ];
231+
232+ // Required. The names of the regions to delete.
233+ // A maximum of 100 regions can be deleted in a batch.
234+ repeated DeleteRegionRequest requests = 2
235+ [(google.api.field_behavior ) = REQUIRED ];
236+ }
237+
145238// Request message for the `ListRegions` method.
146239message ListRegionsRequest {
147240 // Required. The account to list regions for.
0 commit comments