@@ -23,6 +23,15 @@ public interface IModelPlotConfig : IModelPlotConfigEnabled
23
23
/// </remarks>
24
24
[ DataMember ( Name = "terms" ) ]
25
25
Fields Terms { get ; set ; }
26
+
27
+ /// <summary>
28
+ /// If <c>true</c>, enables calculation and storage of the model change annotations
29
+ /// for each entity that is being analyzed. By default, this is not enabled.
30
+ /// <para />
31
+ /// Valid in Elasticsearch 7.9.0+
32
+ /// </summary>
33
+ [ DataMember ( Name = "annotations_enabled" ) ]
34
+ bool ? AnnotationsEnabled { get ; set ; }
26
35
}
27
36
28
37
/// <inheritdoc />
@@ -33,23 +42,31 @@ public class ModelPlotConfig : IModelPlotConfig
33
42
34
43
/// <inheritdoc />
35
44
public Fields Terms { get ; set ; }
45
+
46
+ /// <inheritdoc />
47
+ public bool ? AnnotationsEnabled { get ; set ; }
36
48
}
37
49
38
50
/// <inheritdoc />
39
51
public class ModelPlotConfigDescriptor < T > : DescriptorBase < ModelPlotConfigDescriptor < T > , IModelPlotConfig > , IModelPlotConfig where T : class
40
52
{
41
53
bool ? IModelPlotConfigEnabled . Enabled { get ; set ; }
42
54
Fields IModelPlotConfig . Terms { get ; set ; }
55
+ bool ? IModelPlotConfig . AnnotationsEnabled { get ; set ; }
43
56
44
- /// <inheritdoc />
57
+ /// <inheritdoc cref="IModelPlotConfigEnabled.Enabled" />
45
58
public ModelPlotConfigDescriptor < T > Enabled ( bool ? enabled = true ) => Assign ( enabled , ( a , v ) => a . Enabled = v ) ;
46
59
47
- /// <inheritdoc />
60
+ /// <inheritdoc cref="IModelPlotConfig.Terms" />
48
61
public ModelPlotConfigDescriptor < T > Terms ( Func < FieldsDescriptor < T > , IPromise < Fields > > fields ) =>
49
62
Assign ( fields , ( a , v ) => a . Terms = v ? . Invoke ( new FieldsDescriptor < T > ( ) ) ? . Value ) ;
50
63
51
- /// <inheritdoc />
64
+ /// <inheritdoc cref="IModelPlotConfig.Terms" />
52
65
public ModelPlotConfigDescriptor < T > Terms ( Fields fields ) => Assign ( fields , ( a , v ) => a . Terms = v ) ;
66
+
67
+ /// <inheritdoc cref="IModelPlotConfig.AnnotationsEnabled" />
68
+ public ModelPlotConfigDescriptor < T > AnnotationsEnabled ( bool ? enabled = true ) =>
69
+ Assign ( enabled , ( a , v ) => a . AnnotationsEnabled = v ) ;
53
70
}
54
71
55
72
/// <summary>
0 commit comments