@@ -21,6 +21,7 @@ import "google/api/annotations.proto";
2121import "google/api/client.proto" ;
2222import "google/api/field_behavior.proto" ;
2323import "google/api/resource.proto" ;
24+ import "google/protobuf/field_mask.proto" ;
2425
2526option csharp_namespace = "Google.Ads.AdManager.V1" ;
2627option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager" ;
@@ -60,6 +61,74 @@ service AdUnitService {
6061 };
6162 option (google.api.method_signature ) = "parent" ;
6263 }
64+
65+ // API to create an `AdUnit` object.
66+ rpc CreateAdUnit (CreateAdUnitRequest ) returns (AdUnit ) {
67+ option (google.api.http ) = {
68+ post : "/v1/{parent=networks/*}/adUnits"
69+ body : "ad_unit"
70+ };
71+ option (google.api.method_signature ) = "parent,ad_unit" ;
72+ }
73+
74+ // API to update an `AdUnit` object.
75+ rpc UpdateAdUnit (UpdateAdUnitRequest ) returns (AdUnit ) {
76+ option (google.api.http ) = {
77+ patch : "/v1/{ad_unit.name=networks/*/adUnits/*}"
78+ body : "ad_unit"
79+ };
80+ option (google.api.method_signature ) = "ad_unit,update_mask" ;
81+ }
82+
83+ // API to batch create `AdUnit` objects.
84+ rpc BatchCreateAdUnits (BatchCreateAdUnitsRequest )
85+ returns (BatchCreateAdUnitsResponse ) {
86+ option (google.api.http ) = {
87+ post : "/v1/{parent=networks/*}/adUnits:batchCreate"
88+ body : "*"
89+ };
90+ option (google.api.method_signature ) = "parent,requests" ;
91+ }
92+
93+ // API to batch update `AdUnit` objects.
94+ rpc BatchUpdateAdUnits (BatchUpdateAdUnitsRequest )
95+ returns (BatchUpdateAdUnitsResponse ) {
96+ option (google.api.http ) = {
97+ post : "/v1/{parent=networks/*}/adUnits:batchUpdate"
98+ body : "*"
99+ };
100+ option (google.api.method_signature ) = "parent,requests" ;
101+ }
102+
103+ // API to batch activate `AdUnit` objects.
104+ rpc BatchActivateAdUnits (BatchActivateAdUnitsRequest )
105+ returns (BatchActivateAdUnitsResponse ) {
106+ option (google.api.http ) = {
107+ post : "/v1/{parent=networks/*}/adUnits:batchActivate"
108+ body : "*"
109+ };
110+ option (google.api.method_signature ) = "parent,names" ;
111+ }
112+
113+ // Deactivates a list of `AdUnit` objects.
114+ rpc BatchDeactivateAdUnits (BatchDeactivateAdUnitsRequest )
115+ returns (BatchDeactivateAdUnitsResponse ) {
116+ option (google.api.http ) = {
117+ post : "/v1/{parent=networks/*}/adUnits:batchDeactivate"
118+ body : "*"
119+ };
120+ option (google.api.method_signature ) = "parent,names" ;
121+ }
122+
123+ // Archives a list of `AdUnit` objects.
124+ rpc BatchArchiveAdUnits (BatchArchiveAdUnitsRequest )
125+ returns (BatchArchiveAdUnitsResponse ) {
126+ option (google.api.http ) = {
127+ post : "/v1/{parent=networks/*}/adUnits:batchArchive"
128+ body : "*"
129+ };
130+ option (google.api.method_signature ) = "parent,names" ;
131+ }
63132}
64133
65134// Request object for GetAdUnit method.
@@ -135,6 +204,84 @@ message ListAdUnitsResponse {
135204 int32 total_size = 3 ;
136205}
137206
207+ // Request object for `CreateAdUnit` method.
208+ message CreateAdUnitRequest {
209+ // Required. The parent resource where this `AdUnit` will be created.
210+ // Format: `networks/{network_code}`
211+ string parent = 1 [
212+ (google.api.field_behavior ) = REQUIRED ,
213+ (google.api.resource_reference ) = {
214+ type : "admanager.googleapis.com/Network"
215+ }
216+ ];
217+
218+ // Required. The `AdUnit` to create.
219+ AdUnit ad_unit = 2 [(google.api.field_behavior ) = REQUIRED ];
220+ }
221+
222+ // Request object for `UpdateAdUnit` method.
223+ message UpdateAdUnitRequest {
224+ // Required. The `AdUnit` to update.
225+ //
226+ // The `AdUnit`'s name is used to identify the `AdUnit` to update. Format:
227+ // `networks/{network_code}/adUnits/{ad_unit_id}`
228+ AdUnit ad_unit = 1 [(google.api.field_behavior ) = REQUIRED ];
229+
230+ // Required. The list of fields to update.
231+ google.protobuf.FieldMask update_mask = 2
232+ [(google.api.field_behavior ) = REQUIRED ];
233+ }
234+
235+ // Request object for `BatchCreateAdUnits` method.
236+ message BatchCreateAdUnitsRequest {
237+ // Required. The parent resource where `AdUnits` will be created.
238+ // Format: `networks/{network_code}`
239+ // The parent field in the CreateAdUnitRequest must match this
240+ // field.
241+ string parent = 1 [
242+ (google.api.field_behavior ) = REQUIRED ,
243+ (google.api.resource_reference ) = {
244+ type : "admanager.googleapis.com/Network"
245+ }
246+ ];
247+
248+ // Required. The `AdUnit` objects to create.
249+ // A maximum of 100 objects can be created in a batch.
250+ repeated CreateAdUnitRequest requests = 2
251+ [(google.api.field_behavior ) = REQUIRED ];
252+ }
253+
254+ // Response object for `BatchCreateAdUnits` method.
255+ message BatchCreateAdUnitsResponse {
256+ // The `AdUnit` objects created.
257+ repeated AdUnit ad_units = 1 ;
258+ }
259+
260+ // Request object for `BatchUpdateAdUnits` method.
261+ message BatchUpdateAdUnitsRequest {
262+ // Required. The parent resource where `AdUnits` will be updated.
263+ // Format: `networks/{network_code}`
264+ // The parent field in the UpdateAdUnitRequest must match this
265+ // field.
266+ string parent = 1 [
267+ (google.api.field_behavior ) = REQUIRED ,
268+ (google.api.resource_reference ) = {
269+ type : "admanager.googleapis.com/Network"
270+ }
271+ ];
272+
273+ // Required. The `AdUnit` objects to update.
274+ // A maximum of 100 objects can be updated in a batch.
275+ repeated UpdateAdUnitRequest requests = 2
276+ [(google.api.field_behavior ) = REQUIRED ];
277+ }
278+
279+ // Response object for `BatchUpdateAdUnits` method.
280+ message BatchUpdateAdUnitsResponse {
281+ // The `AdUnit` objects updated.
282+ repeated AdUnit ad_units = 1 ;
283+ }
284+
138285// Request object for ListAdUnitSizes method.
139286message ListAdUnitSizesRequest {
140287 // Required. The parent, which owns this collection of AdUnitSizes.
@@ -195,3 +342,72 @@ message ListAdUnitSizesResponse {
195342 // https://developers.google.com/ad-manager/api/beta/field-masks
196343 int32 total_size = 3 ;
197344}
345+
346+ // Request object for `BatchActivateAdUnits` method.
347+ message BatchActivateAdUnitsRequest {
348+ // Required. Format: `networks/{network_code}`
349+ string parent = 1 [
350+ (google.api.field_behavior ) = REQUIRED ,
351+ (google.api.resource_reference ) = {
352+ type : "admanager.googleapis.com/Network"
353+ }
354+ ];
355+
356+ // Required. The resource names of the `AdUnit`s to activate.
357+ // Format: `networks/{network_code}/adUnits/{ad_unit_id}`
358+ repeated string names = 2 [
359+ (google.api.field_behavior ) = REQUIRED ,
360+ (google.api.resource_reference ) = {
361+ type : "admanager.googleapis.com/AdUnit"
362+ }
363+ ];
364+ }
365+
366+ // Response object for `BatchActivateAdUnits` method.
367+ message BatchActivateAdUnitsResponse {}
368+
369+ // Request object for `BatchDeactivateAdUnits` method.
370+ message BatchDeactivateAdUnitsRequest {
371+ // Required. Format: `networks/{network_code}`
372+ string parent = 1 [
373+ (google.api.field_behavior ) = REQUIRED ,
374+ (google.api.resource_reference ) = {
375+ type : "admanager.googleapis.com/Network"
376+ }
377+ ];
378+
379+ // Required. The resource names of the `AdUnit`s to deactivate.
380+ // Format: `networks/{network_code}/adUnits/{ad_unit_id}`
381+ repeated string names = 2 [
382+ (google.api.field_behavior ) = REQUIRED ,
383+ (google.api.resource_reference ) = {
384+ type : "admanager.googleapis.com/AdUnit"
385+ }
386+ ];
387+ }
388+
389+ // Response object for `BatchDeactivateAdUnits` method.
390+ message BatchDeactivateAdUnitsResponse {}
391+
392+ // Request object for `BatchArchiveAdUnits` method.
393+ message BatchArchiveAdUnitsRequest {
394+ // Required. Format: `networks/{network_code}`
395+ string parent = 1 [
396+ (google.api.field_behavior ) = REQUIRED ,
397+ (google.api.resource_reference ) = {
398+ type : "admanager.googleapis.com/Network"
399+ }
400+ ];
401+
402+ // Required. The resource names of the `AdUnit`s to archive.
403+ // Format: `networks/{network_code}/adUnits/{ad_unit_id}`
404+ repeated string names = 2 [
405+ (google.api.field_behavior ) = REQUIRED ,
406+ (google.api.resource_reference ) = {
407+ type : "admanager.googleapis.com/AdUnit"
408+ }
409+ ];
410+ }
411+
412+ // Response object for `BatchArchiveAdUnits` method.
413+ message BatchArchiveAdUnitsResponse {}
0 commit comments