Class AdUnit (0.12.0)

public final class AdUnit extends GeneratedMessageV3 implements AdUnitOrBuilder

The AdUnit resource.

Protobuf type google.ads.admanager.v1.AdUnit

Implements

AdUnitOrBuilder

Static Fields

AD_UNIT_CODE_FIELD_NUMBER

public static final int AD_UNIT_CODE_FIELD_NUMBER
Field Value
Type Description
int

AD_UNIT_ID_FIELD_NUMBER

public static final int AD_UNIT_ID_FIELD_NUMBER
Field Value
Type Description
int

AD_UNIT_SIZES_FIELD_NUMBER

public static final int AD_UNIT_SIZES_FIELD_NUMBER
Field Value
Type Description
int

APPLIED_ADSENSE_ENABLED_FIELD_NUMBER

public static final int APPLIED_ADSENSE_ENABLED_FIELD_NUMBER
Field Value
Type Description
int

APPLIED_LABELS_FIELD_NUMBER

public static final int APPLIED_LABELS_FIELD_NUMBER
Field Value
Type Description
int

APPLIED_LABEL_FREQUENCY_CAPS_FIELD_NUMBER

public static final int APPLIED_LABEL_FREQUENCY_CAPS_FIELD_NUMBER
Field Value
Type Description
int

APPLIED_TARGET_WINDOW_FIELD_NUMBER

public static final int APPLIED_TARGET_WINDOW_FIELD_NUMBER
Field Value
Type Description
int

APPLIED_TEAMS_FIELD_NUMBER

public static final int APPLIED_TEAMS_FIELD_NUMBER
Field Value
Type Description
int

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
Type Description
int

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
Type Description
int

EFFECTIVE_ADSENSE_ENABLED_FIELD_NUMBER

public static final int EFFECTIVE_ADSENSE_ENABLED_FIELD_NUMBER
Field Value
Type Description
int

EFFECTIVE_APPLIED_LABELS_FIELD_NUMBER

public static final int EFFECTIVE_APPLIED_LABELS_FIELD_NUMBER
Field Value
Type Description
int

EFFECTIVE_LABEL_FREQUENCY_CAPS_FIELD_NUMBER

public static final int EFFECTIVE_LABEL_FREQUENCY_CAPS_FIELD_NUMBER
Field Value
Type Description
int

EFFECTIVE_TARGET_WINDOW_FIELD_NUMBER

public static final int EFFECTIVE_TARGET_WINDOW_FIELD_NUMBER
Field Value
Type Description
int

EXPLICITLY_TARGETED_FIELD_NUMBER

public static final int EXPLICITLY_TARGETED_FIELD_NUMBER
Field Value
Type Description
int

EXTERNAL_SET_TOP_BOX_CHANNEL_ID_FIELD_NUMBER

public static final int EXTERNAL_SET_TOP_BOX_CHANNEL_ID_FIELD_NUMBER
Field Value
Type Description
int

HAS_CHILDREN_FIELD_NUMBER

public static final int HAS_CHILDREN_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

PARENT_AD_UNIT_FIELD_NUMBER

public static final int PARENT_AD_UNIT_FIELD_NUMBER
Field Value
Type Description
int

PARENT_PATH_FIELD_NUMBER

public static final int PARENT_PATH_FIELD_NUMBER
Field Value
Type Description
int

REFRESH_DELAY_FIELD_NUMBER

public static final int REFRESH_DELAY_FIELD_NUMBER
Field Value
Type Description
int

SMART_SIZE_MODE_FIELD_NUMBER

public static final int SMART_SIZE_MODE_FIELD_NUMBER
Field Value
Type Description
int

STATUS_FIELD_NUMBER

public static final int STATUS_FIELD_NUMBER
Field Value
Type Description
int

TEAMS_FIELD_NUMBER

public static final int TEAMS_FIELD_NUMBER
Field Value
Type Description
int

UPDATE_TIME_FIELD_NUMBER

public static final int UPDATE_TIME_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static AdUnit getDefaultInstance()
Returns
Type Description
AdUnit

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static AdUnit.Builder newBuilder()
Returns
Type Description
AdUnit.Builder

newBuilder(AdUnit prototype)

public static AdUnit.Builder newBuilder(AdUnit prototype)
Parameter
Name Description
prototype AdUnit
Returns
Type Description
AdUnit.Builder

