Display & Video 360 API . advertisers . campaigns

Instance Methods

create(advertiserId, body=None, x__xgafv=None)

Creates a new campaign.

delete(advertiserId, campaignId, x__xgafv=None)

Permanently deletes a campaign. A deleted campaign cannot be recovered.

get(advertiserId, campaignId, x__xgafv=None)

Gets a campaign.

list(advertiserId, pageSize=None, filter=None, pageToken=None, orderBy=None, x__xgafv=None)

Lists campaigns in an advertiser.

list_next(previous_request, previous_response)

Retrieves the next page of results.

patch(advertiserId, campaignId, body=None, updateMask=None, x__xgafv=None)

Updates an existing campaign.

Method Details

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.
  "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, e.g. a birthday. The time of day # The upper bound of the date range, inclusive. Must specify a positive value
          # for `year`, `month`, and `day`.
          # and time zone are either specified elsewhere or are not significant. The date
          # is relative to the Proleptic Gregorian Calendar. This can represent:
          #
          # * A full date, with non-zero year, month and day values
          # * A month and day value, with a zero year, e.g. an anniversary
          # * A year on its own, with zero month and day values
          # * A year and month value, with a zero day, e.g. a credit card expiration date
          #
          # Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`.
        "year": 42, # Year of date. Must be from 1 to 9999, or 0 if specifying a date without
            # a year.
        "day": 42, # Day of month. Must be from 1 to 31 and valid for the year and month, or 0
            # if specifying a year by itself or a year and month where the day is not
            # significant.
        "month": 42, # Month of year. Must be from 1 to 12, or 0 if specifying a year without a
            # month and day.
      },
      "startDate": { # 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
          # for `year`, `month`, and `day`.
          # and time zone are either specified elsewhere or are not significant. The date
          # is relative to the Proleptic Gregorian Calendar. This can represent:
          #
          # * A full date, with non-zero year, month and day values
          # * A month and day value, with a zero year, e.g. an anniversary
          # * A year on its own, with zero month and day values
          # * A year and month value, with a zero day, e.g. a credit card expiration date
          #
          # Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`.
        "year": 42, # Year of date. Must be from 1 to 9999, or 0 if specifying a date without
            # a year.
        "day": 42, # Day of month. Must be from 1 to 31 and valid for the year and month, or 0
            # if specifying a year by itself or a year and month where the day is not
            # significant.
        "month": 42, # Month of year. Must be from 1 to 12, or 0 if specifying a year without a
            # month and day.
      },
    },
    "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.
  },
  "frequencyCap": { # Settings that control the number of times a user may be shown with the same # Required. The frequency cap setting of the campaign.
      # ad during a given time period.
    "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.
    "maxImpressions": 42, # The maximum number of times a user may be shown with the same ad
        # during this period. Must be greater than 0.
        #
        # Applicable when unlimited is `false`.
    "timeUnit": "A String", # The time unit in which the frequency cap will be applied.
        #
        # Applicable when unlimited is `false`.
    "timeUnitCount": 42, # The number of time_unit the frequency cap will
        # last.
        #
        # Applicable 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
  },
  "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.
  "updateTime": "A String", # Output only. The timestamp when the campaign was last updated. Assigned by the system.
  "advertiserId": "A String", # Output only. The unique ID of the advertiser the campaign belongs to.
  "campaignId": "A String", # Output only. The unique ID of the campaign. Assigned by the system.
  "name": "A String", # Output only. The resource name of the campaign.
  "campaignGoal": { # Settings that control the goal of a campaign. # Required. The goal of the campaign.
    "performanceGoal": { # Settings that control the performance goal of a campaign or insertion order. # 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`
          #
          # 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`
          #
          # 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.
    },
    "campaignGoalType": "A String", # Required. The type of the campaign goal.
  },
}

  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.
    "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, e.g. a birthday. The time of day # The upper bound of the date range, inclusive. Must specify a positive value
            # for `year`, `month`, and `day`.
            # and time zone are either specified elsewhere or are not significant. The date
            # is relative to the Proleptic Gregorian Calendar. This can represent:
            #
            # * A full date, with non-zero year, month and day values
            # * A month and day value, with a zero year, e.g. an anniversary
            # * A year on its own, with zero month and day values
            # * A year and month value, with a zero day, e.g. a credit card expiration date
            #
            # Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`.
          "year": 42, # Year of date. Must be from 1 to 9999, or 0 if specifying a date without
              # a year.
          "day": 42, # Day of month. Must be from 1 to 31 and valid for the year and month, or 0
              # if specifying a year by itself or a year and month where the day is not
              # significant.
          "month": 42, # Month of year. Must be from 1 to 12, or 0 if specifying a year without a
              # month and day.
        },
        "startDate": { # 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
            # for `year`, `month`, and `day`.
            # and time zone are either specified elsewhere or are not significant. The date
            # is relative to the Proleptic Gregorian Calendar. This can represent:
            #
            # * A full date, with non-zero year, month and day values
            # * A month and day value, with a zero year, e.g. an anniversary
            # * A year on its own, with zero month and day values
            # * A year and month value, with a zero day, e.g. a credit card expiration date
            #
            # Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`.
          "year": 42, # Year of date. Must be from 1 to 9999, or 0 if specifying a date without
              # a year.
          "day": 42, # Day of month. Must be from 1 to 31 and valid for the year and month, or 0
              # if specifying a year by itself or a year and month where the day is not
              # significant.
          "month": 42, # Month of year. Must be from 1 to 12, or 0 if specifying a year without a
              # month and day.
        },
      },
      "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.
    },
    "frequencyCap": { # Settings that control the number of times a user may be shown with the same # Required. The frequency cap setting of the campaign.
        # ad during a given time period.
      "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.
      "maxImpressions": 42, # The maximum number of times a user may be shown with the same ad
          # during this period. Must be greater than 0.
          #
          # Applicable when unlimited is `false`.
      "timeUnit": "A String", # The time unit in which the frequency cap will be applied.
          #
          # Applicable when unlimited is `false`.
      "timeUnitCount": 42, # The number of time_unit the frequency cap will
          # last.
          #
          # Applicable 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
    },
    "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.
    "updateTime": "A String", # Output only. The timestamp when the campaign was last updated. Assigned by the system.
    "advertiserId": "A String", # Output only. The unique ID of the advertiser the campaign belongs to.
    "campaignId": "A String", # Output only. The unique ID of the campaign. Assigned by the system.
    "name": "A String", # Output only. The resource name of the campaign.
    "campaignGoal": { # Settings that control the goal of a campaign. # Required. The goal of the campaign.
      "performanceGoal": { # Settings that control the performance goal of a campaign or insertion order. # 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`
            #
            # 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`
            #
            # 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.
      },
      "campaignGoalType": "A String", # Required. The type of the campaign goal.
    },
  }
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.

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);
      #     }
      #
      # The JSON representation for `Empty` is empty JSON object `{}`.
  }
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.
    "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, e.g. a birthday. The time of day # The upper bound of the date range, inclusive. Must specify a positive value
            # for `year`, `month`, and `day`.
            # and time zone are either specified elsewhere or are not significant. The date
            # is relative to the Proleptic Gregorian Calendar. This can represent:
            #
            # * A full date, with non-zero year, month and day values
            # * A month and day value, with a zero year, e.g. an anniversary
            # * A year on its own, with zero month and day values
            # * A year and month value, with a zero day, e.g. a credit card expiration date
            #
            # Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`.
          "year": 42, # Year of date. Must be from 1 to 9999, or 0 if specifying a date without
              # a year.
          "day": 42, # Day of month. Must be from 1 to 31 and valid for the year and month, or 0
              # if specifying a year by itself or a year and month where the day is not
              # significant.
          "month": 42, # Month of year. Must be from 1 to 12, or 0 if specifying a year without a
              # month and day.
        },
        "startDate": { # 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
            # for `year`, `month`, and `day`.
            # and time zone are either specified elsewhere or are not significant. The date
            # is relative to the Proleptic Gregorian Calendar. This can represent:
            #
            # * A full date, with non-zero year, month and day values
            # * A month and day value, with a zero year, e.g. an anniversary
            # * A year on its own, with zero month and day values
            # * A year and month value, with a zero day, e.g. a credit card expiration date
            #
            # Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`.
          "year": 42, # Year of date. Must be from 1 to 9999, or 0 if specifying a date without
              # a year.
          "day": 42, # Day of month. Must be from 1 to 31 and valid for the year and month, or 0
              # if specifying a year by itself or a year and month where the day is not
              # significant.
          "month": 42, # Month of year. Must be from 1 to 12, or 0 if specifying a year without a
              # month and day.
        },
      },
      "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.
    },
    "frequencyCap": { # Settings that control the number of times a user may be shown with the same # Required. The frequency cap setting of the campaign.
        # ad during a given time period.
      "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.
      "maxImpressions": 42, # The maximum number of times a user may be shown with the same ad
          # during this period. Must be greater than 0.
          #
          # Applicable when unlimited is `false`.
      "timeUnit": "A String", # The time unit in which the frequency cap will be applied.
          #
          # Applicable when unlimited is `false`.
      "timeUnitCount": 42, # The number of time_unit the frequency cap will
          # last.
          #
          # Applicable 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
    },
    "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.
    "updateTime": "A String", # Output only. The timestamp when the campaign was last updated. Assigned by the system.
    "advertiserId": "A String", # Output only. The unique ID of the advertiser the campaign belongs to.
    "campaignId": "A String", # Output only. The unique ID of the campaign. Assigned by the system.
    "name": "A String", # Output only. The resource name of the campaign.
    "campaignGoal": { # Settings that control the goal of a campaign. # Required. The goal of the campaign.
      "performanceGoal": { # Settings that control the performance goal of a campaign or insertion order. # 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`
            #
            # 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`
            #
            # 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.
      },
      "campaignGoalType": "A String", # Required. The type of the campaign goal.
    },
  }
