Class UserSegment.Builder (0.56.0)

public static final class UserSegment.Builder extends GeneratedMessageV3.Builder<UserSegment.Builder> implements UserSegmentOrBuilder

User segments are subsets of users who engaged with your site or app. For example, users who have previously purchased; users who added items to their shopping carts, but didn’t complete a purchase.

Protobuf type google.analytics.data.v1alpha.UserSegment

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public UserSegment build()
Returns
Type Description
UserSegment

buildPartial()

public UserSegment buildPartial()
Returns
Type Description
UserSegment

clear()

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

clearExclusion()

public UserSegment.Builder clearExclusion()

Defines which users are excluded in this segment. Optional.

.google.analytics.data.v1alpha.UserSegmentExclusion exclusion = 2;

Returns
Type Description
UserSegment.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearUserInclusionCriteria()

public UserSegment.Builder clearUserInclusionCriteria()

Defines which users are included in this segment. Optional.

.google.analytics.data.v1alpha.UserSegmentCriteria user_inclusion_criteria = 1;

Returns
Type Description
UserSegment.Builder

clone()

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

getDefaultInstanceForType()

public UserSegment getDefaultInstanceForType()
Returns
Type Description
UserSegment

getDescriptorForType()

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

getExclusion()

public UserSegmentExclusion getExclusion()

Defines which users are excluded in this segment. Optional.

.google.analytics.data.v1alpha.UserSegmentExclusion exclusion = 2;

Returns
Type Description
UserSegmentExclusion

The exclusion.

getExclusionBuilder()

public UserSegmentExclusion.Builder getExclusionBuilder()

Defines which users are excluded in this segment. Optional.

.google.analytics.data.v1alpha.UserSegmentExclusion exclusion = 2;

Returns
Type Description
UserSegmentExclusion.Builder

getExclusionOrBuilder()

public UserSegmentExclusionOrBuilder getExclusionOrBuilder()

Defines which users are excluded in this segment. Optional.

.google.analytics.data.v1alpha.UserSegmentExclusion exclusion = 2;

Returns
Type Description
UserSegmentExclusionOrBuilder

getUserInclusionCriteria()

public UserSegmentCriteria getUserInclusionCriteria()

Defines which users are included in this segment. Optional.

.google.analytics.data.v1alpha.UserSegmentCriteria user_inclusion_criteria = 1;

Returns
Type Description
UserSegmentCriteria

The userInclusionCriteria.

getUserInclusionCriteriaBuilder()

public UserSegmentCriteria.Builder getUserInclusionCriteriaBuilder()

Defines which users are included in this segment. Optional.

.google.analytics.data.v1alpha.UserSegmentCriteria user_inclusion_criteria = 1;

Returns
Type Description
UserSegmentCriteria.Builder

getUserInclusionCriteriaOrBuilder()

public UserSegmentCriteriaOrBuilder getUserInclusionCriteriaOrBuilder()

Defines which users are included in this segment. Optional.

.google.analytics.data.v1alpha.UserSegmentCriteria user_inclusion_criteria = 1;

Returns
Type Description
UserSegmentCriteriaOrBuilder

hasExclusion()

public boolean hasExclusion()

Defines which users are excluded in this segment. Optional.

.google.analytics.data.v1alpha.UserSegmentExclusion exclusion = 2;

Returns
Type Description
boolean

Whether the exclusion field is set.

hasUserInclusionCriteria()

public boolean hasUserInclusionCriteria()

Defines which users are included in this segment. Optional.

.google.analytics.data.v1alpha.UserSegmentCriteria user_inclusion_criteria = 1;

Returns
Type Description
boolean

Whether the userInclusionCriteria field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeExclusion(UserSegmentExclusion value)

public UserSegment.Builder mergeExclusion(UserSegmentExclusion value)

Defines which users are excluded in this segment. Optional.

.google.analytics.data.v1alpha.UserSegmentExclusion exclusion = 2;

Parameter
Name Description
value UserSegmentExclusion
Returns
Type Description
UserSegment.Builder

mergeFrom(UserSegment other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

mergeUserInclusionCriteria(UserSegmentCriteria value)

public UserSegment.Builder mergeUserInclusionCriteria(UserSegmentCriteria value)

Defines which users are included in this segment. Optional.

.google.analytics.data.v1alpha.UserSegmentCriteria user_inclusion_criteria = 1;

Parameter
Name Description
value UserSegmentCriteria
Returns
Type Description
UserSegment.Builder

setExclusion(UserSegmentExclusion value)

public UserSegment.Builder setExclusion(UserSegmentExclusion value)

Defines which users are excluded in this segment. Optional.

.google.analytics.data.v1alpha.UserSegmentExclusion exclusion = 2;

Parameter
Name Description
value UserSegmentExclusion
Returns
Type Description
UserSegment.Builder

setExclusion(UserSegmentExclusion.Builder builderForValue)

public UserSegment.Builder setExclusion(UserSegmentExclusion.Builder builderForValue)

Defines which users are excluded in this segment. Optional.

.google.analytics.data.v1alpha.UserSegmentExclusion exclusion = 2;

Parameter
Name Description
builderForValue UserSegmentExclusion.Builder
Returns
Type Description
UserSegment.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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

setUserInclusionCriteria(UserSegmentCriteria value)

public UserSegment.Builder setUserInclusionCriteria(UserSegmentCriteria value)

Defines which users are included in this segment. Optional.

.google.analytics.data.v1alpha.UserSegmentCriteria user_inclusion_criteria = 1;

Parameter
Name Description
value UserSegmentCriteria
Returns
Type Description
UserSegment.Builder

setUserInclusionCriteria(UserSegmentCriteria.Builder builderForValue)

public UserSegment.Builder setUserInclusionCriteria(UserSegmentCriteria.Builder builderForValue)

Defines which users are included in this segment. Optional.

.google.analytics.data.v1alpha.UserSegmentCriteria user_inclusion_criteria = 1;

Parameter
Name Description
builderForValue UserSegmentCriteria.Builder
Returns
Type Description
UserSegment.Builder