parseDelimitedFrom(InputStream input)

public static AdUnit parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
AdUnit
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AdUnit parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AdUnit
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static AdUnit parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
AdUnit
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static AdUnit parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AdUnit
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static AdUnit parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
AdUnit
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static AdUnit parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AdUnit
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static AdUnit parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
AdUnit
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static AdUnit parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AdUnit
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static AdUnit parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
AdUnit
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AdUnit parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AdUnit
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static AdUnit parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
AdUnit
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static AdUnit parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AdUnit
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<AdUnit> parser()
Returns
Type Description
Parser<AdUnit>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getAdUnitCode()

public String getAdUnitCode()

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.

string ad_unit_code = 2 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
String

The adUnitCode.

getAdUnitCodeBytes()

public ByteString getAdUnitCodeBytes()

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.

string ad_unit_code = 2 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ByteString

The bytes for adUnitCode.

getAdUnitId()

public long getAdUnitId()

Output only. AdUnit ID.

int64 ad_unit_id = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
long

The adUnitId.

getAdUnitSizes(int index)

public AdUnitSize getAdUnitSizes(int index)

Optional. The sizes that can be served inside this ad unit.

repeated .google.ads.admanager.v1.AdUnitSize ad_unit_sizes = 14 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
AdUnitSize

getAdUnitSizesCount()

public int getAdUnitSizesCount()

Optional. The sizes that can be served inside this ad unit.

repeated .google.ads.admanager.v1.AdUnitSize ad_unit_sizes = 14 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getAdUnitSizesList()

public List<AdUnitSize> getAdUnitSizesList()

Optional. The sizes that can be served inside this ad unit.

repeated .google.ads.admanager.v1.AdUnitSize ad_unit_sizes = 14 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<AdUnitSize>

getAdUnitSizesOrBuilder(int index)

public AdUnitSizeOrBuilder getAdUnitSizesOrBuilder(int index)

Optional. The sizes that can be served inside this ad unit.

repeated .google.ads.admanager.v1.AdUnitSize ad_unit_sizes = 14 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
AdUnitSizeOrBuilder

getAdUnitSizesOrBuilderList()

public List<? extends AdUnitSizeOrBuilder> getAdUnitSizesOrBuilderList()

Optional. The sizes that can be served inside this ad unit.

repeated .google.ads.admanager.v1.AdUnitSize ad_unit_sizes = 14 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<? extends com.google.ads.admanager.v1.AdUnitSizeOrBuilder>

getAppliedAdsenseEnabled()

public boolean getAppliedAdsenseEnabled()

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.

optional bool applied_adsense_enabled = 26 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The appliedAdsenseEnabled.

getAppliedLabelFrequencyCaps(int index)

public LabelFrequencyCap getAppliedLabelFrequencyCaps(int index)

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.

repeated .google.ads.admanager.v1.LabelFrequencyCap applied_label_frequency_caps = 23 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
LabelFrequencyCap

getAppliedLabelFrequencyCapsCount()

public int getAppliedLabelFrequencyCapsCount()

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.

repeated .google.ads.admanager.v1.LabelFrequencyCap applied_label_frequency_caps = 23 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getAppliedLabelFrequencyCapsList()

public List<LabelFrequencyCap> getAppliedLabelFrequencyCapsList()

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.

repeated .google.ads.admanager.v1.LabelFrequencyCap applied_label_frequency_caps = 23 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<LabelFrequencyCap>

getAppliedLabelFrequencyCapsOrBuilder(int index)

public LabelFrequencyCapOrBuilder getAppliedLabelFrequencyCapsOrBuilder(int index)

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.

repeated .google.ads.admanager.v1.LabelFrequencyCap applied_label_frequency_caps = 23 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
LabelFrequencyCapOrBuilder

getAppliedLabelFrequencyCapsOrBuilderList()

public List<? extends LabelFrequencyCapOrBuilder> getAppliedLabelFrequencyCapsOrBuilderList()

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.

repeated .google.ads.admanager.v1.LabelFrequencyCap applied_label_frequency_caps = 23 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<? extends com.google.ads.admanager.v1.LabelFrequencyCapOrBuilder>

getAppliedLabels(int index)

public AppliedLabel getAppliedLabels(int index)

Optional. The set of labels applied directly to this ad unit.

repeated .google.ads.admanager.v1.AppliedLabel applied_labels = 21 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
AppliedLabel

