Class AdUnit
Assembly: Google.Ads.AdManager.V1.dll
Syntax
public sealed class AdUnit : IMessage<AdUnit>, IEquatable<AdUnit>, IDeepCloneable<AdUnit>, IBufferMessage, IMessage
Constructors
AdUnit()
Declaration
AdUnit(AdUnit)
Declaration
public AdUnit(AdUnit other)
Parameters
Type |
Name |
Description |
AdUnit |
other |
|
Properties
AdUnitCode
Immutable. A string used to uniquely identify the ad unit for the purposes
of serving the ad. This attribute is optional and can be set during ad unit
creation. If it is not provided, it will be assigned by Google based on the
ad unit ID.
Declaration
public string AdUnitCode { get; set; }
Property Value
AdUnitId
Declaration
public long AdUnitId { get; set; }
Property Value
AdUnitName
Declaration
public AdUnitName AdUnitName { get; set; }
Property Value
AdUnitSizes
Optional. The sizes that can be served inside this ad unit.
Declaration
public RepeatedField<AdUnitSize> AdUnitSizes { get; }
Property Value
AppliedAdsenseEnabled
Optional. The value of AdSense enabled directly applied to this ad unit.
This attribute is optional and if not specified this ad unit will inherit
the value of effectiveAdsenseEnabled from its ancestors.
Declaration
public bool AppliedAdsenseEnabled { get; set; }
Property Value
AppliedLabelFrequencyCaps
Optional. The set of label frequency caps applied directly to this ad unit.
There is a limit of 10 label frequency caps per ad unit.
Declaration
public RepeatedField<LabelFrequencyCap> AppliedLabelFrequencyCaps { get; }
Property Value
AppliedLabels
Optional. The set of labels applied directly to this ad unit.
Declaration
public RepeatedField<AppliedLabel> AppliedLabels { get; }
Property Value
AppliedTargetWindow
Optional. The target window directly applied to this AdUnit.
If this field is not set, this AdUnit uses the target window specified in
effectiveTargetWindow.
Declaration
public TargetWindowEnum.Types.TargetWindow AppliedTargetWindow { get; set; }
Property Value
AppliedTeams
Optional. The resource names of Teams directly applied to this AdUnit.
Format: "networks/{network_code}/teams/{team_id}"
Declaration
public RepeatedField<string> AppliedTeams { get; }
Property Value
AppliedTeamsAsTeamNames
Declaration
public ResourceNameList<TeamName> AppliedTeamsAsTeamNames { get; }
Property Value
Description
Optional. A description of the ad unit. The maximum length is 65,535
characters.
Declaration
public string Description { get; set; }
Property Value
DisplayName
Required. The display name of the ad unit. Its maximum length is 255
characters.
Declaration
public string DisplayName { get; set; }
Property Value
EffectiveAdsenseEnabled
Output only. Specifies whether or not the AdUnit is enabled for serving ads
from the AdSense content network. This attribute defaults to the ad unit's
parent or ancestor's setting if one has been set. If no ancestor of the ad
unit has set appliedAdsenseEnabled, the attribute is defaulted to true.
Declaration
public bool EffectiveAdsenseEnabled { get; set; }
Property Value
EffectiveAppliedLabels
Output only. Contains the set of labels applied directly to the ad unit as
well as those inherited from the parent ad units. If a label has been
negated, only the negated label is returned. This field is readonly and is
assigned by Google.
Declaration
public RepeatedField<AppliedLabel> EffectiveAppliedLabels { get; }
Property Value
EffectiveLabelFrequencyCaps
Output only. The label frequency caps applied directly to the ad unit as
well as those inherited from parent ad units.
Declaration
public RepeatedField<LabelFrequencyCap> EffectiveLabelFrequencyCaps { get; }
Property Value
EffectiveTargetWindow
Output only. Non-empty default. The target window of this AdUnit. This
value is inherited from ancestor AdUnits and defaults to TOP if no AdUnit
in the hierarchy specifies it.
Declaration
public TargetWindowEnum.Types.TargetWindow EffectiveTargetWindow { get; set; }
Property Value
ExplicitlyTargeted
Optional. If this field is set to true, then the AdUnit will not be
implicitly targeted when its parent is. Traffickers must explicitly
target such an AdUnit or else no line items will serve to it. This
feature is only available for Ad Manager 360 accounts.
Declaration
public bool ExplicitlyTargeted { get; set; }
Property Value
ExternalSetTopBoxChannelId
Optional. Determines what set top box video on demand channel this ad unit
corresponds to in an external set top box ad campaign system.
Declaration
public string ExternalSetTopBoxChannelId { get; set; }
Property Value
HasAppliedAdsenseEnabled
Gets whether the "applied_adsense_enabled" field is set
Declaration
public bool HasAppliedAdsenseEnabled { get; }
Property Value
HasChildren
Output only. This field is set to true if the ad unit has any children.
Declaration
public bool HasChildren { get; set; }
Property Value
Name
Identifier. The resource name of the AdUnit.
Format: networks/{network_code}/adUnits/{ad_unit_id}
Declaration
public string Name { get; set; }
Property Value
ParentAdUnit
Required. Immutable. The AdUnit's parent. Every ad unit has a parent except
for the root ad unit, which is created by Google. Format:
"networks/{network_code}/adUnits/{ad_unit_id}"
Declaration
public string ParentAdUnit { get; set; }
Property Value
ParentAdUnitAsAdUnitName
Declaration
public AdUnitName ParentAdUnitAsAdUnitName { get; set; }
Property Value
ParentPath
Output only. The path to this AdUnit in the ad unit hierarchy represented
as a list from the root to this ad unit's parent. For root ad units, this
list is empty.
Declaration
public RepeatedField<AdUnitParent> ParentPath { get; }
Property Value
RefreshDelay
Optional. The duration after which an Ad Unit will automatically refresh.
This is only valid for ad units in mobile apps. If not set, the ad unit
will not refresh.
Declaration
public Duration RefreshDelay { get; set; }
Property Value
SmartSizeMode
Optional. The smart size mode for this ad unit. This attribute is optional
and defaults to SmartSizeMode.NONE for fixed sizes.
Declaration
public SmartSizeModeEnum.Types.SmartSizeMode SmartSizeMode { get; set; }
Property Value
Status
Output only. The status of this ad unit. It defaults to ACTIVE.
Declaration
public AdUnitStatusEnum.Types.AdUnitStatus Status { get; set; }
Property Value
Teams
Output only. The resource names of all Teams that this AdUnit is on as well
as those inherited from parent AdUnits. Format:
"networks/{network_code}/teams/{team_id}"
Declaration
public RepeatedField<string> Teams { get; }
Property Value
TeamsAsTeamNames
Declaration
public ResourceNameList<TeamName> TeamsAsTeamNames { get; }
Property Value
UpdateTime
Output only. The time this AdUnit was last modified.
Declaration
public Timestamp UpdateTime { get; set; }
Property Value