Class Audience.Builder (0.53.0)

public static final class Audience.Builder extends GeneratedMessageV3.Builder<Audience.Builder> implements AudienceOrBuilder

A resource message representing a GA4 Audience.

Protobuf type google.analytics.admin.v1alpha.Audience

Implements

AudienceOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllFilterClauses(Iterable<? extends AudienceFilterClause> values)

public Audience.Builder addAllFilterClauses(Iterable<? extends AudienceFilterClause> values)

Required. Immutable. Unordered list. Filter clauses that define the Audience. All clauses will be AND’ed together.

repeated .google.analytics.admin.v1alpha.AudienceFilterClause filter_clauses = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST];

Parameter
Name Description
values Iterable<? extends com.google.analytics.admin.v1alpha.AudienceFilterClause>
Returns
Type Description
Audience.Builder

addFilterClauses(AudienceFilterClause value)

public Audience.Builder addFilterClauses(AudienceFilterClause value)

Required. Immutable. Unordered list. Filter clauses that define the Audience. All clauses will be AND’ed together.

repeated .google.analytics.admin.v1alpha.AudienceFilterClause filter_clauses = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST];

Parameter
Name Description
value AudienceFilterClause
Returns
Type Description
Audience.Builder

addFilterClauses(AudienceFilterClause.Builder builderForValue)

public Audience.Builder addFilterClauses(AudienceFilterClause.Builder builderForValue)

Required. Immutable. Unordered list. Filter clauses that define the Audience. All clauses will be AND’ed together.

repeated .google.analytics.admin.v1alpha.AudienceFilterClause filter_clauses = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST];

Parameter
Name Description
builderForValue AudienceFilterClause.Builder
Returns
Type Description
Audience.Builder

addFilterClauses(int index, AudienceFilterClause value)

public Audience.Builder addFilterClauses(int index, AudienceFilterClause value)

Required. Immutable. Unordered list. Filter clauses that define the Audience. All clauses will be AND’ed together.

repeated .google.analytics.admin.v1alpha.AudienceFilterClause filter_clauses = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST];

Parameters
Name Description
index int
value AudienceFilterClause
Returns
Type Description
Audience.Builder

addFilterClauses(int index, AudienceFilterClause.Builder builderForValue)

public Audience.Builder addFilterClauses(int index, AudienceFilterClause.Builder builderForValue)

Required. Immutable. Unordered list. Filter clauses that define the Audience. All clauses will be AND’ed together.

repeated .google.analytics.admin.v1alpha.AudienceFilterClause filter_clauses = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST];

Parameters
Name Description
index int
builderForValue AudienceFilterClause.Builder
Returns
Type Description
Audience.Builder

addFilterClausesBuilder()

public AudienceFilterClause.Builder addFilterClausesBuilder()

Required. Immutable. Unordered list. Filter clauses that define the Audience. All clauses will be AND’ed together.

repeated .google.analytics.admin.v1alpha.AudienceFilterClause filter_clauses = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST];

Returns
Type Description
AudienceFilterClause.Builder

addFilterClausesBuilder(int index)

public AudienceFilterClause.Builder addFilterClausesBuilder(int index)

Required. Immutable. Unordered list. Filter clauses that define the Audience. All clauses will be AND’ed together.

repeated .google.analytics.admin.v1alpha.AudienceFilterClause filter_clauses = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST];

Parameter
Name Description
index int
Returns
Type Description
AudienceFilterClause.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Audience build()
Returns
Type Description
Audience

buildPartial()

public Audience buildPartial()
Returns
Type Description
Audience

clear()

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

clearAdsPersonalizationEnabled()

public Audience.Builder clearAdsPersonalizationEnabled()

Output only. It is automatically set by GA to false if this is an NPA Audience and is excluded from ads personalization.

bool ads_personalization_enabled = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Audience.Builder

This builder for chaining.

clearDescription()

public Audience.Builder clearDescription()

Required. The description of the Audience.

string description = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Audience.Builder

This builder for chaining.

clearDisplayName()

public Audience.Builder clearDisplayName()

Required. The display name of the Audience.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Audience.Builder

This builder for chaining.

clearEventTrigger()