getAppliedLabelsCount()

public int getAppliedLabelsCount()

Optional. The set of labels applied directly to this ad unit.

repeated .google.ads.admanager.v1.AppliedLabel applied_labels = 21 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getAppliedLabelsList()

public List<AppliedLabel> getAppliedLabelsList()

Optional. The set of labels applied directly to this ad unit.

repeated .google.ads.admanager.v1.AppliedLabel applied_labels = 21 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<AppliedLabel>

getAppliedLabelsOrBuilder(int index)

public AppliedLabelOrBuilder getAppliedLabelsOrBuilder(int index)

Optional. The set of labels applied directly to this ad unit.

repeated .google.ads.admanager.v1.AppliedLabel applied_labels = 21 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
AppliedLabelOrBuilder

getAppliedLabelsOrBuilderList()

public List<? extends AppliedLabelOrBuilder> getAppliedLabelsOrBuilderList()

Optional. The set of labels applied directly to this ad unit.

repeated .google.ads.admanager.v1.AppliedLabel applied_labels = 21 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<? extends com.google.ads.admanager.v1.AppliedLabelOrBuilder>

getAppliedTargetWindow()

public TargetWindowEnum.TargetWindow getAppliedTargetWindow()

Optional. The target window directly applied to this AdUnit. If this field is not set, this AdUnit uses the target window specified in effectiveTargetWindow.

.google.ads.admanager.v1.TargetWindowEnum.TargetWindow applied_target_window = 44 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
TargetWindowEnum.TargetWindow

The appliedTargetWindow.

getAppliedTargetWindowValue()

public int getAppliedTargetWindowValue()

Optional. The target window directly applied to this AdUnit. If this field is not set, this AdUnit uses the target window specified in effectiveTargetWindow.

.google.ads.admanager.v1.TargetWindowEnum.TargetWindow applied_target_window = 44 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for appliedTargetWindow.

getAppliedTeams(int index)

public String getAppliedTeams(int index)

Optional. The resource names of Teams directly applied to this AdUnit. Format: "networks/{network_code}/teams/{team_id}"

repeated string applied_teams = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The appliedTeams at the given index.

getAppliedTeamsBytes(int index)

public ByteString getAppliedTeamsBytes(int index)

Optional. The resource names of Teams directly applied to this AdUnit. Format: "networks/{network_code}/teams/{team_id}"

repeated string applied_teams = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the appliedTeams at the given index.

getAppliedTeamsCount()

public int getAppliedTeamsCount()

Optional. The resource names of Teams directly applied to this AdUnit. Format: "networks/{network_code}/teams/{team_id}"

repeated string applied_teams = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
int

The count of appliedTeams.

getAppliedTeamsList()

public ProtocolStringList getAppliedTeamsList()

Optional. The resource names of Teams directly applied to this AdUnit. Format: "networks/{network_code}/teams/{team_id}"

repeated string applied_teams = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
ProtocolStringList

A list containing the appliedTeams.

getDefaultInstanceForType()

public AdUnit getDefaultInstanceForType()
Returns
Type Description
AdUnit

getDescription()

public String getDescription()

Optional. A description of the ad unit. The maximum length is 65,535 characters.

string description = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Optional. A description of the ad unit. The maximum length is 65,535 characters.

string description = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for description.

getDisplayName()

public String getDisplayName()

Required. The display name of the ad unit. Its maximum length is 255 characters.

string display_name = 9 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Required. The display name of the ad unit. Its maximum length is 255 characters.

string display_name = 9 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for displayName.

getEffectiveAdsenseEnabled()

public boolean getEffectiveAdsenseEnabled()

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.

bool effective_adsense_enabled = 27 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

The effectiveAdsenseEnabled.

getEffectiveAppliedLabels(int index)

public AppliedLabel getEffectiveAppliedLabels(int index)

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.

repeated .google.ads.admanager.v1.AppliedLabel effective_applied_labels = 22 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
AppliedLabel

getEffectiveAppliedLabelsCount()

public int getEffectiveAppliedLabelsCount()

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.

repeated .google.ads.admanager.v1.AppliedLabel effective_applied_labels = 22 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

getEffectiveAppliedLabelsList()

public List<AppliedLabel> getEffectiveAppliedLabelsList()

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.

repeated .google.ads.admanager.v1.AppliedLabel effective_applied_labels = 22 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<AppliedLabel>

