Class SuggestedAdUnit (0.54.0)

public final class SuggestedAdUnit extends GeneratedMessage implements SuggestedAdUnitOrBuilder

A read-only suggestion for a new ad unit based on an ad tag that has served 10+ times in the past week for an undefined ad unit.

Protobuf type google.ads.admanager.v1.SuggestedAdUnit

Static Fields

AD_UNIT_SIZES_FIELD_NUMBER

public static final int AD_UNIT_SIZES_FIELD_NUMBER
Field Value
Type Description
int

EXISTING_CODE_PATH_FIELD_NUMBER

public static final int EXISTING_CODE_PATH_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

NEW_CODE_PATH_FIELD_NUMBER

public static final int NEW_CODE_PATH_FIELD_NUMBER
Field Value
Type Description
int

TARGET_PLATFORM_FIELD_NUMBER

public static final int TARGET_PLATFORM_FIELD_NUMBER
Field Value
Type Description
int

TARGET_WINDOW_FIELD_NUMBER

public static final int TARGET_WINDOW_FIELD_NUMBER
Field Value
Type Description
int

WEEKLY_REQUEST_COUNT_FIELD_NUMBER

public static final int WEEKLY_REQUEST_COUNT_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static SuggestedAdUnit getDefaultInstance()
Returns
Type Description
SuggestedAdUnit

getDescriptor()

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

newBuilder()

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

