Class AdUnit (0.19.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

getDescriptor()

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

newBuilder()

  public 
  
 static 
  
 AdUnit 
 . 
 Builder 
  
 newBuilder 
 () 
 
Returns
Type
Description

newBuilder(AdUnit prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

  public 
  
 boolean 
  
 equals 
 ( 
 Object 
  
 obj 
 ) 
 
Parameter
Name
Description
obj
Returns
Type
Description
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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

A list containing the appliedTeams.

getDefaultInstanceForType()

  public 
  
 AdUnit 
  
 getDefaultInstanceForType 
 () 
 
Returns
Type
Description

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Whether the updateTime field is set.

hashCode()

  public 
  
 int 
  
 hashCode 
 () 
 
Returns
Type
Description
int
Overrides

internalGetFieldAccessorTable()

  protected 
  
 GeneratedMessageV3 
 . 
 FieldAccessorTable 
  
 internalGetFieldAccessorTable 
 () 
 
Returns
Type
Description
Overrides

isInitialized()

  public 
  
 final 
  
 boolean 
  
 isInitialized 
 () 
 
Returns
Type
Description
Overrides

newBuilderForType()

  public 
  
 AdUnit 
 . 
 Builder 
  
 newBuilderForType 
 () 
 
Returns
Type
Description

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

  public 
  
 AdUnit 
 . 
 Builder 
  
 toBuilder 
 () 
 
Returns
Type
Description

writeTo(CodedOutputStream output)

  public 
  
 void 
  
 writeTo 
 ( 
 CodedOutputStream 
  
 output 
 ) 
 
Parameter
Name
Description
Overrides
Exceptions
Type
Description
Design a Mobile Site
View Site in Mobile | Classic
Share by: