**Service** **AdRuleService** **Dependencies** [AdSpotPage](https://developers.google.com/ad-manager/api/reference/v202605/AdRuleService.AdSpotPage) [createAdSpots()](https://developers.google.com/ad-manager/api/reference/v202605/AdRuleService#createAdSpots) [updateAdSpots()](https://developers.google.com/ad-manager/api/reference/v202605/AdRuleService#updateAdSpots) ▼ **AdSpot**


A [AdSpot](https://developers.google.com/ad-manager/api/reference/v202605/AdRuleService.AdSpot) is a
targetable entity used in the creation of [AdRule](https://developers.google.com/ad-manager/api/reference/v202605/AdRuleService.AdRule) objects.

A ad spot contains a variable number of ads and has constraints
(ad duration, reservation type, etc) on the ads that can appear in
it.

*** ** * ** ***

Namespace
:
    `https://www.google.com/apis/ads/publisher/v202605`

| ## Field ||
|---|---|
| ### `id` | ` xsd:long` The unique ID of the [AdSpot](https://developers.google.com/ad-manager/api/reference/v202605/AdRuleService.AdSpot). This value is readonly and is assigned by Google. |
| ### `name` | ` xsd:string` Name of the [AdSpot](https://developers.google.com/ad-manager/api/reference/v202605/AdRuleService.AdSpot). The name is case insenstive and can be referenced in ad tags. This value is required if `customSpot` is true, and cannot be set otherwise. You can use alphanumeric characters and symbols other than the following: ", ', =, !, +, #, \*, \~, ;, \^, (, ), \<, \>, \[, \], the white space character. <br /> |
| ### `displayName` | ` xsd:string` Descriptive name for the [AdSpot](https://developers.google.com/ad-manager/api/reference/v202605/AdRuleService.AdSpot).This value is optional if `customSpot` is true, and cannot be set otherwise. |
| ### `customSpot` | ` xsd:boolean` Whether this ad spot is a custom spot. This field is optional and defaults to false. Custom spots can be reused and targeted in the targeting picker. <br /> |
| ### `flexible` | ` xsd:boolean` Whether this ad spot is a flexible spot. This field is optional and defaults to false. Flexible spots are allowed to have no max number of ads. <br /> |
| ### `maxDurationMillis` | ` xsd:long` The maximum total duration for this [AdSpot](https://developers.google.com/ad-manager/api/reference/v202605/AdRuleService.AdSpot). This field is optional, defaults to 0, and supports precision to the nearest second. |
| ### `maxNumberOfAds` | ` xsd:int` The maximum number of ads allowed in the [AdSpot](https://developers.google.com/ad-manager/api/reference/v202605/AdRuleService.AdSpot). This field is optional and defaults to O. A `maxNumberOfAds` of 0 means that there is no maximum for the number of ads in the ad spot. No max ads is only supported for ad spots that have `flexible` set to true. <br /> |
| ### `targetingType` | ` https://developers.google.com/ad-manager/api/reference/v202605/AdRuleService.AdSpotTargetingType ` The `SubpodTargetingType` determines how this ad spot can be targeted. This field is required. *** ** * ** *** **Enumerations** `NOT_REQUIRED` :   Line items not targeting this ad spot explicitly may serve in it. `EXPLICITLY_TARGETED` :   Only line items targeting this ad spots explicitly may serve in it `EXPLICITLY_TARGETED_EXCEPT_HOUSE` :   If house ads are an allowed reservation type, they may serve in the ad spot regardless of whether they explicitly target it. Ads of other reservation types (whose type is allowed in the ad spot), may serve in the ad spot only if explicitly targeted. `UNKNOWN` :   The value returned if the actual value is not exposed by the requested API version. <br /> |
| ### `backfillBlocked` | ` xsd:boolean` Whether backfill is blocked in this ad spot. This field is optional and defaults to false. |
| ### `allowedLineItemTypes` | ` https://developers.google.com/ad-manager/api/reference/v202605/AdRuleService.LineItemType[]` The set of line item types that may appear in the ad spot. This field is optional and defaults to an empty set, which means that all types are allowed. Note, backfill reservation types are controlled via the `backfillBlocked` field. *** ** * ** *** **Enumerations** `SPONSORSHIP` :   The type of [LineItem](https://developers.google.com/ad-manager/api/reference/v202605/ForecastService.LineItem) for which a percentage of all the impressions that are being sold are reserved. `STANDARD` :   The type of [LineItem](https://developers.google.com/ad-manager/api/reference/v202605/ForecastService.LineItem) for which a fixed quantity of impressions or clicks are reserved. `NETWORK` :   The type of [LineItem](https://developers.google.com/ad-manager/api/reference/v202605/ForecastService.LineItem) most commonly used to fill a site's unsold inventory if not contractually obligated to deliver a requested number of impressions. Users specify the daily percentage of unsold impressions or clicks when creating this line item. `BULK` :   The type of [LineItem](https://developers.google.com/ad-manager/api/reference/v202605/ForecastService.LineItem) for which a fixed quantity of impressions or clicks will be delivered at a priority lower than the [LineItemType.STANDARD](https://developers.google.com/ad-manager/api/reference/v202605/AdRuleService.LineItemType#STANDARD) type. `PRICE_PRIORITY` :   The type of [LineItem](https://developers.google.com/ad-manager/api/reference/v202605/ForecastService.LineItem) most commonly used to fill a site's unsold inventory if not contractually obligated to deliver a requested number of impressions. Users specify the fixed quantity of unsold impressions or clicks when creating this line item. `HOUSE` :   The type of [LineItem](https://developers.google.com/ad-manager/api/reference/v202605/ForecastService.LineItem) typically used for ads that promote products and services chosen by the publisher. These usually do not generate revenue and have the lowest delivery priority. `LEGACY_DFP` :   Represents a legacy [LineItem](https://developers.google.com/ad-manager/api/reference/v202605/ForecastService.LineItem) that has been migrated from the DFP system. Such line items cannot be created any more. Also, these line items cannot be activated or resumed. `CLICK_TRACKING` :   The type of [LineItem](https://developers.google.com/ad-manager/api/reference/v202605/ForecastService.LineItem) used for ads that track ads being served externally of Ad Manager, for example an email newsletter. The click through would reference this ad, and the click would be tracked via this ad. `ADSENSE` :   A [LineItem](https://developers.google.com/ad-manager/api/reference/v202605/ForecastService.LineItem) using dynamic allocation backed by AdSense. `AD_EXCHANGE` :   A [LineItem](https://developers.google.com/ad-manager/api/reference/v202605/ForecastService.LineItem) using dynamic allocation backed by the Google Ad Exchange. `BUMPER` :   Represents a non-monetizable video [LineItem](https://developers.google.com/ad-manager/api/reference/v202605/ForecastService.LineItem) that targets one or more bumper positions, which are short house video messages used by publishers to separate content from ad breaks. `ADMOB` :   A [LineItem](https://developers.google.com/ad-manager/api/reference/v202605/ForecastService.LineItem) using dynamic allocation backed by AdMob. `PREFERRED_DEAL` :   The type of [LineItem](https://developers.google.com/ad-manager/api/reference/v202605/ForecastService.LineItem) for which there are no impressions reserved, and will serve for a second price bid. All [LineItem](https://developers.google.com/ad-manager/api/reference/v202605/ForecastService.LineItem)s of type [LineItemType.PREFERRED_DEAL](https://developers.google.com/ad-manager/api/reference/v202605/AdRuleService.LineItemType#PREFERRED_DEAL) should be created via a [ProposalLineItem](https://developers.google.com/ad-manager/api/reference/v202605/ForecastService.ProposalLineItem) with a matching type. When creating a [LineItem](https://developers.google.com/ad-manager/api/reference/v202605/ForecastService.LineItem) of type [LineItemType.PREFERRED_DEAL](https://developers.google.com/ad-manager/api/reference/v202605/AdRuleService.LineItemType#PREFERRED_DEAL), the [ProposalLineItem.estimatedMinimumImpressions](https://developers.google.com/ad-manager/api/reference/v202605/ForecastService.ProposalLineItem#estimatedMinimumImpressions) field is required. `UNKNOWN` :   The value returned if the actual value is not exposed by the requested API version. <br /> |
| ### `inventorySharingBlocked` | ` xsd:boolean` Whether inventory sharing is blocked in this ad spot. This field is optional and defaults to false. |