File: displayvideo_v2.advertisers.campaigns.html

package info (click to toggle)
python-googleapi 2.188.0-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 573,720 kB
  • sloc: python: 11,217; javascript: 249; sh: 114; makefile: 59
file content (647 lines) | stat: -rw-r--r-- 90,830 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
<html><body>
<style>

body, h1, h2, h3, div, span, p, pre, a {
  margin: 0;
  padding: 0;
  border: 0;
  font-weight: inherit;
  font-style: inherit;
  font-size: 100%;
  font-family: inherit;
  vertical-align: baseline;
}

body {
  font-size: 13px;
  padding: 1em;
}

h1 {
  font-size: 26px;
  margin-bottom: 1em;
}

h2 {
  font-size: 24px;
  margin-bottom: 1em;
}

h3 {
  font-size: 20px;
  margin-bottom: 1em;
  margin-top: 1em;
}

pre, code {
  line-height: 1.5;
  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}

pre {
  margin-top: 0.5em;
}

h1, h2, h3, p {
  font-family: Arial, sans serif;
}

h1, h2, h3 {
  border-bottom: solid #CCC 1px;
}

.toc_element {
  margin-top: 0.5em;
}

.firstline {
  margin-left: 2 em;
}

.method  {
  margin-top: 1em;
  border: solid 1px #CCC;
  padding: 1em;
  background: #EEE;
}

.details {
  font-weight: bold;
  font-size: 14px;
}

</style>

