public final class Segment extends com.google.protobuf.GeneratedMessageV3 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](https://support.google.com/analytics/answer/9304353).Protobuf type
google.analytics.data.v1alpha.Segment| Modifier and Type | Class and Description |
|---|---|
static class |
Segment.Builder
A segment is a subset of your Analytics data.
|
static class |
Segment.OneSegmentScopeCase |
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
EVENT_SEGMENT_FIELD_NUMBER |
static int |
NAME_FIELD_NUMBER |
static int |
SESSION_SEGMENT_FIELD_NUMBER |
static int |
USER_SEGMENT_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
static Segment |
getDefaultInstance() |
Segment |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
EventSegment |
getEventSegment()
Event segments are subsets of events that were triggered on your site or
app.
|
EventSegmentOrBuilder |
getEventSegmentOrBuilder()
Event segments are subsets of events that were triggered on your site or
app.
|
String |
getName()
The name for this segment.
|
com.google.protobuf.ByteString |
getNameBytes()
The name for this segment.
|
Segment.OneSegmentScopeCase |
getOneSegmentScopeCase() |
com.google.protobuf.Parser<Segment> |
getParserForType() |
int |
getSerializedSize() |
SessionSegment |
getSessionSegment()
Session segments are subsets of the sessions that occurred on your site
or app.
|
SessionSegmentOrBuilder |
getSessionSegmentOrBuilder()
Session segments are subsets of the sessions that occurred on your site
or app.
|
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
UserSegment |
getUserSegment()
User segments are subsets of users who engaged with your site or app.
|
UserSegmentOrBuilder |
getUserSegmentOrBuilder()
User segments are subsets of users who engaged with your site or app.
|
boolean |
hasEventSegment()
Event segments are subsets of events that were triggered on your site or
app.
|
int |
hashCode() |
boolean |
hasSessionSegment()
Session segments are subsets of the sessions that occurred on your site
or app.
|
boolean |
hasUserSegment()
User segments are subsets of users who engaged with your site or app.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static Segment.Builder |
newBuilder() |
static Segment.Builder |
newBuilder(Segment prototype) |
Segment.Builder |
newBuilderForType() |
protected Segment.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static Segment |
parseDelimitedFrom(InputStream input) |
static Segment |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Segment |
parseFrom(byte[] data) |
static Segment |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Segment |
parseFrom(ByteBuffer data) |
static Segment |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Segment |
parseFrom(com.google.protobuf.ByteString data) |
static Segment |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Segment |
parseFrom(com.google.protobuf.CodedInputStream input) |
static Segment |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Segment |
parseFrom(InputStream input) |
static Segment |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<Segment> |
parser() |
Segment.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int NAME_FIELD_NUMBER
public static final int USER_SEGMENT_FIELD_NUMBER
public static final int SESSION_SEGMENT_FIELD_NUMBER
public static final int EVENT_SEGMENT_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public final com.google.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields in interface com.google.protobuf.MessageOrBuildergetUnknownFields in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public Segment.OneSegmentScopeCase getOneSegmentScopeCase()
getOneSegmentScopeCase in interface SegmentOrBuilderpublic 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;getName in interface SegmentOrBuilderpublic com.google.protobuf.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;getNameBytes in interface SegmentOrBuilderpublic boolean hasUserSegment()
User segments are subsets of users who engaged with your site or app.
.google.analytics.data.v1alpha.UserSegment user_segment = 2;hasUserSegment in interface SegmentOrBuilderpublic UserSegment getUserSegment()
User segments are subsets of users who engaged with your site or app.
.google.analytics.data.v1alpha.UserSegment user_segment = 2;getUserSegment in interface SegmentOrBuilderpublic UserSegmentOrBuilder getUserSegmentOrBuilder()
User segments are subsets of users who engaged with your site or app.
.google.analytics.data.v1alpha.UserSegment user_segment = 2;getUserSegmentOrBuilder in interface SegmentOrBuilderpublic boolean hasSessionSegment()
Session segments are subsets of the sessions that occurred on your site or app.
.google.analytics.data.v1alpha.SessionSegment session_segment = 3;hasSessionSegment in interface SegmentOrBuilderpublic SessionSegment getSessionSegment()
Session segments are subsets of the sessions that occurred on your site or app.
.google.analytics.data.v1alpha.SessionSegment session_segment = 3;getSessionSegment in interface SegmentOrBuilderpublic SessionSegmentOrBuilder getSessionSegmentOrBuilder()
Session segments are subsets of the sessions that occurred on your site or app.
.google.analytics.data.v1alpha.SessionSegment session_segment = 3;getSessionSegmentOrBuilder in interface SegmentOrBuilderpublic boolean hasEventSegment()
Event segments are subsets of events that were triggered on your site or app.
.google.analytics.data.v1alpha.EventSegment event_segment = 4;hasEventSegment in interface SegmentOrBuilderpublic EventSegment getEventSegment()
Event segments are subsets of events that were triggered on your site or app.
.google.analytics.data.v1alpha.EventSegment event_segment = 4;getEventSegment in interface SegmentOrBuilderpublic EventSegmentOrBuilder getEventSegmentOrBuilder()
Event segments are subsets of events that were triggered on your site or app.
.google.analytics.data.v1alpha.EventSegment event_segment = 4;getEventSegmentOrBuilder in interface SegmentOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static Segment parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Segment parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Segment parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Segment parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Segment parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Segment parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Segment parseFrom(InputStream input) throws IOException
IOExceptionpublic static Segment parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static Segment parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static Segment parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static Segment parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static Segment parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic Segment.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static Segment.Builder newBuilder()
public static Segment.Builder newBuilder(Segment prototype)
public Segment.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected Segment.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static Segment getDefaultInstance()
public static com.google.protobuf.Parser<Segment> parser()
public com.google.protobuf.Parser<Segment> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public Segment getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2023 Google LLC. All rights reserved.