Class AdRule
An AdRule contains data that the ad server will use to generate a playlist of video ads.
Namespace: Google.Ads.AdManager.V1
Assembly: Google.Ads.AdManager.V1.dll
Syntax
public sealed class AdRule : IMessage<AdRule>, IEquatable<AdRule>, IDeepCloneable<AdRule>, IBufferMessage, IMessage
Constructors
AdRule()
Declaration
public AdRule()
AdRule(AdRule)
Declaration
public AdRule(AdRule other)
Parameters
| Type | Name | Description |
|---|---|---|
| AdRule | other |
Properties
AdRuleName
AdRuleName-typed view over the Name resource name property.
Declaration
public AdRuleName AdRuleName { get; set; }
Property Value
| Type | Description |
|---|---|
| AdRuleName |
DisplayName
Required. The unique name of the AdRule. This attribute is required to create an ad rule and has a maximum length of 255 characters.
Declaration
public string DisplayName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
EndTime
Optional. This end time of the AdRule. This attribute is required unless [end_time_unlimited][google.ads.admanager.v1.AdRule.end_time_unlimited] is set to true. If specified, it must be after the [start_time][google.ads.admanager.v1.AdRule.start_time].
Declaration
public Timestamp EndTime { get; set; }
Property Value
| Type | Description |
|---|---|
| Timestamp |
EndTimeUnlimited
Optional. Specifies whether or not the AdRule has an end time. This attribute is optional and defaults to false.
Declaration
public bool EndTimeUnlimited { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
FrequencyCapBehavior
Optional. The FrequencyCapBehavior of the AdRule. This attribute is optional and defaults to [FrequencyCapBehavior.DEFER][].
Declaration
public AdRuleFrequencyCapBehaviorEnum.Types.AdRuleFrequencyCapBehavior FrequencyCapBehavior { get; set; }
Property Value
| Type | Description |
|---|---|
| AdRuleFrequencyCapBehaviorEnum.Types.AdRuleFrequencyCapBehavior |
HasDisplayName
Gets whether the "display_name" field is set
Declaration
public bool HasDisplayName { get; }
Property Value
| Type | Description |
|---|---|
| bool |
HasEndTimeUnlimited
Gets whether the "end_time_unlimited" field is set
Declaration
public bool HasEndTimeUnlimited { get; }
Property Value
| Type | Description |
|---|---|
| bool |
HasFrequencyCapBehavior
Gets whether the "frequency_cap_behavior" field is set
Declaration
public bool HasFrequencyCapBehavior { get; }
Property Value
| Type | Description |
|---|---|
| bool |
HasMaxImpressionsPerLineItemPerPod
Gets whether the "max_impressions_per_line_item_per_pod" field is set
Declaration
public bool HasMaxImpressionsPerLineItemPerPod { get; }
Property Value
| Type | Description |
|---|---|
| bool |
HasMaxImpressionsPerLineItemPerStream
Gets whether the "max_impressions_per_line_item_per_stream" field is set
Declaration
public bool HasMaxImpressionsPerLineItemPerStream { get; }
Property Value
| Type | Description |
|---|---|
| bool |
HasPriority
Gets whether the "priority" field is set
Declaration
public bool HasPriority { get; }
Property Value
| Type | Description |
|---|---|
| bool |
HasStatus
Gets whether the "status" field is set
Declaration
public bool HasStatus { get; }
Property Value
| Type | Description |
|---|---|
| bool |
MaxImpressionsPerLineItemPerPod
Optional. This AdRule object's frequency cap for the maximum impressions per pod. This attribute is optional and defaults to 0.
Declaration
public int MaxImpressionsPerLineItemPerPod { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
MaxImpressionsPerLineItemPerStream
Optional. This AdRule object's frequency cap for the maximum impressions per stream. This attribute is optional and defaults to 0.
Declaration
public int MaxImpressionsPerLineItemPerStream { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Midrolls
Required. This AdRule object's video mid-roll slots. This attribute is required, and there must be at least one mid-roll.
Declaration
public RepeatedField<AdRuleSlot> Midrolls { get; }
Property Value
| Type | Description |
|---|---|
| RepeatedField<AdRuleSlot> |
Name
Identifier. The resource name of the AdRule.
Format: networks/{network_code}/adRules/{ad_rule_id}
Declaration
public string Name { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Postroll
Required. This AdRule object's post-roll slot. This attribute is required.
Declaration
public AdRuleSlot Postroll { get; set; }
Property Value
| Type | Description |
|---|---|
| AdRuleSlot |
Preroll
Required. This AdRule object's pre-roll slot. This attribute is required.
Declaration
public AdRuleSlot Preroll { get; set; }
Property Value
| Type | Description |
|---|---|
| AdRuleSlot |
Priority
Optional. The priority of the AdRule. This attribute is required and can range from 1 to 1000, with 1 being the highest possible priority.
Changing an ad rule's priority can affect the priorities of other ad rules. For example, increasing an ad rule's priority from 5 to 1 will shift the ad rules that were previously in priority positions 1 through 4 down one.
Declaration
public int Priority { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
StartTime
Required. The start time of the AdRule. This attribute is required and must be a date in the future for new ad rules.
Declaration
public Timestamp StartTime { get; set; }
Property Value
| Type | Description |
|---|---|
| Timestamp |
Status
Output only. The AdRuleStatus of the AdRule. This attribute is read-only and defaults to [AdRuleStatus.INACTIVE][].
Declaration
public AdRuleStatusEnum.Types.AdRuleStatus Status { get; set; }
Property Value
| Type | Description |
|---|---|
| AdRuleStatusEnum.Types.AdRuleStatus |
Targeting
Required. The targeting of the AdRule.
Declaration
public Targeting Targeting { get; set; }
Property Value
| Type | Description |
|---|---|
| Targeting |