getEffectiveAppliedLabelsOrBuilder(int index)

public AppliedLabelOrBuilder getEffectiveAppliedLabelsOrBuilder(int index)

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.

repeated .google.ads.admanager.v1.AppliedLabel effective_applied_labels = 22 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
AppliedLabelOrBuilder

getEffectiveAppliedLabelsOrBuilderList()

public List<? extends AppliedLabelOrBuilder> getEffectiveAppliedLabelsOrBuilderList()

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.

repeated .google.ads.admanager.v1.AppliedLabel effective_applied_labels = 22 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<? extends com.google.ads.admanager.v1.AppliedLabelOrBuilder>

getEffectiveLabelFrequencyCaps(int index)

public LabelFrequencyCap getEffectiveLabelFrequencyCaps(int index)

Output only. The label frequency caps applied directly to the ad unit as well as those inherited from parent ad units.

repeated .google.ads.admanager.v1.LabelFrequencyCap effective_label_frequency_caps = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
LabelFrequencyCap

getEffectiveLabelFrequencyCapsCount()

public int getEffectiveLabelFrequencyCapsCount()

Output only. The label frequency caps applied directly to the ad unit as well as those inherited from parent ad units.

repeated .google.ads.admanager.v1.LabelFrequencyCap effective_label_frequency_caps = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

getEffectiveLabelFrequencyCapsList()

public List<LabelFrequencyCap> getEffectiveLabelFrequencyCapsList()

Output only. The label frequency caps applied directly to the ad unit as well as those inherited from parent ad units.

repeated .google.ads.admanager.v1.LabelFrequencyCap effective_label_frequency_caps = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<LabelFrequencyCap>

getEffectiveLabelFrequencyCapsOrBuilder(int index)

public LabelFrequencyCapOrBuilder getEffectiveLabelFrequencyCapsOrBuilder(int index)

Output only. The label frequency caps applied directly to the ad unit as well as those inherited from parent ad units.

repeated .google.ads.admanager.v1.LabelFrequencyCap effective_label_frequency_caps = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
LabelFrequencyCapOrBuilder

getEffectiveLabelFrequencyCapsOrBuilderList()

public List<? extends LabelFrequencyCapOrBuilder> getEffectiveLabelFrequencyCapsOrBuilderList()

Output only. The label frequency caps applied directly to the ad unit as well as those inherited from parent ad units.

repeated .google.ads.admanager.v1.LabelFrequencyCap effective_label_frequency_caps = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<? extends com.google.ads.admanager.v1.LabelFrequencyCapOrBuilder>

getEffectiveTargetWindow()

public TargetWindowEnum.TargetWindow getEffectiveTargetWindow()

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.

