blob: 1cf8f94941779e977a90fde288a9daabf0cade1d [file] [log] [blame]
Bu Sun Kim65020912020-05-20 12:08:20 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="displayvideo_v1.html">Display & Video 360 API</a> . <a href="displayvideo_v1.advertisers.html">advertisers</a> . <a href="displayvideo_v1.advertisers.campaigns.html">campaigns</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#create">create(advertiserId, body=None, x__xgafv=None)</a></code></p>
79<p class="firstline">Creates a new campaign.</p>
80<p class="toc_element">
81 <code><a href="#delete">delete(advertiserId, campaignId, x__xgafv=None)</a></code></p>
82<p class="firstline">Permanently deletes a campaign. A deleted campaign cannot be recovered.</p>
83<p class="toc_element">
84 <code><a href="#get">get(advertiserId, campaignId, x__xgafv=None)</a></code></p>
85<p class="firstline">Gets a campaign.</p>
86<p class="toc_element">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -070087 <code><a href="#list">list(advertiserId, pageSize=None, filter=None, pageToken=None, orderBy=None, x__xgafv=None)</a></code></p>
Bu Sun Kim65020912020-05-20 12:08:20 -070088<p class="firstline">Lists campaigns in an advertiser.</p>
89<p class="toc_element">
90 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
91<p class="firstline">Retrieves the next page of results.</p>
92<p class="toc_element">
93 <code><a href="#patch">patch(advertiserId, campaignId, body=None, updateMask=None, x__xgafv=None)</a></code></p>
94<p class="firstline">Updates an existing campaign.</p>
95<h3>Method Details</h3>
96<div class="method">
97 <code class="details" id="create">create(advertiserId, body=None, x__xgafv=None)</code>
98 <pre>Creates a new campaign.
99Returns the newly created campaign if successful.
100
101Args:
102 advertiserId: string, Output only. The unique ID of the advertiser the campaign belongs to. (required)
103 body: object, The request body.
104 The object takes the form of:
105
106{ # A single campaign.
107 &quot;campaignFlight&quot;: { # Settings that track the planned spend and duration of a campaign. # Required. The planned spend and duration of the campaign.
108 &quot;plannedDates&quot;: { # A date range. # Required. The dates that the campaign is expected to run. They are resolved
109 # relative to the parent advertiser&#x27;s time zone.
110 #
111 # * The dates specified here will not affect serving. They are used to
112 # generate alerts and warnings. For example, if the flight date of any child
113 # insertion order is outside the range of these dates, the user interface
114 # will show a warning.
115 # * `start_date` is required and must be the current date or later.
116 # * `end_date` is optional. If specified, it must be the `start_date` or
117 # later.
118 # * Any specified date must be before the year 2037.
119 &quot;endDate&quot;: { # Represents a whole or partial calendar date, e.g. a birthday. The time of day # The upper bound of the date range, inclusive. Must specify a positive value
120 # for `year`, `month`, and `day`.
121 # and time zone are either specified elsewhere or are not significant. The date
122 # is relative to the Proleptic Gregorian Calendar. This can represent:
123 #
124 # * A full date, with non-zero year, month and day values
125 # * A month and day value, with a zero year, e.g. an anniversary
126 # * A year on its own, with zero month and day values
127 # * A year and month value, with a zero day, e.g. a credit card expiration date
128 #
129 # Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`.
130 &quot;year&quot;: 42, # Year of date. Must be from 1 to 9999, or 0 if specifying a date without
131 # a year.
132 &quot;day&quot;: 42, # Day of month. Must be from 1 to 31 and valid for the year and month, or 0
133 # if specifying a year by itself or a year and month where the day is not
134 # significant.
135 &quot;month&quot;: 42, # Month of year. Must be from 1 to 12, or 0 if specifying a year without a
136 # month and day.
137 },
138 &quot;startDate&quot;: { # Represents a whole or partial calendar date, e.g. a birthday. The time of day # The lower bound of the date range, inclusive. Must specify a positive value
139 # for `year`, `month`, and `day`.
140 # and time zone are either specified elsewhere or are not significant. The date
141 # is relative to the Proleptic Gregorian Calendar. This can represent:
142 #
143 # * A full date, with non-zero year, month and day values
144 # * A month and day value, with a zero year, e.g. an anniversary
145 # * A year on its own, with zero month and day values
146 # * A year and month value, with a zero day, e.g. a credit card expiration date
147 #
148 # Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`.
149 &quot;year&quot;: 42, # Year of date. Must be from 1 to 9999, or 0 if specifying a date without
150 # a year.
151 &quot;day&quot;: 42, # Day of month. Must be from 1 to 31 and valid for the year and month, or 0
152 # if specifying a year by itself or a year and month where the day is not
153 # significant.
154 &quot;month&quot;: 42, # Month of year. Must be from 1 to 12, or 0 if specifying a year without a
155 # month and day.
156 },
157 },
158 &quot;plannedSpendAmountMicros&quot;: &quot;A String&quot;, # The amount the campaign is expected to spend for its given
159 # planned_dates. This will not limit serving,
160 # but will be used for tracking spend in the DV360 UI.
161 #
162 # The amount is in micros. Must be greater than or equal to 0. For example,
163 # 500000000 represents 500 standard units of the currency.
164 },
165 &quot;frequencyCap&quot;: { # Settings that control the number of times a user may be shown with the same # Required. The frequency cap setting of the campaign.
166 # ad during a given time period.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700167 &quot;unlimited&quot;: True or False, # Whether unlimited frequency capping is applied. When this field is set to
168 # `true`, the remaining frequency cap fields are not applicable.
169 &quot;maxImpressions&quot;: 42, # The maximum number of times a user may be shown with the same ad
170 # during this period. Must be greater than 0.
171 #
172 # Applicable when unlimited is `false`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700173 &quot;timeUnit&quot;: &quot;A String&quot;, # The time unit in which the frequency cap will be applied.
174 #
175 # Applicable when unlimited is `false`.
176 &quot;timeUnitCount&quot;: 42, # The number of time_unit the frequency cap will
177 # last.
178 #
179 # Applicable when unlimited is `false`.
180 # The following restrictions apply based on the value of
181 # time_unit:
182 #
183 # * `TIME_UNIT_LIFETIME` - this field is output only and will
184 # default to 1
185 # * `TIME_UNIT_MONTHS` - must be between 1 and 2
186 # * `TIME_UNIT_WEEKS` - must be between 1 and 4
187 # * `TIME_UNIT_DAYS` - must be between 1 and 6
188 # * `TIME_UNIT_HOURS` - must be between 1 and 23
189 # * `TIME_UNIT_MINUTES` - must be between 1 and 59
Bu Sun Kim65020912020-05-20 12:08:20 -0700190 },
191 &quot;displayName&quot;: &quot;A String&quot;, # Required. The display name of the campaign.
192 #
193 # Must be UTF-8 encoded with a maximum size of 240 bytes.
194 &quot;entityStatus&quot;: &quot;A String&quot;, # Required. Controls whether or not the insertion orders under this campaign
195 # can spend their budgets and bid on inventory.
196 #
197 # * Accepted values are `ENTITY_STATUS_ACTIVE`, `ENTITY_STATUS_ARCHIVED`, and
198 # `ENTITY_STATUS_PAUSED`.
199 # * For
200 # CreateCampaign method,
201 # `ENTITY_STATUS_ARCHIVED` is not allowed.
202 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The timestamp when the campaign was last updated. Assigned by the system.
203 &quot;advertiserId&quot;: &quot;A String&quot;, # Output only. The unique ID of the advertiser the campaign belongs to.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700204 &quot;campaignId&quot;: &quot;A String&quot;, # Output only. The unique ID of the campaign. Assigned by the system.
205 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the campaign.
Bu Sun Kim65020912020-05-20 12:08:20 -0700206 &quot;campaignGoal&quot;: { # Settings that control the goal of a campaign. # Required. The goal of the campaign.
207 &quot;performanceGoal&quot;: { # Settings that control the performance goal of a campaign or insertion order. # Required. The performance goal of the campaign.
208 #
209 # Acceptable values for
210 # performance_goal_type are:
211 #
212 # * `PERFORMANCE_GOAL_TYPE_CPM`
213 # * `PERFORMANCE_GOAL_TYPE_CPC`
214 # * `PERFORMANCE_GOAL_TYPE_CPA`
215 # * `PERFORMANCE_GOAL_TYPE_CPIAVC`
216 # * `PERFORMANCE_GOAL_TYPE_CTR`
217 # * `PERFORMANCE_GOAL_TYPE_VIEWABILITY`
218 # * `PERFORMANCE_GOAL_TYPE_OTHER`
Bu Sun Kim65020912020-05-20 12:08:20 -0700219 &quot;performanceGoalAmountMicros&quot;: &quot;A String&quot;, # The goal amount, in micros of the advertiser&#x27;s currency.
220 #
221 # Applicable when
222 # performance_goal_type is one of:
223 #
224 # * `PERFORMANCE_GOAL_TYPE_CPM`
225 # * `PERFORMANCE_GOAL_TYPE_CPC`
226 # * `PERFORMANCE_GOAL_TYPE_CPA`
227 # * `PERFORMANCE_GOAL_TYPE_CPIAVC`
228 #
229 # For example 1500000 represents 1.5 standard units of the currency.
230 &quot;performanceGoalPercentageMicros&quot;: &quot;A String&quot;, # The decimal representation of the goal percentage in micros.
231 #
232 # Applicable when
233 # performance_goal_type is one of:
234 #
235 # * `PERFORMANCE_GOAL_TYPE_CTR`
236 # * `PERFORMANCE_GOAL_TYPE_VIEWABILITY`
237 #
238 # For example, 70000 represents 7% (decimal 0.07).
239 &quot;performanceGoalString&quot;: &quot;A String&quot;, # A key performance indicator (KPI) string, which can be empty.
240 # Must be UTF-8 encoded with a length of no more than 100 characters.
241 #
242 # Applicable when
243 # performance_goal_type is set to
244 # `PERFORMANCE_GOAL_TYPE_OTHER`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700245 &quot;performanceGoalType&quot;: &quot;A String&quot;, # Required. The type of the performance goal.
Bu Sun Kim65020912020-05-20 12:08:20 -0700246 },
247 &quot;campaignGoalType&quot;: &quot;A String&quot;, # Required. The type of the campaign goal.
248 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700249}
250
251 x__xgafv: string, V1 error format.
252 Allowed values
253 1 - v1 error format
254 2 - v2 error format
255
256Returns:
257 An object of the form:
258
259 { # A single campaign.
260 &quot;campaignFlight&quot;: { # Settings that track the planned spend and duration of a campaign. # Required. The planned spend and duration of the campaign.
261 &quot;plannedDates&quot;: { # A date range. # Required. The dates that the campaign is expected to run. They are resolved
262 # relative to the parent advertiser&#x27;s time zone.
263 #
264 # * The dates specified here will not affect serving. They are used to
265 # generate alerts and warnings. For example, if the flight date of any child
266 # insertion order is outside the range of these dates, the user interface
267 # will show a warning.
268 # * `start_date` is required and must be the current date or later.
269 # * `end_date` is optional. If specified, it must be the `start_date` or
270 # later.
271 # * Any specified date must be before the year 2037.
272 &quot;endDate&quot;: { # Represents a whole or partial calendar date, e.g. a birthday. The time of day # The upper bound of the date range, inclusive. Must specify a positive value
273 # for `year`, `month`, and `day`.
274 # and time zone are either specified elsewhere or are not significant. The date
275 # is relative to the Proleptic Gregorian Calendar. This can represent:
276 #
277 # * A full date, with non-zero year, month and day values
278 # * A month and day value, with a zero year, e.g. an anniversary
279 # * A year on its own, with zero month and day values
280 # * A year and month value, with a zero day, e.g. a credit card expiration date
281 #
282 # Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`.
283 &quot;year&quot;: 42, # Year of date. Must be from 1 to 9999, or 0 if specifying a date without
284 # a year.
285 &quot;day&quot;: 42, # Day of month. Must be from 1 to 31 and valid for the year and month, or 0
286 # if specifying a year by itself or a year and month where the day is not
287 # significant.
288 &quot;month&quot;: 42, # Month of year. Must be from 1 to 12, or 0 if specifying a year without a
289 # month and day.
290 },
291 &quot;startDate&quot;: { # Represents a whole or partial calendar date, e.g. a birthday. The time of day # The lower bound of the date range, inclusive. Must specify a positive value
292 # for `year`, `month`, and `day`.
293 # and time zone are either specified elsewhere or are not significant. The date
294 # is relative to the Proleptic Gregorian Calendar. This can represent:
295 #
296 # * A full date, with non-zero year, month and day values
297 # * A month and day value, with a zero year, e.g. an anniversary
298 # * A year on its own, with zero month and day values
299 # * A year and month value, with a zero day, e.g. a credit card expiration date
300 #
301 # Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`.
302 &quot;year&quot;: 42, # Year of date. Must be from 1 to 9999, or 0 if specifying a date without
303 # a year.
304 &quot;day&quot;: 42, # Day of month. Must be from 1 to 31 and valid for the year and month, or 0
305 # if specifying a year by itself or a year and month where the day is not
306 # significant.
307 &quot;month&quot;: 42, # Month of year. Must be from 1 to 12, or 0 if specifying a year without a
308 # month and day.
309 },
310 },
311 &quot;plannedSpendAmountMicros&quot;: &quot;A String&quot;, # The amount the campaign is expected to spend for its given
312 # planned_dates. This will not limit serving,
313 # but will be used for tracking spend in the DV360 UI.
314 #
315 # The amount is in micros. Must be greater than or equal to 0. For example,
316 # 500000000 represents 500 standard units of the currency.
317 },
318 &quot;frequencyCap&quot;: { # Settings that control the number of times a user may be shown with the same # Required. The frequency cap setting of the campaign.
319 # ad during a given time period.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700320 &quot;unlimited&quot;: True or False, # Whether unlimited frequency capping is applied. When this field is set to
321 # `true`, the remaining frequency cap fields are not applicable.
322 &quot;maxImpressions&quot;: 42, # The maximum number of times a user may be shown with the same ad
323 # during this period. Must be greater than 0.
324 #
325 # Applicable when unlimited is `false`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700326 &quot;timeUnit&quot;: &quot;A String&quot;, # The time unit in which the frequency cap will be applied.
327 #
328 # Applicable when unlimited is `false`.
329 &quot;timeUnitCount&quot;: 42, # The number of time_unit the frequency cap will
330 # last.
331 #
332 # Applicable when unlimited is `false`.
333 # The following restrictions apply based on the value of
334 # time_unit:
335 #
336 # * `TIME_UNIT_LIFETIME` - this field is output only and will
337 # default to 1
338 # * `TIME_UNIT_MONTHS` - must be between 1 and 2
339 # * `TIME_UNIT_WEEKS` - must be between 1 and 4
340 # * `TIME_UNIT_DAYS` - must be between 1 and 6
341 # * `TIME_UNIT_HOURS` - must be between 1 and 23
342 # * `TIME_UNIT_MINUTES` - must be between 1 and 59
Bu Sun Kim65020912020-05-20 12:08:20 -0700343 },
344 &quot;displayName&quot;: &quot;A String&quot;, # Required. The display name of the campaign.
345 #
346 # Must be UTF-8 encoded with a maximum size of 240 bytes.
347 &quot;entityStatus&quot;: &quot;A String&quot;, # Required. Controls whether or not the insertion orders under this campaign
348 # can spend their budgets and bid on inventory.
349 #
350 # * Accepted values are `ENTITY_STATUS_ACTIVE`, `ENTITY_STATUS_ARCHIVED`, and
351 # `ENTITY_STATUS_PAUSED`.
352 # * For
353 # CreateCampaign method,
354 # `ENTITY_STATUS_ARCHIVED` is not allowed.
355 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The timestamp when the campaign was last updated. Assigned by the system.
356 &quot;advertiserId&quot;: &quot;A String&quot;, # Output only. The unique ID of the advertiser the campaign belongs to.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700357 &quot;campaignId&quot;: &quot;A String&quot;, # Output only. The unique ID of the campaign. Assigned by the system.
358 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the campaign.
Bu Sun Kim65020912020-05-20 12:08:20 -0700359 &quot;campaignGoal&quot;: { # Settings that control the goal of a campaign. # Required. The goal of the campaign.
360 &quot;performanceGoal&quot;: { # Settings that control the performance goal of a campaign or insertion order. # Required. The performance goal of the campaign.
361 #
362 # Acceptable values for
363 # performance_goal_type are:
364 #
365 # * `PERFORMANCE_GOAL_TYPE_CPM`
366 # * `PERFORMANCE_GOAL_TYPE_CPC`
367 # * `PERFORMANCE_GOAL_TYPE_CPA`
368 # * `PERFORMANCE_GOAL_TYPE_CPIAVC`
369 # * `PERFORMANCE_GOAL_TYPE_CTR`
370 # * `PERFORMANCE_GOAL_TYPE_VIEWABILITY`
371 # * `PERFORMANCE_GOAL_TYPE_OTHER`
Bu Sun Kim65020912020-05-20 12:08:20 -0700372 &quot;performanceGoalAmountMicros&quot;: &quot;A String&quot;, # The goal amount, in micros of the advertiser&#x27;s currency.
373 #
374 # Applicable when
375 # performance_goal_type is one of:
376 #
377 # * `PERFORMANCE_GOAL_TYPE_CPM`
378 # * `PERFORMANCE_GOAL_TYPE_CPC`
379 # * `PERFORMANCE_GOAL_TYPE_CPA`
380 # * `PERFORMANCE_GOAL_TYPE_CPIAVC`
381 #
382 # For example 1500000 represents 1.5 standard units of the currency.
383 &quot;performanceGoalPercentageMicros&quot;: &quot;A String&quot;, # The decimal representation of the goal percentage in micros.
384 #
385 # Applicable when
386 # performance_goal_type is one of:
387 #
388 # * `PERFORMANCE_GOAL_TYPE_CTR`
389 # * `PERFORMANCE_GOAL_TYPE_VIEWABILITY`
390 #
391 # For example, 70000 represents 7% (decimal 0.07).
392 &quot;performanceGoalString&quot;: &quot;A String&quot;, # A key performance indicator (KPI) string, which can be empty.
393 # Must be UTF-8 encoded with a length of no more than 100 characters.
394 #
395 # Applicable when
396 # performance_goal_type is set to
397 # `PERFORMANCE_GOAL_TYPE_OTHER`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700398 &quot;performanceGoalType&quot;: &quot;A String&quot;, # Required. The type of the performance goal.
Bu Sun Kim65020912020-05-20 12:08:20 -0700399 },
400 &quot;campaignGoalType&quot;: &quot;A String&quot;, # Required. The type of the campaign goal.
401 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700402 }</pre>
403</div>
404
405<div class="method">
406 <code class="details" id="delete">delete(advertiserId, campaignId, x__xgafv=None)</code>
407 <pre>Permanently deletes a campaign. A deleted campaign cannot be recovered.
408The campaign should be archived first, i.e. set
409entity_status to `ENTITY_STATUS_ARCHIVED`, to be
410able to delete it.
411
412Args:
413 advertiserId: string, The ID of the advertiser this campaign belongs to. (required)
414 campaignId: string, The ID of the campaign we need to delete. (required)
415 x__xgafv: string, V1 error format.
416 Allowed values
417 1 - v1 error format
418 2 - v2 error format
419
420Returns:
421 An object of the form:
422
423 { # A generic empty message that you can re-use to avoid defining duplicated
424 # empty messages in your APIs. A typical example is to use it as the request
425 # or the response type of an API method. For instance:
426 #
427 # service Foo {
428 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
429 # }
430 #
431 # The JSON representation for `Empty` is empty JSON object `{}`.
432 }</pre>
433</div>
434
435<div class="method">
436 <code class="details" id="get">get(advertiserId, campaignId, x__xgafv=None)</code>
437 <pre>Gets a campaign.
438
439Args:
440 advertiserId: string, Required. The ID of the advertiser this campaign belongs to. (required)
441 campaignId: string, Required. The ID of the campaign to fetch. (required)
442 x__xgafv: string, V1 error format.
443 Allowed values
444 1 - v1 error format
445 2 - v2 error format
446
447Returns:
448 An object of the form:
449
450 { # A single campaign.
451 &quot;campaignFlight&quot;: { # Settings that track the planned spend and duration of a campaign. # Required. The planned spend and duration of the campaign.
452 &quot;plannedDates&quot;: { # A date range. # Required. The dates that the campaign is expected to run. They are resolved
453 # relative to the parent advertiser&#x27;s time zone.
454 #
455 # * The dates specified here will not affect serving. They are used to
456 # generate alerts and warnings. For example, if the flight date of any child
457 # insertion order is outside the range of these dates, the user interface
458 # will show a warning.
459 # * `start_date` is required and must be the current date or later.
460 # * `end_date` is optional. If specified, it must be the `start_date` or
461 # later.
462 # * Any specified date must be before the year 2037.
463 &quot;endDate&quot;: { # Represents a whole or partial calendar date, e.g. a birthday. The time of day # The upper bound of the date range, inclusive. Must specify a positive value
464 # for `year`, `month`, and `day`.
465 # and time zone are either specified elsewhere or are not significant. The date
466 # is relative to the Proleptic Gregorian Calendar. This can represent:
467 #
468 # * A full date, with non-zero year, month and day values
469 # * A month and day value, with a zero year, e.g. an anniversary
470 # * A year on its own, with zero month and day values
471 # * A year and month value, with a zero day, e.g. a credit card expiration date
472 #
473 # Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`.
474 &quot;year&quot;: 42, # Year of date. Must be from 1 to 9999, or 0 if specifying a date without
475 # a year.
476 &quot;day&quot;: 42, # Day of month. Must be from 1 to 31 and valid for the year and month, or 0
477 # if specifying a year by itself or a year and month where the day is not
478 # significant.
479 &quot;month&quot;: 42, # Month of year. Must be from 1 to 12, or 0 if specifying a year without a
480 # month and day.
481 },
482 &quot;startDate&quot;: { # Represents a whole or partial calendar date, e.g. a birthday. The time of day # The lower bound of the date range, inclusive. Must specify a positive value
483 # for `year`, `month`, and `day`.
484 # and time zone are either specified elsewhere or are not significant. The date
485 # is relative to the Proleptic Gregorian Calendar. This can represent:
486 #
487 # * A full date, with non-zero year, month and day values
488 # * A month and day value, with a zero year, e.g. an anniversary
489 # * A year on its own, with zero month and day values
490 # * A year and month value, with a zero day, e.g. a credit card expiration date
491 #
492 # Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`.
493 &quot;year&quot;: 42, # Year of date. Must be from 1 to 9999, or 0 if specifying a date without
494 # a year.
495 &quot;day&quot;: 42, # Day of month. Must be from 1 to 31 and valid for the year and month, or 0
496 # if specifying a year by itself or a year and month where the day is not
497 # significant.
498 &quot;month&quot;: 42, # Month of year. Must be from 1 to 12, or 0 if specifying a year without a
499 # month and day.
500 },
501 },
502 &quot;plannedSpendAmountMicros&quot;: &quot;A String&quot;, # The amount the campaign is expected to spend for its given
503 # planned_dates. This will not limit serving,
504 # but will be used for tracking spend in the DV360 UI.
505 #
506 # The amount is in micros. Must be greater than or equal to 0. For example,
507 # 500000000 represents 500 standard units of the currency.
508 },
509 &quot;frequencyCap&quot;: { # Settings that control the number of times a user may be shown with the same # Required. The frequency cap setting of the campaign.
510 # ad during a given time period.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700511 &quot;unlimited&quot;: True or False, # Whether unlimited frequency capping is applied. When this field is set to
512 # `true`, the remaining frequency cap fields are not applicable.
513 &quot;maxImpressions&quot;: 42, # The maximum number of times a user may be shown with the same ad
514 # during this period. Must be greater than 0.
515 #
516 # Applicable when unlimited is `false`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700517 &quot;timeUnit&quot;: &quot;A String&quot;, # The time unit in which the frequency cap will be applied.
518 #
519 # Applicable when unlimited is `false`.
520 &quot;timeUnitCount&quot;: 42, # The number of time_unit the frequency cap will
521 # last.
522 #
523 # Applicable when unlimited is `false`.
524 # The following restrictions apply based on the value of
525 # time_unit:
526 #
527 # * `TIME_UNIT_LIFETIME` - this field is output only and will
528 # default to 1
529 # * `TIME_UNIT_MONTHS` - must be between 1 and 2
530 # * `TIME_UNIT_WEEKS` - must be between 1 and 4
531 # * `TIME_UNIT_DAYS` - must be between 1 and 6
532 # * `TIME_UNIT_HOURS` - must be between 1 and 23
533 # * `TIME_UNIT_MINUTES` - must be between 1 and 59
Bu Sun Kim65020912020-05-20 12:08:20 -0700534 },
535 &quot;displayName&quot;: &quot;A String&quot;, # Required. The display name of the campaign.
536 #
537 # Must be UTF-8 encoded with a maximum size of 240 bytes.
538 &quot;entityStatus&quot;: &quot;A String&quot;, # Required. Controls whether or not the insertion orders under this campaign
539 # can spend their budgets and bid on inventory.
540 #
541 # * Accepted values are `ENTITY_STATUS_ACTIVE`, `ENTITY_STATUS_ARCHIVED`, and
542 # `ENTITY_STATUS_PAUSED`.
543 # * For
544 # CreateCampaign method,
545 # `ENTITY_STATUS_ARCHIVED` is not allowed.
546 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The timestamp when the campaign was last updated. Assigned by the system.
547 &quot;advertiserId&quot;: &quot;A String&quot;, # Output only. The unique ID of the advertiser the campaign belongs to.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700548 &quot;campaignId&quot;: &quot;A String&quot;, # Output only. The unique ID of the campaign. Assigned by the system.
549 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the campaign.
Bu Sun Kim65020912020-05-20 12:08:20 -0700550 &quot;campaignGoal&quot;: { # Settings that control the goal of a campaign. # Required. The goal of the campaign.
551 &quot;performanceGoal&quot;: { # Settings that control the performance goal of a campaign or insertion order. # Required. The performance goal of the campaign.
552 #
553 # Acceptable values for
554 # performance_goal_type are:
555 #
556 # * `PERFORMANCE_GOAL_TYPE_CPM`
557 # * `PERFORMANCE_GOAL_TYPE_CPC`
558 # * `PERFORMANCE_GOAL_TYPE_CPA`
559 # * `PERFORMANCE_GOAL_TYPE_CPIAVC`
560 # * `PERFORMANCE_GOAL_TYPE_CTR`
561 # * `PERFORMANCE_GOAL_TYPE_VIEWABILITY`
562 # * `PERFORMANCE_GOAL_TYPE_OTHER`
Bu Sun Kim65020912020-05-20 12:08:20 -0700563 &quot;performanceGoalAmountMicros&quot;: &quot;A String&quot;, # The goal amount, in micros of the advertiser&#x27;s currency.
564 #
565 # Applicable when
566 # performance_goal_type is one of:
567 #
568 # * `PERFORMANCE_GOAL_TYPE_CPM`
569 # * `PERFORMANCE_GOAL_TYPE_CPC`
570 # * `PERFORMANCE_GOAL_TYPE_CPA`
571 # * `PERFORMANCE_GOAL_TYPE_CPIAVC`
572 #
573 # For example 1500000 represents 1.5 standard units of the currency.
574 &quot;performanceGoalPercentageMicros&quot;: &quot;A String&quot;, # The decimal representation of the goal percentage in micros.
575 #
576 # Applicable when
577 # performance_goal_type is one of:
578 #
579 # * `PERFORMANCE_GOAL_TYPE_CTR`
580 # * `PERFORMANCE_GOAL_TYPE_VIEWABILITY`
581 #
582 # For example, 70000 represents 7% (decimal 0.07).
583 &quot;performanceGoalString&quot;: &quot;A String&quot;, # A key performance indicator (KPI) string, which can be empty.
584 # Must be UTF-8 encoded with a length of no more than 100 characters.
585 #
586 # Applicable when
587 # performance_goal_type is set to
588 # `PERFORMANCE_GOAL_TYPE_OTHER`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700589 &quot;performanceGoalType&quot;: &quot;A String&quot;, # Required. The type of the performance goal.
Bu Sun Kim65020912020-05-20 12:08:20 -0700590 },
591 &quot;campaignGoalType&quot;: &quot;A String&quot;, # Required. The type of the campaign goal.
592 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700593 }</pre>
594</div>
595
596<div class="method">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700597 <code class="details" id="list">list(advertiserId, pageSize=None, filter=None, pageToken=None, orderBy=None, x__xgafv=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -0700598 <pre>Lists campaigns in an advertiser.
599
600The order is defined by the order_by
601parameter.
602If a filter by
603entity_status is not specified, campaigns with
604`ENTITY_STATUS_ARCHIVED` will not be included in the results.
605
606Args:
607 advertiserId: string, The ID of the advertiser to list campaigns for. (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700608 pageSize: integer, Requested page size. Must be between `1` and `100`. If unspecified will
609default to `100`.
610 filter: string, Allows filtering by campaign properties.
611
612Supported syntax:
613
614* Filter expressions are made up of one or more restrictions.
615* Restrictions can be combined by `AND` or `OR` logical operators. A
616sequence of restrictions implicitly uses `AND`.
617* A restriction has the form of `{field} {operator} {value}`.
618* The operator must be `EQUALS (=)`.
619* Supported fields:
620 - `entityStatus`
621
622Examples:
623
624* All `ENTITY_STATUS_ACTIVE` or `ENTITY_STATUS_PAUSED` campaigns under an
625advertiser:
626`(entityStatus=&quot;ENTITY_STATUS_ACTIVE&quot; OR
627entityStatus=&quot;ENTITY_STATUS_PAUSED&quot;)`
628
629The length of this field should be no more than 500 characters.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700630 pageToken: string, A token identifying a page of results the server should return.
631Typically, this is the value of
632next_page_token returned from the
633previous call to `ListCampaigns` method. If not specified, the first page
634of results will be returned.
635 orderBy: string, Field by which to sort the list.
636Acceptable values are:
637
638* `displayName` (default)
639* `entityStatus`
640
641The default sorting order is ascending. To specify descending order for
642a field, a suffix &quot;desc&quot; should be added to the field name. Example:
643`displayName desc`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700644 x__xgafv: string, V1 error format.
645 Allowed values
646 1 - v1 error format
647 2 - v2 error format
648
649Returns:
650 An object of the form:
651
652 {
653 &quot;campaigns&quot;: [ # The list of campaigns.
654 #
655 # This list will be absent if empty.
656 { # A single campaign.
657 &quot;campaignFlight&quot;: { # Settings that track the planned spend and duration of a campaign. # Required. The planned spend and duration of the campaign.
658 &quot;plannedDates&quot;: { # A date range. # Required. The dates that the campaign is expected to run. They are resolved
659 # relative to the parent advertiser&#x27;s time zone.
660 #
661 # * The dates specified here will not affect serving. They are used to
662 # generate alerts and warnings. For example, if the flight date of any child
663 # insertion order is outside the range of these dates, the user interface
664 # will show a warning.
665 # * `start_date` is required and must be the current date or later.
666 # * `end_date` is optional. If specified, it must be the `start_date` or
667 # later.
668 # * Any specified date must be before the year 2037.
669 &quot;endDate&quot;: { # Represents a whole or partial calendar date, e.g. a birthday. The time of day # The upper bound of the date range, inclusive. Must specify a positive value
670 # for `year`, `month`, and `day`.
671 # and time zone are either specified elsewhere or are not significant. The date
672 # is relative to the Proleptic Gregorian Calendar. This can represent:
673 #
674 # * A full date, with non-zero year, month and day values
675 # * A month and day value, with a zero year, e.g. an anniversary
676 # * A year on its own, with zero month and day values
677 # * A year and month value, with a zero day, e.g. a credit card expiration date
678 #
679 # Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`.
680 &quot;year&quot;: 42, # Year of date. Must be from 1 to 9999, or 0 if specifying a date without
681 # a year.
682 &quot;day&quot;: 42, # Day of month. Must be from 1 to 31 and valid for the year and month, or 0
683 # if specifying a year by itself or a year and month where the day is not
684 # significant.
685 &quot;month&quot;: 42, # Month of year. Must be from 1 to 12, or 0 if specifying a year without a
686 # month and day.
687 },
688 &quot;startDate&quot;: { # Represents a whole or partial calendar date, e.g. a birthday. The time of day # The lower bound of the date range, inclusive. Must specify a positive value
689 # for `year`, `month`, and `day`.
690 # and time zone are either specified elsewhere or are not significant. The date
691 # is relative to the Proleptic Gregorian Calendar. This can represent:
692 #
693 # * A full date, with non-zero year, month and day values
694 # * A month and day value, with a zero year, e.g. an anniversary
695 # * A year on its own, with zero month and day values
696 # * A year and month value, with a zero day, e.g. a credit card expiration date
697 #
698 # Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`.
699 &quot;year&quot;: 42, # Year of date. Must be from 1 to 9999, or 0 if specifying a date without
700 # a year.
701 &quot;day&quot;: 42, # Day of month. Must be from 1 to 31 and valid for the year and month, or 0
702 # if specifying a year by itself or a year and month where the day is not
703 # significant.
704 &quot;month&quot;: 42, # Month of year. Must be from 1 to 12, or 0 if specifying a year without a
705 # month and day.
706 },
707 },
708 &quot;plannedSpendAmountMicros&quot;: &quot;A String&quot;, # The amount the campaign is expected to spend for its given
709 # planned_dates. This will not limit serving,
710 # but will be used for tracking spend in the DV360 UI.
711 #
712 # The amount is in micros. Must be greater than or equal to 0. For example,
713 # 500000000 represents 500 standard units of the currency.
714 },
715 &quot;frequencyCap&quot;: { # Settings that control the number of times a user may be shown with the same # Required. The frequency cap setting of the campaign.
716 # ad during a given time period.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700717 &quot;unlimited&quot;: True or False, # Whether unlimited frequency capping is applied. When this field is set to
718 # `true`, the remaining frequency cap fields are not applicable.
719 &quot;maxImpressions&quot;: 42, # The maximum number of times a user may be shown with the same ad
720 # during this period. Must be greater than 0.
721 #
722 # Applicable when unlimited is `false`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700723 &quot;timeUnit&quot;: &quot;A String&quot;, # The time unit in which the frequency cap will be applied.
724 #
725 # Applicable when unlimited is `false`.
726 &quot;timeUnitCount&quot;: 42, # The number of time_unit the frequency cap will
727 # last.
728 #
729 # Applicable when unlimited is `false`.
730 # The following restrictions apply based on the value of
731 # time_unit:
732 #
733 # * `TIME_UNIT_LIFETIME` - this field is output only and will
734 # default to 1
735 # * `TIME_UNIT_MONTHS` - must be between 1 and 2
736 # * `TIME_UNIT_WEEKS` - must be between 1 and 4
737 # * `TIME_UNIT_DAYS` - must be between 1 and 6
738 # * `TIME_UNIT_HOURS` - must be between 1 and 23
739 # * `TIME_UNIT_MINUTES` - must be between 1 and 59
Bu Sun Kim65020912020-05-20 12:08:20 -0700740 },
741 &quot;displayName&quot;: &quot;A String&quot;, # Required. The display name of the campaign.
742 #
743 # Must be UTF-8 encoded with a maximum size of 240 bytes.
744 &quot;entityStatus&quot;: &quot;A String&quot;, # Required. Controls whether or not the insertion orders under this campaign
745 # can spend their budgets and bid on inventory.
746 #
747 # * Accepted values are `ENTITY_STATUS_ACTIVE`, `ENTITY_STATUS_ARCHIVED`, and
748 # `ENTITY_STATUS_PAUSED`.
749 # * For
750 # CreateCampaign method,
751 # `ENTITY_STATUS_ARCHIVED` is not allowed.
752 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The timestamp when the campaign was last updated. Assigned by the system.
753 &quot;advertiserId&quot;: &quot;A String&quot;, # Output only. The unique ID of the advertiser the campaign belongs to.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700754 &quot;campaignId&quot;: &quot;A String&quot;, # Output only. The unique ID of the campaign. Assigned by the system.
755 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the campaign.
Bu Sun Kim65020912020-05-20 12:08:20 -0700756 &quot;campaignGoal&quot;: { # Settings that control the goal of a campaign. # Required. The goal of the campaign.
757 &quot;performanceGoal&quot;: { # Settings that control the performance goal of a campaign or insertion order. # Required. The performance goal of the campaign.
758 #
759 # Acceptable values for
760 # performance_goal_type are:
761 #
762 # * `PERFORMANCE_GOAL_TYPE_CPM`
763 # * `PERFORMANCE_GOAL_TYPE_CPC`
764 # * `PERFORMANCE_GOAL_TYPE_CPA`
765 # * `PERFORMANCE_GOAL_TYPE_CPIAVC`
766 # * `PERFORMANCE_GOAL_TYPE_CTR`
767 # * `PERFORMANCE_GOAL_TYPE_VIEWABILITY`
768 # * `PERFORMANCE_GOAL_TYPE_OTHER`
Bu Sun Kim65020912020-05-20 12:08:20 -0700769 &quot;performanceGoalAmountMicros&quot;: &quot;A String&quot;, # The goal amount, in micros of the advertiser&#x27;s currency.
770 #
771 # Applicable when
772 # performance_goal_type is one of:
773 #
774 # * `PERFORMANCE_GOAL_TYPE_CPM`
775 # * `PERFORMANCE_GOAL_TYPE_CPC`
776 # * `PERFORMANCE_GOAL_TYPE_CPA`
777 # * `PERFORMANCE_GOAL_TYPE_CPIAVC`
778 #
779 # For example 1500000 represents 1.5 standard units of the currency.
780 &quot;performanceGoalPercentageMicros&quot;: &quot;A String&quot;, # The decimal representation of the goal percentage in micros.
781 #
782 # Applicable when
783 # performance_goal_type is one of:
784 #
785 # * `PERFORMANCE_GOAL_TYPE_CTR`
786 # * `PERFORMANCE_GOAL_TYPE_VIEWABILITY`
787 #
788 # For example, 70000 represents 7% (decimal 0.07).
789 &quot;performanceGoalString&quot;: &quot;A String&quot;, # A key performance indicator (KPI) string, which can be empty.
790 # Must be UTF-8 encoded with a length of no more than 100 characters.
791 #
792 # Applicable when
793 # performance_goal_type is set to
794 # `PERFORMANCE_GOAL_TYPE_OTHER`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700795 &quot;performanceGoalType&quot;: &quot;A String&quot;, # Required. The type of the performance goal.
Bu Sun Kim65020912020-05-20 12:08:20 -0700796 },
797 &quot;campaignGoalType&quot;: &quot;A String&quot;, # Required. The type of the campaign goal.
798 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700799 },
800 ],
801 &quot;nextPageToken&quot;: &quot;A String&quot;, # A token to retrieve the next page of results.
802 # Pass this value in the page_token field
803 # in the subsequent call to `ListCampaigns` method to retrieve the next page
804 # of results.
805 }</pre>
806</div>
807
808<div class="method">
809 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
810 <pre>Retrieves the next page of results.
811
812Args:
813 previous_request: The request for the previous page. (required)
814 previous_response: The response from the request for the previous page. (required)
815
816Returns:
817 A request object that you can call &#x27;execute()&#x27; on to request the next
818 page. Returns None if there are no more items in the collection.
819 </pre>
820</div>
821
822<div class="method">
823 <code class="details" id="patch">patch(advertiserId, campaignId, body=None, updateMask=None, x__xgafv=None)</code>
824 <pre>Updates an existing campaign.
825Returns the updated campaign if successful.
826
827Args:
828 advertiserId: string, Output only. The unique ID of the advertiser the campaign belongs to. (required)
829 campaignId: string, Output only. The unique ID of the campaign. Assigned by the system. (required)
830 body: object, The request body.
831 The object takes the form of:
832
833{ # A single campaign.
834 &quot;campaignFlight&quot;: { # Settings that track the planned spend and duration of a campaign. # Required. The planned spend and duration of the campaign.
835 &quot;plannedDates&quot;: { # A date range. # Required. The dates that the campaign is expected to run. They are resolved
836 # relative to the parent advertiser&#x27;s time zone.
837 #
838 # * The dates specified here will not affect serving. They are used to
839 # generate alerts and warnings. For example, if the flight date of any child
840 # insertion order is outside the range of these dates, the user interface
841 # will show a warning.
842 # * `start_date` is required and must be the current date or later.
843 # * `end_date` is optional. If specified, it must be the `start_date` or
844 # later.
845 # * Any specified date must be before the year 2037.
846 &quot;endDate&quot;: { # Represents a whole or partial calendar date, e.g. a birthday. The time of day # The upper bound of the date range, inclusive. Must specify a positive value
847 # for `year`, `month`, and `day`.
848 # and time zone are either specified elsewhere or are not significant. The date
849 # is relative to the Proleptic Gregorian Calendar. This can represent:
850 #
851 # * A full date, with non-zero year, month and day values
852 # * A month and day value, with a zero year, e.g. an anniversary
853 # * A year on its own, with zero month and day values
854 # * A year and month value, with a zero day, e.g. a credit card expiration date
855 #
856 # Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`.
857 &quot;year&quot;: 42, # Year of date. Must be from 1 to 9999, or 0 if specifying a date without
858 # a year.
859 &quot;day&quot;: 42, # Day of month. Must be from 1 to 31 and valid for the year and month, or 0
860 # if specifying a year by itself or a year and month where the day is not
861 # significant.
862 &quot;month&quot;: 42, # Month of year. Must be from 1 to 12, or 0 if specifying a year without a
863 # month and day.
864 },
865 &quot;startDate&quot;: { # Represents a whole or partial calendar date, e.g. a birthday. The time of day # The lower bound of the date range, inclusive. Must specify a positive value
866 # for `year`, `month`, and `day`.
867 # and time zone are either specified elsewhere or are not significant. The date
868 # is relative to the Proleptic Gregorian Calendar. This can represent:
869 #
870 # * A full date, with non-zero year, month and day values
871 # * A month and day value, with a zero year, e.g. an anniversary
872 # * A year on its own, with zero month and day values
873 # * A year and month value, with a zero day, e.g. a credit card expiration date
874 #
875 # Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`.
876 &quot;year&quot;: 42, # Year of date. Must be from 1 to 9999, or 0 if specifying a date without
877 # a year.
878 &quot;day&quot;: 42, # Day of month. Must be from 1 to 31 and valid for the year and month, or 0
879 # if specifying a year by itself or a year and month where the day is not
880 # significant.
881 &quot;month&quot;: 42, # Month of year. Must be from 1 to 12, or 0 if specifying a year without a
882 # month and day.
883 },
884 },
885 &quot;plannedSpendAmountMicros&quot;: &quot;A String&quot;, # The amount the campaign is expected to spend for its given
886 # planned_dates. This will not limit serving,
887 # but will be used for tracking spend in the DV360 UI.
888 #
889 # The amount is in micros. Must be greater than or equal to 0. For example,
890 # 500000000 represents 500 standard units of the currency.
891 },
892 &quot;frequencyCap&quot;: { # Settings that control the number of times a user may be shown with the same # Required. The frequency cap setting of the campaign.
893 # ad during a given time period.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700894 &quot;unlimited&quot;: True or False, # Whether unlimited frequency capping is applied. When this field is set to
895 # `true`, the remaining frequency cap fields are not applicable.
896 &quot;maxImpressions&quot;: 42, # The maximum number of times a user may be shown with the same ad
897 # during this period. Must be greater than 0.
898 #
899 # Applicable when unlimited is `false`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700900 &quot;timeUnit&quot;: &quot;A String&quot;, # The time unit in which the frequency cap will be applied.
901 #
902 # Applicable when unlimited is `false`.
903 &quot;timeUnitCount&quot;: 42, # The number of time_unit the frequency cap will
904 # last.
905 #
906 # Applicable when unlimited is `false`.
907 # The following restrictions apply based on the value of
908 # time_unit:
909 #
910 # * `TIME_UNIT_LIFETIME` - this field is output only and will
911 # default to 1
912 # * `TIME_UNIT_MONTHS` - must be between 1 and 2
913 # * `TIME_UNIT_WEEKS` - must be between 1 and 4
914 # * `TIME_UNIT_DAYS` - must be between 1 and 6
915 # * `TIME_UNIT_HOURS` - must be between 1 and 23
916 # * `TIME_UNIT_MINUTES` - must be between 1 and 59
Bu Sun Kim65020912020-05-20 12:08:20 -0700917 },
918 &quot;displayName&quot;: &quot;A String&quot;, # Required. The display name of the campaign.
919 #
920 # Must be UTF-8 encoded with a maximum size of 240 bytes.
921 &quot;entityStatus&quot;: &quot;A String&quot;, # Required. Controls whether or not the insertion orders under this campaign
922 # can spend their budgets and bid on inventory.
923 #
924 # * Accepted values are `ENTITY_STATUS_ACTIVE`, `ENTITY_STATUS_ARCHIVED`, and
925 # `ENTITY_STATUS_PAUSED`.
926 # * For
927 # CreateCampaign method,
928 # `ENTITY_STATUS_ARCHIVED` is not allowed.
929 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The timestamp when the campaign was last updated. Assigned by the system.
930 &quot;advertiserId&quot;: &quot;A String&quot;, # Output only. The unique ID of the advertiser the campaign belongs to.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700931 &quot;campaignId&quot;: &quot;A String&quot;, # Output only. The unique ID of the campaign. Assigned by the system.
932 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the campaign.
Bu Sun Kim65020912020-05-20 12:08:20 -0700933 &quot;campaignGoal&quot;: { # Settings that control the goal of a campaign. # Required. The goal of the campaign.
934 &quot;performanceGoal&quot;: { # Settings that control the performance goal of a campaign or insertion order. # Required. The performance goal of the campaign.
935 #
936 # Acceptable values for
937 # performance_goal_type are:
938 #
939 # * `PERFORMANCE_GOAL_TYPE_CPM`
940 # * `PERFORMANCE_GOAL_TYPE_CPC`
941 # * `PERFORMANCE_GOAL_TYPE_CPA`
942 # * `PERFORMANCE_GOAL_TYPE_CPIAVC`
943 # * `PERFORMANCE_GOAL_TYPE_CTR`
944 # * `PERFORMANCE_GOAL_TYPE_VIEWABILITY`
945 # * `PERFORMANCE_GOAL_TYPE_OTHER`
Bu Sun Kim65020912020-05-20 12:08:20 -0700946 &quot;performanceGoalAmountMicros&quot;: &quot;A String&quot;, # The goal amount, in micros of the advertiser&#x27;s currency.
947 #
948 # Applicable when
949 # performance_goal_type is one of:
950 #
951 # * `PERFORMANCE_GOAL_TYPE_CPM`
952 # * `PERFORMANCE_GOAL_TYPE_CPC`
953 # * `PERFORMANCE_GOAL_TYPE_CPA`
954 # * `PERFORMANCE_GOAL_TYPE_CPIAVC`
955 #
956 # For example 1500000 represents 1.5 standard units of the currency.
957 &quot;performanceGoalPercentageMicros&quot;: &quot;A String&quot;, # The decimal representation of the goal percentage in micros.
958 #
959 # Applicable when
960 # performance_goal_type is one of:
961 #
962 # * `PERFORMANCE_GOAL_TYPE_CTR`
963 # * `PERFORMANCE_GOAL_TYPE_VIEWABILITY`
964 #
965 # For example, 70000 represents 7% (decimal 0.07).
966 &quot;performanceGoalString&quot;: &quot;A String&quot;, # A key performance indicator (KPI) string, which can be empty.
967 # Must be UTF-8 encoded with a length of no more than 100 characters.
968 #
969 # Applicable when
970 # performance_goal_type is set to
971 # `PERFORMANCE_GOAL_TYPE_OTHER`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700972 &quot;performanceGoalType&quot;: &quot;A String&quot;, # Required. The type of the performance goal.
Bu Sun Kim65020912020-05-20 12:08:20 -0700973 },
974 &quot;campaignGoalType&quot;: &quot;A String&quot;, # Required. The type of the campaign goal.
975 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700976}
977
978 updateMask: string, Required. The mask to control which fields to update.
979 x__xgafv: string, V1 error format.
980 Allowed values
981 1 - v1 error format
982 2 - v2 error format
983
984Returns:
985 An object of the form:
986
987 { # A single campaign.
988 &quot;campaignFlight&quot;: { # Settings that track the planned spend and duration of a campaign. # Required. The planned spend and duration of the campaign.
989 &quot;plannedDates&quot;: { # A date range. # Required. The dates that the campaign is expected to run. They are resolved
990 # relative to the parent advertiser&#x27;s time zone.
991 #
992 # * The dates specified here will not affect serving. They are used to
993 # generate alerts and warnings. For example, if the flight date of any child
994 # insertion order is outside the range of these dates, the user interface
995 # will show a warning.
996 # * `start_date` is required and must be the current date or later.
997 # * `end_date` is optional. If specified, it must be the `start_date` or
998 # later.
999 # * Any specified date must be before the year 2037.
1000 &quot;endDate&quot;: { # Represents a whole or partial calendar date, e.g. a birthday. The time of day # The upper bound of the date range, inclusive. Must specify a positive value
1001 # for `year`, `month`, and `day`.
1002 # and time zone are either specified elsewhere or are not significant. The date
1003 # is relative to the Proleptic Gregorian Calendar. This can represent:
1004 #
1005 # * A full date, with non-zero year, month and day values
1006 # * A month and day value, with a zero year, e.g. an anniversary
1007 # * A year on its own, with zero month and day values
1008 # * A year and month value, with a zero day, e.g. a credit card expiration date
1009 #
1010 # Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`.
1011 &quot;year&quot;: 42, # Year of date. Must be from 1 to 9999, or 0 if specifying a date without
1012 # a year.
1013 &quot;day&quot;: 42, # Day of month. Must be from 1 to 31 and valid for the year and month, or 0
1014 # if specifying a year by itself or a year and month where the day is not
1015 # significant.
1016 &quot;month&quot;: 42, # Month of year. Must be from 1 to 12, or 0 if specifying a year without a
1017 # month and day.
1018 },
1019 &quot;startDate&quot;: { # Represents a whole or partial calendar date, e.g. a birthday. The time of day # The lower bound of the date range, inclusive. Must specify a positive value
1020 # for `year`, `month`, and `day`.
1021 # and time zone are either specified elsewhere or are not significant. The date
1022 # is relative to the Proleptic Gregorian Calendar. This can represent:
1023 #
1024 # * A full date, with non-zero year, month and day values
1025 # * A month and day value, with a zero year, e.g. an anniversary
1026 # * A year on its own, with zero month and day values
1027 # * A year and month value, with a zero day, e.g. a credit card expiration date
1028 #
1029 # Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`.
1030 &quot;year&quot;: 42, # Year of date. Must be from 1 to 9999, or 0 if specifying a date without
1031 # a year.
1032 &quot;day&quot;: 42, # Day of month. Must be from 1 to 31 and valid for the year and month, or 0
1033 # if specifying a year by itself or a year and month where the day is not
1034 # significant.
1035 &quot;month&quot;: 42, # Month of year. Must be from 1 to 12, or 0 if specifying a year without a
1036 # month and day.
1037 },
1038 },
1039 &quot;plannedSpendAmountMicros&quot;: &quot;A String&quot;, # The amount the campaign is expected to spend for its given
1040 # planned_dates. This will not limit serving,
1041 # but will be used for tracking spend in the DV360 UI.
1042 #
1043 # The amount is in micros. Must be greater than or equal to 0. For example,
1044 # 500000000 represents 500 standard units of the currency.
1045 },
1046 &quot;frequencyCap&quot;: { # Settings that control the number of times a user may be shown with the same # Required. The frequency cap setting of the campaign.
1047 # ad during a given time period.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001048 &quot;unlimited&quot;: True or False, # Whether unlimited frequency capping is applied. When this field is set to
1049 # `true`, the remaining frequency cap fields are not applicable.
1050 &quot;maxImpressions&quot;: 42, # The maximum number of times a user may be shown with the same ad
1051 # during this period. Must be greater than 0.
1052 #
1053 # Applicable when unlimited is `false`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001054 &quot;timeUnit&quot;: &quot;A String&quot;, # The time unit in which the frequency cap will be applied.
1055 #
1056 # Applicable when unlimited is `false`.
1057 &quot;timeUnitCount&quot;: 42, # The number of time_unit the frequency cap will
1058 # last.
1059 #
1060 # Applicable when unlimited is `false`.
1061 # The following restrictions apply based on the value of
1062 # time_unit:
1063 #
1064 # * `TIME_UNIT_LIFETIME` - this field is output only and will
1065 # default to 1
1066 # * `TIME_UNIT_MONTHS` - must be between 1 and 2
1067 # * `TIME_UNIT_WEEKS` - must be between 1 and 4
1068 # * `TIME_UNIT_DAYS` - must be between 1 and 6
1069 # * `TIME_UNIT_HOURS` - must be between 1 and 23
1070 # * `TIME_UNIT_MINUTES` - must be between 1 and 59
Bu Sun Kim65020912020-05-20 12:08:20 -07001071 },
1072 &quot;displayName&quot;: &quot;A String&quot;, # Required. The display name of the campaign.
1073 #
1074 # Must be UTF-8 encoded with a maximum size of 240 bytes.
1075 &quot;entityStatus&quot;: &quot;A String&quot;, # Required. Controls whether or not the insertion orders under this campaign
1076 # can spend their budgets and bid on inventory.
1077 #
1078 # * Accepted values are `ENTITY_STATUS_ACTIVE`, `ENTITY_STATUS_ARCHIVED`, and
1079 # `ENTITY_STATUS_PAUSED`.
1080 # * For
1081 # CreateCampaign method,
1082 # `ENTITY_STATUS_ARCHIVED` is not allowed.
1083 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The timestamp when the campaign was last updated. Assigned by the system.
1084 &quot;advertiserId&quot;: &quot;A String&quot;, # Output only. The unique ID of the advertiser the campaign belongs to.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001085 &quot;campaignId&quot;: &quot;A String&quot;, # Output only. The unique ID of the campaign. Assigned by the system.
1086 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the campaign.
Bu Sun Kim65020912020-05-20 12:08:20 -07001087 &quot;campaignGoal&quot;: { # Settings that control the goal of a campaign. # Required. The goal of the campaign.
1088 &quot;performanceGoal&quot;: { # Settings that control the performance goal of a campaign or insertion order. # Required. The performance goal of the campaign.
1089 #
1090 # Acceptable values for
1091 # performance_goal_type are:
1092 #
1093 # * `PERFORMANCE_GOAL_TYPE_CPM`
1094 # * `PERFORMANCE_GOAL_TYPE_CPC`
1095 # * `PERFORMANCE_GOAL_TYPE_CPA`
1096 # * `PERFORMANCE_GOAL_TYPE_CPIAVC`
1097 # * `PERFORMANCE_GOAL_TYPE_CTR`
1098 # * `PERFORMANCE_GOAL_TYPE_VIEWABILITY`
1099 # * `PERFORMANCE_GOAL_TYPE_OTHER`
Bu Sun Kim65020912020-05-20 12:08:20 -07001100 &quot;performanceGoalAmountMicros&quot;: &quot;A String&quot;, # The goal amount, in micros of the advertiser&#x27;s currency.
1101 #
1102 # Applicable when
1103 # performance_goal_type is one of:
1104 #
1105 # * `PERFORMANCE_GOAL_TYPE_CPM`
1106 # * `PERFORMANCE_GOAL_TYPE_CPC`
1107 # * `PERFORMANCE_GOAL_TYPE_CPA`
1108 # * `PERFORMANCE_GOAL_TYPE_CPIAVC`
1109 #
1110 # For example 1500000 represents 1.5 standard units of the currency.
1111 &quot;performanceGoalPercentageMicros&quot;: &quot;A String&quot;, # The decimal representation of the goal percentage in micros.
1112 #
1113 # Applicable when
1114 # performance_goal_type is one of:
1115 #
1116 # * `PERFORMANCE_GOAL_TYPE_CTR`
1117 # * `PERFORMANCE_GOAL_TYPE_VIEWABILITY`
1118 #
1119 # For example, 70000 represents 7% (decimal 0.07).
1120 &quot;performanceGoalString&quot;: &quot;A String&quot;, # A key performance indicator (KPI) string, which can be empty.
1121 # Must be UTF-8 encoded with a length of no more than 100 characters.
1122 #
1123 # Applicable when
1124 # performance_goal_type is set to
1125 # `PERFORMANCE_GOAL_TYPE_OTHER`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001126 &quot;performanceGoalType&quot;: &quot;A String&quot;, # Required. The type of the performance goal.
Bu Sun Kim65020912020-05-20 12:08:20 -07001127 },
1128 &quot;campaignGoalType&quot;: &quot;A String&quot;, # Required. The type of the campaign goal.
1129 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001130 }</pre>
1131</div>
1132
1133</body></html>