public Audience.Builder clearEventTrigger()

Optional. Specifies an event to log when a user joins the Audience. If not set, no event is logged when a user joins the Audience.

.google.analytics.admin.v1alpha.AudienceEventTrigger event_trigger = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Audience.Builder

clearExclusionDurationMode()

public Audience.Builder clearExclusionDurationMode()

Immutable. Specifies how long an exclusion lasts for users that meet the exclusion filter. It is applied to all EXCLUDE filter clauses and is ignored when there is no EXCLUDE filter clause in the Audience.

.google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode exclusion_duration_mode = 7 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
Audience.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearFilterClauses()

public Audience.Builder clearFilterClauses()

Required. Immutable. Unordered list. Filter clauses that define the Audience. All clauses will be AND’ed together.

repeated .google.analytics.admin.v1alpha.AudienceFilterClause filter_clauses = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST];

Returns
Type Description
Audience.Builder

clearMembershipDurationDays()

public Audience.Builder clearMembershipDurationDays()

Required. Immutable. The duration a user should stay in an Audience. It cannot be set to more than 540 days.

int32 membership_duration_days = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
Audience.Builder

This builder for chaining.

clearName()

public Audience.Builder clearName()

Output only. The resource name for this Audience resource. Format: properties/{propertyId}/audiences/{audienceId}

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

Returns
Type Description
Audience.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

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

getAdsPersonalizationEnabled()

public boolean getAdsPersonalizationEnabled()

Output only. It is automatically set by GA to false if this is an NPA Audience and is excluded from ads personalization.

bool ads_personalization_enabled = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

The adsPersonalizationEnabled.

getDefaultInstanceForType()

public Audience getDefaultInstanceForType()
Returns
Type Description
Audience

getDescription()

public String getDescription()

Required. The description of the Audience.

string description = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Required. The description of the Audience.

string description = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for description.

getDescriptorForType()

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

getDisplayName()

public String getDisplayName()

Required. The display name of the Audience.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Required. The display name of the Audience.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for displayName.

getEventTrigger()

public AudienceEventTrigger getEventTrigger()

Optional. Specifies an event to log when a user joins the Audience. If not set, no event is logged when a user joins the Audience.

.google.analytics.admin.v1alpha.AudienceEventTrigger event_trigger = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AudienceEventTrigger

The eventTrigger.

getEventTriggerBuilder()

public AudienceEventTrigger.Builder getEventTriggerBuilder()

Optional. Specifies an event to log when a user joins the Audience. If not set, no event is logged when a user joins the Audience.

.google.analytics.admin.v1alpha.AudienceEventTrigger event_trigger = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AudienceEventTrigger.Builder

getEventTriggerOrBuilder()

public AudienceEventTriggerOrBuilder getEventTriggerOrBuilder()

Optional. Specifies an event to log when a user joins the Audience. If not set, no event is logged when a user joins the Audience.

.google.analytics.admin.v1alpha.AudienceEventTrigger event_trigger = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AudienceEventTriggerOrBuilder

getExclusionDurationMode()

public Audience.AudienceExclusionDurationMode getExclusionDurationMode()

Immutable. Specifies how long an exclusion lasts for users that meet the exclusion filter. It is applied to all EXCLUDE filter clauses and is ignored when there is no EXCLUDE filter clause in the Audience.

.google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode exclusion_duration_mode = 7 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
Audience.AudienceExclusionDurationMode

The exclusionDurationMode.

getExclusionDurationModeValue()

public int getExclusionDurationModeValue()

Immutable. Specifies how long an exclusion lasts for users that meet the exclusion filter. It is applied to all EXCLUDE filter clauses and is ignored when there is no EXCLUDE filter clause in the Audience.

.google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode exclusion_duration_mode = 7 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
int

The enum numeric value on the wire for exclusionDurationMode.

getFilterClauses(int index)

public AudienceFilterClause getFilterClauses(int index)

Required. Immutable. Unordered list. Filter clauses that define the Audience. All clauses will be AND’ed together.

repeated .google.analytics.admin.v1alpha.AudienceFilterClause filter_clauses = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST];

Parameter
Name Description
index int
Returns
Type Description
AudienceFilterClause

