Send feedback
Class Audience (0.69.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version 0.69.0 keyboard_arrow_down
public final class Audience extends GeneratedMessageV3 implements AudienceOrBuilder
A resource message representing an Audience.
Protobuf type google.analytics.admin.v1alpha.Audience
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
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 ()
getDescriptor()
public static final Descriptors . Descriptor getDescriptor ()
newBuilder()
public static Audience . Builder newBuilder ()
newBuilder(Audience prototype)
public static Audience . Builder newBuilder ( Audience prototype )
Parameter
Name
Description
prototype
Audience
public static Audience parseDelimitedFrom ( InputStream input )
public static Audience parseDelimitedFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
parseFrom(byte[] data)
public static Audience parseFrom ( byte [] data )
Parameter
Name
Description
data
byte []
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Audience parseFrom ( byte [] data , ExtensionRegistryLite extensionRegistry )
parseFrom(ByteString data)
public static Audience parseFrom ( ByteString data )
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Audience parseFrom ( ByteString data , ExtensionRegistryLite extensionRegistry )
public static Audience parseFrom ( CodedInputStream input )
public static Audience parseFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
public static Audience parseFrom ( InputStream input )
public static Audience parseFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
parseFrom(ByteBuffer data)
public static Audience parseFrom ( ByteBuffer data )
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Audience parseFrom ( ByteBuffer data , ExtensionRegistryLite extensionRegistry )
parser()
public static Parser<Audience> parser ()
Methods
equals(Object obj)
public boolean equals ( Object obj )
Parameter
Name
Description
obj
Object
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];
getDefaultInstanceForType()
public Audience getDefaultInstanceForType ()
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];
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];
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];
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
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];
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
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()
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 ()
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()
Returns
Type
Description
int
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3 . FieldAccessorTable internalGetFieldAccessorTable ()
Overrides
isInitialized()
public final boolean isInitialized ()
Overrides
newBuilderForType()
public Audience . Builder newBuilderForType ()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected Audience . Builder newBuilderForType ( GeneratedMessageV3 . BuilderParent parent )
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance ( GeneratedMessageV3 . UnusedPrivateParameter unused )
Returns
Type
Description
Object
Overrides
toBuilder()
public Audience . Builder toBuilder ()
writeTo(CodedOutputStream output)
public void writeTo ( CodedOutputStream output )
Overrides
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-04-09 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-04-09 UTC."],[[["The webpage provides documentation for the `Audience` class within the `com.google.analytics.admin.v1alpha` package of the Google Analytics Admin Java library, with version 0.69.0 highlighted, and 0.70.0 being the latest version."],["This `Audience` class extends `GeneratedMessageV3` and implements `AudienceOrBuilder`, offering functionality for defining and managing audience data structures, with immutable properties."],["The documentation outlines the class's inheritance hierarchy, inherited members, static fields like `ADS_PERSONALIZATION_ENABLED_FIELD_NUMBER`, `CREATE_TIME_FIELD_NUMBER`, etc., along with static and instance methods for interacting with `Audience` objects."],["Key functionalities of the Audience class include setting display name, description, membership duration, exclusion duration, filter clauses, event triggers, and enabling ads personalization, also including output only values like create time and name."],["The webpage has links to all prior versions of the class including: 0.68.0, 0.67.0, 0.66.0, 0.65.0, 0.64.0, 0.63.0, 0.62.0, 0.61.0, 0.59.0, 0.58.0, 0.57.0, 0.56.0, 0.55.0, 0.54.0, 0.53.0, 0.52.0, 0.51.0, 0.50.0, 0.49.0, 0.47.0, 0.46.0, 0.45.0, 0.44.0, 0.43.0, 0.42.0, 0.41.0, 0.40.0, 0.39.0, 0.38.0, 0.37.0, 0.34.0, 0.33.0, 0.32.0, 0.31.0, 0.30.0, 0.29.0, 0.28.0, 0.27.0, 0.26.0, 0.25.0, 0.24.0, 0.23.0, 0.22.0, 0.21.0, 0.20.0, 0.19.0, 0.18.0, 0.17.0, 0.16.0, 0.15.0, and 0.14.0."]]],[]]