Package com.moesif.api.models
Class UserBuilder
- java.lang.Object
-
- com.moesif.api.models.UserBuilder
-
public class UserBuilder extends Object
-
-
Constructor Summary
Constructors Constructor Description UserBuilder()Default constructor to initialize the instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UserModelbuild()Build the instance with the given valuesUserBuildercampaign(CampaignModel campaign)the campaignUserBuildercompanyId(String companyId)Company_id associated with the user if knownUserBuilderipAddress(String ipAddress)Last seen IP Address of the user if knownUserBuildermetadata(Object metadata)Custom user metadata as a JSON objectUserBuildermodifiedTime(Date modifiedTime)Timestamp of when user was updated.UserBuildersessionToken(String sessionToken)End user's auth/session tokenUserBuilderuserAgentString(String userAgentString)User Agent String of the user's device such as "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36"UserBuilderuserId(String userId)End user's user_id string from your app
-
-
-
Method Detail
-
userId
public UserBuilder userId(String userId)
End user's user_id string from your app- Parameters:
userId- the field to set- Returns:
- itself
-
companyId
public UserBuilder companyId(String companyId)
Company_id associated with the user if known- Parameters:
companyId- the field to set- Returns:
- itself
-
modifiedTime
public UserBuilder modifiedTime(Date modifiedTime)
Timestamp of when user was updated. (Moesif will use the current time if not set)- Parameters:
modifiedTime- the field to set- Returns:
- itself
-
ipAddress
public UserBuilder ipAddress(String ipAddress)
Last seen IP Address of the user if known- Parameters:
ipAddress- the field to set- Returns:
- itself
-
sessionToken
public UserBuilder sessionToken(String sessionToken)
End user's auth/session token- Parameters:
sessionToken- the field to set- Returns:
- itself
-
userAgentString
public UserBuilder userAgentString(String userAgentString)
User Agent String of the user's device such as "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36"- Parameters:
userAgentString- the field to set- Returns:
- itself
-
metadata
public UserBuilder metadata(Object metadata)
Custom user metadata as a JSON object- Parameters:
metadata- the field to set- Returns:
- itself
-
campaign
public UserBuilder campaign(CampaignModel campaign)
the campaign- Parameters:
campaign- the field to set- Returns:
- itself
-
build
public UserModel build()
Build the instance with the given values- Returns:
- The built UserModel
-
-