@@ -82,7 +82,7 @@ internal SimulateIndexTemplateRequest(Elastic.Clients.Elasticsearch.Serializatio
8282
8383 protected override Elastic . Transport . HttpMethod StaticHttpMethod => Elastic . Transport . HttpMethod . POST ;
8484
85- internal override bool SupportsBody => false ;
85+ internal override bool SupportsBody => true ;
8686
8787 internal override string OperationName => "indices.simulate_index_template" ;
8888
@@ -124,6 +124,7 @@ internal SimulateIndexTemplateRequest(Elastic.Clients.Elasticsearch.Serializatio
124124 /// </para>
125125 /// </summary>
126126 public Elastic . Clients . Elasticsearch . Duration ? MasterTimeout { get => Q < Elastic . Clients . Elasticsearch . Duration ? > ( "master_timeout" ) ; set => Q ( "master_timeout" , value ) ; }
127+ public Elastic . Clients . Elasticsearch . IndexManagement . IndexTemplate ? IndexTemplate { get ; set ; }
127128}
128129
129130/// <summary>
@@ -211,6 +212,24 @@ public Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTemplateReques
211212 return this ;
212213 }
213214
215+ public Elastic . Clients . Elasticsearch . IndexManagement . SimulateIndexTemplateRequestDescriptor IndexTemplate ( Elastic . Clients . Elasticsearch . IndexManagement . IndexTemplate ? value )
216+ {
217+ Instance . IndexTemplate = value ;
218+ return this ;
219+ }
220+
221+ public Elastic . Clients . Elasticsearch . IndexManagement . SimulateIndexTemplateRequestDescriptor IndexTemplate ( System . Action < Elastic . Clients . Elasticsearch . IndexManagement . IndexTemplateDescriptor > action )
222+ {
223+ Instance . IndexTemplate = Elastic . Clients . Elasticsearch . IndexManagement . IndexTemplateDescriptor . Build ( action ) ;
224+ return this ;
225+ }
226+
227+ public Elastic . Clients . Elasticsearch . IndexManagement . SimulateIndexTemplateRequestDescriptor IndexTemplate < T > ( System . Action < Elastic . Clients . Elasticsearch . IndexManagement . IndexTemplateDescriptor < T > > action )
228+ {
229+ Instance . IndexTemplate = Elastic . Clients . Elasticsearch . IndexManagement . IndexTemplateDescriptor < T > . Build ( action ) ;
230+ return this ;
231+ }
232+
214233 [ System . Runtime . CompilerServices . MethodImpl ( System . Runtime . CompilerServices . MethodImplOptions . AggressiveInlining ) ]
215234 internal static Elastic . Clients . Elasticsearch . IndexManagement . SimulateIndexTemplateRequest Build ( System . Action < Elastic . Clients . Elasticsearch . IndexManagement . SimulateIndexTemplateRequestDescriptor > action )
216235 {
@@ -260,4 +279,152 @@ public Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTemplateReques
260279 Instance . RequestConfiguration = configurationSelector . Invoke ( Instance . RequestConfiguration is null ? new Elastic . Transport . RequestConfigurationDescriptor ( ) : new Elastic . Transport . RequestConfigurationDescriptor ( Instance . RequestConfiguration ) ) ?? Instance . RequestConfiguration ;
261280 return this ;
262281 }
282+ }
283+
284+ /// <summary>
285+ /// <para>
286+ /// Simulate an index.
287+ /// Get the index configuration that would be applied to the specified index from an existing index template.
288+ /// </para>
289+ /// </summary>
290+ public readonly partial struct SimulateIndexTemplateRequestDescriptor < TDocument >
291+ {
292+ internal Elastic . Clients . Elasticsearch . IndexManagement . SimulateIndexTemplateRequest Instance { get ; init ; }
293+
294+ [ System . Diagnostics . CodeAnalysis . SetsRequiredMembers ]
295+ public SimulateIndexTemplateRequestDescriptor ( Elastic . Clients . Elasticsearch . IndexManagement . SimulateIndexTemplateRequest instance )
296+ {
297+ Instance = instance ;
298+ }
299+
300+ public SimulateIndexTemplateRequestDescriptor ( Elastic . Clients . Elasticsearch . Name name )
301+ {
302+ Instance = new Elastic . Clients . Elasticsearch . IndexManagement . SimulateIndexTemplateRequest ( name ) ;
303+ }
304+
305+ [ System . Obsolete ( "The use of the parameterless constructor is not permitted for this type." ) ]
306+ public SimulateIndexTemplateRequestDescriptor ( )
307+ {
308+ throw new System . InvalidOperationException ( "The use of the parameterless constructor is not permitted for this type." ) ;
309+ }
310+
311+ public static explicit operator Elastic . Clients . Elasticsearch . IndexManagement . SimulateIndexTemplateRequestDescriptor < TDocument > ( Elastic . Clients . Elasticsearch . IndexManagement . SimulateIndexTemplateRequest instance ) => new Elastic . Clients . Elasticsearch . IndexManagement . SimulateIndexTemplateRequestDescriptor < TDocument > ( instance ) ;
312+ public static implicit operator Elastic . Clients . Elasticsearch . IndexManagement . SimulateIndexTemplateRequest ( Elastic . Clients . Elasticsearch . IndexManagement . SimulateIndexTemplateRequestDescriptor < TDocument > descriptor ) => descriptor . Instance ;
313+
314+ /// <summary>
315+ /// <para>
316+ /// Name of the index to simulate
317+ /// </para>
318+ /// </summary>
319+ public Elastic . Clients . Elasticsearch . IndexManagement . SimulateIndexTemplateRequestDescriptor < TDocument > Name ( Elastic . Clients . Elasticsearch . Name value )
320+ {
321+ Instance . Name = value ;
322+ return this ;
323+ }
324+
325+ /// <summary>
326+ /// <para>
327+ /// User defined reason for dry-run creating the new template for simulation purposes
328+ /// </para>
329+ /// </summary>
330+ public Elastic . Clients . Elasticsearch . IndexManagement . SimulateIndexTemplateRequestDescriptor < TDocument > Cause ( string ? value )
331+ {
332+ Instance . Cause = value ;
333+ return this ;
334+ }
335+
336+ /// <summary>
337+ /// <para>
338+ /// Whether the index template we optionally defined in the body should only be dry-run added if new or can also replace an existing one
339+ /// </para>
340+ /// </summary>
341+ public Elastic . Clients . Elasticsearch . IndexManagement . SimulateIndexTemplateRequestDescriptor < TDocument > Create ( bool ? value = true )
342+ {
343+ Instance . Create = value ;
344+ return this ;
345+ }
346+
347+ /// <summary>
348+ /// <para>
349+ /// If true, returns all relevant default configurations for the index template.
350+ /// </para>
351+ /// </summary>
352+ public Elastic . Clients . Elasticsearch . IndexManagement . SimulateIndexTemplateRequestDescriptor < TDocument > IncludeDefaults ( bool ? value = true )
353+ {
354+ Instance . IncludeDefaults = value ;
355+ return this ;
356+ }
357+
358+ /// <summary>
359+ /// <para>
360+ /// Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
361+ /// </para>
362+ /// </summary>
363+ public Elastic . Clients . Elasticsearch . IndexManagement . SimulateIndexTemplateRequestDescriptor < TDocument > MasterTimeout ( Elastic . Clients . Elasticsearch . Duration ? value )
364+ {
365+ Instance . MasterTimeout = value ;
366+ return this ;
367+ }
368+
369+ public Elastic . Clients . Elasticsearch . IndexManagement . SimulateIndexTemplateRequestDescriptor < TDocument > IndexTemplate ( Elastic . Clients . Elasticsearch . IndexManagement . IndexTemplate ? value )
370+ {
371+ Instance . IndexTemplate = value ;
372+ return this ;
373+ }
374+
375+ public Elastic . Clients . Elasticsearch . IndexManagement . SimulateIndexTemplateRequestDescriptor < TDocument > IndexTemplate ( System . Action < Elastic . Clients . Elasticsearch . IndexManagement . IndexTemplateDescriptor < TDocument > > action )
376+ {
377+ Instance . IndexTemplate = Elastic . Clients . Elasticsearch . IndexManagement . IndexTemplateDescriptor < TDocument > . Build ( action ) ;
378+ return this ;
379+ }
380+
381+ [ System . Runtime . CompilerServices . MethodImpl ( System . Runtime . CompilerServices . MethodImplOptions . AggressiveInlining ) ]
382+ internal static Elastic . Clients . Elasticsearch . IndexManagement . SimulateIndexTemplateRequest Build ( System . Action < Elastic . Clients . Elasticsearch . IndexManagement . SimulateIndexTemplateRequestDescriptor < TDocument > > action )
383+ {
384+ var builder = new Elastic . Clients . Elasticsearch . IndexManagement . SimulateIndexTemplateRequestDescriptor < TDocument > ( new Elastic . Clients . Elasticsearch . IndexManagement . SimulateIndexTemplateRequest ( Elastic . Clients . Elasticsearch . Serialization . JsonConstructorSentinel . Instance ) ) ;
385+ action . Invoke ( builder ) ;
386+ return builder . Instance ;
387+ }
388+
389+ public Elastic . Clients . Elasticsearch . IndexManagement . SimulateIndexTemplateRequestDescriptor < TDocument > ErrorTrace ( bool ? value )
390+ {
391+ Instance . ErrorTrace = value ;
392+ return this ;
393+ }
394+
395+ public Elastic . Clients . Elasticsearch . IndexManagement . SimulateIndexTemplateRequestDescriptor < TDocument > FilterPath ( params string [ ] ? value )
396+ {
397+ Instance . FilterPath = value ;
398+ return this ;
399+ }
400+
401+ public Elastic . Clients . Elasticsearch . IndexManagement . SimulateIndexTemplateRequestDescriptor < TDocument > Human ( bool ? value )
402+ {
403+ Instance . Human = value ;
404+ return this ;
405+ }
406+
407+ public Elastic . Clients . Elasticsearch . IndexManagement . SimulateIndexTemplateRequestDescriptor < TDocument > Pretty ( bool ? value )
408+ {
409+ Instance . Pretty = value ;
410+ return this ;
411+ }
412+
413+ public Elastic . Clients . Elasticsearch . IndexManagement . SimulateIndexTemplateRequestDescriptor < TDocument > SourceQueryString ( string ? value )
414+ {
415+ Instance . SourceQueryString = value ;
416+ return this ;
417+ }
418+
419+ public Elastic . Clients . Elasticsearch . IndexManagement . SimulateIndexTemplateRequestDescriptor < TDocument > RequestConfiguration ( Elastic . Transport . IRequestConfiguration ? value )
420+ {
421+ Instance . RequestConfiguration = value ;
422+ return this ;
423+ }
424+
425+ public Elastic . Clients . Elasticsearch . IndexManagement . SimulateIndexTemplateRequestDescriptor < TDocument > RequestConfiguration ( System . Func < Elastic . Transport . RequestConfigurationDescriptor , Elastic . Transport . IRequestConfiguration > ? configurationSelector )
426+ {
427+ Instance . RequestConfiguration = configurationSelector . Invoke ( Instance . RequestConfiguration is null ? new Elastic . Transport . RequestConfigurationDescriptor ( ) : new Elastic . Transport . RequestConfigurationDescriptor ( Instance . RequestConfiguration ) ) ?? Instance . RequestConfiguration ;
428+ return this ;
429+ }
263430}
0 commit comments