list(advertiserId, pageSize=None, filter=None, pageToken=None, orderBy=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)
  pageSize: integer, Requested page size. Must be between `1` and `100`. If unspecified will
default to `100`.
  filter: string, Allows filtering by campaign properties.

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 operator must be `EQUALS (=)`.
* Supported fields:
    - `entityStatus`

Examples:

* All `ENTITY_STATUS_ACTIVE` or `ENTITY_STATUS_PAUSED` campaigns under an
advertiser:
`(entityStatus="ENTITY_STATUS_ACTIVE" OR
entityStatus="ENTITY_STATUS_PAUSED")`

The length of this field should be no more than 500 characters.
  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.
  orderBy: string, Field by which to sort the list.
Acceptable values are:

* `displayName` (default)
* `entityStatus`

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`.
  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.
        "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, e.g. a birthday. The time of day # The upper bound of the date range, inclusive. Must specify a positive value
                # for `year`, `month`, and `day`.
                # and time zone are either specified elsewhere or are not significant. The date
                # is relative to the Proleptic Gregorian Calendar. This can represent:
                #
                # * A full date, with non-zero year, month and day values
                # * A month and day value, with a zero year, e.g. an anniversary
                # * A year on its own, with zero month and day values
                # * A year and month value, with a zero day, e.g. a credit card expiration date
                #
                # Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`.
              "year": 42, # Year of date. Must be from 1 to 9999, or 0 if specifying a date without
                  # a year.
              "day": 42, # Day of month. Must be from 1 to 31 and valid for the year and month, or 0
                  # if specifying a year by itself or a year and month where the day is not
                  # significant.
              "month": 42, # Month of year. Must be from 1 to 12, or 0 if specifying a year without a
                  # month and day.
            },
            "startDate": { # 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
                # for `year`, `month`, and `day`.
                # and time zone are either specified elsewhere or are not significant. The date
                # is relative to the Proleptic Gregorian Calendar. This can represent:
                #
                # * A full date, with non-zero year, month and day values
                # * A month and day value, with a zero year, e.g. an anniversary
                # * A year on its own, with zero month and day values
                # * A year and month value, with a zero day, e.g. a credit card expiration date
                #
                # Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`.
              "year": 42, # Year of date. Must be from 1 to 9999, or 0 if specifying a date without
                  # a year.
              "day": 42, # Day of month. Must be from 1 to 31 and valid for the year and month, or 0
                  # if specifying a year by itself or a year and month where the day is not
                  # significant.
              "month": 42, # Month of year. Must be from 1 to 12, or 0 if specifying a year without a
                  # month and day.
            },
          },
          "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.
        },
        "frequencyCap": { # Settings that control the number of times a user may be shown with the same # Required. The frequency cap setting of the campaign.
            # ad during a given time period.
          "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.
          "maxImpressions": 42, # The maximum number of times a user may be shown with the same ad
              # during this period. Must be greater than 0.
              #
              # Applicable when unlimited is `false`.
          "timeUnit": "A String", # The time unit in which the frequency cap will be applied.
              #
              # Applicable when unlimited is `false`.
          "timeUnitCount": 42, # The number of time_unit the frequency cap will
              # last.
              #
              # Applicable 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
        },
        "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.
        "updateTime": "A String", # Output only. The timestamp when the campaign was last updated. Assigned by the system.
        "advertiserId": "A String", # Output only. The unique ID of the advertiser the campaign belongs to.
        "campaignId": "A String", # Output only. The unique ID of the campaign. Assigned by the system.
        "name": "A String", # Output only. The resource name of the campaign.
        "campaignGoal": { # Settings that control the goal of a campaign. # Required. The goal of the campaign.
          "performanceGoal": { # Settings that control the performance goal of a campaign or insertion order. # 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`
                #
                # 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`
                #
                # 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.
          },
          "campaignGoalType": "A String", # Required. The type of the campaign goal.
        },
      },
    ],
    "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(previous_request, previous_response)
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.
  "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, e.g. a birthday. The time of day # The upper bound of the date range, inclusive. Must specify a positive value
          # for `year`, `month`, and `day`.
          # and time zone are either specified elsewhere or are not significant. The date
          # is relative to the Proleptic Gregorian Calendar. This can represent:
          #
          # * A full date, with non-zero year, month and day values
          # * A month and day value, with a zero year, e.g. an anniversary
          # * A year on its own, with zero month and day values
          # * A year and month value, with a zero day, e.g. a credit card expiration date
          #
          # Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`.
        "year": 42, # Year of date. Must be from 1 to 9999, or 0 if specifying a date without
            # a year.
        "day": 42, # Day of month. Must be from 1 to 31 and valid for the year and month, or 0
            # if specifying a year by itself or a year and month where the day is not
            # significant.
        "month": 42, # Month of year. Must be from 1 to 12, or 0 if specifying a year without a
            # month and day.
      },
      "startDate": { # 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
          # for `year`, `month`, and `day`.
          # and time zone are either specified elsewhere or are not significant. The date
          # is relative to the Proleptic Gregorian Calendar. This can represent:
          #
          # * A full date, with non-zero year, month and day values
          # * A month and day value, with a zero year, e.g. an anniversary
          # * A year on its own, with zero month and day values
          # * A year and month value, with a zero day, e.g. a credit card expiration date
          #
          # Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`.
        "year": 42, # Year of date. Must be from 1 to 9999, or 0 if specifying a date without
            # a year.
        "day": 42, # Day of month. Must be from 1 to 31 and valid for the year and month, or 0
            # if specifying a year by itself or a year and month where the day is not
            # significant.
        "month": 42, # Month of year. Must be from 1 to 12, or 0 if specifying a year without a
            # month and day.
      },
    },
    "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.
  },
  "frequencyCap": { # Settings that control the number of times a user may be shown with the same # Required. The frequency cap setting of the campaign.
      # ad during a given time period.
    "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.
    "maxImpressions": 42, # The maximum number of times a user may be shown with the same ad
        # during this period. Must be greater than 0.
        #
        # Applicable when unlimited is `false`.
    "timeUnit": "A String", # The time unit in which the frequency cap will be applied.
        #
        # Applicable when unlimited is `false`.
    "timeUnitCount": 42, # The number of time_unit the frequency cap will
        # last.
        #
        # Applicable 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
  },
  "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.
  "updateTime": "A String", # Output only. The timestamp when the campaign was last updated. Assigned by the system.
  "advertiserId": "A String", # Output only. The unique ID of the advertiser the campaign belongs to.
  "campaignId": "A String", # Output only. The unique ID of the campaign. Assigned by the system.
  "name": "A String", # Output only. The resource name of the campaign.
  "campaignGoal": { # Settings that control the goal of a campaign. # Required. The goal of the campaign.
    "performanceGoal": { # Settings that control the performance goal of a campaign or insertion order. # 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`
          #
          # 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`
          #
          # 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.
    },
    "campaignGoalType": "A String", # Required. The type of the campaign goal.
  },
}

  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.
    "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, e.g. a birthday. The time of day # The upper bound of the date range, inclusive. Must specify a positive value
            # for `year`, `month`, and `day`.
            # and time zone are either specified elsewhere or are not significant. The date
            # is relative to the Proleptic Gregorian Calendar. This can represent:
            #
            # * A full date, with non-zero year, month and day values
            # * A month and day value, with a zero year, e.g. an anniversary
            # * A year on its own, with zero month and day values
            # * A year and month value, with a zero day, e.g. a credit card expiration date
            #
            # Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`.
          "year": 42, # Year of date. Must be from 1 to 9999, or 0 if specifying a date without
              # a year.
          "day": 42, # Day of month. Must be from 1 to 31 and valid for the year and month, or 0
              # if specifying a year by itself or a year and month where the day is not
              # significant.
          "month": 42, # Month of year. Must be from 1 to 12, or 0 if specifying a year without a
              # month and day.
        },
        "startDate": { # 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
            # for `year`, `month`, and `day`.
            # and time zone are either specified elsewhere or are not significant. The date
            # is relative to the Proleptic Gregorian Calendar. This can represent:
            #
            # * A full date, with non-zero year, month and day values
            # * A month and day value, with a zero year, e.g. an anniversary
            # * A year on its own, with zero month and day values
            # * A year and month value, with a zero day, e.g. a credit card expiration date
            #
            # Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`.
          "year": 42, # Year of date. Must be from 1 to 9999, or 0 if specifying a date without
              # a year.
          "day": 42, # Day of month. Must be from 1 to 31 and valid for the year and month, or 0
              # if specifying a year by itself or a year and month where the day is not
              # significant.
          "month": 42, # Month of year. Must be from 1 to 12, or 0 if specifying a year without a
              # month and day.
        },
      },
      "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.
    },
    "frequencyCap": { # Settings that control the number of times a user may be shown with the same # Required. The frequency cap setting of the campaign.
        # ad during a given time period.
      "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.
      "maxImpressions": 42, # The maximum number of times a user may be shown with the same ad
          # during this period. Must be greater than 0.
          #
          # Applicable when unlimited is `false`.
      "timeUnit": "A String", # The time unit in which the frequency cap will be applied.
          #
          # Applicable when unlimited is `false`.
      "timeUnitCount": 42, # The number of time_unit the frequency cap will
          # last.
          #
          # Applicable 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
    },
    "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.
    "updateTime": "A String", # Output only. The timestamp when the campaign was last updated. Assigned by the system.
    "advertiserId": "A String", # Output only. The unique ID of the advertiser the campaign belongs to.
    "campaignId": "A String", # Output only. The unique ID of the campaign. Assigned by the system.
    "name": "A String", # Output only. The resource name of the campaign.
    "campaignGoal": { # Settings that control the goal of a campaign. # Required. The goal of the campaign.
      "performanceGoal": { # Settings that control the performance goal of a campaign or insertion order. # 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`
            #
            # 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`
            #
            # 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.
      },
      "campaignGoalType": "A String", # Required. The type of the campaign goal.
    },
  }