Class AdPartnerDeclaration.Builder (0.5.0)

public static final class AdPartnerDeclaration.Builder extends GeneratedMessageV3.Builder<AdPartnerDeclaration.Builder> implements AdPartnerDeclarationOrBuilder

Represents a set of declarations about what (if any) ad partners are associated with a given creative. This can be set at the network level, as a default for all creatives, or overridden for a particular creative.

Protobuf type google.ads.admanager.v1.AdPartnerDeclaration

Static Methods

getDescriptor()

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

Methods

addAdPartners(String value)

public AdPartnerDeclaration.Builder addAdPartners(String value)

The resource names of AdPartners being declared. Format: "networks/{network_code}/adPartners/{ad_partner_id}"

repeated string ad_partners = 2 [(.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The adPartners to add.

Returns
Type Description
AdPartnerDeclaration.Builder

This builder for chaining.

addAdPartnersBytes(ByteString value)

public AdPartnerDeclaration.Builder addAdPartnersBytes(ByteString value)

The resource names of AdPartners being declared. Format: "networks/{network_code}/adPartners/{ad_partner_id}"

repeated string ad_partners = 2 [(.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes of the adPartners to add.

Returns
Type Description
AdPartnerDeclaration.Builder

This builder for chaining.

addAllAdPartners(Iterable<String> values)

public AdPartnerDeclaration.Builder addAllAdPartners(Iterable<String> values)

The resource names of AdPartners being declared. Format: "networks/{network_code}/adPartners/{ad_partner_id}"

repeated string ad_partners = 2 [(.google.api.resource_reference) = { ... }

Parameter
Name Description
values Iterable<String>

The adPartners to add.

Returns
Type Description
AdPartnerDeclaration.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public AdPartnerDeclaration.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
AdPartnerDeclaration.Builder
Overrides

build()

public AdPartnerDeclaration build()
Returns
Type Description
AdPartnerDeclaration

buildPartial()

public AdPartnerDeclaration buildPartial()
Returns
Type Description
AdPartnerDeclaration

clear()

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

clearAdPartners()

public AdPartnerDeclaration.Builder clearAdPartners()

The resource names of AdPartners being declared. Format: "networks/{network_code}/adPartners/{ad_partner_id}"

repeated string ad_partners = 2 [(.google.api.resource_reference) = { ... }

Returns
Type Description
AdPartnerDeclaration.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public AdPartnerDeclaration.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
AdPartnerDeclaration.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public AdPartnerDeclaration.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
AdPartnerDeclaration.Builder
Overrides

clearType()

public AdPartnerDeclaration.Builder clearType()

They type of declaration.

.google.ads.admanager.v1.DeclarationTypeEnum.DeclarationType type = 1;

Returns
Type Description
AdPartnerDeclaration.Builder

This builder for chaining.

clone()

public AdPartnerDeclaration.Builder clone()
Returns
Type Description
AdPartnerDeclaration.Builder
Overrides

getAdPartners(int index)

public String getAdPartners(int index)

The resource names of AdPartners being declared. Format: "networks/{network_code}/adPartners/{ad_partner_id}"

repeated string ad_partners = 2 [(.google.api.resource_reference) = { ... }

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The adPartners at the given index.

getAdPartnersBytes(int index)

public ByteString getAdPartnersBytes(int index)

The resource names of AdPartners being declared. Format: "networks/{network_code}/adPartners/{ad_partner_id}"

repeated string ad_partners = 2 [(.google.api.resource_reference) = { ... }

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the adPartners at the given index.

getAdPartnersCount()

public int getAdPartnersCount()

The resource names of AdPartners being declared. Format: "networks/{network_code}/adPartners/{ad_partner_id}"

repeated string ad_partners = 2 [(.google.api.resource_reference) = { ... }

Returns
Type Description
int

The count of adPartners.

getAdPartnersList()

public ProtocolStringList getAdPartnersList()

The resource names of AdPartners being declared. Format: "networks/{network_code}/adPartners/{ad_partner_id}"

repeated string ad_partners = 2 [(.google.api.resource_reference) = { ... }

Returns
Type Description
ProtocolStringList

A list containing the adPartners.

getDefaultInstanceForType()

public AdPartnerDeclaration getDefaultInstanceForType()
Returns
Type Description
AdPartnerDeclaration

getDescriptorForType()

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

getType()

public DeclarationTypeEnum.DeclarationType getType()

They type of declaration.

.google.ads.admanager.v1.DeclarationTypeEnum.DeclarationType type = 1;

Returns
Type Description
DeclarationTypeEnum.DeclarationType

The type.

getTypeValue()

public int getTypeValue()

They type of declaration.

.google.ads.admanager.v1.DeclarationTypeEnum.DeclarationType type = 1;

Returns
Type Description
int

The enum numeric value on the wire for type.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(AdPartnerDeclaration other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final AdPartnerDeclaration.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
AdPartnerDeclaration.Builder
Overrides

setAdPartners(int index, String value)

public AdPartnerDeclaration.Builder setAdPartners(int index, String value)

The resource names of AdPartners being declared. Format: "networks/{network_code}/adPartners/{ad_partner_id}"

repeated string ad_partners = 2 [(.google.api.resource_reference) = { ... }

Parameters
Name Description
index int

The index to set the value at.

value String

The adPartners to set.

Returns
Type Description
AdPartnerDeclaration.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public AdPartnerDeclaration.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
AdPartnerDeclaration.Builder
Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public AdPartnerDeclaration.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
AdPartnerDeclaration.Builder
Overrides

setType(DeclarationTypeEnum.DeclarationType value)

public AdPartnerDeclaration.Builder setType(DeclarationTypeEnum.DeclarationType value)

They type of declaration.

.google.ads.admanager.v1.DeclarationTypeEnum.DeclarationType type = 1;

Parameter
Name Description
value DeclarationTypeEnum.DeclarationType

The type to set.

Returns
Type Description
AdPartnerDeclaration.Builder

This builder for chaining.

setTypeValue(int value)

public AdPartnerDeclaration.Builder setTypeValue(int value)

They type of declaration.

.google.ads.admanager.v1.DeclarationTypeEnum.DeclarationType type = 1;

Parameter
Name Description
value int

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

Returns
Type Description
AdPartnerDeclaration.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final AdPartnerDeclaration.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
AdPartnerDeclaration.Builder
Overrides