Class GoogleAdsLink.Builder (0.20.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.v1beta.GoogleAdsLink

Static Methods

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

public GoogleAdsLink.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
GoogleAdsLink.Builder
Overrides
public GoogleAdsLink build()
Returns
TypeDescription
GoogleAdsLink
public GoogleAdsLink buildPartial()
Returns
TypeDescription
GoogleAdsLink
public GoogleAdsLink.Builder clear()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
GoogleAdsLink.Builder

This builder for chaining.

public GoogleAdsLink.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
GoogleAdsLink.Builder

This builder for chaining.

public GoogleAdsLink.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
GoogleAdsLink.Builder
public GoogleAdsLink.Builder clone()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for creatorEmailAddress.

public String getCustomerId()

Immutable. Google Ads customer ID.

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

Returns
TypeDescription
String

The customerId.

public ByteString getCustomerIdBytes()

Immutable. Google Ads customer ID.

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

Returns
TypeDescription
ByteString

The bytes for customerId.

public GoogleAdsLink getDefaultInstanceForType()
Returns
TypeDescription
GoogleAdsLink
public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the updateTime field is set.

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides
public final boolean isInitialized()
Returns
TypeDescription
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
NameDescription
valueBoolValue
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
GoogleAdsLink.Builder
public GoogleAdsLink.Builder mergeFrom(GoogleAdsLink other)
Parameter
NameDescription
otherGoogleAdsLink
Returns
TypeDescription
GoogleAdsLink.Builder
public GoogleAdsLink.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
GoogleAdsLink.Builder
Overrides Exceptions
TypeDescription
IOException
public GoogleAdsLink.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
GoogleAdsLink.Builder
Overrides
public final GoogleAdsLink.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
valueBoolValue
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
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
NameDescription
valueboolean

The canManageClients to set.

Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
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
NameDescription
valueString

The creatorEmailAddress to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for creatorEmailAddress to set.

Returns
TypeDescription
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
NameDescription
valueString

The customerId to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for customerId to set.

Returns
TypeDescription
GoogleAdsLink.Builder

This builder for chaining.

public GoogleAdsLink.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The name to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
GoogleAdsLink.Builder

This builder for chaining.

public GoogleAdsLink.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
GoogleAdsLink.Builder
Overrides
public final GoogleAdsLink.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
GoogleAdsLink.Builder