Class AdUnitParent.Builder (0.44.0)

public static final class AdUnitParent.Builder extends GeneratedMessage.Builder<AdUnitParent.Builder> implements AdUnitParentOrBuilder

The summary of a parent AdUnit.

Protobuf type google.ads.admanager.v1.AdUnitParent

Static Methods

getDescriptor()

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

Methods

build()

public AdUnitParent build()
Returns
Type Description
AdUnitParent

buildPartial()

public AdUnitParent buildPartial()
Returns
Type Description
AdUnitParent

clear()

public AdUnitParent.Builder clear()
Returns
Type Description
AdUnitParent.Builder
Overrides

clearAdUnitCode()

public AdUnitParent.Builder clearAdUnitCode()

Output only. A string used to uniquely identify the ad unit for the purposes of serving the ad.

optional string ad_unit_code = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
AdUnitParent.Builder

This builder for chaining.

clearDisplayName()

public AdUnitParent.Builder clearDisplayName()

Output only. The display name of the parent AdUnit.

optional string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
AdUnitParent.Builder

This builder for chaining.

clearParentAdUnit()

public AdUnitParent.Builder clearParentAdUnit()

Output only. The parent of the current AdUnit Format: networks/{network_code}/adUnits/{ad_unit_id}

optional string parent_ad_unit = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Returns
Type Description
AdUnitParent.Builder

This builder for chaining.

getAdUnitCode()

public String getAdUnitCode()

Output only. A string used to uniquely identify the ad unit for the purposes of serving the ad.

optional string ad_unit_code = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The adUnitCode.

getAdUnitCodeBytes()

public ByteString getAdUnitCodeBytes()

Output only. A string used to uniquely identify the ad unit for the purposes of serving the ad.

optional string ad_unit_code = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for adUnitCode.

getDefaultInstanceForType()

public AdUnitParent getDefaultInstanceForType()
Returns
Type Description
AdUnitParent

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getDisplayName()

public String getDisplayName()

Output only. The display name of the parent AdUnit.

optional string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Output only. The display name of the parent AdUnit.

optional string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for displayName.

getParentAdUnit()

public String getParentAdUnit()

Output only. The parent of the current AdUnit Format: networks/{network_code}/adUnits/{ad_unit_id}

optional string parent_ad_unit = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The parentAdUnit.

getParentAdUnitBytes()

public ByteString getParentAdUnitBytes()

Output only. The parent of the current AdUnit Format: networks/{network_code}/adUnits/{ad_unit_id}

optional string parent_ad_unit = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for parentAdUnit.

hasAdUnitCode()

public boolean hasAdUnitCode()

Output only. A string used to uniquely identify the ad unit for the purposes of serving the ad.

optional string ad_unit_code = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the adUnitCode field is set.

hasDisplayName()

public boolean hasDisplayName()

Output only. The display name of the parent AdUnit.

optional string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the displayName field is set.

hasParentAdUnit()

public boolean hasParentAdUnit()

Output only. The parent of the current AdUnit Format: networks/{network_code}/adUnits/{ad_unit_id}

optional string parent_ad_unit = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Returns
Type Description
boolean

Whether the parentAdUnit field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(AdUnitParent other)

public AdUnitParent.Builder mergeFrom(AdUnitParent other)
Parameter
Name Description
other AdUnitParent
Returns
Type Description
AdUnitParent.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public AdUnitParent.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AdUnitParent.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public AdUnitParent.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
AdUnitParent.Builder
Overrides

setAdUnitCode(String value)

public AdUnitParent.Builder setAdUnitCode(String value)

Output only. A string used to uniquely identify the ad unit for the purposes of serving the ad.

optional string ad_unit_code = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The adUnitCode to set.

Returns
Type Description
AdUnitParent.Builder

This builder for chaining.

setAdUnitCodeBytes(ByteString value)

public AdUnitParent.Builder setAdUnitCodeBytes(ByteString value)

Output only. A string used to uniquely identify the ad unit for the purposes of serving the ad.

optional string ad_unit_code = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for adUnitCode to set.

Returns
Type Description
AdUnitParent.Builder

This builder for chaining.

setDisplayName(String value)

public AdUnitParent.Builder setDisplayName(String value)

Output only. The display name of the parent AdUnit.

optional string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The displayName to set.

Returns
Type Description
AdUnitParent.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public AdUnitParent.Builder setDisplayNameBytes(ByteString value)

Output only. The display name of the parent AdUnit.

optional string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for displayName to set.

Returns
Type Description
AdUnitParent.Builder

This builder for chaining.

setParentAdUnit(String value)

public AdUnitParent.Builder setParentAdUnit(String value)

Output only. The parent of the current AdUnit Format: networks/{network_code}/adUnits/{ad_unit_id}

optional string parent_ad_unit = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The parentAdUnit to set.

Returns
Type Description
AdUnitParent.Builder

This builder for chaining.

setParentAdUnitBytes(ByteString value)

public AdUnitParent.Builder setParentAdUnitBytes(ByteString value)

Output only. The parent of the current AdUnit Format: networks/{network_code}/adUnits/{ad_unit_id}

optional string parent_ad_unit = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for parentAdUnit to set.

Returns
Type Description
AdUnitParent.Builder

This builder for chaining.