Class GoogleAdsLink.Builder (0.57.0)

public static final class GoogleAdsLink.Builder extends GeneratedMessageV3.Builder<GoogleAdsLink.Builder> implements GoogleAdsLinkOrBuilder

A link between a GA4 property and a Google Ads account.

Protobuf type google.analytics.admin.v1alpha.GoogleAdsLink

Static Methods

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

Methods

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

Enable personalized advertising features with this integration. Automatically publish my Google Analytics audience lists and Google Analytics remarketing events/parameters to the linked Google Ads account. If this field is not set on create/update, it will be defaulted to true.

.google.protobuf.BoolValue ads_personalization_enabled = 5;

Returns
Type Description
GoogleAdsLink.Builder
public GoogleAdsLink.Builder clearCanManageClients()

Output only. If true, this link is for a Google Ads manager account.

bool can_manage_clients = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
GoogleAdsLink.Builder

This builder for chaining.

public GoogleAdsLink.Builder clearCreateTime()

Output only. Time when this link was originally created.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
GoogleAdsLink.Builder
public GoogleAdsLink.Builder clearCreatorEmailAddress()

Output only. Email address of the user that created the link. An empty string will be returned if the email address can't be retrieved.

string creator_email_address = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
GoogleAdsLink.Builder

This builder for chaining.

public GoogleAdsLink.Builder clearCustomerId()

Immutable. Google Ads customer ID.

string customer_id = 3 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
GoogleAdsLink.Builder

This builder for chaining.

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

Output only. Format: properties/{propertyId}/googleAdsLinks/{googleAdsLinkId}

Note: googleAdsLinkId is not the Google Ads customer ID.

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

Returns
Type Description
GoogleAdsLink.Builder

This builder for chaining.

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

Output only. Time when this link was last updated.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
GoogleAdsLink.Builder
public GoogleAdsLink.Builder clone()
Returns
Type Description
GoogleAdsLink.Builder
Overrides
public BoolValue getAdsPersonalizationEnabled()

Enable personalized advertising features with this integration. Automatically publish my Google Analytics audience lists and Google Analytics remarketing events/parameters to the linked Google Ads account. If this field is not set on create/update, it will be defaulted to true.

.google.protobuf.BoolValue ads_personalization_enabled = 5;

Returns
Type Description
BoolValue

The adsPersonalizationEnabled.

public BoolValue.Builder getAdsPersonalizationEnabledBuilder()

Enable personalized advertising features with this integration. Automatically publish my Google Analytics audience lists and Google Analytics remarketing events/parameters to the linked Google Ads account. If this field is not set on create/update, it will be defaulted to true.

.google.protobuf.BoolValue ads_personalization_enabled = 5;

Returns
Type Description
Builder
public BoolValueOrBuilder getAdsPersonalizationEnabledOrBuilder()

Enable personalized advertising features with this integration. Automatically publish my Google Analytics audience lists and Google Analytics remarketing events/parameters to the linked Google Ads account. If this field is not set on create/update, it will be defaulted to true.

.google.protobuf.BoolValue ads_personalization_enabled = 5;

Returns
Type Description
BoolValueOrBuilder
public boolean getCanManageClients()

Output only. If true, this link is for a Google Ads manager account.

bool can_manage_clients = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

The canManageClients.

public Timestamp getCreateTime()

Output only. Time when this link was originally created.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The createTime.

public Timestamp.Builder getCreateTimeBuilder()

Output only. Time when this link was originally created.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder
public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. Time when this link was originally created.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder
public String getCreatorEmailAddress()

Output only. Email address of the user that created the link. An empty string will be returned if the email address can't be retrieved.

string creator_email_address = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The creatorEmailAddress.

public ByteString getCreatorEmailAddressBytes()

Output only. Email address of the user that created the link. An empty string will be returned if the email address can't be retrieved.

string creator_email_address = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for creatorEmailAddress.

public String getCustomerId()

Immutable. Google Ads customer ID.

string customer_id = 3 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
String

The customerId.

public ByteString getCustomerIdBytes()

Immutable. Google Ads customer ID.

string customer_id = 3 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ByteString

The bytes for customerId.

public GoogleAdsLink getDefaultInstanceForType()
Returns
Type Description
GoogleAdsLink
public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides
public String getName()

Output only. Format: properties/{propertyId}/googleAdsLinks/{googleAdsLinkId}

Note: googleAdsLinkId is not the Google Ads customer ID.

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

Returns
Type Description
String

The name.

public ByteString getNameBytes()

Output only. Format: properties/{propertyId}/googleAdsLinks/{googleAdsLinkId}

Note: googleAdsLinkId is not the Google Ads customer ID.

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

Returns
Type Description
ByteString

The bytes for name.

public Timestamp getUpdateTime()

Output only. Time when this link was last updated.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The updateTime.

public Timestamp.Builder getUpdateTimeBuilder()

Output only. Time when this link was last updated.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder
public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. Time when this link was last updated.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder
public boolean hasAdsPersonalizationEnabled()

Enable personalized advertising features with this integration. Automatically publish my Google Analytics audience lists and Google Analytics remarketing events/parameters to the linked Google Ads account. If this field is not set on create/update, it will be defaulted to true.

