Class YieldGroup.Builder (0.62.0)

public static final class YieldGroup.Builder extends GeneratedMessage.Builder<YieldGroup.Builder> implements YieldGroupOrBuilder

Represents a segment of inventory and a set of yield partners that can monetize that inventory.

Protobuf type google.ads.admanager.v1.YieldGroup

Implements

YieldGroupOrBuilder

Static Methods

getDescriptor()

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

Methods

addAdSources(YieldAdSource value)

public YieldGroup.Builder addAdSources(YieldAdSource value)

Optional. The ad sources that belong to the YieldGroup.

repeated .google.ads.admanager.v1.YieldAdSource ad_sources = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value YieldAdSource
Returns
Type Description
YieldGroup.Builder

addAdSources(YieldAdSource.Builder builderForValue)

public YieldGroup.Builder addAdSources(YieldAdSource.Builder builderForValue)

Optional. The ad sources that belong to the YieldGroup.

repeated .google.ads.admanager.v1.YieldAdSource ad_sources = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue YieldAdSource.Builder
Returns
Type Description
YieldGroup.Builder

addAdSources(int index, YieldAdSource value)

public YieldGroup.Builder addAdSources(int index, YieldAdSource value)

Optional. The ad sources that belong to the YieldGroup.

repeated .google.ads.admanager.v1.YieldAdSource ad_sources = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value YieldAdSource
Returns
Type Description
YieldGroup.Builder

addAdSources(int index, YieldAdSource.Builder builderForValue)

public YieldGroup.Builder addAdSources(int index, YieldAdSource.Builder builderForValue)

Optional. The ad sources that belong to the YieldGroup.

repeated .google.ads.admanager.v1.YieldAdSource ad_sources = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue YieldAdSource.Builder
Returns
Type Description
YieldGroup.Builder

addAdSourcesBuilder()

public YieldAdSource.Builder addAdSourcesBuilder()

Optional. The ad sources that belong to the YieldGroup.

repeated .google.ads.admanager.v1.YieldAdSource ad_sources = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
YieldAdSource.Builder

addAdSourcesBuilder(int index)

public YieldAdSource.Builder addAdSourcesBuilder(int index)

Optional. The ad sources that belong to the YieldGroup.

repeated .google.ads.admanager.v1.YieldAdSource ad_sources = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
YieldAdSource.Builder

addAllAdSources(Iterable<? extends YieldAdSource> values)

public YieldGroup.Builder addAllAdSources(Iterable<? extends YieldAdSource> values)

Optional. The ad sources that belong to the YieldGroup.

repeated .google.ads.admanager.v1.YieldAdSource ad_sources = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<? extends com.google.ads.admanager.v1.YieldAdSource>
Returns
Type Description
YieldGroup.Builder

build()

public YieldGroup build()
Returns
Type Description
YieldGroup

buildPartial()

public YieldGroup buildPartial()
Returns
Type Description
YieldGroup

clear()

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

clearAdSources()

public YieldGroup.Builder clearAdSources()

Optional. The ad sources that belong to the YieldGroup.

repeated .google.ads.admanager.v1.YieldAdSource ad_sources = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
YieldGroup.Builder

clearDisplayName()

public YieldGroup.Builder clearDisplayName()

Required. The display name of the YieldGroup. This value has a maximum length of 255 characters.

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

Returns
Type Description
YieldGroup.Builder

This builder for chaining.

clearName()

public YieldGroup.Builder clearName()

Identifier. The resource name of the YieldGroup. Format: networks/{network_code}/yieldGroups/{yield_group_id}

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

Returns
Type Description
YieldGroup.Builder

This builder for chaining.

clearStatus()

public YieldGroup.Builder clearStatus()

Output only. Status of the YieldGroup.

optional .google.ads.admanager.v1.YieldEntityStatusEnum.YieldEntityStatus status = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
YieldGroup.Builder

This builder for chaining.

clearTargeting()

public YieldGroup.Builder clearTargeting()

Optional. The targeting of the YieldGroup.

