- 0.63.0 (latest)
- 0.62.0
- 0.60.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.48.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.35.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
public static final class Segment.Builder extends GeneratedMessageV3.Builder<Segment.Builder> implements SegmentOrBuilder
A segment is a subset of your Analytics data. For example, of your entire set of users, one segment might be users from a particular country or city. Another segment might be users who purchase a particular line of products or who visit a specific part of your site or trigger certain events in your app. To learn more, see GA4 Segment Builder.
Protobuf type google.analytics.data.v1alpha.Segment
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > Segment.BuilderImplements
SegmentOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Type | Description |
Descriptor |
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Segment.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
Segment.Builder |
build()
public Segment build()
Type | Description |
Segment |
buildPartial()
public Segment buildPartial()
Type | Description |
Segment |
clear()
public Segment.Builder clear()
Type | Description |
Segment.Builder |
clearEventSegment()
public Segment.Builder clearEventSegment()
Event segments are subsets of events that were triggered on your site or app.
.google.analytics.data.v1alpha.EventSegment event_segment = 4;
Type | Description |
Segment.Builder |
clearField(Descriptors.FieldDescriptor field)
public Segment.Builder clearField(Descriptors.FieldDescriptor field)
Name | Description |
field | FieldDescriptor |
Type | Description |
Segment.Builder |
clearName()
public Segment.Builder clearName()
The name for this segment. If unspecified, segments are named "Segment".
This name defines string value returned by the segment
dimension. The
segment
dimension prefixes segment names by the 1-based index number of
the segment in the request (i.e. "1. Segment", "2. Segment", etc.).
string name = 1;
Type | Description |
Segment.Builder | This builder for chaining. |
clearOneSegmentScope()
public Segment.Builder clearOneSegmentScope()
Type | Description |
Segment.Builder |
clearOneof(Descriptors.OneofDescriptor oneof)
public Segment.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Name | Description |
oneof | OneofDescriptor |
Type | Description |
Segment.Builder |
clearSessionSegment()
public Segment.Builder clearSessionSegment()
Session segments are subsets of the sessions that occurred on your site or app.
.google.analytics.data.v1alpha.SessionSegment session_segment = 3;
Type | Description |
Segment.Builder |
clearUserSegment()
public Segment.Builder clearUserSegment()
User segments are subsets of users who engaged with your site or app.
.google.analytics.data.v1alpha.UserSegment user_segment = 2;
Type | Description |
Segment.Builder |
clone()
public Segment.Builder clone()
Type | Description |
Segment.Builder |
getDefaultInstanceForType()
public Segment getDefaultInstanceForType()
Type | Description |
Segment |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Type | Description |
Descriptor |
getEventSegment()
public EventSegment getEventSegment()
Event segments are subsets of events that were triggered on your site or app.
.google.analytics.data.v1alpha.EventSegment event_segment = 4;
Type | Description |
EventSegment | The eventSegment. |
getEventSegmentBuilder()
public EventSegment.Builder getEventSegmentBuilder()
Event segments are subsets of events that were triggered on your site or app.
.google.analytics.data.v1alpha.EventSegment event_segment = 4;
Type | Description |
EventSegment.Builder |
getEventSegmentOrBuilder()
public EventSegmentOrBuilder getEventSegmentOrBuilder()
Event segments are subsets of events that were triggered on your site or app.
.google.analytics.data.v1alpha.EventSegment event_segment = 4;
Type | Description |
EventSegmentOrBuilder |
getName()
public String getName()
The name for this segment. If unspecified, segments are named "Segment".
This name defines string value returned by the segment
dimension. The
segment
dimension prefixes segment names by the 1-based index number of
the segment in the request (i.e. "1. Segment", "2. Segment", etc.).
string name = 1;
Type | Description |
String | The name. |
getNameBytes()
public ByteString getNameBytes()
The name for this segment. If unspecified, segments are named "Segment".
This name defines string value returned by the segment
dimension. The
segment
dimension prefixes segment names by the 1-based index number of
the segment in the request (i.e. "1. Segment", "2. Segment", etc.).
string name = 1;
Type | Description |
ByteString | The bytes for name. |
getOneSegmentScopeCase()
public Segment.OneSegmentScopeCase getOneSegmentScopeCase()
Type | Description |
Segment.OneSegmentScopeCase |
getSessionSegment()
public SessionSegment getSessionSegment()
Session segments are subsets of the sessions that occurred on your site or app.
.google.analytics.data.v1alpha.SessionSegment session_segment = 3;
Type | Description |
SessionSegment | The sessionSegment. |
getSessionSegmentBuilder()
public SessionSegment.Builder getSessionSegmentBuilder()
Session segments are subsets of the sessions that occurred on your site or app.
.google.analytics.data.v1alpha.SessionSegment session_segment = 3;
Type | Description |
SessionSegment.Builder |
getSessionSegmentOrBuilder()
public SessionSegmentOrBuilder getSessionSegmentOrBuilder()
Session segments are subsets of the sessions that occurred on your site or app.
.google.analytics.data.v1alpha.SessionSegment session_segment = 3;
Type | Description |
SessionSegmentOrBuilder |
getUserSegment()
public UserSegment getUserSegment()
User segments are subsets of users who engaged with your site or app.
.google.analytics.data.v1alpha.UserSegment user_segment = 2;
Type | Description |
UserSegment | The userSegment. |
getUserSegmentBuilder()
public UserSegment.Builder getUserSegmentBuilder()
User segments are subsets of users who engaged with your site or app.
.google.analytics.data.v1alpha.UserSegment user_segment = 2;
Type | Description |
UserSegment.Builder |
getUserSegmentOrBuilder()
public UserSegmentOrBuilder getUserSegmentOrBuilder()
User segments are subsets of users who engaged with your site or app.
.google.analytics.data.v1alpha.UserSegment user_segment = 2;
Type | Description |
UserSegmentOrBuilder |
hasEventSegment()
public boolean hasEventSegment()
Event segments are subsets of events that were triggered on your site or app.
.google.analytics.data.v1alpha.EventSegment event_segment = 4;
Type | Description |
boolean | Whether the eventSegment field is set. |
hasSessionSegment()
public boolean hasSessionSegment()
Session segments are subsets of the sessions that occurred on your site or app.
.google.analytics.data.v1alpha.SessionSegment session_segment = 3;
Type | Description |
boolean | Whether the sessionSegment field is set. |
hasUserSegment()
public boolean hasUserSegment()
User segments are subsets of users who engaged with your site or app.
.google.analytics.data.v1alpha.UserSegment user_segment = 2;
Type | Description |
boolean | Whether the userSegment field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Type | Description |
boolean |
mergeEventSegment(EventSegment value)
public Segment.Builder mergeEventSegment(EventSegment value)
Event segments are subsets of events that were triggered on your site or app.
.google.analytics.data.v1alpha.EventSegment event_segment = 4;
Name | Description |
value | EventSegment |
Type | Description |
Segment.Builder |
mergeFrom(Segment other)
public Segment.Builder mergeFrom(Segment other)
Name | Description |
other | Segment |
Type | Description |
Segment.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public Segment.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
Segment.Builder |
Type | Description |
IOException |
mergeFrom(Message other)
public Segment.Builder mergeFrom(Message other)
Name | Description |
other | Message |
Type | Description |
Segment.Builder |
mergeSessionSegment(SessionSegment value)
public Segment.Builder mergeSessionSegment(SessionSegment value)
Session segments are subsets of the sessions that occurred on your site or app.
.google.analytics.data.v1alpha.SessionSegment session_segment = 3;
Name | Description |
value | SessionSegment |
Type | Description |
Segment.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Segment.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
Segment.Builder |
mergeUserSegment(UserSegment value)
public Segment.Builder mergeUserSegment(UserSegment value)
User segments are subsets of users who engaged with your site or app.
.google.analytics.data.v1alpha.UserSegment user_segment = 2;
Name | Description |
value | UserSegment |
Type | Description |
Segment.Builder |
setEventSegment(EventSegment value)
public Segment.Builder setEventSegment(EventSegment value)
Event segments are subsets of events that were triggered on your site or app.
.google.analytics.data.v1alpha.EventSegment event_segment = 4;
Name | Description |
value | EventSegment |
Type | Description |
Segment.Builder |
setEventSegment(EventSegment.Builder builderForValue)
public Segment.Builder setEventSegment(EventSegment.Builder builderForValue)
Event segments are subsets of events that were triggered on your site or app.
.google.analytics.data.v1alpha.EventSegment event_segment = 4;
Name | Description |
builderForValue | EventSegment.Builder |
Type | Description |
Segment.Builder |
setField(Descriptors.FieldDescriptor field, Object value)
public Segment.Builder setField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
Segment.Builder |
setName(String value)
public Segment.Builder setName(String value)
The name for this segment. If unspecified, segments are named "Segment".
This name defines string value returned by the segment
dimension. The
segment
dimension prefixes segment names by the 1-based index number of
the segment in the request (i.e. "1. Segment", "2. Segment", etc.).
string name = 1;
Name | Description |
value | String The name to set. |
Type | Description |
Segment.Builder | This builder for chaining. |
setNameBytes(ByteString value)
public Segment.Builder setNameBytes(ByteString value)
The name for this segment. If unspecified, segments are named "Segment".
This name defines string value returned by the segment
dimension. The
segment
dimension prefixes segment names by the 1-based index number of
the segment in the request (i.e. "1. Segment", "2. Segment", etc.).
string name = 1;
Name | Description |
value | ByteString The bytes for name to set. |
Type | Description |
Segment.Builder | This builder for chaining. |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Segment.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Name | Description |
field | FieldDescriptor |
index | int |
value | Object |
Type | Description |
Segment.Builder |
setSessionSegment(SessionSegment value)
public Segment.Builder setSessionSegment(SessionSegment value)
Session segments are subsets of the sessions that occurred on your site or app.
.google.analytics.data.v1alpha.SessionSegment session_segment = 3;
Name | Description |
value | SessionSegment |
Type | Description |
Segment.Builder |
setSessionSegment(SessionSegment.Builder builderForValue)
public Segment.Builder setSessionSegment(SessionSegment.Builder builderForValue)
Session segments are subsets of the sessions that occurred on your site or app.
.google.analytics.data.v1alpha.SessionSegment session_segment = 3;
Name | Description |
builderForValue | SessionSegment.Builder |
Type | Description |
Segment.Builder |
setUnknownFields(UnknownFieldSet unknownFields)
public final Segment.Builder setUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
Segment.Builder |
setUserSegment(UserSegment value)
public Segment.Builder setUserSegment(UserSegment value)
User segments are subsets of users who engaged with your site or app.
.google.analytics.data.v1alpha.UserSegment user_segment = 2;
Name | Description |
value | UserSegment |
Type | Description |
Segment.Builder |
setUserSegment(UserSegment.Builder builderForValue)
public Segment.Builder setUserSegment(UserSegment.Builder builderForValue)
User segments are subsets of users who engaged with your site or app.
.google.analytics.data.v1alpha.UserSegment user_segment = 2;
Name | Description |
builderForValue | UserSegment.Builder |
Type | Description |
Segment.Builder |