@@ -130,6 +130,62 @@ default void identify(@NotNull String distinctId, @Nullable Object properties) {
130130 capture (distinctId , IDENTIFY , eventProps );
131131 }
132132
133+ /**
134+ * Set the given properties with the person profile of the user (distinct id).
135+ *
136+ * @param distinctId Unique ID of the target in your database. May not be empty.
137+ * @param properties Properties to set (including overwriting previous values) on the person profile
138+ * @param propertiesSetOnce Properties to set only if missing on the person profile
139+ */
140+ default void set (@ NotNull String distinctId , @ Nullable Map <String , Object > properties , @ Nullable Map <String , Object > propertiesSetOnce ) {
141+ Map <String , Object > eventProps = new HashMap <>();
142+ if (properties != null ) eventProps .put (SET , properties );
143+ if (propertiesSetOnce != null ) eventProps .put (SET_ONCE , propertiesSetOnce );
144+ capture (distinctId , SET , eventProps );
145+ }
146+
147+ /**
148+ * Set the given properties with the person profile of the user (distinct id).
149+ *
150+ * <p>The objects must be serializable to a JSON object via Gson (not primitive or array)</p>
151+ *
152+ * @param distinctId Unique ID of the target in your database. May not be empty.
153+ * @param properties Properties to set (including overwriting previous values) on the person profile
154+ * @param propertiesSetOnce Properties to set only if missing on the person profile
155+ */
156+ default void set (@ NotNull String distinctId , @ Nullable Object properties , @ Nullable Object propertiesSetOnce ) {
157+ Map <String , Object > eventProps = new HashMap <>();
158+ if (properties != null ) eventProps .put (SET , properties );
159+ if (propertiesSetOnce != null ) eventProps .put (SET_ONCE , propertiesSetOnce );
160+ capture (distinctId , SET , eventProps );
161+ }
162+
163+ /**
164+ * Set the given properties with the person profile of the user (distinct id).
165+ *
166+ * @param distinctId Unique ID of the target in your database. May not be empty.
167+ * @param properties Properties to set (including overwriting previous values) on the person profile
168+ */
169+ default void set (@ NotNull String distinctId , @ Nullable Map <String , Object > properties ) {
170+ Map <String , Object > eventProps = new HashMap <>();
171+ if (properties != null ) eventProps .put (SET , properties );
172+ capture (distinctId , SET , eventProps );
173+ }
174+
175+ /**
176+ * Set the given properties with the person profile of the user (distinct id).
177+ *
178+ * <p>The object must be serializable to a JSON object via Gson (not primitive or array)</p>
179+ *
180+ * @param distinctId Unique ID of the target in your database. May not be empty.
181+ * @param properties Properties to set (including overwriting previous values) on the person profile
182+ */
183+ default void set (@ NotNull String distinctId , @ Nullable Object properties ) {
184+ Map <String , Object > eventProps = new HashMap <>();
185+ if (properties != null ) eventProps .put (SET , properties );
186+ capture (distinctId , SET , eventProps );
187+ }
188+
133189 /**
134190 * Alias the given distinct ID to the given alias.
135191 *
0 commit comments