newBuilder(SuggestedAdUnit prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getAdUnitSizes(int index)

public AdUnitSize getAdUnitSizes(int index)

Output only. Sizes associated with this suggested ad unit.

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

Parameter
Name Description
index int
Returns
Type Description
AdUnitSize

getAdUnitSizesCount()

public int getAdUnitSizesCount()

Output only. Sizes associated with this suggested ad unit.

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

Returns
Type Description
int

getAdUnitSizesList()

public List<AdUnitSize> getAdUnitSizesList()

Output only. Sizes associated with this suggested ad unit.

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

Returns
Type Description
List<AdUnitSize>

getAdUnitSizesOrBuilder(int index)

public AdUnitSizeOrBuilder getAdUnitSizesOrBuilder(int index)

Output only. Sizes associated with this suggested ad unit.

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

Parameter
Name Description
index int
Returns
Type Description
AdUnitSizeOrBuilder

getAdUnitSizesOrBuilderList()

public List<? extends AdUnitSizeOrBuilder> getAdUnitSizesOrBuilderList()

Output only. Sizes associated with this suggested ad unit.

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

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

getDefaultInstanceForType()

public SuggestedAdUnit getDefaultInstanceForType()
Returns
Type Description
SuggestedAdUnit

getExistingCodePath(int index)

public AdUnitParent getExistingCodePath(int index)

Output only. Code path of ad units leading up to and including the parent of the first suggested ad unit. Combined with the new_code_path field, this represents the full path for the suggested ad unit if approved.

Example: If a -> b -> c are existing ad units with parent-child relationships, and the suggested ad unit x is a child of c, the existing_code_path is (a, b, c). If x is the grandchild of c, the existing_code_path is also (a, b, c).

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

Parameter
Name Description
index int
Returns
Type Description
AdUnitParent

getExistingCodePathCount()

public int getExistingCodePathCount()

Output only. Code path of ad units leading up to and including the parent of the first suggested ad unit. Combined with the new_code_path field, this represents the full path for the suggested ad unit if approved.

Example: If a -> b -> c are existing ad units with parent-child relationships, and the suggested ad unit x is a child of c, the existing_code_path is (a, b, c). If x is the grandchild of c, the existing_code_path is also (a, b, c).

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

Returns
Type Description
int

getExistingCodePathList()

public List<AdUnitParent> getExistingCodePathList()

Output only. Code path of ad units leading up to and including the parent of the first suggested ad unit. Combined with the new_code_path field, this represents the full path for the suggested ad unit if approved.

Example: If a -> b -> c are existing ad units with parent-child relationships, and the suggested ad unit x is a child of c, the existing_code_path is (a, b, c). If x is the grandchild of c, the existing_code_path is also (a, b, c).

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

Returns
Type Description
List<AdUnitParent>

getExistingCodePathOrBuilder(int index)

public AdUnitParentOrBuilder getExistingCodePathOrBuilder(int index)

Output only. Code path of ad units leading up to and including the parent of the first suggested ad unit. Combined with the new_code_path field, this represents the full path for the suggested ad unit if approved.

Example: If a -> b -> c are existing ad units with parent-child relationships, and the suggested ad unit x is a child of c, the existing_code_path is (a, b, c). If x is the grandchild of c, the existing_code_path is also (a, b, c).

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

Parameter
Name Description
index int
Returns
Type Description
AdUnitParentOrBuilder

getExistingCodePathOrBuilderList()

public List<? extends AdUnitParentOrBuilder> getExistingCodePathOrBuilderList()

Output only. Code path of ad units leading up to and including the parent of the first suggested ad unit. Combined with the new_code_path field, this represents the full path for the suggested ad unit if approved.

Example: If a -> b -> c are existing ad units with parent-child relationships, and the suggested ad unit x is a child of c, the existing_code_path is (a, b, c). If x is the grandchild of c, the existing_code_path is also (a, b, c).

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

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

getName()

public String getName()

Identifier. Resource name of the SuggestedAdUnit. Format: networks/{network_code}/suggestedAdUnits/{suggested_ad_unit_id}

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

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Identifier. Resource name of the SuggestedAdUnit. Format: networks/{network_code}/suggestedAdUnits/{suggested_ad_unit_id}

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

Returns
Type Description
ByteString

The bytes for name.

getNewCodePath(int index)

public String getNewCodePath(int index)

Output only. Path of suggested ad unit codes from the closest existing ancestor ad unit that will all be created as ad units when the suggestion is approved.

Example: If a -> b -> c are existing ad units with parent-child relationships, and the suggested ad unit x is a child of c, the new_code_path is (x). If x is the grandchild of c, the new_code_path is (y, x) where y is an ad unit that would be created as the parent ad unit of x (and the child of c) if the suggestion is approved.

repeated string new_code_path = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The newCodePath at the given index.

getNewCodePathBytes(int index)

public ByteString getNewCodePathBytes(int index)

Output only. Path of suggested ad unit codes from the closest existing ancestor ad unit that will all be created as ad units when the suggestion is approved.

Example: If a -> b -> c are existing ad units with parent-child relationships, and the suggested ad unit x is a child of c, the new_code_path is (x). If x is the grandchild of c, the new_code_path is (y, x) where y is an ad unit that would be created as the parent ad unit of x (and the child of c) if the suggestion is approved.

repeated string new_code_path = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the newCodePath at the given index.

getNewCodePathCount()

public int getNewCodePathCount()

Output only. Path of suggested ad unit codes from the closest existing ancestor ad unit that will all be created as ad units when the suggestion is approved.

Example: If a -> b -> c are existing ad units with parent-child relationships, and the suggested ad unit x is a child of c, the new_code_path is (x). If x is the grandchild of c, the new_code_path is (y, x) where y is an ad unit that would be created as the parent ad unit of x (and the child of c) if the suggestion is approved.

repeated string new_code_path = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The count of newCodePath.

getNewCodePathList()

public ProtocolStringList getNewCodePathList()

Output only. Path of suggested ad unit codes from the closest existing ancestor ad unit that will all be created as ad units when the suggestion is approved.

Example: If a -> b -> c are existing ad units with parent-child relationships, and the suggested ad unit x is a child of c, the new_code_path is (x). If x is the grandchild of c, the new_code_path is (y, x) where y is an ad unit that would be created as the parent ad unit of x (and the child of c) if the suggestion is approved.

repeated string new_code_path = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ProtocolStringList

A list containing the newCodePath.

getParserForType()

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

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getTargetPlatform()

public TargetPlatformEnum.TargetPlatform getTargetPlatform()

Output only. Target platform for the browser that clicked the underlying ad tag.

optional .google.ads.admanager.v1.TargetPlatformEnum.TargetPlatform target_platform = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TargetPlatformEnum.TargetPlatform

The targetPlatform.

getTargetPlatformValue()

public int getTargetPlatformValue()

Output only. Target platform for the browser that clicked the underlying ad tag.

optional .google.ads.admanager.v1.TargetPlatformEnum.TargetPlatform target_platform = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for targetPlatform.

getTargetWindow()

public TargetWindowEnum.TargetWindow getTargetWindow()

Output only. Target window of the underlying ad tag which will be used in the ad unit if the suggestion is approved.

optional .google.ads.admanager.v1.TargetWindowEnum.TargetWindow target_window = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TargetWindowEnum.TargetWindow

The targetWindow.

getTargetWindowValue()

public int getTargetWindowValue()

Output only. Target window of the underlying ad tag which will be used in the ad unit if the suggestion is approved.

optional .google.ads.admanager.v1.TargetWindowEnum.TargetWindow target_window = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for targetWindow.

getWeeklyRequestCount()

public long getWeeklyRequestCount()

Output only. Number of times the ad tag has been served in the past week.

optional int64 weekly_request_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
long

The weeklyRequestCount.

hasTargetPlatform()

public boolean hasTargetPlatform()

Output only. Target platform for the browser that clicked the underlying ad tag.

optional .google.ads.admanager.v1.TargetPlatformEnum.TargetPlatform target_platform = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the targetPlatform field is set.

hasTargetWindow()

public boolean hasTargetWindow()

Output only. Target window of the underlying ad tag which will be used in the ad unit if the suggestion is approved.

optional .google.ads.admanager.v1.TargetWindowEnum.TargetWindow target_window = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the targetWindow field is set.

hasWeeklyRequestCount()

public boolean hasWeeklyRequestCount()

Output only. Number of times the ad tag has been served in the past week.

optional int64 weekly_request_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the weeklyRequestCount field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

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

newBuilderForType(AbstractMessage.BuilderParent parent)

protected SuggestedAdUnit.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
SuggestedAdUnit.Builder
Overrides

toBuilder()

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

writeTo(CodedOutputStream output)

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