<h1><a href="displayvideo_v2.html">Display & Video 360 API</a> . <a href="displayvideo_v2.advertisers.html">advertisers</a> . <a href="displayvideo_v2.advertisers.campaigns.html">campaigns</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
  <code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<p class="toc_element">
  <code><a href="#create">create(advertiserId, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Creates a new campaign. Returns the newly created campaign if successful.</p>
<p class="toc_element">
  <code><a href="#delete">delete(advertiserId, campaignId, x__xgafv=None)</a></code></p>
<p class="firstline">Permanently deletes a campaign. A deleted campaign cannot be recovered. The campaign should be archived first, i.e. set entity_status to `ENTITY_STATUS_ARCHIVED`, to be able to delete it. **This method regularly experiences high latency.** We recommend [increasing your default timeout](/display-video/api/guides/best-practices/timeouts#client_library_timeout) to avoid errors.</p>
<p class="toc_element">
  <code><a href="#get">get(advertiserId, campaignId, x__xgafv=None)</a></code></p>
<p class="firstline">Gets a campaign.</p>
<p class="toc_element">
  <code><a href="#list">list(advertiserId, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
<p class="firstline">Lists campaigns in an advertiser. The order is defined by the order_by parameter. If a filter by entity_status is not specified, campaigns with `ENTITY_STATUS_ARCHIVED` will not be included in the results.</p>
<p class="toc_element">
  <code><a href="#list_next">list_next()</a></code></p>
<p class="firstline">Retrieves the next page of results.</p>
<p class="toc_element">
  <code><a href="#patch">patch(advertiserId, campaignId, body=None, updateMask=None, x__xgafv=None)</a></code></p>
<p class="firstline">Updates an existing campaign. Returns the updated campaign if successful.</p>
<h3>Method Details</h3>
<div class="method">
    <code class="details" id="close">close()</code>
  <pre>Close httplib2 connections.</pre>
</div>

<div class="method">
    <code class="details" id="create">create(advertiserId, body=None, x__xgafv=None)</code>
  <pre>Creates a new campaign. Returns the newly created campaign if successful.

Args:
  advertiserId: string, Output only. The unique ID of the advertiser the campaign belongs to. (required)
  body: object, The request body.
    The object takes the form of:

{ # A single campaign.
  &quot;advertiserId&quot;: &quot;A String&quot;, # Output only. The unique ID of the advertiser the campaign belongs to.
  &quot;campaignBudgets&quot;: [ # The list of budgets available to this campaign. If this field is not set, the campaign uses an unlimited budget.
    { # Settings that control how the campaign budget is allocated.
      &quot;budgetAmountMicros&quot;: &quot;A String&quot;, # Required. The total amount the linked insertion order segments can budget. The amount is in micros. Must be greater than 0. For example, 500000000 represents 500 standard units of the currency.
      &quot;budgetId&quot;: &quot;A String&quot;, # The unique ID of the campaign budget. Assigned by the system. Do not set for new budgets. Must be included when updating or adding budgets to campaign_budgets. Otherwise, a new ID will be generated and assigned.
      &quot;budgetUnit&quot;: &quot;A String&quot;, # Required. Immutable. Specifies whether the budget is measured in currency or impressions.
      &quot;dateRange&quot;: { # A date range. # Required. The date range for the campaign budget. Linked budget segments may have a different date range. They are resolved relative to the parent advertiser&#x27;s time zone. Both `start_date` and `end_date` must be before the year 2037.
        &quot;endDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # The upper bound of the date range, inclusive. Must specify a positive value for `year`, `month`, and `day`.
          &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
          &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
        &quot;startDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # The lower bound of the date range, inclusive. Must specify a positive value for `year`, `month`, and `day`.
          &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
          &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
      },
      &quot;displayName&quot;: &quot;A String&quot;, # Required. The display name of the budget. Must be UTF-8 encoded with a maximum size of 240 bytes.
      &quot;externalBudgetId&quot;: &quot;A String&quot;, # Immutable. The ID identifying this budget to the external source. If this field is set and the invoice detail level of the corresponding billing profile is set to &quot;Budget level PO&quot;, all impressions served against this budget will include this ID on the invoice. Must be unique under the campaign.
      &quot;externalBudgetSource&quot;: &quot;A String&quot;, # Required. The external source of the budget.
      &quot;invoiceGroupingId&quot;: &quot;A String&quot;, # Immutable. The ID used to group budgets to be included the same invoice. If this field is set and the invoice level of the corresponding billing profile is set to &quot;Budget invoice grouping ID&quot;, all external_budget_id sharing the same invoice_grouping_id will be grouped in the same invoice.
      &quot;prismaConfig&quot;: { # Settings specific to the Mediaocean Prisma tool. # Additional metadata for use by the Mediaocean Prisma tool. Required for Mediaocean budgets. Only applicable to prisma_enabled advertisers.
        &quot;prismaCpeCode&quot;: { # Google Payments Center supports searching and filtering on the component fields of this code. # Required. Relevant client, product, and estimate codes from the Mediaocean Prisma tool.
          &quot;prismaClientCode&quot;: &quot;A String&quot;, # The Prisma client code.
          &quot;prismaEstimateCode&quot;: &quot;A String&quot;, # The Prisma estimate code.
          &quot;prismaProductCode&quot;: &quot;A String&quot;, # The Prisma product code.
        },
        &quot;prismaType&quot;: &quot;A String&quot;, # Required. The Prisma type.
        &quot;supplier&quot;: &quot;A String&quot;, # Required. The entity allocated this budget (DSP, site, etc.).
      },
    },
  ],
  &quot;campaignFlight&quot;: { # Settings that track the planned spend and duration of a campaign. # Required. The planned spend and duration of the campaign.
    &quot;plannedDates&quot;: { # A date range. # Required. The dates that the campaign is expected to run. They are resolved relative to the parent advertiser&#x27;s time zone. * The dates specified here will not affect serving. They are used to generate alerts and warnings. For example, if the flight date of any child insertion order is outside the range of these dates, the user interface will show a warning. * `start_date` is required and must be the current date or later. * `end_date` is optional. If specified, it must be the `start_date` or later. * Any specified date must be before the year 2037.
      &quot;endDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # The upper bound of the date range, inclusive. Must specify a positive value for `year`, `month`, and `day`.
        &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
        &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
        &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
      },
      &quot;startDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # The lower bound of the date range, inclusive. Must specify a positive value for `year`, `month`, and `day`.
        &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
        &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
        &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
      },
    },
    &quot;plannedSpendAmountMicros&quot;: &quot;A String&quot;, # The amount the campaign is expected to spend for its given planned_dates. This will not limit serving, but will be used for tracking spend in the DV360 UI. The amount is in micros. Must be greater than or equal to 0. For example, 500000000 represents 500 standard units of the currency.
  },
  &quot;campaignGoal&quot;: { # Settings that control the goal of a campaign. # Required. The goal of the campaign.
    &quot;campaignGoalType&quot;: &quot;A String&quot;, # Required. The type of the campaign goal.
    &quot;performanceGoal&quot;: { # Settings that control the performance goal of a campaign. # Required. The performance goal of the campaign. Acceptable values for performance_goal_type are: * `PERFORMANCE_GOAL_TYPE_CPM` * `PERFORMANCE_GOAL_TYPE_CPC` * `PERFORMANCE_GOAL_TYPE_CPA` * `PERFORMANCE_GOAL_TYPE_CPIAVC` * `PERFORMANCE_GOAL_TYPE_CTR` * `PERFORMANCE_GOAL_TYPE_VIEWABILITY` * `PERFORMANCE_GOAL_TYPE_OTHER`
      &quot;performanceGoalAmountMicros&quot;: &quot;A String&quot;, # The goal amount, in micros of the advertiser&#x27;s currency. Applicable when performance_goal_type is one of: * `PERFORMANCE_GOAL_TYPE_CPM` * `PERFORMANCE_GOAL_TYPE_CPC` * `PERFORMANCE_GOAL_TYPE_CPA` * `PERFORMANCE_GOAL_TYPE_CPIAVC` * `PERFORMANCE_GOAL_TYPE_VCPM` For example 1500000 represents 1.5 standard units of the currency.
      &quot;performanceGoalPercentageMicros&quot;: &quot;A String&quot;, # The decimal representation of the goal percentage in micros. Applicable when performance_goal_type is one of: * `PERFORMANCE_GOAL_TYPE_CTR` * `PERFORMANCE_GOAL_TYPE_VIEWABILITY` * `PERFORMANCE_GOAL_TYPE_CLICK_CVR` * `PERFORMANCE_GOAL_TYPE_IMPRESSION_CVR` * `PERFORMANCE_GOAL_TYPE_VTR` * `PERFORMANCE_GOAL_TYPE_AUDIO_COMPLETION_RATE` * `PERFORMANCE_GOAL_TYPE_VIDEO_COMPLETION_RATE` For example, 70000 represents 7% (decimal 0.07).
      &quot;performanceGoalString&quot;: &quot;A String&quot;, # A key performance indicator (KPI) string, which can be empty. Must be UTF-8 encoded with a length of no more than 100 characters. Applicable when performance_goal_type is set to `PERFORMANCE_GOAL_TYPE_OTHER`.
      &quot;performanceGoalType&quot;: &quot;A String&quot;, # Required. The type of the performance goal.
    },
  },
  &quot;campaignId&quot;: &quot;A String&quot;, # Output only. The unique ID of the campaign. Assigned by the system.
  &quot;displayName&quot;: &quot;A String&quot;, # Required. The display name of the campaign. Must be UTF-8 encoded with a maximum size of 240 bytes.
  &quot;entityStatus&quot;: &quot;A String&quot;, # Required. Controls whether or not the insertion orders under this campaign can spend their budgets and bid on inventory. * Accepted values are `ENTITY_STATUS_ACTIVE`, `ENTITY_STATUS_ARCHIVED`, and `ENTITY_STATUS_PAUSED`. * For CreateCampaign method, `ENTITY_STATUS_ARCHIVED` is not allowed.
  &quot;frequencyCap&quot;: { # Settings that control the number of times a user may be shown with the same ad during a given time period. # Required. The frequency cap setting of the campaign. *Warning*: On **February 28, 2025**, frequency cap time periods greater than 30 days will no longer be accepted. [Read more about this announced change](/display-video/api/deprecations#features.lifetime_frequency_cap)
    &quot;maxImpressions&quot;: 42, # The maximum number of times a user may be shown the same ad during this period. Must be greater than 0. Required when unlimited is `false` and max_views is not set.
    &quot;maxViews&quot;: 42, # Optional. The maximum number of times a user may click-through or fully view an ad during this period until it is no longer served to them. Must be greater than 0. Only applicable to YouTube and Partners resources. Required when unlimited is `false` and max_impressions is not set.
    &quot;timeUnit&quot;: &quot;A String&quot;, # The time unit in which the frequency cap will be applied. Required when unlimited is `false`.
    &quot;timeUnitCount&quot;: 42, # The number of time_unit the frequency cap will last. Required when unlimited is `false`. The following restrictions apply based on the value of time_unit: * `TIME_UNIT_MONTHS` - must be 1 * `TIME_UNIT_WEEKS` - must be between 1 and 4 * `TIME_UNIT_DAYS` - must be between 1 and 6 * `TIME_UNIT_HOURS` - must be between 1 and 23 * `TIME_UNIT_MINUTES` - must be between 1 and 59
    &quot;unlimited&quot;: True or False, # Whether unlimited frequency capping is applied. When this field is set to `true`, the remaining frequency cap fields are not applicable.
  },
  &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the campaign.
  &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The timestamp when the campaign was last updated. Assigned by the system.
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A single campaign.
  &quot;advertiserId&quot;: &quot;A String&quot;, # Output only. The unique ID of the advertiser the campaign belongs to.
  &quot;campaignBudgets&quot;: [ # The list of budgets available to this campaign. If this field is not set, the campaign uses an unlimited budget.
    { # Settings that control how the campaign budget is allocated.
      &quot;budgetAmountMicros&quot;: &quot;A String&quot;, # Required. The total amount the linked insertion order segments can budget. The amount is in micros. Must be greater than 0. For example, 500000000 represents 500 standard units of the currency.
      &quot;budgetId&quot;: &quot;A String&quot;, # The unique ID of the campaign budget. Assigned by the system. Do not set for new budgets. Must be included when updating or adding budgets to campaign_budgets. Otherwise, a new ID will be generated and assigned.
      &quot;budgetUnit&quot;: &quot;A String&quot;, # Required. Immutable. Specifies whether the budget is measured in currency or impressions.
      &quot;dateRange&quot;: { # A date range. # Required. The date range for the campaign budget. Linked budget segments may have a different date range. They are resolved relative to the parent advertiser&#x27;s time zone. Both `start_date` and `end_date` must be before the year 2037.
        &quot;endDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # The upper bound of the date range, inclusive. Must specify a positive value for `year`, `month`, and `day`.
          &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
          &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
        &quot;startDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # The lower bound of the date range, inclusive. Must specify a positive value for `year`, `month`, and `day`.
          &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
          &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
      },
      &quot;displayName&quot;: &quot;A String&quot;, # Required. The display name of the budget. Must be UTF-8 encoded with a maximum size of 240 bytes.
      &quot;externalBudgetId&quot;: &quot;A String&quot;, # Immutable. The ID identifying this budget to the external source. If this field is set and the invoice detail level of the corresponding billing profile is set to &quot;Budget level PO&quot;, all impressions served against this budget will include this ID on the invoice. Must be unique under the campaign.
      &quot;externalBudgetSource&quot;: &quot;A String&quot;, # Required. The external source of the budget.
      &quot;invoiceGroupingId&quot;: &quot;A String&quot;, # Immutable. The ID used to group budgets to be included the same invoice. If this field is set and the invoice level of the corresponding billing profile is set to &quot;Budget invoice grouping ID&quot;, all external_budget_id sharing the same invoice_grouping_id will be grouped in the same invoice.
      &quot;prismaConfig&quot;: { # Settings specific to the Mediaocean Prisma tool. # Additional metadata for use by the Mediaocean Prisma tool. Required for Mediaocean budgets. Only applicable to prisma_enabled advertisers.
        &quot;prismaCpeCode&quot;: { # Google Payments Center supports searching and filtering on the component fields of this code. # Required. Relevant client, product, and estimate codes from the Mediaocean Prisma tool.
          &quot;prismaClientCode&quot;: &quot;A String&quot;, # The Prisma client code.
          &quot;prismaEstimateCode&quot;: &quot;A String&quot;, # The Prisma estimate code.
          &quot;prismaProductCode&quot;: &quot;A String&quot;, # The Prisma product code.
        },
        &quot;prismaType&quot;: &quot;A String&quot;, # Required. The Prisma type.
        &quot;supplier&quot;: &quot;A String&quot;, # Required. The entity allocated this budget (DSP, site, etc.).
      },
    },
  ],
  &quot;campaignFlight&quot;: { # Settings that track the planned spend and duration of a campaign. # Required. The planned spend and duration of the campaign.
    &quot;plannedDates&quot;: { # A date range. # Required. The dates that the campaign is expected to run. They are resolved relative to the parent advertiser&#x27;s time zone. * The dates specified here will not affect serving. They are used to generate alerts and warnings. For example, if the flight date of any child insertion order is outside the range of these dates, the user interface will show a warning. * `start_date` is required and must be the current date or later. * `end_date` is optional. If specified, it must be the `start_date` or later. * Any specified date must be before the year 2037.
      &quot;endDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # The upper bound of the date range, inclusive. Must specify a positive value for `year`, `month`, and `day`.
        &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
        &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
        &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
      },
      &quot;startDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # The lower bound of the date range, inclusive. Must specify a positive value for `year`, `month`, and `day`.
        &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
        &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
        &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
      },
    },
    &quot;plannedSpendAmountMicros&quot;: &quot;A String&quot;, # The amount the campaign is expected to spend for its given planned_dates. This will not limit serving, but will be used for tracking spend in the DV360 UI. The amount is in micros. Must be greater than or equal to 0. For example, 500000000 represents 500 standard units of the currency.
  },
  &quot;campaignGoal&quot;: { # Settings that control the goal of a campaign. # Required. The goal of the campaign.
    &quot;campaignGoalType&quot;: &quot;A String&quot;, # Required. The type of the campaign goal.
    &quot;performanceGoal&quot;: { # Settings that control the performance goal of a campaign. # Required. The performance goal of the campaign. Acceptable values for performance_goal_type are: * `PERFORMANCE_GOAL_TYPE_CPM` * `PERFORMANCE_GOAL_TYPE_CPC` * `PERFORMANCE_GOAL_TYPE_CPA` * `PERFORMANCE_GOAL_TYPE_CPIAVC` * `PERFORMANCE_GOAL_TYPE_CTR` * `PERFORMANCE_GOAL_TYPE_VIEWABILITY` * `PERFORMANCE_GOAL_TYPE_OTHER`
      &quot;performanceGoalAmountMicros&quot;: &quot;A String&quot;, # The goal amount, in micros of the advertiser&#x27;s currency. Applicable when performance_goal_type is one of: * `PERFORMANCE_GOAL_TYPE_CPM` * `PERFORMANCE_GOAL_TYPE_CPC` * `PERFORMANCE_GOAL_TYPE_CPA` * `PERFORMANCE_GOAL_TYPE_CPIAVC` * `PERFORMANCE_GOAL_TYPE_VCPM` For example 1500000 represents 1.5 standard units of the currency.
      &quot;performanceGoalPercentageMicros&quot;: &quot;A String&quot;, # The decimal representation of the goal percentage in micros. Applicable when performance_goal_type is one of: * `PERFORMANCE_GOAL_TYPE_CTR` * `PERFORMANCE_GOAL_TYPE_VIEWABILITY` * `PERFORMANCE_GOAL_TYPE_CLICK_CVR` * `PERFORMANCE_GOAL_TYPE_IMPRESSION_CVR` * `PERFORMANCE_GOAL_TYPE_VTR` * `PERFORMANCE_GOAL_TYPE_AUDIO_COMPLETION_RATE` * `PERFORMANCE_GOAL_TYPE_VIDEO_COMPLETION_RATE` For example, 70000 represents 7% (decimal 0.07).
      &quot;performanceGoalString&quot;: &quot;A String&quot;, # A key performance indicator (KPI) string, which can be empty. Must be UTF-8 encoded with a length of no more than 100 characters. Applicable when performance_goal_type is set to `PERFORMANCE_GOAL_TYPE_OTHER`.
      &quot;performanceGoalType&quot;: &quot;A String&quot;, # Required. The type of the performance goal.
    },
  },
  &quot;campaignId&quot;: &quot;A String&quot;, # Output only. The unique ID of the campaign. Assigned by the system.
  &quot;displayName&quot;: &quot;A String&quot;, # Required. The display name of the campaign. Must be UTF-8 encoded with a maximum size of 240 bytes.
  &quot;entityStatus&quot;: &quot;A String&quot;, # Required. Controls whether or not the insertion orders under this campaign can spend their budgets and bid on inventory. * Accepted values are `ENTITY_STATUS_ACTIVE`, `ENTITY_STATUS_ARCHIVED`, and `ENTITY_STATUS_PAUSED`. * For CreateCampaign method, `ENTITY_STATUS_ARCHIVED` is not allowed.
  &quot;frequencyCap&quot;: { # Settings that control the number of times a user may be shown with the same ad during a given time period. # Required. The frequency cap setting of the campaign. *Warning*: On **February 28, 2025**, frequency cap time periods greater than 30 days will no longer be accepted. [Read more about this announced change](/display-video/api/deprecations#features.lifetime_frequency_cap)
    &quot;maxImpressions&quot;: 42, # The maximum number of times a user may be shown the same ad during this period. Must be greater than 0. Required when unlimited is `false` and max_views is not set.
    &quot;maxViews&quot;: 42, # Optional. The maximum number of times a user may click-through or fully view an ad during this period until it is no longer served to them. Must be greater than 0. Only applicable to YouTube and Partners resources. Required when unlimited is `false` and max_impressions is not set.
    &quot;timeUnit&quot;: &quot;A String&quot;, # The time unit in which the frequency cap will be applied. Required when unlimited is `false`.
    &quot;timeUnitCount&quot;: 42, # The number of time_unit the frequency cap will last. Required when unlimited is `false`. The following restrictions apply based on the value of time_unit: * `TIME_UNIT_MONTHS` - must be 1 * `TIME_UNIT_WEEKS` - must be between 1 and 4 * `TIME_UNIT_DAYS` - must be between 1 and 6 * `TIME_UNIT_HOURS` - must be between 1 and 23 * `TIME_UNIT_MINUTES` - must be between 1 and 59
    &quot;unlimited&quot;: True or False, # Whether unlimited frequency capping is applied. When this field is set to `true`, the remaining frequency cap fields are not applicable.
  },
  &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the campaign.
  &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The timestamp when the campaign was last updated. Assigned by the system.
}</pre>
</div>

