66import lombok .ToString ;
77import lombok .experimental .Delegate ;
88
9+ import java .time .Instant ;
10+ import java .util .List ;
911import java .util .Map ;
1012import java .util .function .Function ;
1113
@@ -31,6 +33,48 @@ public MutableTrackingEventDetails(final Number value) {
3133 this .structure = new MutableStructure ();
3234 }
3335
36+ // override @Delegate methods so that we can use "add" methods and still return MutableTrackingEventDetails,
37+ // not Structure
38+ public MutableTrackingEventDetails add (String key , Boolean value ) {
39+ this .structure .add (key , value );
40+ return this ;
41+ }
42+
43+ public MutableTrackingEventDetails add (String key , String value ) {
44+ this .structure .add (key , value );
45+ return this ;
46+ }
47+
48+ public MutableTrackingEventDetails add (String key , Integer value ) {
49+ this .structure .add (key , value );
50+ return this ;
51+ }
52+
53+ public MutableTrackingEventDetails add (String key , Double value ) {
54+ this .structure .add (key , value );
55+ return this ;
56+ }
57+
58+ public MutableTrackingEventDetails add (String key , Instant value ) {
59+ this .structure .add (key , value );
60+ return this ;
61+ }
62+
63+ public MutableTrackingEventDetails add (String key , Structure value ) {
64+ this .structure .add (key , value );
65+ return this ;
66+ }
67+
68+ public MutableTrackingEventDetails add (String key , List <Value > value ) {
69+ this .structure .add (key , value );
70+ return this ;
71+ }
72+
73+ public MutableTrackingEventDetails add (String key , Value value ) {
74+ this .structure .add (key ,value );
75+ return this ;
76+ }
77+
3478
3579 @ SuppressWarnings ("all" )
3680 private static class DelegateExclusions {
0 commit comments