Close httplib2 connections.
create(advertiserId, body=None, x__xgafv=None)
Creates a new campaign. Returns the newly created campaign if successful.
delete(advertiserId, campaignId, x__xgafv=None)
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.
get(advertiserId, campaignId, x__xgafv=None)
Gets a campaign.
list(advertiserId, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)
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.
Retrieves the next page of results.
patch(advertiserId, campaignId, body=None, updateMask=None, x__xgafv=None)
Updates an existing campaign. Returns the updated campaign if successful.
close()
Close httplib2 connections.
create(advertiserId, body=None, x__xgafv=None)
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. "advertiserId": "A String", # Output only. The unique ID of the advertiser the campaign belongs to. "campaignBudgets": [ # 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. "budgetAmountMicros": "A String", # 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. "budgetId": "A String", # 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. "budgetUnit": "A String", # Required. Immutable. Specifies whether the budget is measured in currency or impressions. "dateRange": { # 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's time zone. Both `start_date` and `end_date` must be before the year 2037. "endDate": { # 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`. "day": 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't significant. "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. }, "startDate": { # 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`. "day": 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't significant. "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. }, }, "displayName": "A String", # Required. The display name of the budget. Must be UTF-8 encoded with a maximum size of 240 bytes. "externalBudgetId": "A String", # 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 "Budget level PO", all impressions served against this budget will include this ID on the invoice. Must be unique under the campaign. "externalBudgetSource": "A String", # Required. The external source of the budget. "invoiceGroupingId": "A String", # 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 "Budget invoice grouping ID", all external_budget_id sharing the same invoice_grouping_id will be grouped in the same invoice. "prismaConfig": { # 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. "prismaCpeCode": { # 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. "prismaClientCode": "A String", # The Prisma client code. "prismaEstimateCode": "A String", # The Prisma estimate code. "prismaProductCode": "A String", # The Prisma product code. }, "prismaType": "A String", # Required. The Prisma type. "supplier": "A String", # Required. The entity allocated this budget (DSP, site, etc.). }, }, ], "campaignFlight": { # Settings that track the planned spend and duration of a campaign. # Required. The planned spend and duration of the campaign. "plannedDates": { # A date range. # Required. The dates that the campaign is expected to run. They are resolved relative to the parent advertiser'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. "endDate": { # 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`. "day": 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't significant. "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. }, "startDate": { # 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`. "day": 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't significant. "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. }, }, "plannedSpendAmountMicros": "A String", # 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. }, "campaignGoal": { # Settings that control the goal of a campaign. # Required. The goal of the campaign. "campaignGoalType": "A String", # Required. The type of the campaign goal. "performanceGoal": { # 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` "performanceGoalAmountMicros": "A String", # The goal amount, in micros of the advertiser'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. "performanceGoalPercentageMicros": "A String", # 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). "performanceGoalString": "A String", # 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`. "performanceGoalType": "A String", # Required. The type of the performance goal. }, }, "campaignId": "A String", # Output only. The unique ID of the campaign. Assigned by the system. "displayName": "A String", # Required. The display name of the campaign. Must be UTF-8 encoded with a maximum size of 240 bytes. "entityStatus": "A String", # 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. "frequencyCap": { # 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) "maxImpressions": 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. "maxViews": 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. "timeUnit": "A String", # The time unit in which the frequency cap will be applied. Required when unlimited is `false`. *Warning*: On **February 28, 2025**, frequency cap time periods greater than 30 days will no longer be accepted. This field will no longer accept the value `TIME_UNIT_LIFETIME`. [Read more about this announced change](/display-video/api/deprecations#features.lifetime_frequency_cap). "timeUnitCount": 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_LIFETIME` - this field is output only and will default to 1 * `TIME_UNIT_MONTHS` - must be between 1 and 2 * `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 *Warning*: On **February 28, 2025**, frequency cap time periods greater than 30 days will no longer be accepted. This field will no longer accept the value 2 if the value of time_unit is `TIME_UNIT_MONTHS`. [Read more about this announced change](/display-video/api/deprecations#features.lifetime_frequency_cap). "unlimited": True or False, # Whether unlimited frequency capping is applied. When this field is set to `true`, the remaining frequency cap fields are not applicable. }, "name": "A String", # Output only. The resource name of the campaign. "updateTime": "A String", # 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. "advertiserId": "A String", # Output only. The unique ID of the advertiser the campaign belongs to. "campaignBudgets": [ # 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. "budgetAmountMicros": "A String", # 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. "budgetId": "A String", # 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. "budgetUnit": "A String", # Required. Immutable. Specifies whether the budget is measured in currency or impressions. "dateRange": { # 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's time zone. Both `start_date` and `end_date` must be before the year 2037. "endDate": { # 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`. "day": 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't significant. "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. }, "startDate": { # 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`. "day": 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't significant. "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. }, }, "displayName": "A String", # Required. The display name of the budget. Must be UTF-8 encoded with a maximum size of 240 bytes. "externalBudgetId": "A String", # 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 "Budget level PO", all impressions served against this budget will include this ID on the invoice. Must be unique under the campaign. "externalBudgetSource": "A String", # Required. The external source of the budget. "invoiceGroupingId": "A String", # 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 "Budget invoice grouping ID", all external_budget_id sharing the same invoice_grouping_id will be grouped in the same invoice. "prismaConfig": { # 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. "prismaCpeCode": { # 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. "prismaClientCode": "A String", # The Prisma client code. "prismaEstimateCode": "A String", # The Prisma estimate code. "prismaProductCode": "A String", # The Prisma product code. }, "prismaType": "A String", # Required. The Prisma type. "supplier": "A String", # Required. The entity allocated this budget (DSP, site, etc.). }, }, ], "campaignFlight": { # Settings that track the planned spend and duration of a campaign. # Required. The planned spend and duration of the campaign. "plannedDates": { # A date range. # Required. The dates that the campaign is expected to run. They are resolved relative to the parent advertiser'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. "endDate": { # 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`. "day": 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't significant. "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. }, "startDate": { # 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`. "day": 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't significant. "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. }, }, "plannedSpendAmountMicros": "A String", # 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. }, "campaignGoal": { # Settings that control the goal of a campaign. # Required. The goal of the campaign. "campaignGoalType": "A String", # Required. The type of the campaign goal. "performanceGoal": { # 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` "performanceGoalAmountMicros": "A String", # The goal amount, in micros of the advertiser'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. "performanceGoalPercentageMicros": "A String", # 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). "performanceGoalString": "A String", # 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`. "performanceGoalType": "A String", # Required. The type of the performance goal. }, }, "campaignId": "A String", # Output only. The unique ID of the campaign. Assigned by the system. "displayName": "A String", # Required. The display name of the campaign. Must be UTF-8 encoded with a maximum size of 240 bytes. "entityStatus": "A String", # 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. "frequencyCap": { # 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) "maxImpressions": 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. "maxViews": 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. "timeUnit": "A String", # The time unit in which the frequency cap will be applied. Required when unlimited is `false`. *Warning*: On **February 28, 2025**, frequency cap time periods greater than 30 days will no longer be accepted. This field will no longer accept the value `TIME_UNIT_LIFETIME`. [Read more about this announced change](/display-video/api/deprecations#features.lifetime_frequency_cap). "timeUnitCount": 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_LIFETIME` - this field is output only and will default to 1 * `TIME_UNIT_MONTHS` - must be between 1 and 2 * `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 *Warning*: On **February 28, 2025**, frequency cap time periods greater than 30 days will no longer be accepted. This field will no longer accept the value 2 if the value of time_unit is `TIME_UNIT_MONTHS`. [Read more about this announced change](/display-video/api/deprecations#features.lifetime_frequency_cap). "unlimited": True or False, # Whether unlimited frequency capping is applied. When this field is set to `true`, the remaining frequency cap fields are not applicable. }, "name": "A String", # Output only. The resource name of the campaign. "updateTime": "A String", # Output only. The timestamp when the campaign was last updated. Assigned by the system. }
delete(advertiserId, campaignId, x__xgafv=None)
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); } }
get(advertiserId, campaignId, x__xgafv=None)
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. "advertiserId": "A String", # Output only. The unique ID of the advertiser the campaign belongs to. "campaignBudgets": [ # 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. "budgetAmountMicros": "A String", # 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. "budgetId": "A String", # 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. "budgetUnit": "A String", # Required. Immutable. Specifies whether the budget is measured in currency or impressions. "dateRange": { # 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's time zone. Both `start_date` and `end_date` must be before the year 2037. "endDate": { # 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`. "day": 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't significant. "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. }, "startDate": { # 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`. "day": 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't significant. "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. }, }, "displayName": "A String", # Required. The display name of the budget. Must be UTF-8 encoded with a maximum size of 240 bytes. "externalBudgetId": "A String", # 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 "Budget level PO", all impressions served against this budget will include this ID on the invoice. Must be unique under the campaign. "externalBudgetSource": "A String", # Required. The external source of the budget. "invoiceGroupingId": "A String", # 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 "Budget invoice grouping ID", all external_budget_id sharing the same invoice_grouping_id will be grouped in the same invoice. "prismaConfig": { # 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. "prismaCpeCode": { # 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. "prismaClientCode": "A String", # The Prisma client code. "prismaEstimateCode": "A String", # The Prisma estimate code. "prismaProductCode": "A String", # The Prisma product code. }, "prismaType": "A String", # Required. The Prisma type. "supplier": "A String", # Required. The entity allocated this budget (DSP, site, etc.). }, }, ], "campaignFlight": { # Settings that track the planned spend and duration of a campaign. # Required. The planned spend and duration of the campaign. "plannedDates": { # A date range. # Required. The dates that the campaign is expected to run. They are resolved relative to the parent advertiser'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. "endDate": { # 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`. "day": 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't significant. "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. }, "startDate": { # 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`. "day": 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't significant. "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. }, }, "plannedSpendAmountMicros": "A String", # 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. }, "campaignGoal": { # Settings that control the goal of a campaign. # Required. The goal of the campaign. "campaignGoalType": "A String", # Required. The type of the campaign goal. "performanceGoal": { # 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` "performanceGoalAmountMicros": "A String", # The goal amount, in micros of the advertiser'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. "performanceGoalPercentageMicros": "A String", # 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). "performanceGoalString": "A String", # 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`. "performanceGoalType": "A String", # Required. The type of the performance goal. }, }, "campaignId": "A String", # Output only. The unique ID of the campaign. Assigned by the system. "displayName": "A String", # Required. The display name of the campaign. Must be UTF-8 encoded with a maximum size of 240 bytes. "entityStatus": "A String", # 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. "frequencyCap": { # 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) "maxImpressions": 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. "maxViews": 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. "timeUnit": "A String", # The time unit in which the frequency cap will be applied. Required when unlimited is `false`. *Warning*: On **February 28, 2025**, frequency cap time periods greater than 30 days will no longer be accepted. This field will no longer accept the value `TIME_UNIT_LIFETIME`. [Read more about this announced change](/display-video/api/deprecations#features.lifetime_frequency_cap). "timeUnitCount": 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_LIFETIME` - this field is output only and will default to 1 * `TIME_UNIT_MONTHS` - must be between 1 and 2 * `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 *Warning*: On **February 28, 2025**, frequency cap time periods greater than 30 days will no longer be accepted. This field will no longer accept the value 2 if the value of time_unit is `TIME_UNIT_MONTHS`. [Read more about this announced change](/display-video/api/deprecations#features.lifetime_frequency_cap). "unlimited": True or False, # Whether unlimited frequency capping is applied. When this field is set to `true`, the remaining frequency cap fields are not applicable. }, "name": "A String", # Output only. The resource name of the campaign. "updateTime": "A String", # Output only. The timestamp when the campaign was last updated. Assigned by the system. }
list(advertiserId, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)
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 (>=)` or `LESS THAN OR EQUAL TO (<=)` 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="ENTITY_STATUS_ACTIVE" OR entityStatus="ENTITY_STATUS_PAUSED")` * All campaigns with an update time less than or equal to 2020-11-04T18:54:47Z (format of ISO 8601): `updateTime<="2020-11-04T18:54:47Z"` * All campaigns with an update time greater than or equal to 2020-11-04T18:54:47Z (format of ISO 8601): `updateTime>="2020-11-04T18:54:47Z"` 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 "desc" 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: { "campaigns": [ # The list of campaigns. This list will be absent if empty. { # A single campaign. "advertiserId": "A String", # Output only. The unique ID of the advertiser the campaign belongs to. "campaignBudgets": [ # 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. "budgetAmountMicros": "A String", # 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. "budgetId": "A String", # 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. "budgetUnit": "A String", # Required. Immutable. Specifies whether the budget is measured in currency or impressions. "dateRange": { # 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's time zone. Both `start_date` and `end_date` must be before the year 2037. "endDate": { # 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`. "day": 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't significant. "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. }, "startDate": { # 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`. "day": 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't significant. "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. }, }, "displayName": "A String", # Required. The display name of the budget. Must be UTF-8 encoded with a maximum size of 240 bytes. "externalBudgetId": "A String", # 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 "Budget level PO", all impressions served against this budget will include this ID on the invoice. Must be unique under the campaign. "externalBudgetSource": "A String", # Required. The external source of the budget. "invoiceGroupingId": "A String", # 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 "Budget invoice grouping ID", all external_budget_id sharing the same invoice_grouping_id will be grouped in the same invoice. "prismaConfig": { # 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. "prismaCpeCode": { # 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. "prismaClientCode": "A String", # The Prisma client code. "prismaEstimateCode": "A String", # The Prisma estimate code. "prismaProductCode": "A String", # The Prisma product code. }, "prismaType": "A String", # Required. The Prisma type. "supplier": "A String", # Required. The entity allocated this budget (DSP, site, etc.). }, }, ], "campaignFlight": { # Settings that track the planned spend and duration of a campaign. # Required. The planned spend and duration of the campaign. "plannedDates": { # A date range. # Required. The dates that the campaign is expected to run. They are resolved relative to the parent advertiser'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. "endDate": { # 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`. "day": 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't significant. "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. }, "startDate": { # 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`. "day": 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't significant. "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. }, }, "plannedSpendAmountMicros": "A String", # 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. }, "campaignGoal": { # Settings that control the goal of a campaign. # Required. The goal of the campaign. "campaignGoalType": "A String", # Required. The type of the campaign goal. "performanceGoal": { # 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` "performanceGoalAmountMicros": "A String", # The goal amount, in micros of the advertiser'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. "performanceGoalPercentageMicros": "A String", # 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). "performanceGoalString": "A String", # 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`. "performanceGoalType": "A String", # Required. The type of the performance goal. }, }, "campaignId": "A String", # Output only. The unique ID of the campaign. Assigned by the system. "displayName": "A String", # Required. The display name of the campaign. Must be UTF-8 encoded with a maximum size of 240 bytes. "entityStatus": "A String", # 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. "frequencyCap": { # 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) "maxImpressions": 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. "maxViews": 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. "timeUnit": "A String", # The time unit in which the frequency cap will be applied. Required when unlimited is `false`. *Warning*: On **February 28, 2025**, frequency cap time periods greater than 30 days will no longer be accepted. This field will no longer accept the value `TIME_UNIT_LIFETIME`. [Read more about this announced change](/display-video/api/deprecations#features.lifetime_frequency_cap). "timeUnitCount": 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_LIFETIME` - this field is output only and will default to 1 * `TIME_UNIT_MONTHS` - must be between 1 and 2 * `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 *Warning*: On **February 28, 2025**, frequency cap time periods greater than 30 days will no longer be accepted. This field will no longer accept the value 2 if the value of time_unit is `TIME_UNIT_MONTHS`. [Read more about this announced change](/display-video/api/deprecations#features.lifetime_frequency_cap). "unlimited": True or False, # Whether unlimited frequency capping is applied. When this field is set to `true`, the remaining frequency cap fields are not applicable. }, "name": "A String", # Output only. The resource name of the campaign. "updateTime": "A String", # Output only. The timestamp when the campaign was last updated. Assigned by the system. }, ], "nextPageToken": "A String", # 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. }
list_next()
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 'execute()' on to request the next page. Returns None if there are no more items in the collection.
patch(advertiserId, campaignId, body=None, updateMask=None, x__xgafv=None)
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. "advertiserId": "A String", # Output only. The unique ID of the advertiser the campaign belongs to. "campaignBudgets": [ # 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. "budgetAmountMicros": "A String", # 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. "budgetId": "A String", # 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. "budgetUnit": "A String", # Required. Immutable. Specifies whether the budget is measured in currency or impressions. "dateRange": { # 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's time zone. Both `start_date` and `end_date` must be before the year 2037. "endDate": { # 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`. "day": 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't significant. "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. }, "startDate": { # 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`. "day": 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't significant. "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. }, }, "displayName": "A String", # Required. The display name of the budget. Must be UTF-8 encoded with a maximum size of 240 bytes. "externalBudgetId": "A String", # 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 "Budget level PO", all impressions served against this budget will include this ID on the invoice. Must be unique under the campaign. "externalBudgetSource": "A String", # Required. The external source of the budget. "invoiceGroupingId": "A String", # 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 "Budget invoice grouping ID", all external_budget_id sharing the same invoice_grouping_id will be grouped in the same invoice. "prismaConfig": { # 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. "prismaCpeCode": { # 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. "prismaClientCode": "A String", # The Prisma client code. "prismaEstimateCode": "A String", # The Prisma estimate code. "prismaProductCode": "A String", # The Prisma product code. }, "prismaType": "A String", # Required. The Prisma type. "supplier": "A String", # Required. The entity allocated this budget (DSP, site, etc.). }, }, ], "campaignFlight": { # Settings that track the planned spend and duration of a campaign. # Required. The planned spend and duration of the campaign. "plannedDates": { # A date range. # Required. The dates that the campaign is expected to run. They are resolved relative to the parent advertiser'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. "endDate": { # 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`. "day": 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't significant. "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. }, "startDate": { # 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`. "day": 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't significant. "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. }, }, "plannedSpendAmountMicros": "A String", # 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. }, "campaignGoal": { # Settings that control the goal of a campaign. # Required. The goal of the campaign. "campaignGoalType": "A String", # Required. The type of the campaign goal. "performanceGoal": { # 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` "performanceGoalAmountMicros": "A String", # The goal amount, in micros of the advertiser'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. "performanceGoalPercentageMicros": "A String", # 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). "performanceGoalString": "A String", # 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`. "performanceGoalType": "A String", # Required. The type of the performance goal. }, }, "campaignId": "A String", # Output only. The unique ID of the campaign. Assigned by the system. "displayName": "A String", # Required. The display name of the campaign. Must be UTF-8 encoded with a maximum size of 240 bytes. "entityStatus": "A String", # 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. "frequencyCap": { # 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) "maxImpressions": 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. "maxViews": 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. "timeUnit": "A String", # The time unit in which the frequency cap will be applied. Required when unlimited is `false`. *Warning*: On **February 28, 2025**, frequency cap time periods greater than 30 days will no longer be accepted. This field will no longer accept the value `TIME_UNIT_LIFETIME`. [Read more about this announced change](/display-video/api/deprecations#features.lifetime_frequency_cap). "timeUnitCount": 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_LIFETIME` - this field is output only and will default to 1 * `TIME_UNIT_MONTHS` - must be between 1 and 2 * `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 *Warning*: On **February 28, 2025**, frequency cap time periods greater than 30 days will no longer be accepted. This field will no longer accept the value 2 if the value of time_unit is `TIME_UNIT_MONTHS`. [Read more about this announced change](/display-video/api/deprecations#features.lifetime_frequency_cap). "unlimited": True or False, # Whether unlimited frequency capping is applied. When this field is set to `true`, the remaining frequency cap fields are not applicable. }, "name": "A String", # Output only. The resource name of the campaign. "updateTime": "A String", # 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. "advertiserId": "A String", # Output only. The unique ID of the advertiser the campaign belongs to. "campaignBudgets": [ # 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. "budgetAmountMicros": "A String", # 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. "budgetId": "A String", # 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. "budgetUnit": "A String", # Required. Immutable. Specifies whether the budget is measured in currency or impressions. "dateRange": { # 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's time zone. Both `start_date` and `end_date` must be before the year 2037. "endDate": { # 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`. "day": 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't significant. "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. }, "startDate": { # 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`. "day": 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't significant. "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. }, }, "displayName": "A String", # Required. The display name of the budget. Must be UTF-8 encoded with a maximum size of 240 bytes. "externalBudgetId": "A String", # 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 "Budget level PO", all impressions served against this budget will include this ID on the invoice. Must be unique under the campaign. "externalBudgetSource": "A String", # Required. The external source of the budget. "invoiceGroupingId": "A String", # 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 "Budget invoice grouping ID", all external_budget_id sharing the same invoice_grouping_id will be grouped in the same invoice. "prismaConfig": { # 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. "prismaCpeCode": { # 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. "prismaClientCode": "A String", # The Prisma client code. "prismaEstimateCode": "A String", # The Prisma estimate code. "prismaProductCode": "A String", # The Prisma product code. }, "prismaType": "A String", # Required. The Prisma type. "supplier": "A String", # Required. The entity allocated this budget (DSP, site, etc.). }, }, ], "campaignFlight": { # Settings that track the planned spend and duration of a campaign. # Required. The planned spend and duration of the campaign. "plannedDates": { # A date range. # Required. The dates that the campaign is expected to run. They are resolved relative to the parent advertiser'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. "endDate": { # 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`. "day": 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't significant. "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. }, "startDate": { # 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`. "day": 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't significant. "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. }, }, "plannedSpendAmountMicros": "A String", # 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. }, "campaignGoal": { # Settings that control the goal of a campaign. # Required. The goal of the campaign. "campaignGoalType": "A String", # Required. The type of the campaign goal. "performanceGoal": { # 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` "performanceGoalAmountMicros": "A String", # The goal amount, in micros of the advertiser'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. "performanceGoalPercentageMicros": "A String", # 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). "performanceGoalString": "A String", # 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`. "performanceGoalType": "A String", # Required. The type of the performance goal. }, }, "campaignId": "A String", # Output only. The unique ID of the campaign. Assigned by the system. "displayName": "A String", # Required. The display name of the campaign. Must be UTF-8 encoded with a maximum size of 240 bytes. "entityStatus": "A String", # 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. "frequencyCap": { # 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) "maxImpressions": 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. "maxViews": 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. "timeUnit": "A String", # The time unit in which the frequency cap will be applied. Required when unlimited is `false`. *Warning*: On **February 28, 2025**, frequency cap time periods greater than 30 days will no longer be accepted. This field will no longer accept the value `TIME_UNIT_LIFETIME`. [Read more about this announced change](/display-video/api/deprecations#features.lifetime_frequency_cap). "timeUnitCount": 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_LIFETIME` - this field is output only and will default to 1 * `TIME_UNIT_MONTHS` - must be between 1 and 2 * `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 *Warning*: On **February 28, 2025**, frequency cap time periods greater than 30 days will no longer be accepted. This field will no longer accept the value 2 if the value of time_unit is `TIME_UNIT_MONTHS`. [Read more about this announced change](/display-video/api/deprecations#features.lifetime_frequency_cap). "unlimited": True or False, # Whether unlimited frequency capping is applied. When this field is set to `true`, the remaining frequency cap fields are not applicable. }, "name": "A String", # Output only. The resource name of the campaign. "updateTime": "A String", # Output only. The timestamp when the campaign was last updated. Assigned by the system. }