<div class="method">
    <code class="details" id="delete">delete(advertiserId, campaignId, x__xgafv=None)</code>
  <pre>Permanently deletes a campaign. A deleted campaign cannot be recovered. The campaign should be archived first, i.e. set entity_status to `ENTITY_STATUS_ARCHIVED`, to be able to delete it. **This method regularly experiences high latency.** We recommend [increasing your default timeout](/display-video/api/guides/best-practices/timeouts#client_library_timeout) to avoid errors.

Args:
  advertiserId: string, The ID of the advertiser this campaign belongs to. (required)
  campaignId: string, The ID of the campaign we need to delete. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
}</pre>
</div>

<div class="method">
    <code class="details" id="get">get(advertiserId, campaignId, x__xgafv=None)</code>
  <pre>Gets a campaign.

Args:
  advertiserId: string, Required. The ID of the advertiser this campaign belongs to. (required)
  campaignId: string, Required. The ID of the campaign to fetch. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A single campaign.
  &quot;advertiserId&quot;: &quot;A String&quot;, # Output only. The unique ID of the advertiser the campaign belongs to.
  &quot;campaignBudgets&quot;: [ # The list of budgets available to this campaign. If this field is not set, the campaign uses an unlimited budget.
    { # Settings that control how the campaign budget is allocated.
      &quot;budgetAmountMicros&quot;: &quot;A String&quot;, # Required. The total amount the linked insertion order segments can budget. The amount is in micros. Must be greater than 0. For example, 500000000 represents 500 standard units of the currency.
      &quot;budgetId&quot;: &quot;A String&quot;, # The unique ID of the campaign budget. Assigned by the system. Do not set for new budgets. Must be included when updating or adding budgets to campaign_budgets. Otherwise, a new ID will be generated and assigned.
      &quot;budgetUnit&quot;: &quot;A String&quot;, # Required. Immutable. Specifies whether the budget is measured in currency or impressions.
      &quot;dateRange&quot;: { # A date range. # Required. The date range for the campaign budget. Linked budget segments may have a different date range. They are resolved relative to the parent advertiser&#x27;s time zone. Both `start_date` and `end_date` must be before the year 2037.
        &quot;endDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # The upper bound of the date range, inclusive. Must specify a positive value for `year`, `month`, and `day`.
          &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
          &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
        &quot;startDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # The lower bound of the date range, inclusive. Must specify a positive value for `year`, `month`, and `day`.
          &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
          &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
      },
      &quot;displayName&quot;: &quot;A String&quot;, # Required. The display name of the budget. Must be UTF-8 encoded with a maximum size of 240 bytes.
      &quot;externalBudgetId&quot;: &quot;A String&quot;, # Immutable. The ID identifying this budget to the external source. If this field is set and the invoice detail level of the corresponding billing profile is set to &quot;Budget level PO&quot;, all impressions served against this budget will include this ID on the invoice. Must be unique under the campaign.
      &quot;externalBudgetSource&quot;: &quot;A String&quot;, # Required. The external source of the budget.
      &quot;invoiceGroupingId&quot;: &quot;A String&quot;, # Immutable. The ID used to group budgets to be included the same invoice. If this field is set and the invoice level of the corresponding billing profile is set to &quot;Budget invoice grouping ID&quot;, all external_budget_id sharing the same invoice_grouping_id will be grouped in the same invoice.
      &quot;prismaConfig&quot;: { # Settings specific to the Mediaocean Prisma tool. # Additional metadata for use by the Mediaocean Prisma tool. Required for Mediaocean budgets. Only applicable to prisma_enabled advertisers.
        &quot;prismaCpeCode&quot;: { # Google Payments Center supports searching and filtering on the component fields of this code. # Required. Relevant client, product, and estimate codes from the Mediaocean Prisma tool.
          &quot;prismaClientCode&quot;: &quot;A String&quot;, # The Prisma client code.
          &quot;prismaEstimateCode&quot;: &quot;A String&quot;, # The Prisma estimate code.
          &quot;prismaProductCode&quot;: &quot;A String&quot;, # The Prisma product code.
        },
        &quot;prismaType&quot;: &quot;A String&quot;, # Required. The Prisma type.
        &quot;supplier&quot;: &quot;A String&quot;, # Required. The entity allocated this budget (DSP, site, etc.).
      },
    },
  ],
  &quot;campaignFlight&quot;: { # Settings that track the planned spend and duration of a campaign. # Required. The planned spend and duration of the campaign.
    &quot;plannedDates&quot;: { # A date range. # Required. The dates that the campaign is expected to run. They are resolved relative to the parent advertiser&#x27;s time zone. * The dates specified here will not affect serving. They are used to generate alerts and warnings. For example, if the flight date of any child insertion order is outside the range of these dates, the user interface will show a warning. * `start_date` is required and must be the current date or later. * `end_date` is optional. If specified, it must be the `start_date` or later. * Any specified date must be before the year 2037.
      &quot;endDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # The upper bound of the date range, inclusive. Must specify a positive value for `year`, `month`, and `day`.
        &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
        &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
        &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
      },
      &quot;startDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # The lower bound of the date range, inclusive. Must specify a positive value for `year`, `month`, and `day`.
        &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
        &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
        &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
      },
    },
    &quot;plannedSpendAmountMicros&quot;: &quot;A String&quot;, # The amount the campaign is expected to spend for its given planned_dates. This will not limit serving, but will be used for tracking spend in the DV360 UI. The amount is in micros. Must be greater than or equal to 0. For example, 500000000 represents 500 standard units of the currency.
  },
  &quot;campaignGoal&quot;: { # Settings that control the goal of a campaign. # Required. The goal of the campaign.
    &quot;campaignGoalType&quot;: &quot;A String&quot;, # Required. The type of the campaign goal.
    &quot;performanceGoal&quot;: { # Settings that control the performance goal of a campaign. # Required. The performance goal of the campaign. Acceptable values for performance_goal_type are: * `PERFORMANCE_GOAL_TYPE_CPM` * `PERFORMANCE_GOAL_TYPE_CPC` * `PERFORMANCE_GOAL_TYPE_CPA` * `PERFORMANCE_GOAL_TYPE_CPIAVC` * `PERFORMANCE_GOAL_TYPE_CTR` * `PERFORMANCE_GOAL_TYPE_VIEWABILITY` * `PERFORMANCE_GOAL_TYPE_OTHER`
      &quot;performanceGoalAmountMicros&quot;: &quot;A String&quot;, # The goal amount, in micros of the advertiser&#x27;s currency. Applicable when performance_goal_type is one of: * `PERFORMANCE_GOAL_TYPE_CPM` * `PERFORMANCE_GOAL_TYPE_CPC` * `PERFORMANCE_GOAL_TYPE_CPA` * `PERFORMANCE_GOAL_TYPE_CPIAVC` * `PERFORMANCE_GOAL_TYPE_VCPM` For example 1500000 represents 1.5 standard units of the currency.
      &quot;performanceGoalPercentageMicros&quot;: &quot;A String&quot;, # The decimal representation of the goal percentage in micros. Applicable when performance_goal_type is one of: * `PERFORMANCE_GOAL_TYPE_CTR` * `PERFORMANCE_GOAL_TYPE_VIEWABILITY` * `PERFORMANCE_GOAL_TYPE_CLICK_CVR` * `PERFORMANCE_GOAL_TYPE_IMPRESSION_CVR` * `PERFORMANCE_GOAL_TYPE_VTR` * `PERFORMANCE_GOAL_TYPE_AUDIO_COMPLETION_RATE` * `PERFORMANCE_GOAL_TYPE_VIDEO_COMPLETION_RATE` For example, 70000 represents 7% (decimal 0.07).
      &quot;performanceGoalString&quot;: &quot;A String&quot;, # A key performance indicator (KPI) string, which can be empty. Must be UTF-8 encoded with a length of no more than 100 characters. Applicable when performance_goal_type is set to `PERFORMANCE_GOAL_TYPE_OTHER`.
      &quot;performanceGoalType&quot;: &quot;A String&quot;, # Required. The type of the performance goal.
    },
  },
  &quot;campaignId&quot;: &quot;A String&quot;, # Output only. The unique ID of the campaign. Assigned by the system.
  &quot;displayName&quot;: &quot;A String&quot;, # Required. The display name of the campaign. Must be UTF-8 encoded with a maximum size of 240 bytes.
  &quot;entityStatus&quot;: &quot;A String&quot;, # Required. Controls whether or not the insertion orders under this campaign can spend their budgets and bid on inventory. * Accepted values are `ENTITY_STATUS_ACTIVE`, `ENTITY_STATUS_ARCHIVED`, and `ENTITY_STATUS_PAUSED`. * For CreateCampaign method, `ENTITY_STATUS_ARCHIVED` is not allowed.
  &quot;frequencyCap&quot;: { # Settings that control the number of times a user may be shown with the same ad during a given time period. # Required. The frequency cap setting of the campaign. *Warning*: On **February 28, 2025**, frequency cap time periods greater than 30 days will no longer be accepted. [Read more about this announced change](/display-video/api/deprecations#features.lifetime_frequency_cap)
    &quot;maxImpressions&quot;: 42, # The maximum number of times a user may be shown the same ad during this period. Must be greater than 0. Required when unlimited is `false` and max_views is not set.
    &quot;maxViews&quot;: 42, # Optional. The maximum number of times a user may click-through or fully view an ad during this period until it is no longer served to them. Must be greater than 0. Only applicable to YouTube and Partners resources. Required when unlimited is `false` and max_impressions is not set.
    &quot;timeUnit&quot;: &quot;A String&quot;, # The time unit in which the frequency cap will be applied. Required when unlimited is `false`.
    &quot;timeUnitCount&quot;: 42, # The number of time_unit the frequency cap will last. Required when unlimited is `false`. The following restrictions apply based on the value of time_unit: * `TIME_UNIT_MONTHS` - must be 1 * `TIME_UNIT_WEEKS` - must be between 1 and 4 * `TIME_UNIT_DAYS` - must be between 1 and 6 * `TIME_UNIT_HOURS` - must be between 1 and 23 * `TIME_UNIT_MINUTES` - must be between 1 and 59
    &quot;unlimited&quot;: True or False, # Whether unlimited frequency capping is applied. When this field is set to `true`, the remaining frequency cap fields are not applicable.
  },
  &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the campaign.
  &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The timestamp when the campaign was last updated. Assigned by the system.
}</pre>
</div>