getFilterClausesBuilder(int index)

public AudienceFilterClause.Builder getFilterClausesBuilder(int index)

Required. Immutable. Unordered list. Filter clauses that define the Audience. All clauses will be AND’ed together.

repeated .google.analytics.admin.v1alpha.AudienceFilterClause filter_clauses = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST];

Parameter
Name Description
index int
Returns
Type Description
AudienceFilterClause.Builder

getFilterClausesBuilderList()

public List<AudienceFilterClause.Builder> getFilterClausesBuilderList()

Required. Immutable. Unordered list. Filter clauses that define the Audience. All clauses will be AND’ed together.

repeated .google.analytics.admin.v1alpha.AudienceFilterClause filter_clauses = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST];

Returns
Type Description
List<Builder>

getFilterClausesCount()

public int getFilterClausesCount()

Required. Immutable. Unordered list. Filter clauses that define the Audience. All clauses will be AND’ed together.

repeated .google.analytics.admin.v1alpha.AudienceFilterClause filter_clauses = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST];

Returns
Type Description
int

getFilterClausesList()

public List<AudienceFilterClause> getFilterClausesList()

Required. Immutable. Unordered list. Filter clauses that define the Audience. All clauses will be AND’ed together.

repeated .google.analytics.admin.v1alpha.AudienceFilterClause filter_clauses = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST];

Returns
Type Description
List<AudienceFilterClause>

getFilterClausesOrBuilder(int index)

public AudienceFilterClauseOrBuilder getFilterClausesOrBuilder(int index)

Required. Immutable. Unordered list. Filter clauses that define the Audience. All clauses will be AND’ed together.

repeated .google.analytics.admin.v1alpha.AudienceFilterClause filter_clauses = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST];

Parameter
Name Description
index int
Returns
Type Description
AudienceFilterClauseOrBuilder

getFilterClausesOrBuilderList()

public List<? extends AudienceFilterClauseOrBuilder> getFilterClausesOrBuilderList()

Required. Immutable. Unordered list. Filter clauses that define the Audience. All clauses will be AND’ed together.

repeated .google.analytics.admin.v1alpha.AudienceFilterClause filter_clauses = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST];

Returns
Type Description
List<? extends com.google.analytics.admin.v1alpha.AudienceFilterClauseOrBuilder>

getMembershipDurationDays()

public int getMembershipDurationDays()

Required. Immutable. The duration a user should stay in an Audience. It cannot be set to more than 540 days.

int32 membership_duration_days = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
int

The membershipDurationDays.

getName()

public String getName()

Output only. The resource name for this Audience resource. Format: properties/{propertyId}/audiences/{audienceId}

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

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Output only. The resource name for this Audience resource. Format: properties/{propertyId}/audiences/{audienceId}

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

Returns
Type Description
ByteString

The bytes for name.

hasEventTrigger()

public boolean hasEventTrigger()

Optional. Specifies an event to log when a user joins the Audience. If not set, no event is logged when a user joins the Audience.

.google.analytics.admin.v1alpha.AudienceEventTrigger event_trigger = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the eventTrigger field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeEventTrigger(AudienceEventTrigger value)

public Audience.Builder mergeEventTrigger(AudienceEventTrigger value)

Optional. Specifies an event to log when a user joins the Audience. If not set, no event is logged when a user joins the Audience.

.google.analytics.admin.v1alpha.AudienceEventTrigger event_trigger = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value AudienceEventTrigger
Returns
Type Description
Audience.Builder

mergeFrom(Audience other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeFilterClauses(int index)

public Audience.Builder removeFilterClauses(int index)

Required. Immutable. Unordered list. Filter clauses that define the Audience. All clauses will be AND’ed together.

repeated .google.analytics.admin.v1alpha.AudienceFilterClause filter_clauses = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST];

Parameter
Name Description
index int
Returns
Type Description
Audience.Builder

setAdsPersonalizationEnabled(boolean value)

public Audience.Builder setAdsPersonalizationEnabled(boolean value)

Output only. It is automatically set by GA to false if this is an NPA Audience and is excluded from ads personalization.

bool ads_personalization_enabled = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value boolean

