public static final class AdRule.Builder extends GeneratedMessage.Builder<AdRule.Builder> implements AdRuleOrBuilderAn AdRule contains data that the ad server will use to generate a playlist of video ads.
Protobuf type google.ads.admanager.v1.AdRule
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > AdRule.BuilderImplements
AdRuleOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
addAllMidrolls(Iterable<? extends AdRuleSlot> values)
public AdRule.Builder addAllMidrolls(Iterable<? extends AdRuleSlot> values)Required. This AdRule object's video mid-roll slots. This attribute is required, and there must be at least one mid-roll.
repeated .google.ads.admanager.v1.AdRuleSlot midrolls = 9 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
values |
Iterable<? extends com.google.ads.admanager.v1.AdRuleSlot> |
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
|
addMidrolls(AdRuleSlot value)
public AdRule.Builder addMidrolls(AdRuleSlot value)Required. This AdRule object's video mid-roll slots. This attribute is required, and there must be at least one mid-roll.
repeated .google.ads.admanager.v1.AdRuleSlot midrolls = 9 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
AdRuleSlot |
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
|
addMidrolls(AdRuleSlot.Builder builderForValue)
public AdRule.Builder addMidrolls(AdRuleSlot.Builder builderForValue)Required. This AdRule object's video mid-roll slots. This attribute is required, and there must be at least one mid-roll.
repeated .google.ads.admanager.v1.AdRuleSlot midrolls = 9 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
AdRuleSlot.Builder |
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
|
addMidrolls(int index, AdRuleSlot value)
public AdRule.Builder addMidrolls(int index, AdRuleSlot value)Required. This AdRule object's video mid-roll slots. This attribute is required, and there must be at least one mid-roll.
repeated .google.ads.admanager.v1.AdRuleSlot midrolls = 9 [(.google.api.field_behavior) = REQUIRED];
| Parameters | |
|---|---|
| Name | Description |
index |
int |
value |
AdRuleSlot |
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
|
addMidrolls(int index, AdRuleSlot.Builder builderForValue)
public AdRule.Builder addMidrolls(int index, AdRuleSlot.Builder builderForValue)Required. This AdRule object's video mid-roll slots. This attribute is required, and there must be at least one mid-roll.
repeated .google.ads.admanager.v1.AdRuleSlot midrolls = 9 [(.google.api.field_behavior) = REQUIRED];
| Parameters | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
AdRuleSlot.Builder |
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
|
addMidrollsBuilder()
public AdRuleSlot.Builder addMidrollsBuilder()Required. This AdRule object's video mid-roll slots. This attribute is required, and there must be at least one mid-roll.
repeated .google.ads.admanager.v1.AdRuleSlot midrolls = 9 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
AdRuleSlot.Builder |
|
addMidrollsBuilder(int index)
public AdRuleSlot.Builder addMidrollsBuilder(int index)Required. This AdRule object's video mid-roll slots. This attribute is required, and there must be at least one mid-roll.
repeated .google.ads.admanager.v1.AdRuleSlot midrolls = 9 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
AdRuleSlot.Builder |
|
build()
public AdRule build()| Returns | |
|---|---|
| Type | Description |
AdRule |
|
buildPartial()
public AdRule buildPartial()| Returns | |
|---|---|
| Type | Description |
AdRule |
|
clear()
public AdRule.Builder clear()| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
|
clearDisplayName()
public AdRule.Builder clearDisplayName()Required. The unique name of the AdRule. This attribute is required to create an ad rule and has a maximum length of 255 characters.
optional string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
This builder for chaining. |
clearEndTime()
public AdRule.Builder clearEndTime()Optional. This end time of the AdRule. This attribute is required unless endTimeUnlimited is set to true. If specified, it must be after the startTime.
optional .google.protobuf.Timestamp end_time = 14 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
|
clearEndTimeUnlimited()
public AdRule.Builder clearEndTimeUnlimited()Optional. Specifies whether or not the AdRule has an end time. This attribute is optional and defaults to false.
optional bool end_time_unlimited = 15 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
This builder for chaining. |
clearFrequencyCapBehavior()
public AdRule.Builder clearFrequencyCapBehavior()Optional. The FrequencyCapBehavior of the AdRule. This attribute is optional and defaults to AdRuleFrequencyCapBehaviorEnum.AdRuleFrequencyCapBehavior.DEFER.
optional .google.ads.admanager.v1.AdRuleFrequencyCapBehaviorEnum.AdRuleFrequencyCapBehavior frequency_cap_behavior = 5 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
This builder for chaining. |
clearMaxImpressionsPerLineItemPerPod()
public AdRule.Builder clearMaxImpressionsPerLineItemPerPod()Optional. This AdRule object's frequency cap for the maximum impressions per pod. This attribute is optional and defaults to 0.
optional int32 max_impressions_per_line_item_per_pod = 7 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
This builder for chaining. |
clearMaxImpressionsPerLineItemPerStream()
public AdRule.Builder clearMaxImpressionsPerLineItemPerStream()Optional. This AdRule object's frequency cap for the maximum impressions per stream. This attribute is optional and defaults to 0.
optional int32 max_impressions_per_line_item_per_stream = 6 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
This builder for chaining. |
clearMidrolls()
public AdRule.Builder clearMidrolls()Required. This AdRule object's video mid-roll slots. This attribute is required, and there must be at least one mid-roll.
repeated .google.ads.admanager.v1.AdRuleSlot midrolls = 9 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
|
clearName()
public AdRule.Builder clearName() Identifier. The resource name of the AdRule.
Format: networks/{network_code}/adRules/{ad_rule_id}
string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
This builder for chaining. |
clearPostroll()
public AdRule.Builder clearPostroll()Required. This AdRule object's post-roll slot. This attribute is required.
optional .google.ads.admanager.v1.AdRuleSlot postroll = 10 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
|
clearPreroll()
public AdRule.Builder clearPreroll()Required. This AdRule object's pre-roll slot. This attribute is required.
optional .google.ads.admanager.v1.AdRuleSlot preroll = 8 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
|
clearPriority()
public AdRule.Builder clearPriority()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.
optional int32 priority = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
This builder for chaining. |
clearStartTime()
public AdRule.Builder clearStartTime()Required. The start time of the AdRule. This attribute is required and must be a date in the future for new ad rules.
optional .google.protobuf.Timestamp start_time = 13 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
|
clearStatus()
public AdRule.Builder clearStatus()Output only. The AdRuleStatus of the AdRule. This attribute is read-only and defaults to AdRuleStatusEnum.AdRuleStatus.INACTIVE.
optional .google.ads.admanager.v1.AdRuleStatusEnum.AdRuleStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
This builder for chaining. |
clearTargeting()
public AdRule.Builder clearTargeting() Required. The targeting of the AdRule.
optional .google.ads.admanager.v1.Targeting targeting = 11 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
|
getDefaultInstanceForType()
public AdRule getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
AdRule |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getDisplayName()
public String getDisplayName()Required. The unique name of the AdRule. This attribute is required to create an ad rule and has a maximum length of 255 characters.
optional string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
String |
The displayName. |
getDisplayNameBytes()
public ByteString getDisplayNameBytes()Required. The unique name of the AdRule. This attribute is required to create an ad rule and has a maximum length of 255 characters.
optional string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for displayName. |
getEndTime()
public Timestamp getEndTime()Optional. This end time of the AdRule. This attribute is required unless endTimeUnlimited is set to true. If specified, it must be after the startTime.
optional .google.protobuf.Timestamp end_time = 14 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
Timestamp |
The endTime. |
getEndTimeBuilder()
public Timestamp.Builder getEndTimeBuilder()Optional. This end time of the AdRule. This attribute is required unless endTimeUnlimited is set to true. If specified, it must be after the startTime.
optional .google.protobuf.Timestamp end_time = 14 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
Builder |
|
getEndTimeOrBuilder()
public TimestampOrBuilder getEndTimeOrBuilder()Optional. This end time of the AdRule. This attribute is required unless endTimeUnlimited is set to true. If specified, it must be after the startTime.
optional .google.protobuf.Timestamp end_time = 14 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
TimestampOrBuilder |
|
getEndTimeUnlimited()
public boolean getEndTimeUnlimited()Optional. Specifies whether or not the AdRule has an end time. This attribute is optional and defaults to false.
optional bool end_time_unlimited = 15 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
boolean |
The endTimeUnlimited. |
getFrequencyCapBehavior()
public AdRuleFrequencyCapBehaviorEnum.AdRuleFrequencyCapBehavior getFrequencyCapBehavior()Optional. The FrequencyCapBehavior of the AdRule. This attribute is optional and defaults to AdRuleFrequencyCapBehaviorEnum.AdRuleFrequencyCapBehavior.DEFER.
optional .google.ads.admanager.v1.AdRuleFrequencyCapBehaviorEnum.AdRuleFrequencyCapBehavior frequency_cap_behavior = 5 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
AdRuleFrequencyCapBehaviorEnum.AdRuleFrequencyCapBehavior |
The frequencyCapBehavior. |
getFrequencyCapBehaviorValue()
public int getFrequencyCapBehaviorValue()Optional. The FrequencyCapBehavior of the AdRule. This attribute is optional and defaults to AdRuleFrequencyCapBehaviorEnum.AdRuleFrequencyCapBehavior.DEFER.
optional .google.ads.admanager.v1.AdRuleFrequencyCapBehaviorEnum.AdRuleFrequencyCapBehavior frequency_cap_behavior = 5 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
int |
The enum numeric value on the wire for frequencyCapBehavior. |
getMaxImpressionsPerLineItemPerPod()
public int getMaxImpressionsPerLineItemPerPod()Optional. This AdRule object's frequency cap for the maximum impressions per pod. This attribute is optional and defaults to 0.
optional int32 max_impressions_per_line_item_per_pod = 7 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
int |
The maxImpressionsPerLineItemPerPod. |
getMaxImpressionsPerLineItemPerStream()
public int getMaxImpressionsPerLineItemPerStream()Optional. This AdRule object's frequency cap for the maximum impressions per stream. This attribute is optional and defaults to 0.
optional int32 max_impressions_per_line_item_per_stream = 6 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
int |
The maxImpressionsPerLineItemPerStream. |
getMidrolls(int index)
public AdRuleSlot getMidrolls(int index)Required. This AdRule object's video mid-roll slots. This attribute is required, and there must be at least one mid-roll.
repeated .google.ads.admanager.v1.AdRuleSlot midrolls = 9 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
AdRuleSlot |
|
getMidrollsBuilder(int index)
public AdRuleSlot.Builder getMidrollsBuilder(int index)Required. This AdRule object's video mid-roll slots. This attribute is required, and there must be at least one mid-roll.
repeated .google.ads.admanager.v1.AdRuleSlot midrolls = 9 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
AdRuleSlot.Builder |
|
getMidrollsBuilderList()
public List<AdRuleSlot.Builder> getMidrollsBuilderList()Required. This AdRule object's video mid-roll slots. This attribute is required, and there must be at least one mid-roll.
repeated .google.ads.admanager.v1.AdRuleSlot midrolls = 9 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
List<Builder> |
|
getMidrollsCount()
public int getMidrollsCount()Required. This AdRule object's video mid-roll slots. This attribute is required, and there must be at least one mid-roll.
repeated .google.ads.admanager.v1.AdRuleSlot midrolls = 9 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
int |
|
getMidrollsList()
public List<AdRuleSlot> getMidrollsList()Required. This AdRule object's video mid-roll slots. This attribute is required, and there must be at least one mid-roll.
repeated .google.ads.admanager.v1.AdRuleSlot midrolls = 9 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
List<AdRuleSlot> |
|
getMidrollsOrBuilder(int index)
public AdRuleSlotOrBuilder getMidrollsOrBuilder(int index)Required. This AdRule object's video mid-roll slots. This attribute is required, and there must be at least one mid-roll.
repeated .google.ads.admanager.v1.AdRuleSlot midrolls = 9 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
AdRuleSlotOrBuilder |
|
getMidrollsOrBuilderList()
public List<? extends AdRuleSlotOrBuilder> getMidrollsOrBuilderList()Required. This AdRule object's video mid-roll slots. This attribute is required, and there must be at least one mid-roll.
repeated .google.ads.admanager.v1.AdRuleSlot midrolls = 9 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
List<? extends com.google.ads.admanager.v1.AdRuleSlotOrBuilder> |
|
getName()
public String getName() Identifier. The resource name of the AdRule.
Format: networks/{network_code}/adRules/{ad_rule_id}
string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
| Returns | |
|---|---|
| Type | Description |
String |
The name. |
getNameBytes()
public ByteString getNameBytes() Identifier. The resource name of the AdRule.
Format: networks/{network_code}/adRules/{ad_rule_id}
string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for name. |
getPostroll()
public AdRuleSlot getPostroll()Required. This AdRule object's post-roll slot. This attribute is required.
optional .google.ads.admanager.v1.AdRuleSlot postroll = 10 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
AdRuleSlot |
The postroll. |
getPostrollBuilder()
public AdRuleSlot.Builder getPostrollBuilder()Required. This AdRule object's post-roll slot. This attribute is required.
optional .google.ads.admanager.v1.AdRuleSlot postroll = 10 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
AdRuleSlot.Builder |
|
getPostrollOrBuilder()
public AdRuleSlotOrBuilder getPostrollOrBuilder()Required. This AdRule object's post-roll slot. This attribute is required.
optional .google.ads.admanager.v1.AdRuleSlot postroll = 10 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
AdRuleSlotOrBuilder |
|
getPreroll()
public AdRuleSlot getPreroll()Required. This AdRule object's pre-roll slot. This attribute is required.
optional .google.ads.admanager.v1.AdRuleSlot preroll = 8 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
AdRuleSlot |
The preroll. |
getPrerollBuilder()
public AdRuleSlot.Builder getPrerollBuilder()Required. This AdRule object's pre-roll slot. This attribute is required.
optional .google.ads.admanager.v1.AdRuleSlot preroll = 8 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
AdRuleSlot.Builder |
|
getPrerollOrBuilder()
public AdRuleSlotOrBuilder getPrerollOrBuilder()Required. This AdRule object's pre-roll slot. This attribute is required.
optional .google.ads.admanager.v1.AdRuleSlot preroll = 8 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
AdRuleSlotOrBuilder |
|
getPriority()
public int getPriority()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.
optional int32 priority = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
int |
The priority. |
getStartTime()
public Timestamp getStartTime()Required. The start time of the AdRule. This attribute is required and must be a date in the future for new ad rules.
optional .google.protobuf.Timestamp start_time = 13 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
Timestamp |
The startTime. |
getStartTimeBuilder()
public Timestamp.Builder getStartTimeBuilder()Required. The start time of the AdRule. This attribute is required and must be a date in the future for new ad rules.
optional .google.protobuf.Timestamp start_time = 13 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
Builder |
|
getStartTimeOrBuilder()
public TimestampOrBuilder getStartTimeOrBuilder()Required. The start time of the AdRule. This attribute is required and must be a date in the future for new ad rules.
optional .google.protobuf.Timestamp start_time = 13 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
TimestampOrBuilder |
|
getStatus()
public AdRuleStatusEnum.AdRuleStatus getStatus()Output only. The AdRuleStatus of the AdRule. This attribute is read-only and defaults to AdRuleStatusEnum.AdRuleStatus.INACTIVE.
optional .google.ads.admanager.v1.AdRuleStatusEnum.AdRuleStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
AdRuleStatusEnum.AdRuleStatus |
The status. |
getStatusValue()
public int getStatusValue()Output only. The AdRuleStatus of the AdRule. This attribute is read-only and defaults to AdRuleStatusEnum.AdRuleStatus.INACTIVE.
optional .google.ads.admanager.v1.AdRuleStatusEnum.AdRuleStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
int |
The enum numeric value on the wire for status. |
getTargeting()
public Targeting getTargeting() Required. The targeting of the AdRule.
optional .google.ads.admanager.v1.Targeting targeting = 11 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
Targeting |
The targeting. |
getTargetingBuilder()
public Targeting.Builder getTargetingBuilder() Required. The targeting of the AdRule.
optional .google.ads.admanager.v1.Targeting targeting = 11 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
Targeting.Builder |
|
getTargetingOrBuilder()
public TargetingOrBuilder getTargetingOrBuilder() Required. The targeting of the AdRule.
optional .google.ads.admanager.v1.Targeting targeting = 11 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
TargetingOrBuilder |
|
hasDisplayName()
public boolean hasDisplayName()Required. The unique name of the AdRule. This attribute is required to create an ad rule and has a maximum length of 255 characters.
optional string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the displayName field is set. |
hasEndTime()
public boolean hasEndTime()Optional. This end time of the AdRule. This attribute is required unless endTimeUnlimited is set to true. If specified, it must be after the startTime.
optional .google.protobuf.Timestamp end_time = 14 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the endTime field is set. |
hasEndTimeUnlimited()
public boolean hasEndTimeUnlimited()Optional. Specifies whether or not the AdRule has an end time. This attribute is optional and defaults to false.
optional bool end_time_unlimited = 15 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the endTimeUnlimited field is set. |
hasFrequencyCapBehavior()
public boolean hasFrequencyCapBehavior()Optional. The FrequencyCapBehavior of the AdRule. This attribute is optional and defaults to AdRuleFrequencyCapBehaviorEnum.AdRuleFrequencyCapBehavior.DEFER.
optional .google.ads.admanager.v1.AdRuleFrequencyCapBehaviorEnum.AdRuleFrequencyCapBehavior frequency_cap_behavior = 5 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the frequencyCapBehavior field is set. |
hasMaxImpressionsPerLineItemPerPod()
public boolean hasMaxImpressionsPerLineItemPerPod()Optional. This AdRule object's frequency cap for the maximum impressions per pod. This attribute is optional and defaults to 0.
optional int32 max_impressions_per_line_item_per_pod = 7 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the maxImpressionsPerLineItemPerPod field is set. |
hasMaxImpressionsPerLineItemPerStream()
public boolean hasMaxImpressionsPerLineItemPerStream()Optional. This AdRule object's frequency cap for the maximum impressions per stream. This attribute is optional and defaults to 0.
optional int32 max_impressions_per_line_item_per_stream = 6 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the maxImpressionsPerLineItemPerStream field is set. |
hasPostroll()
public boolean hasPostroll()Required. This AdRule object's post-roll slot. This attribute is required.
optional .google.ads.admanager.v1.AdRuleSlot postroll = 10 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the postroll field is set. |
hasPreroll()
public boolean hasPreroll()Required. This AdRule object's pre-roll slot. This attribute is required.
optional .google.ads.admanager.v1.AdRuleSlot preroll = 8 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the preroll field is set. |
hasPriority()
public boolean hasPriority()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.
optional int32 priority = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the priority field is set. |
hasStartTime()
public boolean hasStartTime()Required. The start time of the AdRule. This attribute is required and must be a date in the future for new ad rules.
optional .google.protobuf.Timestamp start_time = 13 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the startTime field is set. |
hasStatus()
public boolean hasStatus()Output only. The AdRuleStatus of the AdRule. This attribute is read-only and defaults to AdRuleStatusEnum.AdRuleStatus.INACTIVE.
optional .google.ads.admanager.v1.AdRuleStatusEnum.AdRuleStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the status field is set. |
hasTargeting()
public boolean hasTargeting() Required. The targeting of the AdRule.
optional .google.ads.admanager.v1.Targeting targeting = 11 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the targeting field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeEndTime(Timestamp value)
public AdRule.Builder mergeEndTime(Timestamp value)Optional. This end time of the AdRule. This attribute is required unless endTimeUnlimited is set to true. If specified, it must be after the startTime.
optional .google.protobuf.Timestamp end_time = 14 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
Timestamp |
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
|
mergeFrom(AdRule other)
public AdRule.Builder mergeFrom(AdRule other)| Parameter | |
|---|---|
| Name | Description |
other |
AdRule |
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public AdRule.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public AdRule.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
|
mergePostroll(AdRuleSlot value)
public AdRule.Builder mergePostroll(AdRuleSlot value)Required. This AdRule object's post-roll slot. This attribute is required.
optional .google.ads.admanager.v1.AdRuleSlot postroll = 10 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
AdRuleSlot |
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
|
mergePreroll(AdRuleSlot value)
public AdRule.Builder mergePreroll(AdRuleSlot value)Required. This AdRule object's pre-roll slot. This attribute is required.
optional .google.ads.admanager.v1.AdRuleSlot preroll = 8 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
AdRuleSlot |
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
|
mergeStartTime(Timestamp value)
public AdRule.Builder mergeStartTime(Timestamp value)Required. The start time of the AdRule. This attribute is required and must be a date in the future for new ad rules.
optional .google.protobuf.Timestamp start_time = 13 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
Timestamp |
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
|
mergeTargeting(Targeting value)
public AdRule.Builder mergeTargeting(Targeting value) Required. The targeting of the AdRule.
optional .google.ads.admanager.v1.Targeting targeting = 11 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
Targeting |
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
|
removeMidrolls(int index)
public AdRule.Builder removeMidrolls(int index)Required. This AdRule object's video mid-roll slots. This attribute is required, and there must be at least one mid-roll.
repeated .google.ads.admanager.v1.AdRuleSlot midrolls = 9 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
|
setDisplayName(String value)
public AdRule.Builder setDisplayName(String value)Required. The unique name of the AdRule. This attribute is required to create an ad rule and has a maximum length of 255 characters.
optional string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe displayName to set. |
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
This builder for chaining. |
setDisplayNameBytes(ByteString value)
public AdRule.Builder setDisplayNameBytes(ByteString value)Required. The unique name of the AdRule. This attribute is required to create an ad rule and has a maximum length of 255 characters.
optional string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for displayName to set. |
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
This builder for chaining. |
setEndTime(Timestamp value)
public AdRule.Builder setEndTime(Timestamp value)Optional. This end time of the AdRule. This attribute is required unless endTimeUnlimited is set to true. If specified, it must be after the startTime.
optional .google.protobuf.Timestamp end_time = 14 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
Timestamp |
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
|
setEndTime(Timestamp.Builder builderForValue)
public AdRule.Builder setEndTime(Timestamp.Builder builderForValue)Optional. This end time of the AdRule. This attribute is required unless endTimeUnlimited is set to true. If specified, it must be after the startTime.
optional .google.protobuf.Timestamp end_time = 14 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
Builder |
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
|
setEndTimeUnlimited(boolean value)
public AdRule.Builder setEndTimeUnlimited(boolean value)Optional. Specifies whether or not the AdRule has an end time. This attribute is optional and defaults to false.
optional bool end_time_unlimited = 15 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
booleanThe endTimeUnlimited to set. |
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
This builder for chaining. |
setFrequencyCapBehavior(AdRuleFrequencyCapBehaviorEnum.AdRuleFrequencyCapBehavior value)
public AdRule.Builder setFrequencyCapBehavior(AdRuleFrequencyCapBehaviorEnum.AdRuleFrequencyCapBehavior value)Optional. The FrequencyCapBehavior of the AdRule. This attribute is optional and defaults to AdRuleFrequencyCapBehaviorEnum.AdRuleFrequencyCapBehavior.DEFER.
optional .google.ads.admanager.v1.AdRuleFrequencyCapBehaviorEnum.AdRuleFrequencyCapBehavior frequency_cap_behavior = 5 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
AdRuleFrequencyCapBehaviorEnum.AdRuleFrequencyCapBehaviorThe frequencyCapBehavior to set. |
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
This builder for chaining. |
setFrequencyCapBehaviorValue(int value)
public AdRule.Builder setFrequencyCapBehaviorValue(int value)Optional. The FrequencyCapBehavior of the AdRule. This attribute is optional and defaults to AdRuleFrequencyCapBehaviorEnum.AdRuleFrequencyCapBehavior.DEFER.
optional .google.ads.admanager.v1.AdRuleFrequencyCapBehaviorEnum.AdRuleFrequencyCapBehavior frequency_cap_behavior = 5 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
intThe enum numeric value on the wire for frequencyCapBehavior to set. |
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
This builder for chaining. |
setMaxImpressionsPerLineItemPerPod(int value)
public AdRule.Builder setMaxImpressionsPerLineItemPerPod(int value)Optional. This AdRule object's frequency cap for the maximum impressions per pod. This attribute is optional and defaults to 0.
optional int32 max_impressions_per_line_item_per_pod = 7 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
intThe maxImpressionsPerLineItemPerPod to set. |
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
This builder for chaining. |
setMaxImpressionsPerLineItemPerStream(int value)
public AdRule.Builder setMaxImpressionsPerLineItemPerStream(int value)Optional. This AdRule object's frequency cap for the maximum impressions per stream. This attribute is optional and defaults to 0.
optional int32 max_impressions_per_line_item_per_stream = 6 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
intThe maxImpressionsPerLineItemPerStream to set. |
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
This builder for chaining. |
setMidrolls(int index, AdRuleSlot value)
public AdRule.Builder setMidrolls(int index, AdRuleSlot value)Required. This AdRule object's video mid-roll slots. This attribute is required, and there must be at least one mid-roll.
repeated .google.ads.admanager.v1.AdRuleSlot midrolls = 9 [(.google.api.field_behavior) = REQUIRED];
| Parameters | |
|---|---|
| Name | Description |
index |
int |
value |
AdRuleSlot |
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
|
setMidrolls(int index, AdRuleSlot.Builder builderForValue)
public AdRule.Builder setMidrolls(int index, AdRuleSlot.Builder builderForValue)Required. This AdRule object's video mid-roll slots. This attribute is required, and there must be at least one mid-roll.
repeated .google.ads.admanager.v1.AdRuleSlot midrolls = 9 [(.google.api.field_behavior) = REQUIRED];
| Parameters | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
AdRuleSlot.Builder |
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
|
setName(String value)
public AdRule.Builder setName(String value) Identifier. The resource name of the AdRule.
Format: networks/{network_code}/adRules/{ad_rule_id}
string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe name to set. |
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
This builder for chaining. |
setNameBytes(ByteString value)
public AdRule.Builder setNameBytes(ByteString value) Identifier. The resource name of the AdRule.
Format: networks/{network_code}/adRules/{ad_rule_id}
string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for name to set. |
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
This builder for chaining. |
setPostroll(AdRuleSlot value)
public AdRule.Builder setPostroll(AdRuleSlot value)Required. This AdRule object's post-roll slot. This attribute is required.
optional .google.ads.admanager.v1.AdRuleSlot postroll = 10 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
AdRuleSlot |
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
|
setPostroll(AdRuleSlot.Builder builderForValue)
public AdRule.Builder setPostroll(AdRuleSlot.Builder builderForValue)Required. This AdRule object's post-roll slot. This attribute is required.
optional .google.ads.admanager.v1.AdRuleSlot postroll = 10 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
AdRuleSlot.Builder |
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
|
setPreroll(AdRuleSlot value)
public AdRule.Builder setPreroll(AdRuleSlot value)Required. This AdRule object's pre-roll slot. This attribute is required.
optional .google.ads.admanager.v1.AdRuleSlot preroll = 8 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
AdRuleSlot |
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
|
setPreroll(AdRuleSlot.Builder builderForValue)
public AdRule.Builder setPreroll(AdRuleSlot.Builder builderForValue)Required. This AdRule object's pre-roll slot. This attribute is required.
optional .google.ads.admanager.v1.AdRuleSlot preroll = 8 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
AdRuleSlot.Builder |
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
|
setPriority(int value)
public AdRule.Builder setPriority(int value)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.
optional int32 priority = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
intThe priority to set. |
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
This builder for chaining. |
setStartTime(Timestamp value)
public AdRule.Builder setStartTime(Timestamp value)Required. The start time of the AdRule. This attribute is required and must be a date in the future for new ad rules.
optional .google.protobuf.Timestamp start_time = 13 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
Timestamp |
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
|
setStartTime(Timestamp.Builder builderForValue)
public AdRule.Builder setStartTime(Timestamp.Builder builderForValue)Required. The start time of the AdRule. This attribute is required and must be a date in the future for new ad rules.
optional .google.protobuf.Timestamp start_time = 13 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
Builder |
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
|
setStatus(AdRuleStatusEnum.AdRuleStatus value)
public AdRule.Builder setStatus(AdRuleStatusEnum.AdRuleStatus value)Output only. The AdRuleStatus of the AdRule. This attribute is read-only and defaults to AdRuleStatusEnum.AdRuleStatus.INACTIVE.
optional .google.ads.admanager.v1.AdRuleStatusEnum.AdRuleStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
AdRuleStatusEnum.AdRuleStatusThe status to set. |
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
This builder for chaining. |
setStatusValue(int value)
public AdRule.Builder setStatusValue(int value)Output only. The AdRuleStatus of the AdRule. This attribute is read-only and defaults to AdRuleStatusEnum.AdRuleStatus.INACTIVE.
optional .google.ads.admanager.v1.AdRuleStatusEnum.AdRuleStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
intThe enum numeric value on the wire for status to set. |
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
This builder for chaining. |
setTargeting(Targeting value)
public AdRule.Builder setTargeting(Targeting value) Required. The targeting of the AdRule.
optional .google.ads.admanager.v1.Targeting targeting = 11 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
Targeting |
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
|
setTargeting(Targeting.Builder builderForValue)
public AdRule.Builder setTargeting(Targeting.Builder builderForValue) Required. The targeting of the AdRule.
optional .google.ads.admanager.v1.Targeting targeting = 11 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
Targeting.Builder |
| Returns | |
|---|---|
| Type | Description |
AdRule.Builder |
|