optional .google.ads.admanager.v1.Targeting targeting = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
YieldGroup.Builder

getAdSources(int index)

public YieldAdSource getAdSources(int index)

Optional. The ad sources that belong to the YieldGroup.

repeated .google.ads.admanager.v1.YieldAdSource ad_sources = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
YieldAdSource

getAdSourcesBuilder(int index)

public YieldAdSource.Builder getAdSourcesBuilder(int index)

Optional. The ad sources that belong to the YieldGroup.

repeated .google.ads.admanager.v1.YieldAdSource ad_sources = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
YieldAdSource.Builder

getAdSourcesBuilderList()

public List<YieldAdSource.Builder> getAdSourcesBuilderList()

Optional. The ad sources that belong to the YieldGroup.

repeated .google.ads.admanager.v1.YieldAdSource ad_sources = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Builder>

getAdSourcesCount()

public int getAdSourcesCount()

Optional. The ad sources that belong to the YieldGroup.

repeated .google.ads.admanager.v1.YieldAdSource ad_sources = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getAdSourcesList()

public List<YieldAdSource> getAdSourcesList()

Optional. The ad sources that belong to the YieldGroup.

repeated .google.ads.admanager.v1.YieldAdSource ad_sources = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<YieldAdSource>

getAdSourcesOrBuilder(int index)

public YieldAdSourceOrBuilder getAdSourcesOrBuilder(int index)

Optional. The ad sources that belong to the YieldGroup.

repeated .google.ads.admanager.v1.YieldAdSource ad_sources = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
YieldAdSourceOrBuilder

getAdSourcesOrBuilderList()

public List<? extends YieldAdSourceOrBuilder> getAdSourcesOrBuilderList()

Optional. The ad sources that belong to the YieldGroup.

repeated .google.ads.admanager.v1.YieldAdSource ad_sources = 7 [(.google.api.field_behavior) = OPTIONAL];

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

getDefaultInstanceForType()

public YieldGroup getDefaultInstanceForType()
Returns
Type Description
YieldGroup

getDescriptorForType()

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

getDisplayName()

public String getDisplayName()

Required. The display name of the YieldGroup. This value has a maximum length of 255 characters.

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

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Required. The display name of the YieldGroup. This value has a maximum length of 255 characters.

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

Returns
Type Description
ByteString

The bytes for displayName.

getName()

public String getName()