The adsPersonalizationEnabled to set.

Returns
Type Description
Audience.Builder

This builder for chaining.

setDescription(String value)

public Audience.Builder setDescription(String value)

Required. The description of the Audience.

string description = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The description to set.

Returns
Type Description
Audience.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public Audience.Builder setDescriptionBytes(ByteString value)

Required. The description of the Audience.

string description = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
Audience.Builder

This builder for chaining.

setDisplayName(String value)

public Audience.Builder setDisplayName(String value)

Required. The display name of the Audience.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The displayName to set.

Returns
Type Description
Audience.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public Audience.Builder setDisplayNameBytes(ByteString value)

Required. The display name of the Audience.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for displayName to set.

Returns
Type Description
Audience.Builder

This builder for chaining.

setEventTrigger(AudienceEventTrigger value)

public Audience.Builder setEventTrigger(AudienceEventTrigger value)

Optional. Specifies an event to log when a user joins the Audience. If not set, no event is logged when a user joins the Audience.

.google.analytics.admin.v1alpha.AudienceEventTrigger event_trigger = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value AudienceEventTrigger
Returns
Type Description
Audience.Builder

setEventTrigger(AudienceEventTrigger.Builder builderForValue)

public Audience.Builder setEventTrigger(AudienceEventTrigger.Builder builderForValue)

Optional. Specifies an event to log when a user joins the Audience. If not set, no event is logged when a user joins the Audience.

.google.analytics.admin.v1alpha.AudienceEventTrigger event_trigger = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue AudienceEventTrigger.Builder
Returns
Type Description
Audience.Builder

setExclusionDurationMode(Audience.AudienceExclusionDurationMode value)

public Audience.Builder setExclusionDurationMode(Audience.AudienceExclusionDurationMode value)

Immutable. Specifies how long an exclusion lasts for users that meet the exclusion filter. It is applied to all EXCLUDE filter clauses and is ignored when there is no EXCLUDE filter clause in the Audience.

.google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode exclusion_duration_mode = 7 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value Audience.AudienceExclusionDurationMode

The exclusionDurationMode to set.

Returns
Type Description
Audience.Builder

This builder for chaining.

setExclusionDurationModeValue(int value)

public Audience.Builder setExclusionDurationModeValue(int value)

Immutable. Specifies how long an exclusion lasts for users that meet the exclusion filter. It is applied to all EXCLUDE filter clauses and is ignored when there is no EXCLUDE filter clause in the Audience.

.google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode exclusion_duration_mode = 7 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value int

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

Returns
Type Description
Audience.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setFilterClauses(int index, AudienceFilterClause value)

public Audience.Builder setFilterClauses(int index, AudienceFilterClause value)

Required. Immutable. Unordered list. Filter clauses that define the Audience. All clauses will be AND’ed together.

repeated .google.analytics.admin.v1alpha.AudienceFilterClause filter_clauses = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST];

Parameters
Name Description
index int
value AudienceFilterClause
Returns
Type Description
Audience.Builder

setFilterClauses(int index, AudienceFilterClause.Builder builderForValue)

public Audience.Builder setFilterClauses(int index, AudienceFilterClause.Builder builderForValue)

Required. Immutable. Unordered list. Filter clauses that define the Audience. All clauses will be AND’ed together.

repeated .google.analytics.admin.v1alpha.AudienceFilterClause filter_clauses = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST];

Parameters
Name Description
index int
builderForValue AudienceFilterClause.Builder
Returns
Type Description
Audience.Builder

setMembershipDurationDays(int value)

public Audience.Builder setMembershipDurationDays(int value)

Required. Immutable. The duration a user should stay in an Audience. It cannot be set to more than 540 days.

int32 membership_duration_days = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value int

The membershipDurationDays to set.

Returns
Type Description
Audience.Builder

This builder for chaining.

setName(String value)

public Audience.Builder setName(String value)

Output only. The resource name for this Audience resource. Format: properties/{propertyId}/audiences/{audienceId}

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

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Audience.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Audience.Builder setNameBytes(ByteString value)

Output only. The resource name for this Audience resource. Format: properties/{propertyId}/audiences/{audienceId}

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

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Audience.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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