@@ -52,11 +52,27 @@ public partial interface IUpdateJobRequest
5252
5353 /// <summary>
5454 /// The time in days that model snapshots are retained for the job.
55- /// Older snapshots are deleted. The default value is 1 day.
55+ /// Older snapshots are deleted. The default value is 10 days in Elasticsearch 7.8.0+
56+ /// and 1 day in older versions.
5657 /// </summary>
5758 [ DataMember ( Name = "model_snapshot_retention_days" ) ]
5859 long ? ModelSnapshotRetentionDays { get ; set ; }
5960
61+ /// <summary>
62+ /// Specifies a number of days between 0 and the value of <see cref="ModelSnapshotRetentionDays"/>.
63+ /// After this period of time, only the first model snapshot per day is retained for this job.
64+ /// Age is calculated relative to the timestamp of the newest model snapshot. For new jobs, the default
65+ /// value is <c>1</c>, which means that all snapshots are retained for one day. Older snapshots
66+ /// are thinned out such that only one per day is retained. For jobs that were
67+ /// created before this setting was available, the default value matches the
68+ /// <see cref="ModelSnapshotRetentionDays"/> value, which preserves the original behavior
69+ /// and no thinning out of model snapshots occurs.
70+ /// <para />
71+ /// Available in Elasticsearch 7.8.0+
72+ /// </summary>
73+ [ DataMember ( Name = "daily_model_snapshot_retention_after_days" ) ]
74+ long ? DailyModelSnapshotRetentionAfterDays { get ; set ; }
75+
6076 /// <summary>
6177 /// The period over which adjustments to the score are applied, as new data is seen.
6278 /// </summary>
@@ -104,6 +120,9 @@ public partial class UpdateJobRequest
104120 /// <inheritdoc />
105121 public long ? ModelSnapshotRetentionDays { get ; set ; }
106122
123+ /// <inheritdoc />
124+ public long ? DailyModelSnapshotRetentionAfterDays { get ; set ; }
125+
107126 /// <inheritdoc />
108127 public long ? RenormalizationWindowDays { get ; set ; }
109128
@@ -123,43 +142,47 @@ public partial class UpdateJobDescriptor<TDocument> where TDocument : class
123142 string IUpdateJobRequest . Description { get ; set ; }
124143 IModelPlotConfigEnabled IUpdateJobRequest . ModelPlotConfig { get ; set ; }
125144 long ? IUpdateJobRequest . ModelSnapshotRetentionDays { get ; set ; }
145+ long ? IUpdateJobRequest . DailyModelSnapshotRetentionAfterDays { get ; set ; }
126146 long ? IUpdateJobRequest . RenormalizationWindowDays { get ; set ; }
127147 long ? IUpdateJobRequest . ResultsRetentionDays { get ; set ; }
128-
129148 bool ? IUpdateJobRequest . AllowLazyOpen { get ; set ; }
130149
131- /// <inheritdoc />
150+ /// <inheritdoc cref="IUpdateJobRequest.AnalysisLimits" />
132151 public UpdateJobDescriptor < TDocument > AnalysisLimits ( Func < AnalysisMemoryLimitDescriptor , IAnalysisMemoryLimit > selector ) =>
133152 Assign ( selector , ( a , v ) => a . AnalysisLimits = v ? . Invoke ( new AnalysisMemoryLimitDescriptor ( ) ) ) ;
134153
135- /// <inheritdoc />
154+ /// <inheritdoc cref="IUpdateJobRequest.BackgroundPersistInterval" />
136155 public UpdateJobDescriptor < TDocument > BackgroundPersistInterval ( Time backgroundPersistInterval ) =>
137156 Assign ( backgroundPersistInterval , ( a , v ) => a . BackgroundPersistInterval = v ) ;
138157
139- /// <inheritdoc />
158+ /// <inheritdoc cref="IUpdateJobRequest.CustomSettings" />
140159 public UpdateJobDescriptor < TDocument > CustomSettings ( Func < FluentDictionary < string , object > , FluentDictionary < string , object > > customSettingsDictionary
141160 ) =>
142161 Assign ( customSettingsDictionary ( new FluentDictionary < string , object > ( ) ) , ( a , v ) => a . CustomSettings = v ) ;
143162
144- /// <inheritdoc />
163+ /// <inheritdoc cref="IUpdateJobRequest.Description" />
145164 public UpdateJobDescriptor < TDocument > Description ( string description ) => Assign ( description , ( a , v ) => a . Description = v ) ;
146165
147- /// <inheritdoc />
166+ /// <inheritdoc cref="IUpdateJobRequest.ModelPlotConfig" />
148167 public UpdateJobDescriptor < TDocument > ModelPlot ( Func < ModelPlotConfigEnabledDescriptor < TDocument > , IModelPlotConfigEnabled > selector ) =>
149168 Assign ( selector , ( a , v ) => a . ModelPlotConfig = v ? . Invoke ( new ModelPlotConfigEnabledDescriptor < TDocument > ( ) ) ) ;
150169
151- /// <inheritdoc />
170+ /// <inheritdoc cref="IUpdateJobRequest.ModelSnapshotRetentionDays" />
152171 public UpdateJobDescriptor < TDocument > ModelSnapshotRetentionDays ( long ? modelSnapshotRetentionDays ) =>
153172 Assign ( modelSnapshotRetentionDays , ( a , v ) => a . ModelSnapshotRetentionDays = v ) ;
154173
155- /// <inheritdoc />
174+ /// <inheritdoc cref="IUpdateJobRequest.DailyModelSnapshotRetentionAfterDays" />
175+ public UpdateJobDescriptor < TDocument > DailyModelSnapshotRetentionAfterDays ( long ? dailyModelSnapshotRetentionAfterDays ) =>
176+ Assign ( dailyModelSnapshotRetentionAfterDays , ( a , v ) => a . DailyModelSnapshotRetentionAfterDays = v ) ;
177+
178+ /// <inheritdoc cref="IUpdateJobRequest.RenormalizationWindowDays" />
156179 public UpdateJobDescriptor < TDocument > RenormalizationWindowDays ( long ? renormalizationWindowDays ) =>
157180 Assign ( renormalizationWindowDays , ( a , v ) => a . RenormalizationWindowDays = v ) ;
158181
159- /// <inheritdoc />
182+ /// <inheritdoc cref="IUpdateJobRequest.ResultsRetentionDays" />
160183 public UpdateJobDescriptor < TDocument > ResultsRetentionDays ( long ? resultsRetentionDays ) => Assign ( resultsRetentionDays , ( a , v ) => a . ResultsRetentionDays = v ) ;
161184
162- /// <inheritdoc />
185+ /// <inheritdoc cref="IUpdateJobRequest.AllowLazyOpen" />
163186 public UpdateJobDescriptor < TDocument > AllowLazyOpen ( bool ? allowLazyOpen = true ) =>
164187 Assign ( allowLazyOpen , ( a , v ) => a . AllowLazyOpen = v ) ;
165188 }
0 commit comments