Class UserSegment.Builder (0.42.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public UserSegment.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
UserSegment.Builder
Overrides

build()

public UserSegment build()
Returns
TypeDescription
UserSegment

buildPartial()

public UserSegment buildPartial()
Returns
TypeDescription
UserSegment

clear()

public UserSegment.Builder clear()
Returns
TypeDescription
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
TypeDescription
UserSegment.Builder

clearField(Descriptors.FieldDescriptor field)

public UserSegment.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
UserSegment.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public UserSegment.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
UserSegment.Builder

clone()

public UserSegment.Builder clone()
Returns
TypeDescription
UserSegment.Builder
Overrides

getDefaultInstanceForType()

public UserSegment getDefaultInstanceForType()
Returns
TypeDescription
UserSegment

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getExclusion()

public UserSegmentExclusion getExclusion()

Defines which users are excluded in this segment. Optional.

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

Returns
TypeDescription
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
TypeDescription
UserSegmentExclusion.Builder

getExclusionOrBuilder()

public UserSegmentExclusionOrBuilder getExclusionOrBuilder()

Defines which users are excluded in this segment. Optional.

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

Returns
TypeDescription
UserSegmentExclusionOrBuilder

getUserInclusionCriteria()

public UserSegmentCriteria getUserInclusionCriteria()

Defines which users are included in this segment. Optional.

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
UserSegmentCriteriaOrBuilder

hasExclusion()

public boolean hasExclusion()

Defines which users are excluded in this segment. Optional.

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

Returns
TypeDescription
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
TypeDescription
boolean

Whether the userInclusionCriteria field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
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
NameDescription
valueUserSegmentExclusion
Returns
TypeDescription
UserSegment.Builder

mergeFrom(UserSegment other)

public UserSegment.Builder mergeFrom(UserSegment other)
Parameter
NameDescription
otherUserSegment
Returns
TypeDescription
UserSegment.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public UserSegment.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
UserSegment.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public UserSegment.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
UserSegment.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final UserSegment.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueUserSegmentCriteria
Returns
TypeDescription
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
NameDescription
valueUserSegmentExclusion
Returns
TypeDescription
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
NameDescription
builderForValueUserSegmentExclusion.Builder
Returns
TypeDescription
UserSegment.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public UserSegment.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
UserSegment.Builder
Overrides

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

public UserSegment.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
UserSegment.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final UserSegment.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueUserSegmentCriteria
Returns
TypeDescription
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
NameDescription
builderForValueUserSegmentCriteria.Builder
Returns
TypeDescription
UserSegment.Builder