Identifier. The resource name of the YieldGroup. Format: networks/{network_code}/yieldGroups/{yield_group_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 YieldGroup. Format: networks/{network_code}/yieldGroups/{yield_group_id}

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

Returns
Type Description
ByteString

The bytes for name.

getStatus()

public YieldEntityStatusEnum.YieldEntityStatus getStatus()

Output only. Status of the YieldGroup.

optional .google.ads.admanager.v1.YieldEntityStatusEnum.YieldEntityStatus status = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
YieldEntityStatusEnum.YieldEntityStatus

The status.

getStatusValue()

public int getStatusValue()

Output only. Status of the YieldGroup.

optional .google.ads.admanager.v1.YieldEntityStatusEnum.YieldEntityStatus status = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for status.

getTargeting()

public Targeting getTargeting()

Optional. The targeting of the YieldGroup.

optional .google.ads.admanager.v1.Targeting targeting = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Targeting

The targeting.

getTargetingBuilder()

public Targeting.Builder getTargetingBuilder()

Optional. The targeting of the YieldGroup.

optional .google.ads.admanager.v1.Targeting targeting = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Targeting.Builder

getTargetingOrBuilder()

public TargetingOrBuilder getTargetingOrBuilder()

Optional. The targeting of the YieldGroup.

optional .google.ads.admanager.v1.Targeting targeting = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
TargetingOrBuilder

hasDisplayName()

public boolean hasDisplayName()

Required. The display name of the YieldGroup. This value has a maximum length of 255 characters.

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

Returns
Type Description
boolean

Whether the displayName field is set.

hasStatus()

public boolean hasStatus()

Output only. Status of the YieldGroup.

optional .google.ads.admanager.v1.YieldEntityStatusEnum.YieldEntityStatus status = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the status field is set.

hasTargeting()

public boolean hasTargeting()

Optional. The targeting of the YieldGroup.

optional .google.ads.admanager.v1.Targeting targeting = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the targeting field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(YieldGroup other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeTargeting(Targeting value)

public YieldGroup.Builder mergeTargeting(Targeting value)

Optional. The targeting of the YieldGroup.

optional .google.ads.admanager.v1.Targeting targeting = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Targeting
Returns
Type Description
YieldGroup.Builder

removeAdSources(int index)

public YieldGroup.Builder removeAdSources(int index)

Optional. The ad sources that belong to the YieldGroup.

repeated .google.ads.admanager.v1.YieldAdSource ad_sources = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
YieldGroup.Builder

setAdSources(int index, YieldAdSource value)

public YieldGroup.Builder setAdSources(int index, YieldAdSource value)

Optional. The ad sources that belong to the YieldGroup.

repeated .google.ads.admanager.v1.YieldAdSource ad_sources = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value YieldAdSource
Returns
Type Description
YieldGroup.Builder

setAdSources(int index, YieldAdSource.Builder builderForValue)

public YieldGroup.Builder setAdSources(int index, YieldAdSource.Builder builderForValue)

Optional. The ad sources that belong to the YieldGroup.

repeated .google.ads.admanager.v1.YieldAdSource ad_sources = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue YieldAdSource.Builder
Returns
Type Description
YieldGroup.Builder

setDisplayName(String value)

public YieldGroup.Builder setDisplayName(String value)

Required. The display name of the YieldGroup. This value has a maximum length of 255 characters.

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

Parameter
Name Description
value String

The displayName to set.

Returns
Type Description
YieldGroup.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public YieldGroup.Builder setDisplayNameBytes(ByteString value)

Required. The display name of the YieldGroup. This value has a maximum length of 255 characters.

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

Parameter
Name Description
value ByteString

The bytes for displayName to set.

Returns
Type Description
YieldGroup.Builder

This builder for chaining.

setName(String value)

public YieldGroup.Builder setName(String value)

Identifier. The resource name of the YieldGroup. Format: networks/{network_code}/yieldGroups/{yield_group_id}

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

Parameter
Name Description
value String

The name to set.

Returns
Type Description
YieldGroup.Builder

This builder for chaining.

setNameBytes(ByteString value)

public YieldGroup.Builder setNameBytes(ByteString value)

Identifier. The resource name of the YieldGroup. Format: networks/{network_code}/yieldGroups/{yield_group_id}

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

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
YieldGroup.Builder

This builder for chaining.

setStatus(YieldEntityStatusEnum.YieldEntityStatus value)

public YieldGroup.Builder setStatus(YieldEntityStatusEnum.YieldEntityStatus value)

Output only. Status of the YieldGroup.

optional .google.ads.admanager.v1.YieldEntityStatusEnum.YieldEntityStatus status = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value YieldEntityStatusEnum.YieldEntityStatus

The status to set.

Returns
Type Description
YieldGroup.Builder

This builder for chaining.

setStatusValue(int value)

public YieldGroup.Builder setStatusValue(int value)

Output only. Status of the YieldGroup.

optional .google.ads.admanager.v1.YieldEntityStatusEnum.YieldEntityStatus status = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value int

The enum numeric value on the wire for status to set.

Returns
Type Description
YieldGroup.Builder

This builder for chaining.

setTargeting(Targeting value)

public YieldGroup.Builder setTargeting(Targeting value)

Optional. The targeting of the YieldGroup.

optional .google.ads.admanager.v1.Targeting targeting = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Targeting
Returns
Type Description
YieldGroup.Builder

setTargeting(Targeting.Builder builderForValue)

public YieldGroup.Builder setTargeting(Targeting.Builder builderForValue)

Optional. The targeting of the YieldGroup.

optional .google.ads.admanager.v1.Targeting targeting = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue Targeting.Builder
Returns
Type Description
YieldGroup.Builder