Class Audience (0.64.0)

public final class Audience extends GeneratedMessageV3 implements AudienceOrBuilder

A resource message representing a GA4 Audience.

Protobuf type google.analytics.admin.v1alpha.Audience

Implements

AudienceOrBuilder

Static Fields

ADS_PERSONALIZATION_ENABLED_FIELD_NUMBER

public static final int ADS_PERSONALIZATION_ENABLED_FIELD_NUMBER
Field Value
Type Description
int

CREATE_TIME_FIELD_NUMBER

public static final int CREATE_TIME_FIELD_NUMBER
Field Value
Type Description
int

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
Type Description
int

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
Type Description
int

EVENT_TRIGGER_FIELD_NUMBER

public static final int EVENT_TRIGGER_FIELD_NUMBER
Field Value
Type Description
int

EXCLUSION_DURATION_MODE_FIELD_NUMBER

public static final int EXCLUSION_DURATION_MODE_FIELD_NUMBER
Field Value
Type Description
int

FILTER_CLAUSES_FIELD_NUMBER

public static final int FILTER_CLAUSES_FIELD_NUMBER
Field Value
Type Description
int

MEMBERSHIP_DURATION_DAYS_FIELD_NUMBER

public static final int MEMBERSHIP_DURATION_DAYS_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Audience getDefaultInstance()
Returns
Type Description
Audience

getDescriptor()

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

newBuilder()

public static Audience.Builder newBuilder()
Returns
Type Description
Audience.Builder

newBuilder(Audience prototype)

public static Audience.Builder newBuilder(Audience prototype)
Parameter
Name Description
prototype Audience
Returns
Type Description
Audience.Builder

parseDelimitedFrom(InputStream input)

public static Audience parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Audience
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Audience parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Audience
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Audience parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Audience
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Audience parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Audience
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Audience parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Audience
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Audience parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Audience
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Audience parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Audience
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Audience parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Audience
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Audience parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Audience
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Audience parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Audience
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Audience parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Audience
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Audience parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Audience
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Audience> parser()
Returns
Type Description
Parser<Audience>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
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.

getCreateTime()

public Timestamp getCreateTime()

Output only. Time when the Audience was created.

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

Returns
Type Description
Timestamp

The createTime.

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. Time when the Audience was created.

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

Returns
Type Description
TimestampOrBuilder

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.

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.

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

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.

getParserForType()

public Parser<Audience> getParserForType()
Returns
Type Description
Parser<Audience>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hasCreateTime()

public boolean hasCreateTime()

Output only. Time when the Audience was created.

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

Returns
Type Description
boolean

Whether the createTime field is set.

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.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public Audience.Builder newBuilderForType()
Returns
Type Description
Audience.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Audience.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Audience.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public Audience.Builder toBuilder()
Returns
Type Description
Audience.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException