Package com.segment.analytics.messages
Class GroupMessage
- java.lang.Object
-
- com.segment.analytics.messages.GroupMessage
-
- All Implemented Interfaces:
Message
public abstract class GroupMessage extends java.lang.Object implements Message
The group API call is how you associate an individual user with a group—be it a company, organization, account, project, team or whatever other crazy name you came up with for the same concept! It also lets you record custom traits about the group, like industry or number of employees. Calling group is a slightly more advanced feature, but it’s helpful if you have accounts with multiple users.Use
builder(java.lang.String)
to construct your own instances.- See Also:
- Group
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GroupMessage.Builder
Fluent API for creatingGroupMessage
instances.-
Nested classes/interfaces inherited from interface com.segment.analytics.messages.Message
Message.Type
-
-
Constructor Summary
Constructors Constructor Description GroupMessage()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static GroupMessage.Builder
builder(java.lang.String groupId)
Start building anGroupMessage
instance.abstract java.lang.String
groupId()
GroupMessage.Builder
toBuilder()
abstract java.util.Map<java.lang.String,?>
traits()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.segment.analytics.messages.Message
anonymousId, context, integrations, messageId, sentAt, timestamp, type, userId
-
-
-
-
Method Detail
-
builder
public static GroupMessage.Builder builder(java.lang.String groupId)
Start building anGroupMessage
instance.- Parameters:
groupId
- A unique identifier for the group in your database.- Throws:
java.lang.IllegalArgumentException
- if the event name is null or empty- See Also:
- Group ID
-
groupId
public abstract java.lang.String groupId()
-
traits
@Nullable public abstract java.util.Map<java.lang.String,?> traits()
-
toBuilder
public GroupMessage.Builder toBuilder()
-
-