-
public final class CfLogMilestoneEvent.BuilderCfLogMilestoneEvent is to log actions regarding milestones which can be when the user achieved a milestone.
-
-
Field Summary
Fields Modifier and Type Field Description private Stringmilestone_idprivate Stringaction_value
-
Constructor Summary
Constructors Constructor Description CfLogMilestoneEvent.Builder(String milestone_id, String action_value, Object meta, Boolean update_immediately)
-
Method Summary
Modifier and Type Method Description final StringgetMilestone_id()final UnitsetMilestone_id(String milestone_id)final StringgetAction_value()final UnitsetAction_value(String action_value)final <ERROR CLASS>setMilestoneId(String milestone_id)setMilestoneId is required for logging the milestone user achieved. final <ERROR CLASS>setAction(MilestoneAction action)setAction is required to set the Action type for the Milestone event. final <ERROR CLASS>setAction(String action)setAction is required to set the Action type for the Milestone event. final <ERROR CLASS>setMeta(Object meta)You can pass any type of value in setMeta. final <ERROR CLASS>updateImmediately(Boolean update_immediately)updateImmediately is responsible for updating the values ot the backend immediately. final <ERROR CLASS>build()build will validate all of the values provided and if passes will call the track function and queue the events based on it's updateImmediately value and also on the user's network resources. -
-
Method Detail
-
getMilestone_id
final String getMilestone_id()
-
setMilestone_id
final Unit setMilestone_id(String milestone_id)
-
getAction_value
final String getAction_value()
-
setAction_value
final Unit setAction_value(String action_value)
-
setMilestoneId
final <ERROR CLASS> setMilestoneId(String milestone_id)
setMilestoneId is required for logging the milestone user achieved. The is should be in a string format and must in accordance to the catalog provided.
-
setAction
final <ERROR CLASS> setAction(MilestoneAction action)
setAction is required to set the Action type for the Milestone event. SDK provides enum classes to support available log types. 1 main is achieved. SDK provides 2 approaches to log this event, one being enum type and the other is string type. Below is the function to log type using enum.
-
setAction
final <ERROR CLASS> setAction(String action)
setAction is required to set the Action type for the Milestone event. SDK provides enum classes to support available log types. 1 main is achieved. SDK provides 2 approaches to log this event, one being enum type and the other is string type. Below is the function to log type using string. Remember to note that values provided using string should be the same as provided in enum or else the events will be discarded.
-
setMeta
final <ERROR CLASS> setMeta(Object meta)
You can pass any type of value in setMeta. It is for developer and partners to log additional information with the log that they find would be helpful for logging and providing more context to the log. Default value for the meta is null.
-
updateImmediately
final <ERROR CLASS> updateImmediately(Boolean update_immediately)
updateImmediately is responsible for updating the values ot the backend immediately. By default this is set to false or whatever the developer has set in the SDK initialisation block. This differs the time for which the logs will be logged, if true, the SDK will log the content instantly and if false it will wait till the end of user session which is whenever the app goes into background.
-
build
final <ERROR CLASS> build()
build will validate all of the values provided and if passes will call the track function and queue the events based on it's updateImmediately value and also on the user's network resources.
-
-
-
-