.google.protobuf.BoolValue ads_personalization_enabled = 5;

Returns
Type Description
boolean

Whether the adsPersonalizationEnabled field is set.

public boolean hasCreateTime()

Output only. Time when this link was originally created.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the createTime field is set.

public boolean hasUpdateTime()

Output only. Time when this link was last updated.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the updateTime field is set.

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides
public final boolean isInitialized()
Returns
Type Description
boolean
Overrides
public GoogleAdsLink.Builder mergeAdsPersonalizationEnabled(BoolValue value)

Enable personalized advertising features with this integration. Automatically publish my Google Analytics audience lists and Google Analytics remarketing events/parameters to the linked Google Ads account. If this field is not set on create/update, it will be defaulted to true.

.google.protobuf.BoolValue ads_personalization_enabled = 5;

Parameter
Name Description
value BoolValue
Returns
Type Description
GoogleAdsLink.Builder
public GoogleAdsLink.Builder mergeCreateTime(Timestamp value)

Output only. Time when this link was originally created.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
GoogleAdsLink.Builder
public GoogleAdsLink.Builder mergeFrom(GoogleAdsLink other)
Parameter
Name Description
other GoogleAdsLink
Returns
Type Description
GoogleAdsLink.Builder
public GoogleAdsLink.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
GoogleAdsLink.Builder
Overrides
Exceptions
Type Description
IOException
public GoogleAdsLink.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
GoogleAdsLink.Builder
Overrides
public final GoogleAdsLink.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
GoogleAdsLink.Builder
Overrides
public GoogleAdsLink.Builder mergeUpdateTime(Timestamp value)

Output only. Time when this link was last updated.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
GoogleAdsLink.Builder
public GoogleAdsLink.Builder setAdsPersonalizationEnabled(BoolValue value)

Enable personalized advertising features with this integration. Automatically publish my Google Analytics audience lists and Google Analytics remarketing events/parameters to the linked Google Ads account. If this field is not set on create/update, it will be defaulted to true.

.google.protobuf.BoolValue ads_personalization_enabled = 5;

Parameter
Name Description
value BoolValue
Returns
Type Description
GoogleAdsLink.Builder
public GoogleAdsLink.Builder setAdsPersonalizationEnabled(BoolValue.Builder builderForValue)

Enable personalized advertising features with this integration. Automatically publish my Google Analytics audience lists and Google Analytics remarketing events/parameters to the linked Google Ads account. If this field is not set on create/update, it will be defaulted to true.

.google.protobuf.BoolValue ads_personalization_enabled = 5;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
GoogleAdsLink.Builder
public GoogleAdsLink.Builder setCanManageClients(boolean value)

Output only. If true, this link is for a Google Ads manager account.

bool can_manage_clients = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value boolean

The canManageClients to set.

Returns
Type Description
GoogleAdsLink.Builder

This builder for chaining.

public GoogleAdsLink.Builder setCreateTime(Timestamp value)

Output only. Time when this link was originally created.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
GoogleAdsLink.Builder
public GoogleAdsLink.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. Time when this link was originally created.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
GoogleAdsLink.Builder
public GoogleAdsLink.Builder setCreatorEmailAddress(String value)

Output only. Email address of the user that created the link. An empty string will be returned if the email address can't be retrieved.

string creator_email_address = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The creatorEmailAddress to set.

Returns
Type Description
GoogleAdsLink.Builder

This builder for chaining.

public GoogleAdsLink.Builder setCreatorEmailAddressBytes(ByteString value)

Output only. Email address of the user that created the link. An empty string will be returned if the email address can't be retrieved.

string creator_email_address = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for creatorEmailAddress to set.

Returns
Type Description
GoogleAdsLink.Builder

This builder for chaining.

public GoogleAdsLink.Builder setCustomerId(String value)

Immutable. Google Ads customer ID.

string customer_id = 3 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value String

The customerId to set.

Returns
Type Description
GoogleAdsLink.Builder

This builder for chaining.

public GoogleAdsLink.Builder setCustomerIdBytes(ByteString value)

Immutable. Google Ads customer ID.

string customer_id = 3 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value ByteString

The bytes for customerId to set.

Returns
Type Description
GoogleAdsLink.Builder

This builder for chaining.

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

Output only. Format: properties/{propertyId}/googleAdsLinks/{googleAdsLinkId}

Note: googleAdsLinkId is not the Google Ads customer ID.

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

Parameter
Name Description
value String

The name to set.

Returns
Type Description
GoogleAdsLink.Builder

This builder for chaining.

public GoogleAdsLink.Builder setNameBytes(ByteString value)

Output only. Format: properties/{propertyId}/googleAdsLinks/{googleAdsLinkId}

Note: googleAdsLinkId is not the Google Ads customer ID.

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

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
GoogleAdsLink.Builder

This builder for chaining.

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

Output only. Time when this link was last updated.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
GoogleAdsLink.Builder
public GoogleAdsLink.Builder setUpdateTime(Timestamp.Builder builderForValue)

Output only. Time when this link was last updated.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
GoogleAdsLink.Builder