.google.ads.admanager.v1.TargetWindowEnum.TargetWindow effective_target_window = 45 [(.google.api.field_behavior) = NON_EMPTY_DEFAULT, (.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TargetWindowEnum.TargetWindow

The effectiveTargetWindow.

getEffectiveTargetWindowValue()

public int getEffectiveTargetWindowValue()

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.

.google.ads.admanager.v1.TargetWindowEnum.TargetWindow effective_target_window = 45 [(.google.api.field_behavior) = NON_EMPTY_DEFAULT, (.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for effectiveTargetWindow.

getExplicitlyTargeted()

public boolean getExplicitlyTargeted()

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.

bool explicitly_targeted = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The explicitlyTargeted.

getExternalSetTopBoxChannelId()

public String getExternalSetTopBoxChannelId()

Optional. Determines what set top box video on demand channel this ad unit corresponds to in an external set top box ad campaign system.

string external_set_top_box_channel_id = 17 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The externalSetTopBoxChannelId.

getExternalSetTopBoxChannelIdBytes()

public ByteString getExternalSetTopBoxChannelIdBytes()

Optional. Determines what set top box video on demand channel this ad unit corresponds to in an external set top box ad campaign system.

string external_set_top_box_channel_id = 17 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for externalSetTopBoxChannelId.

getHasChildren()

public boolean getHasChildren()

Output only. This field is set to true if the ad unit has any children.

bool has_children = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

The hasChildren.

getName()

public String getName()

Identifier. The resource name of the AdUnit. Format: networks/{network_code}/adUnits/{ad_unit_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 AdUnit. Format: networks/{network_code}/adUnits/{ad_unit_id}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
ByteString

The bytes for name.

getParentAdUnit()

public String getParentAdUnit()

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}"

string parent_ad_unit = 10 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The parentAdUnit.

getParentAdUnitBytes()

public ByteString getParentAdUnitBytes()

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}"

string parent_ad_unit = 10 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for parentAdUnit.

getParentPath(int index)

public AdUnitParent getParentPath(int index)

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.

repeated .google.ads.admanager.v1.AdUnitParent parent_path = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
AdUnitParent

getParentPathCount()

public int getParentPathCount()

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.

repeated .google.ads.admanager.v1.AdUnitParent parent_path = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

getParentPathList()

public List<AdUnitParent> getParentPathList()

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.

repeated .google.ads.admanager.v1.AdUnitParent parent_path = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<AdUnitParent>

getParentPathOrBuilder(int index)

public AdUnitParentOrBuilder getParentPathOrBuilder(int index)

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.

repeated .google.ads.admanager.v1.AdUnitParent parent_path = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
AdUnitParentOrBuilder

getParentPathOrBuilderList()

public List<? extends AdUnitParentOrBuilder> getParentPathOrBuilderList()

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.

repeated .google.ads.admanager.v1.AdUnitParent parent_path = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<? extends com.google.ads.admanager.v1.AdUnitParentOrBuilder>

getParserForType()

public Parser<AdUnit> getParserForType()
Returns
Type Description
Parser<AdUnit>
Overrides

getRefreshDelay()

public Duration getRefreshDelay()

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.

.google.protobuf.Duration refresh_delay = 19 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Duration

The refreshDelay.

getRefreshDelayOrBuilder()

public DurationOrBuilder getRefreshDelayOrBuilder()

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.

.google.protobuf.Duration refresh_delay = 19 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
DurationOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getSmartSizeMode()

public SmartSizeModeEnum.SmartSizeMode getSmartSizeMode()

Optional. The smart size mode for this ad unit. This attribute is optional and defaults to SmartSizeMode.NONE for fixed sizes.

.google.ads.admanager.v1.SmartSizeModeEnum.SmartSizeMode smart_size_mode = 25 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
SmartSizeModeEnum.SmartSizeMode

The smartSizeMode.

getSmartSizeModeValue()

public int getSmartSizeModeValue()

Optional. The smart size mode for this ad unit. This attribute is optional and defaults to SmartSizeMode.NONE for fixed sizes.

.google.ads.admanager.v1.SmartSizeModeEnum.SmartSizeMode smart_size_mode = 25 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for smartSizeMode.

getStatus()

public AdUnitStatusEnum.AdUnitStatus getStatus()

Output only. The status of this ad unit. It defaults to ACTIVE.

.google.ads.admanager.v1.AdUnitStatusEnum.AdUnitStatus status = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
AdUnitStatusEnum.AdUnitStatus

The status.

getStatusValue()

public int getStatusValue()

Output only. The status of this ad unit. It defaults to ACTIVE.

.google.ads.admanager.v1.AdUnitStatusEnum.AdUnitStatus status = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for status.

getTeams(int index)

public String getTeams(int index)

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}"

repeated string teams = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The teams at the given index.

getTeamsBytes(int index)

public ByteString getTeamsBytes(int index)

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}"

repeated string teams = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the teams at the given index.

getTeamsCount()

public int getTeamsCount()

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}"

repeated string teams = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Returns
Type Description
int

The count of teams.

getTeamsList()

public ProtocolStringList getTeamsList()

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}"

repeated string teams = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Returns
Type Description
ProtocolStringList

A list containing the teams.

getUpdateTime()

public Timestamp getUpdateTime()

Output only. The time this AdUnit was last modified.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. The time this AdUnit was last modified.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

hasAppliedAdsenseEnabled()

public boolean hasAppliedAdsenseEnabled()

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.

optional bool applied_adsense_enabled = 26 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the appliedAdsenseEnabled field is set.

hasRefreshDelay()

public boolean hasRefreshDelay()

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.

.google.protobuf.Duration refresh_delay = 19 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the refreshDelay field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. The time this AdUnit was last modified.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the updateTime field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public AdUnit.Builder newBuilderForType()
Returns
Type Description
AdUnit.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected AdUnit.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
AdUnit.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public AdUnit.Builder toBuilder()
Returns
Type Description
AdUnit.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException