Class Consent.Builder (0.1.0)

public static final class Consent.Builder extends GeneratedMessageV3.Builder<Consent.Builder> implements ConsentOrBuilder

Digital Markets Act (DMA) consent settings for the user.

Protobuf type google.ads.datamanager.v1.Consent

Implements

ConsentOrBuilder

Static Methods

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

Methods

public Consent.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Consent.Builder
Overrides
public Consent build()
Returns
Type Description
Consent
public Consent buildPartial()
Returns
Type Description
Consent
public Consent.Builder clear()
Returns
Type Description
Consent.Builder
Overrides
public Consent.Builder clearAdPersonalization()

Optional. Represents if the user consents to ad personalization.

.google.ads.datamanager.v1.ConsentStatus ad_personalization = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Consent.Builder

This builder for chaining.

public Consent.Builder clearAdUserData()

Optional. Represents if the user consents to ad user data.

.google.ads.datamanager.v1.ConsentStatus ad_user_data = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Consent.Builder

This builder for chaining.

public Consent.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Consent.Builder
Overrides
public Consent.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Consent.Builder
Overrides
public Consent.Builder clone()
Returns
Type Description
Consent.Builder
Overrides
public ConsentStatus getAdPersonalization()

Optional. Represents if the user consents to ad personalization.

.google.ads.datamanager.v1.ConsentStatus ad_personalization = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ConsentStatus

The adPersonalization.

public int getAdPersonalizationValue()

Optional. Represents if the user consents to ad personalization.

.google.ads.datamanager.v1.ConsentStatus ad_personalization = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for adPersonalization.

public ConsentStatus getAdUserData()

Optional. Represents if the user consents to ad user data.

.google.ads.datamanager.v1.ConsentStatus ad_user_data = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ConsentStatus

The adUserData.

public int getAdUserDataValue()

Optional. Represents if the user consents to ad user data.

.google.ads.datamanager.v1.ConsentStatus ad_user_data = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for adUserData.

public Consent getDefaultInstanceForType()
Returns
Type Description
Consent
public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides
public final boolean isInitialized()
Returns
Type Description
boolean
Overrides
public Consent.Builder mergeFrom(Consent other)
Parameter
Name Description
other Consent
Returns
Type Description
Consent.Builder
public Consent.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Consent.Builder
Overrides
Exceptions
Type Description
IOException
public Consent.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Consent.Builder
Overrides
public final Consent.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Consent.Builder
Overrides
public Consent.Builder setAdPersonalization(ConsentStatus value)

Optional. Represents if the user consents to ad personalization.

.google.ads.datamanager.v1.ConsentStatus ad_personalization = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ConsentStatus

The adPersonalization to set.

Returns
Type Description
Consent.Builder

This builder for chaining.

public Consent.Builder setAdPersonalizationValue(int value)

Optional. Represents if the user consents to ad personalization.

.google.ads.datamanager.v1.ConsentStatus ad_personalization = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

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

Returns
Type Description
Consent.Builder

This builder for chaining.

public Consent.Builder setAdUserData(ConsentStatus value)

Optional. Represents if the user consents to ad user data.

.google.ads.datamanager.v1.ConsentStatus ad_user_data = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ConsentStatus

The adUserData to set.

Returns
Type Description
Consent.Builder

This builder for chaining.

public Consent.Builder setAdUserDataValue(int value)

Optional. Represents if the user consents to ad user data.

.google.ads.datamanager.v1.ConsentStatus ad_user_data = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

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

Returns
Type Description
Consent.Builder

This builder for chaining.

public Consent.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Consent.Builder
Overrides
public Consent.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Consent.Builder
Overrides
public final Consent.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Consent.Builder
Overrides