Class AdSenseLink.Builder (0.62.0)

public static final class AdSenseLink.Builder extends GeneratedMessageV3.Builder<AdSenseLink.Builder> implements AdSenseLinkOrBuilder

A link between a GA4 Property and an AdSense for Content ad client.

Protobuf type google.analytics.admin.v1alpha.AdSenseLink

Static Methods

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

Methods

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

Immutable. The AdSense ad client code that the GA4 property is linked to. Example format: "ca-pub-1234567890"

string ad_client_code = 2 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
AdSenseLink.Builder

This builder for chaining.

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

Output only. The resource name for this AdSense Link resource. Format: properties/{propertyId}/adSenseLinks/{linkId} Example: properties/1234/adSenseLinks/6789

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

Returns
Type Description
AdSenseLink.Builder

This builder for chaining.

public AdSenseLink.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
AdSenseLink.Builder
Overrides
public AdSenseLink.Builder clone()
Returns
Type Description
AdSenseLink.Builder
Overrides
public String getAdClientCode()

Immutable. The AdSense ad client code that the GA4 property is linked to. Example format: "ca-pub-1234567890"

string ad_client_code = 2 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
String

The adClientCode.

public ByteString getAdClientCodeBytes()

Immutable. The AdSense ad client code that the GA4 property is linked to. Example format: "ca-pub-1234567890"

string ad_client_code = 2 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ByteString

The bytes for adClientCode.

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

Output only. The resource name for this AdSense Link resource. Format: properties/{propertyId}/adSenseLinks/{linkId} Example: properties/1234/adSenseLinks/6789

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

Returns
Type Description
String

The name.

public ByteString getNameBytes()

Output only. The resource name for this AdSense Link resource. Format: properties/{propertyId}/adSenseLinks/{linkId} Example: properties/1234/adSenseLinks/6789

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

Returns
Type Description
ByteString

The bytes for name.

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides
public final boolean isInitialized()
Returns
Type Description
boolean
Overrides
public AdSenseLink.Builder mergeFrom(AdSenseLink other)
Parameter
Name Description
other AdSenseLink
Returns
Type Description
AdSenseLink.Builder
public AdSenseLink.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AdSenseLink.Builder
Overrides
Exceptions
Type Description
IOException
public AdSenseLink.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
AdSenseLink.Builder
Overrides
public final AdSenseLink.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
AdSenseLink.Builder
Overrides
public AdSenseLink.Builder setAdClientCode(String value)

Immutable. The AdSense ad client code that the GA4 property is linked to. Example format: "ca-pub-1234567890"

string ad_client_code = 2 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value String

The adClientCode to set.

Returns
Type Description
AdSenseLink.Builder

This builder for chaining.

public AdSenseLink.Builder setAdClientCodeBytes(ByteString value)

Immutable. The AdSense ad client code that the GA4 property is linked to. Example format: "ca-pub-1234567890"

string ad_client_code = 2 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value ByteString

The bytes for adClientCode to set.

Returns
Type Description
AdSenseLink.Builder

This builder for chaining.

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

Output only. The resource name for this AdSense Link resource. Format: properties/{propertyId}/adSenseLinks/{linkId} Example: properties/1234/adSenseLinks/6789

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

Parameter
Name Description
value String

The name to set.

Returns
Type Description
AdSenseLink.Builder

This builder for chaining.

public AdSenseLink.Builder setNameBytes(ByteString value)

Output only. The resource name for this AdSense Link resource. Format: properties/{propertyId}/adSenseLinks/{linkId} Example: properties/1234/adSenseLinks/6789

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

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
AdSenseLink.Builder

This builder for chaining.

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