<div class="method">
    <code class="details" id="list">list(advertiserId, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)</code>
  <pre>Lists campaigns in an advertiser. The order is defined by the order_by parameter. If a filter by entity_status is not specified, campaigns with `ENTITY_STATUS_ARCHIVED` will not be included in the results.

Args:
  advertiserId: string, The ID of the advertiser to list campaigns for. (required)
  filter: string, Allows filtering by campaign fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * The `updateTime` field must use the `GREATER THAN OR EQUAL TO (&gt;=)` or `LESS THAN OR EQUAL TO (&lt;=)` operators. * All other fields must use the `EQUALS (=)` operator. Supported fields: * `campaignId` * `displayName` * `entityStatus` * `updateTime` (input in ISO 8601 format, or `YYYY-MM-DDTHH:MM:SSZ`) Examples: * All `ENTITY_STATUS_ACTIVE` or `ENTITY_STATUS_PAUSED` campaigns under an advertiser: `(entityStatus=&quot;ENTITY_STATUS_ACTIVE&quot; OR entityStatus=&quot;ENTITY_STATUS_PAUSED&quot;)` * All campaigns with an update time less than or equal to 2020-11-04T18:54:47Z (format of ISO 8601): `updateTime&lt;=&quot;2020-11-04T18:54:47Z&quot;` * All campaigns with an update time greater than or equal to 2020-11-04T18:54:47Z (format of ISO 8601): `updateTime&gt;=&quot;2020-11-04T18:54:47Z&quot;` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.
  orderBy: string, Field by which to sort the list. Acceptable values are: * `displayName` (default) * `entityStatus` * `updateTime` The default sorting order is ascending. To specify descending order for a field, a suffix &quot;desc&quot; should be added to the field name. Example: `displayName desc`.
  pageSize: integer, Requested page size. Must be between `1` and `200`. If unspecified will default to `100`.
  pageToken: string, A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListCampaigns` method. If not specified, the first page of results will be returned.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    {
  &quot;campaigns&quot;: [ # The list of campaigns. This list will be absent if empty.
    { # A single campaign.
      &quot;advertiserId&quot;: &quot;A String&quot;, # Output only. The unique ID of the advertiser the campaign belongs to.
      &quot;campaignBudgets&quot;: [ # The list of budgets available to this campaign. If this field is not set, the campaign uses an unlimited budget.
        { # Settings that control how the campaign budget is allocated.
          &quot;budgetAmountMicros&quot;: &quot;A String&quot;, # Required. The total amount the linked insertion order segments can budget. The amount is in micros. Must be greater than 0. For example, 500000000 represents 500 standard units of the currency.
          &quot;budgetId&quot;: &quot;A String&quot;, # The unique ID of the campaign budget. Assigned by the system. Do not set for new budgets. Must be included when updating or adding budgets to campaign_budgets. Otherwise, a new ID will be generated and assigned.
          &quot;budgetUnit&quot;: &quot;A String&quot;, # Required. Immutable. Specifies whether the budget is measured in currency or impressions.
          &quot;dateRange&quot;: { # A date range. # Required. The date range for the campaign budget. Linked budget segments may have a different date range. They are resolved relative to the parent advertiser&#x27;s time zone. Both `start_date` and `end_date` must be before the year 2037.
            &quot;endDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # The upper bound of the date range, inclusive. Must specify a positive value for `year`, `month`, and `day`.
              &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
              &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
              &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
            },
            &quot;startDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # The lower bound of the date range, inclusive. Must specify a positive value for `year`, `month`, and `day`.
              &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
              &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
              &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
            },
          },
          &quot;displayName&quot;: &quot;A String&quot;, # Required. The display name of the budget. Must be UTF-8 encoded with a maximum size of 240 bytes.
          &quot;externalBudgetId&quot;: &quot;A String&quot;, # Immutable. The ID identifying this budget to the external source. If this field is set and the invoice detail level of the corresponding billing profile is set to &quot;Budget level PO&quot;, all impressions served against this budget will include this ID on the invoice. Must be unique under the campaign.
          &quot;externalBudgetSource&quot;: &quot;A String&quot;, # Required. The external source of the budget.
          &quot;invoiceGroupingId&quot;: &quot;A String&quot;, # Immutable. The ID used to group budgets to be included the same invoice. If this field is set and the invoice level of the corresponding billing profile is set to &quot;Budget invoice grouping ID&quot;, all external_budget_id sharing the same invoice_grouping_id will be grouped in the same invoice.
          &quot;prismaConfig&quot;: { # Settings specific to the Mediaocean Prisma tool. # Additional metadata for use by the Mediaocean Prisma tool. Required for Mediaocean budgets. Only applicable to prisma_enabled advertisers.
            &quot;prismaCpeCode&quot;: { # Google Payments Center supports searching and filtering on the component fields of this code. # Required. Relevant client, product, and estimate codes from the Mediaocean Prisma tool.
              &quot;prismaClientCode&quot;: &quot;A String&quot;, # The Prisma client code.
              &quot;prismaEstimateCode&quot;: &quot;A String&quot;, # The Prisma estimate code.
              &quot;prismaProductCode&quot;: &quot;A String&quot;, # The Prisma product code.
            },
            &quot;prismaType&quot;: &quot;A String&quot;, # Required. The Prisma type.
            &quot;supplier&quot;: &quot;A String&quot;, # Required. The entity allocated this budget (DSP, site, etc.).
          },
        },
      ],
      &quot;campaignFlight&quot;: { # Settings that track the planned spend and duration of a campaign. # Required. The planned spend and duration of the campaign.
        &quot;plannedDates&quot;: { # A date range. # Required. The dates that the campaign is expected to run. They are resolved relative to the parent advertiser&#x27;s time zone. * The dates specified here will not affect serving. They are used to generate alerts and warnings. For example, if the flight date of any child insertion order is outside the range of these dates, the user interface will show a warning. * `start_date` is required and must be the current date or later. * `end_date` is optional. If specified, it must be the `start_date` or later. * Any specified date must be before the year 2037.
          &quot;endDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # The upper bound of the date range, inclusive. Must specify a positive value for `year`, `month`, and `day`.
            &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
            &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
            &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
          },
          &quot;startDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # The lower bound of the date range, inclusive. Must specify a positive value for `year`, `month`, and `day`.
            &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
            &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
            &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
          },
        },
        &quot;plannedSpendAmountMicros&quot;: &quot;A String&quot;, # The amount the campaign is expected to spend for its given planned_dates. This will not limit serving, but will be used for tracking spend in the DV360 UI. The amount is in micros. Must be greater than or equal to 0. For example, 500000000 represents 500 standard units of the currency.
      },
      &quot;campaignGoal&quot;: { # Settings that control the goal of a campaign. # Required. The goal of the campaign.
        &quot;campaignGoalType&quot;: &quot;A String&quot;, # Required. The type of the campaign goal.
        &quot;performanceGoal&quot;: { # Settings that control the performance goal of a campaign. # Required. The performance goal of the campaign. Acceptable values for performance_goal_type are: * `PERFORMANCE_GOAL_TYPE_CPM` * `PERFORMANCE_GOAL_TYPE_CPC` * `PERFORMANCE_GOAL_TYPE_CPA` * `PERFORMANCE_GOAL_TYPE_CPIAVC` * `PERFORMANCE_GOAL_TYPE_CTR` * `PERFORMANCE_GOAL_TYPE_VIEWABILITY` * `PERFORMANCE_GOAL_TYPE_OTHER`
          &quot;performanceGoalAmountMicros&quot;: &quot;A String&quot;, # The goal amount, in micros of the advertiser&#x27;s currency. Applicable when performance_goal_type is one of: * `PERFORMANCE_GOAL_TYPE_CPM` * `PERFORMANCE_GOAL_TYPE_CPC` * `PERFORMANCE_GOAL_TYPE_CPA` * `PERFORMANCE_GOAL_TYPE_CPIAVC` * `PERFORMANCE_GOAL_TYPE_VCPM` For example 1500000 represents 1.5 standard units of the currency.
          &quot;performanceGoalPercentageMicros&quot;: &quot;A String&quot;, # The decimal representation of the goal percentage in micros. Applicable when performance_goal_type is one of: * `PERFORMANCE_GOAL_TYPE_CTR` * `PERFORMANCE_GOAL_TYPE_VIEWABILITY` * `PERFORMANCE_GOAL_TYPE_CLICK_CVR` * `PERFORMANCE_GOAL_TYPE_IMPRESSION_CVR` * `PERFORMANCE_GOAL_TYPE_VTR` * `PERFORMANCE_GOAL_TYPE_AUDIO_COMPLETION_RATE` * `PERFORMANCE_GOAL_TYPE_VIDEO_COMPLETION_RATE` For example, 70000 represents 7% (decimal 0.07).
          &quot;performanceGoalString&quot;: &quot;A String&quot;, # A key performance indicator (KPI) string, which can be empty. Must be UTF-8 encoded with a length of no more than 100 characters. Applicable when performance_goal_type is set to `PERFORMANCE_GOAL_TYPE_OTHER`.
          &quot;performanceGoalType&quot;: &quot;A String&quot;, # Required. The type of the performance goal.
        },
      },
      &quot;campaignId&quot;: &quot;A String&quot;, # Output only. The unique ID of the campaign. Assigned by the system.
      &quot;displayName&quot;: &quot;A String&quot;, # Required. The display name of the campaign. Must be UTF-8 encoded with a maximum size of 240 bytes.
      &quot;entityStatus&quot;: &quot;A String&quot;, # Required. Controls whether or not the insertion orders under this campaign can spend their budgets and bid on inventory. * Accepted values are `ENTITY_STATUS_ACTIVE`, `ENTITY_STATUS_ARCHIVED`, and `ENTITY_STATUS_PAUSED`. * For CreateCampaign method, `ENTITY_STATUS_ARCHIVED` is not allowed.
      &quot;frequencyCap&quot;: { # Settings that control the number of times a user may be shown with the same ad during a given time period. # Required. The frequency cap setting of the campaign. *Warning*: On **February 28, 2025**, frequency cap time periods greater than 30 days will no longer be accepted. [Read more about this announced change](/display-video/api/deprecations#features.lifetime_frequency_cap)
        &quot;maxImpressions&quot;: 42, # The maximum number of times a user may be shown the same ad during this period. Must be greater than 0. Required when unlimited is `false` and max_views is not set.
        &quot;maxViews&quot;: 42, # Optional. The maximum number of times a user may click-through or fully view an ad during this period until it is no longer served to them. Must be greater than 0. Only applicable to YouTube and Partners resources. Required when unlimited is `false` and max_impressions is not set.
        &quot;timeUnit&quot;: &quot;A String&quot;, # The time unit in which the frequency cap will be applied. Required when unlimited is `false`.
        &quot;timeUnitCount&quot;: 42, # The number of time_unit the frequency cap will last. Required when unlimited is `false`. The following restrictions apply based on the value of time_unit: * `TIME_UNIT_MONTHS` - must be 1 * `TIME_UNIT_WEEKS` - must be between 1 and 4 * `TIME_UNIT_DAYS` - must be between 1 and 6 * `TIME_UNIT_HOURS` - must be between 1 and 23 * `TIME_UNIT_MINUTES` - must be between 1 and 59
        &quot;unlimited&quot;: True or False, # Whether unlimited frequency capping is applied. When this field is set to `true`, the remaining frequency cap fields are not applicable.
      },
      &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the campaign.
      &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The timestamp when the campaign was last updated. Assigned by the system.
    },
  ],
  &quot;nextPageToken&quot;: &quot;A String&quot;, # A token to retrieve the next page of results. Pass this value in the page_token field in the subsequent call to `ListCampaigns` method to retrieve the next page of results.
}</pre>
</div>

<div class="method">
    <code class="details" id="list_next">list_next()</code>
  <pre>Retrieves the next page of results.

        Args:
          previous_request: The request for the previous page. (required)
          previous_response: The response from the request for the previous page. (required)

        Returns:
          A request object that you can call &#x27;execute()&#x27; on to request the next
          page. Returns None if there are no more items in the collection.
        </pre>
</div>

<div class="method">
    <code class="details" id="patch">patch(advertiserId, campaignId, body=None, updateMask=None, x__xgafv=None)</code>
  <pre>Updates an existing campaign. Returns the updated campaign if successful.

Args:
  advertiserId: string, Output only. The unique ID of the advertiser the campaign belongs to. (required)
  campaignId: string, Output only. The unique ID of the campaign. Assigned by the system. (required)
  body: object, The request body.
    The object takes the form of:

{ # A single campaign.
  &quot;advertiserId&quot;: &quot;A String&quot;, # Output only. The unique ID of the advertiser the campaign belongs to.
  &quot;campaignBudgets&quot;: [ # The list of budgets available to this campaign. If this field is not set, the campaign uses an unlimited budget.
    { # Settings that control how the campaign budget is allocated.
      &quot;budgetAmountMicros&quot;: &quot;A String&quot;, # Required. The total amount the linked insertion order segments can budget. The amount is in micros. Must be greater than 0. For example, 500000000 represents 500 standard units of the currency.
      &quot;budgetId&quot;: &quot;A String&quot;, # The unique ID of the campaign budget. Assigned by the system. Do not set for new budgets. Must be included when updating or adding budgets to campaign_budgets. Otherwise, a new ID will be generated and assigned.
      &quot;budgetUnit&quot;: &quot;A String&quot;, # Required. Immutable. Specifies whether the budget is measured in currency or impressions.
      &quot;dateRange&quot;: { # A date range. # Required. The date range for the campaign budget. Linked budget segments may have a different date range. They are resolved relative to the parent advertiser&#x27;s time zone. Both `start_date` and `end_date` must be before the year 2037.
        &quot;endDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # The upper bound of the date range, inclusive. Must specify a positive value for `year`, `month`, and `day`.
          &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
          &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
        &quot;startDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # The lower bound of the date range, inclusive. Must specify a positive value for `year`, `month`, and `day`.
          &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
          &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
      },
      &quot;displayName&quot;: &quot;A String&quot;, # Required. The display name of the budget. Must be UTF-8 encoded with a maximum size of 240 bytes.
      &quot;externalBudgetId&quot;: &quot;A String&quot;, # Immutable. The ID identifying this budget to the external source. If this field is set and the invoice detail level of the corresponding billing profile is set to &quot;Budget level PO&quot;, all impressions served against this budget will include this ID on the invoice. Must be unique under the campaign.
      &quot;externalBudgetSource&quot;: &quot;A String&quot;, # Required. The external source of the budget.
      &quot;invoiceGroupingId&quot;: &quot;A String&quot;, # Immutable. The ID used to group budgets to be included the same invoice. If this field is set and the invoice level of the corresponding billing profile is set to &quot;Budget invoice grouping ID&quot;, all external_budget_id sharing the same invoice_grouping_id will be grouped in the same invoice.
      &quot;prismaConfig&quot;: { # Settings specific to the Mediaocean Prisma tool. # Additional metadata for use by the Mediaocean Prisma tool. Required for Mediaocean budgets. Only applicable to prisma_enabled advertisers.
        &quot;prismaCpeCode&quot;: { # Google Payments Center supports searching and filtering on the component fields of this code. # Required. Relevant client, product, and estimate codes from the Mediaocean Prisma tool.
          &quot;prismaClientCode&quot;: &quot;A String&quot;, # The Prisma client code.
          &quot;prismaEstimateCode&quot;: &quot;A String&quot;, # The Prisma estimate code.
          &quot;prismaProductCode&quot;: &quot;A String&quot;, # The Prisma product code.
        },
        &quot;prismaType&quot;: &quot;A String&quot;, # Required. The Prisma type.
        &quot;supplier&quot;: &quot;A String&quot;, # Required. The entity allocated this budget (DSP, site, etc.).
      },
    },
  ],
  &quot;campaignFlight&quot;: { # Settings that track the planned spend and duration of a campaign. # Required. The planned spend and duration of the campaign.
    &quot;plannedDates&quot;: { # A date range. # Required. The dates that the campaign is expected to run. They are resolved relative to the parent advertiser&#x27;s time zone. * The dates specified here will not affect serving. They are used to generate alerts and warnings. For example, if the flight date of any child insertion order is outside the range of these dates, the user interface will show a warning. * `start_date` is required and must be the current date or later. * `end_date` is optional. If specified, it must be the `start_date` or later. * Any specified date must be before the year 2037.
      &quot;endDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # The upper bound of the date range, inclusive. Must specify a positive value for `year`, `month`, and `day`.
        &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
        &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
        &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
      },
      &quot;startDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # The lower bound of the date range, inclusive. Must specify a positive value for `year`, `month`, and `day`.
        &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
        &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
        &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
      },
    },
    &quot;plannedSpendAmountMicros&quot;: &quot;A String&quot;, # The amount the campaign is expected to spend for its given planned_dates. This will not limit serving, but will be used for tracking spend in the DV360 UI. The amount is in micros. Must be greater than or equal to 0. For example, 500000000 represents 500 standard units of the currency.
  },
  &quot;campaignGoal&quot;: { # Settings that control the goal of a campaign. # Required. The goal of the campaign.
    &quot;campaignGoalType&quot;: &quot;A String&quot;, # Required. The type of the campaign goal.
    &quot;performanceGoal&quot;: { # Settings that control the performance goal of a campaign. # Required. The performance goal of the campaign. Acceptable values for performance_goal_type are: * `PERFORMANCE_GOAL_TYPE_CPM` * `PERFORMANCE_GOAL_TYPE_CPC` * `PERFORMANCE_GOAL_TYPE_CPA` * `PERFORMANCE_GOAL_TYPE_CPIAVC` * `PERFORMANCE_GOAL_TYPE_CTR` * `PERFORMANCE_GOAL_TYPE_VIEWABILITY` * `PERFORMANCE_GOAL_TYPE_OTHER`
      &quot;performanceGoalAmountMicros&quot;: &quot;A String&quot;, # The goal amount, in micros of the advertiser&#x27;s currency. Applicable when performance_goal_type is one of: * `PERFORMANCE_GOAL_TYPE_CPM` * `PERFORMANCE_GOAL_TYPE_CPC` * `PERFORMANCE_GOAL_TYPE_CPA` * `PERFORMANCE_GOAL_TYPE_CPIAVC` * `PERFORMANCE_GOAL_TYPE_VCPM` For example 1500000 represents 1.5 standard units of the currency.
      &quot;performanceGoalPercentageMicros&quot;: &quot;A String&quot;, # The decimal representation of the goal percentage in micros. Applicable when performance_goal_type is one of: * `PERFORMANCE_GOAL_TYPE_CTR` * `PERFORMANCE_GOAL_TYPE_VIEWABILITY` * `PERFORMANCE_GOAL_TYPE_CLICK_CVR` * `PERFORMANCE_GOAL_TYPE_IMPRESSION_CVR` * `PERFORMANCE_GOAL_TYPE_VTR` * `PERFORMANCE_GOAL_TYPE_AUDIO_COMPLETION_RATE` * `PERFORMANCE_GOAL_TYPE_VIDEO_COMPLETION_RATE` For example, 70000 represents 7% (decimal 0.07).
      &quot;performanceGoalString&quot;: &quot;A String&quot;, # A key performance indicator (KPI) string, which can be empty. Must be UTF-8 encoded with a length of no more than 100 characters. Applicable when performance_goal_type is set to `PERFORMANCE_GOAL_TYPE_OTHER`.
      &quot;performanceGoalType&quot;: &quot;A String&quot;, # Required. The type of the performance goal.
    },
  },
  &quot;campaignId&quot;: &quot;A String&quot;, # Output only. The unique ID of the campaign. Assigned by the system.
  &quot;displayName&quot;: &quot;A String&quot;, # Required. The display name of the campaign. Must be UTF-8 encoded with a maximum size of 240 bytes.
  &quot;entityStatus&quot;: &quot;A String&quot;, # Required. Controls whether or not the insertion orders under this campaign can spend their budgets and bid on inventory. * Accepted values are `ENTITY_STATUS_ACTIVE`, `ENTITY_STATUS_ARCHIVED`, and `ENTITY_STATUS_PAUSED`. * For CreateCampaign method, `ENTITY_STATUS_ARCHIVED` is not allowed.
  &quot;frequencyCap&quot;: { # Settings that control the number of times a user may be shown with the same ad during a given time period. # Required. The frequency cap setting of the campaign. *Warning*: On **February 28, 2025**, frequency cap time periods greater than 30 days will no longer be accepted. [Read more about this announced change](/display-video/api/deprecations#features.lifetime_frequency_cap)
    &quot;maxImpressions&quot;: 42, # The maximum number of times a user may be shown the same ad during this period. Must be greater than 0. Required when unlimited is `false` and max_views is not set.
    &quot;maxViews&quot;: 42, # Optional. The maximum number of times a user may click-through or fully view an ad during this period until it is no longer served to them. Must be greater than 0. Only applicable to YouTube and Partners resources. Required when unlimited is `false` and max_impressions is not set.
    &quot;timeUnit&quot;: &quot;A String&quot;, # The time unit in which the frequency cap will be applied. Required when unlimited is `false`.
    &quot;timeUnitCount&quot;: 42, # The number of time_unit the frequency cap will last. Required when unlimited is `false`. The following restrictions apply based on the value of time_unit: * `TIME_UNIT_MONTHS` - must be 1 * `TIME_UNIT_WEEKS` - must be between 1 and 4 * `TIME_UNIT_DAYS` - must be between 1 and 6 * `TIME_UNIT_HOURS` - must be between 1 and 23 * `TIME_UNIT_MINUTES` - must be between 1 and 59
    &quot;unlimited&quot;: True or False, # Whether unlimited frequency capping is applied. When this field is set to `true`, the remaining frequency cap fields are not applicable.
  },
  &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the campaign.
  &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The timestamp when the campaign was last updated. Assigned by the system.
}

  updateMask: string, Required. The mask to control which fields to update.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A single campaign.
  &quot;advertiserId&quot;: &quot;A String&quot;, # Output only. The unique ID of the advertiser the campaign belongs to.
  &quot;campaignBudgets&quot;: [ # The list of budgets available to this campaign. If this field is not set, the campaign uses an unlimited budget.
    { # Settings that control how the campaign budget is allocated.
      &quot;budgetAmountMicros&quot;: &quot;A String&quot;, # Required. The total amount the linked insertion order segments can budget. The amount is in micros. Must be greater than 0. For example, 500000000 represents 500 standard units of the currency.
      &quot;budgetId&quot;: &quot;A String&quot;, # The unique ID of the campaign budget. Assigned by the system. Do not set for new budgets. Must be included when updating or adding budgets to campaign_budgets. Otherwise, a new ID will be generated and assigned.
      &quot;budgetUnit&quot;: &quot;A String&quot;, # Required. Immutable. Specifies whether the budget is measured in currency or impressions.
      &quot;dateRange&quot;: { # A date range. # Required. The date range for the campaign budget. Linked budget segments may have a different date range. They are resolved relative to the parent advertiser&#x27;s time zone. Both `start_date` and `end_date` must be before the year 2037.
        &quot;endDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # The upper bound of the date range, inclusive. Must specify a positive value for `year`, `month`, and `day`.
          &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
          &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
        &quot;startDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # The lower bound of the date range, inclusive. Must specify a positive value for `year`, `month`, and `day`.
          &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
          &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        },
      },
      &quot;displayName&quot;: &quot;A String&quot;, # Required. The display name of the budget. Must be UTF-8 encoded with a maximum size of 240 bytes.
      &quot;externalBudgetId&quot;: &quot;A String&quot;, # Immutable. The ID identifying this budget to the external source. If this field is set and the invoice detail level of the corresponding billing profile is set to &quot;Budget level PO&quot;, all impressions served against this budget will include this ID on the invoice. Must be unique under the campaign.
      &quot;externalBudgetSource&quot;: &quot;A String&quot;, # Required. The external source of the budget.
      &quot;invoiceGroupingId&quot;: &quot;A String&quot;, # Immutable. The ID used to group budgets to be included the same invoice. If this field is set and the invoice level of the corresponding billing profile is set to &quot;Budget invoice grouping ID&quot;, all external_budget_id sharing the same invoice_grouping_id will be grouped in the same invoice.
      &quot;prismaConfig&quot;: { # Settings specific to the Mediaocean Prisma tool. # Additional metadata for use by the Mediaocean Prisma tool. Required for Mediaocean budgets. Only applicable to prisma_enabled advertisers.
        &quot;prismaCpeCode&quot;: { # Google Payments Center supports searching and filtering on the component fields of this code. # Required. Relevant client, product, and estimate codes from the Mediaocean Prisma tool.
          &quot;prismaClientCode&quot;: &quot;A String&quot;, # The Prisma client code.
          &quot;prismaEstimateCode&quot;: &quot;A String&quot;, # The Prisma estimate code.
          &quot;prismaProductCode&quot;: &quot;A String&quot;, # The Prisma product code.
        },
        &quot;prismaType&quot;: &quot;A String&quot;, # Required. The Prisma type.
        &quot;supplier&quot;: &quot;A String&quot;, # Required. The entity allocated this budget (DSP, site, etc.).
      },
    },
  ],
  &quot;campaignFlight&quot;: { # Settings that track the planned spend and duration of a campaign. # Required. The planned spend and duration of the campaign.
    &quot;plannedDates&quot;: { # A date range. # Required. The dates that the campaign is expected to run. They are resolved relative to the parent advertiser&#x27;s time zone. * The dates specified here will not affect serving. They are used to generate alerts and warnings. For example, if the flight date of any child insertion order is outside the range of these dates, the user interface will show a warning. * `start_date` is required and must be the current date or later. * `end_date` is optional. If specified, it must be the `start_date` or later. * Any specified date must be before the year 2037.
      &quot;endDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # The upper bound of the date range, inclusive. Must specify a positive value for `year`, `month`, and `day`.
        &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
        &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
        &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
      },
      &quot;startDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # The lower bound of the date range, inclusive. Must specify a positive value for `year`, `month`, and `day`.
        &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
        &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
        &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
      },
    },
    &quot;plannedSpendAmountMicros&quot;: &quot;A String&quot;, # The amount the campaign is expected to spend for its given planned_dates. This will not limit serving, but will be used for tracking spend in the DV360 UI. The amount is in micros. Must be greater than or equal to 0. For example, 500000000 represents 500 standard units of the currency.
  },
  &quot;campaignGoal&quot;: { # Settings that control the goal of a campaign. # Required. The goal of the campaign.
    &quot;campaignGoalType&quot;: &quot;A String&quot;, # Required. The type of the campaign goal.
    &quot;performanceGoal&quot;: { # Settings that control the performance goal of a campaign. # Required. The performance goal of the campaign. Acceptable values for performance_goal_type are: * `PERFORMANCE_GOAL_TYPE_CPM` * `PERFORMANCE_GOAL_TYPE_CPC` * `PERFORMANCE_GOAL_TYPE_CPA` * `PERFORMANCE_GOAL_TYPE_CPIAVC` * `PERFORMANCE_GOAL_TYPE_CTR` * `PERFORMANCE_GOAL_TYPE_VIEWABILITY` * `PERFORMANCE_GOAL_TYPE_OTHER`
      &quot;performanceGoalAmountMicros&quot;: &quot;A String&quot;, # The goal amount, in micros of the advertiser&#x27;s currency. Applicable when performance_goal_type is one of: * `PERFORMANCE_GOAL_TYPE_CPM` * `PERFORMANCE_GOAL_TYPE_CPC` * `PERFORMANCE_GOAL_TYPE_CPA` * `PERFORMANCE_GOAL_TYPE_CPIAVC` * `PERFORMANCE_GOAL_TYPE_VCPM` For example 1500000 represents 1.5 standard units of the currency.
      &quot;performanceGoalPercentageMicros&quot;: &quot;A String&quot;, # The decimal representation of the goal percentage in micros. Applicable when performance_goal_type is one of: * `PERFORMANCE_GOAL_TYPE_CTR` * `PERFORMANCE_GOAL_TYPE_VIEWABILITY` * `PERFORMANCE_GOAL_TYPE_CLICK_CVR` * `PERFORMANCE_GOAL_TYPE_IMPRESSION_CVR` * `PERFORMANCE_GOAL_TYPE_VTR` * `PERFORMANCE_GOAL_TYPE_AUDIO_COMPLETION_RATE` * `PERFORMANCE_GOAL_TYPE_VIDEO_COMPLETION_RATE` For example, 70000 represents 7% (decimal 0.07).
      &quot;performanceGoalString&quot;: &quot;A String&quot;, # A key performance indicator (KPI) string, which can be empty. Must be UTF-8 encoded with a length of no more than 100 characters. Applicable when performance_goal_type is set to `PERFORMANCE_GOAL_TYPE_OTHER`.
      &quot;performanceGoalType&quot;: &quot;A String&quot;, # Required. The type of the performance goal.
    },
  },
  &quot;campaignId&quot;: &quot;A String&quot;, # Output only. The unique ID of the campaign. Assigned by the system.
  &quot;displayName&quot;: &quot;A String&quot;, # Required. The display name of the campaign. Must be UTF-8 encoded with a maximum size of 240 bytes.
  &quot;entityStatus&quot;: &quot;A String&quot;, # Required. Controls whether or not the insertion orders under this campaign can spend their budgets and bid on inventory. * Accepted values are `ENTITY_STATUS_ACTIVE`, `ENTITY_STATUS_ARCHIVED`, and `ENTITY_STATUS_PAUSED`. * For CreateCampaign method, `ENTITY_STATUS_ARCHIVED` is not allowed.
  &quot;frequencyCap&quot;: { # Settings that control the number of times a user may be shown with the same ad during a given time period. # Required. The frequency cap setting of the campaign. *Warning*: On **February 28, 2025**, frequency cap time periods greater than 30 days will no longer be accepted. [Read more about this announced change](/display-video/api/deprecations#features.lifetime_frequency_cap)
    &quot;maxImpressions&quot;: 42, # The maximum number of times a user may be shown the same ad during this period. Must be greater than 0. Required when unlimited is `false` and max_views is not set.
    &quot;maxViews&quot;: 42, # Optional. The maximum number of times a user may click-through or fully view an ad during this period until it is no longer served to them. Must be greater than 0. Only applicable to YouTube and Partners resources. Required when unlimited is `false` and max_impressions is not set.
    &quot;timeUnit&quot;: &quot;A String&quot;, # The time unit in which the frequency cap will be applied. Required when unlimited is `false`.
    &quot;timeUnitCount&quot;: 42, # The number of time_unit the frequency cap will last. Required when unlimited is `false`. The following restrictions apply based on the value of time_unit: * `TIME_UNIT_MONTHS` - must be 1 * `TIME_UNIT_WEEKS` - must be between 1 and 4 * `TIME_UNIT_DAYS` - must be between 1 and 6 * `TIME_UNIT_HOURS` - must be between 1 and 23 * `TIME_UNIT_MINUTES` - must be between 1 and 59
    &quot;unlimited&quot;: True or False, # Whether unlimited frequency capping is applied. When this field is set to `true`, the remaining frequency cap fields are not applicable.
  },
  &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the campaign.
  &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The timestamp when the campaign was last updated. Assigned by the system.
}</pre>
</div>

</body></html>