Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,29 @@ public sealed partial class DownsampleRequestParameters : Elastic.Transport.Requ
/// <summary>
/// <para>
/// Downsample an index.
/// Aggregate a time series (TSDS) index and store pre-computed statistical summaries (<c>min</c>, <c>max</c>, <c>sum</c>, <c>value_count</c> and <c>avg</c>) for each metric field grouped by a configured time interval.
/// Downsamples a time series (TSDS) index and reduces its size by keeping the last value or by pre-aggregating metrics:
/// </para>
/// <list type="bullet">
/// <item>
/// <para>
/// When running in <c>aggregate</c> mode, it pre-calculates and stores statistical summaries (<c>min</c>, <c>max</c>, <c>sum</c>, <c>value_count</c> and <c>avg</c>)
/// for each metric field grouped by a configured time interval and their dimensions.
/// </para>
/// </item>
/// <item>
/// <para>
/// When running in <c>last_value</c> mode, it keeps the last value for each metric in the configured interval and their dimensions.
/// </para>
/// </item>
/// </list>
/// <para>
/// For example, a TSDS index that contains metrics sampled every 10 seconds can be downsampled to an hourly index.
/// All documents within an hour interval are summarized and stored as a single document in the downsample index.
/// </para>
/// <para>
/// NOTE: Only indices in a time series data stream are supported.
/// Neither field nor document level security can be defined on the source index.
/// The source index must be read only (<c>index.blocks.write: true</c>).
/// The source index must be read-only (<c>index.blocks.write: true</c>).
/// </para>
/// </summary>
[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.IndexManagement.Json.DownsampleRequestConverter))]
Expand Down Expand Up @@ -104,14 +119,29 @@ internal DownsampleRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConst
/// <summary>
/// <para>
/// Downsample an index.
/// Aggregate a time series (TSDS) index and store pre-computed statistical summaries (<c>min</c>, <c>max</c>, <c>sum</c>, <c>value_count</c> and <c>avg</c>) for each metric field grouped by a configured time interval.
/// Downsamples a time series (TSDS) index and reduces its size by keeping the last value or by pre-aggregating metrics:
/// </para>
/// <list type="bullet">
/// <item>
/// <para>
/// When running in <c>aggregate</c> mode, it pre-calculates and stores statistical summaries (<c>min</c>, <c>max</c>, <c>sum</c>, <c>value_count</c> and <c>avg</c>)
/// for each metric field grouped by a configured time interval and their dimensions.
/// </para>
/// </item>
/// <item>
/// <para>
/// When running in <c>last_value</c> mode, it keeps the last value for each metric in the configured interval and their dimensions.
/// </para>
/// </item>
/// </list>
/// <para>
/// For example, a TSDS index that contains metrics sampled every 10 seconds can be downsampled to an hourly index.
/// All documents within an hour interval are summarized and stored as a single document in the downsample index.
/// </para>
/// <para>
/// NOTE: Only indices in a time series data stream are supported.
/// Neither field nor document level security can be defined on the source index.
/// The source index must be read only (<c>index.blocks.write: true</c>).
/// The source index must be read-only (<c>index.blocks.write: true</c>).
/// </para>
/// </summary>
public readonly partial struct DownsampleRequestDescriptor
Expand Down Expand Up @@ -228,14 +258,29 @@ public Elastic.Clients.Elasticsearch.IndexManagement.DownsampleRequestDescriptor
/// <summary>
/// <para>
/// Downsample an index.
/// Aggregate a time series (TSDS) index and store pre-computed statistical summaries (<c>min</c>, <c>max</c>, <c>sum</c>, <c>value_count</c> and <c>avg</c>) for each metric field grouped by a configured time interval.
/// Downsamples a time series (TSDS) index and reduces its size by keeping the last value or by pre-aggregating metrics:
/// </para>
/// <list type="bullet">
/// <item>
/// <para>
/// When running in <c>aggregate</c> mode, it pre-calculates and stores statistical summaries (<c>min</c>, <c>max</c>, <c>sum</c>, <c>value_count</c> and <c>avg</c>)
/// for each metric field grouped by a configured time interval and their dimensions.
/// </para>
/// </item>
/// <item>
/// <para>
/// When running in <c>last_value</c> mode, it keeps the last value for each metric in the configured interval and their dimensions.
/// </para>
/// </item>
/// </list>
/// <para>
/// For example, a TSDS index that contains metrics sampled every 10 seconds can be downsampled to an hourly index.
/// All documents within an hour interval are summarized and stored as a single document in the downsample index.
/// </para>
/// <para>
/// NOTE: Only indices in a time series data stream are supported.
/// Neither field nor document level security can be defined on the source index.
/// The source index must be read only (<c>index.blocks.write: true</c>).
/// The source index must be read-only (<c>index.blocks.write: true</c>).
/// </para>
/// </summary>
public readonly partial struct DownsampleRequestDescriptor<TDocument>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.PutDataLifecycleRe
{
reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
LocalJsonValue<Elastic.Clients.Elasticsearch.Duration?> propDataRetention = default;
LocalJsonValue<Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleDownsampling?> propDownsampling = default;
LocalJsonValue<System.Collections.Generic.ICollection<Elastic.Clients.Elasticsearch.IndexManagement.DownsamplingRound>?> propDownsampling = default;
LocalJsonValue<bool?> propEnabled = default;
while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
{
Expand All @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.PutDataLifecycleRe
continue;
}

if (propDownsampling.TryReadProperty(ref reader, options, PropDownsampling, null))
if (propDownsampling.TryReadProperty(ref reader, options, PropDownsampling, static System.Collections.Generic.ICollection<Elastic.Clients.Elasticsearch.IndexManagement.DownsamplingRound>? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue<Elastic.Clients.Elasticsearch.IndexManagement.DownsamplingRound>(o, null)))
{
continue;
}
Expand Down Expand Up @@ -74,7 +74,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien
{
writer.WriteStartObject();
writer.WriteProperty(options, PropDataRetention, value.DataRetention, null, null);
writer.WriteProperty(options, PropDownsampling, value.Downsampling, null, null);
writer.WriteProperty(options, PropDownsampling, value.Downsampling, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection<Elastic.Clients.Elasticsearch.IndexManagement.DownsamplingRound>? v) => w.WriteCollectionValue<Elastic.Clients.Elasticsearch.IndexManagement.DownsamplingRound>(o, v, null));
writer.WriteProperty(options, PropEnabled, value.Enabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue<bool>(o, v));
writer.WriteEndObject();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ internal PutDataLifecycleRequest(Elastic.Clients.Elasticsearch.Serialization.Jso
/// The downsampling configuration to execute for the managed backing index after rollover.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleDownsampling? Downsampling { get; set; }
public System.Collections.Generic.ICollection<Elastic.Clients.Elasticsearch.IndexManagement.DownsamplingRound>? Downsampling { get; set; }

/// <summary>
/// <para>
Expand Down Expand Up @@ -256,7 +256,7 @@ public Elastic.Clients.Elasticsearch.IndexManagement.PutDataLifecycleRequestDesc
/// The downsampling configuration to execute for the managed backing index after rollover.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.IndexManagement.PutDataLifecycleRequestDescriptor Downsampling(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleDownsampling? value)
public Elastic.Clients.Elasticsearch.IndexManagement.PutDataLifecycleRequestDescriptor Downsampling(System.Collections.Generic.ICollection<Elastic.Clients.Elasticsearch.IndexManagement.DownsamplingRound>? value)
{
Instance.Downsampling = value;
return this;
Expand All @@ -267,9 +267,26 @@ public Elastic.Clients.Elasticsearch.IndexManagement.PutDataLifecycleRequestDesc
/// The downsampling configuration to execute for the managed backing index after rollover.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.IndexManagement.PutDataLifecycleRequestDescriptor Downsampling(System.Action<Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleDownsamplingDescriptor> action)
public Elastic.Clients.Elasticsearch.IndexManagement.PutDataLifecycleRequestDescriptor Downsampling(params Elastic.Clients.Elasticsearch.IndexManagement.DownsamplingRound[] values)
{
Instance.Downsampling = Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleDownsamplingDescriptor.Build(action);
Instance.Downsampling = [.. values];
return this;
}

/// <summary>
/// <para>
/// The downsampling configuration to execute for the managed backing index after rollover.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.IndexManagement.PutDataLifecycleRequestDescriptor Downsampling(params System.Action<Elastic.Clients.Elasticsearch.IndexManagement.DownsamplingRoundDescriptor>[] actions)
{
var items = new System.Collections.Generic.List<Elastic.Clients.Elasticsearch.IndexManagement.DownsamplingRound>();
foreach (var action in actions)
{
items.Add(Elastic.Clients.Elasticsearch.IndexManagement.DownsamplingRoundDescriptor.Build(action));
}

Instance.Downsampling = items;
return this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ internal CompletionRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConst

/// <summary>
/// <para>
/// Optional task settings
/// Task settings for the individual inference request. These settings are specific to the &lt;task_type> you specified and override the task settings specified when initializing the service.
/// </para>
/// </summary>
public object? TaskSettings { get; set; }
Expand Down Expand Up @@ -204,7 +204,7 @@ public Elastic.Clients.Elasticsearch.Inference.CompletionRequestDescriptor Input

/// <summary>
/// <para>
/// Optional task settings
/// Task settings for the individual inference request. These settings are specific to the &lt;task_type> you specified and override the task settings specified when initializing the service.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.Inference.CompletionRequestDescriptor TaskSettings(object? value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public sealed partial class DeleteInferenceRequestParameters : Elastic.Transport
{
/// <summary>
/// <para>
/// When true, the endpoint is not deleted and a list of ingest processors which reference this endpoint is returned.
/// When true, checks the semantic_text fields and inference processors that reference the endpoint and returns them in a list, but does not delete the endpoint.
/// </para>
/// </summary>
public bool? DryRun { get => Q<bool?>("dry_run"); set => Q("dry_run", value); }
Expand Down Expand Up @@ -96,7 +96,7 @@ internal DeleteInferenceRequest(Elastic.Clients.Elasticsearch.Serialization.Json

/// <summary>
/// <para>
/// When true, the endpoint is not deleted and a list of ingest processors which reference this endpoint is returned.
/// When true, checks the semantic_text fields and inference processors that reference the endpoint and returns them in a list, but does not delete the endpoint.
/// </para>
/// </summary>
public bool? DryRun { get => Q<bool?>("dry_run"); set => Q("dry_run", value); }
Expand Down Expand Up @@ -167,7 +167,7 @@ public Elastic.Clients.Elasticsearch.Inference.DeleteInferenceRequestDescriptor

/// <summary>
/// <para>
/// When true, the endpoint is not deleted and a list of ingest processors which reference this endpoint is returned.
/// When true, checks the semantic_text fields and inference processors that reference the endpoint and returns them in a list, but does not delete the endpoint.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.Inference.DeleteInferenceRequestDescriptor DryRun(bool? value = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ internal PutAnthropicRequest(Elastic.Clients.Elasticsearch.Serialization.JsonCon

/// <summary>
/// <para>
/// Settings used to install the inference model. These settings are specific to the <c>watsonxai</c> service.
/// Settings used to install the inference model. These settings are specific to the <c>anthropic</c> service.
/// </para>
/// </summary>
public
Expand Down Expand Up @@ -241,7 +241,7 @@ public Elastic.Clients.Elasticsearch.Inference.PutAnthropicRequestDescriptor Chu

/// <summary>
/// <para>
/// Settings used to install the inference model. These settings are specific to the <c>watsonxai</c> service.
/// Settings used to install the inference model. These settings are specific to the <c>anthropic</c> service.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.Inference.PutAnthropicRequestDescriptor ServiceSettings(Elastic.Clients.Elasticsearch.Inference.AnthropicServiceSettings value)
Expand All @@ -252,7 +252,7 @@ public Elastic.Clients.Elasticsearch.Inference.PutAnthropicRequestDescriptor Ser

/// <summary>
/// <para>
/// Settings used to install the inference model. These settings are specific to the <c>watsonxai</c> service.
/// Settings used to install the inference model. These settings are specific to the <c>anthropic</c> service.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.Inference.PutAnthropicRequestDescriptor ServiceSettings(System.Action<Elastic.Clients.Elasticsearch.Inference.AnthropicServiceSettingsDescriptor> action)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ internal PutAzureaistudioRequest(Elastic.Clients.Elasticsearch.Serialization.Jso

/// <summary>
/// <para>
/// Settings used to install the inference model. These settings are specific to the <c>openai</c> service.
/// Settings used to install the inference model. These settings are specific to the <c>azureaistudio</c> service.
/// </para>
/// </summary>
public
Expand Down Expand Up @@ -239,7 +239,7 @@ public Elastic.Clients.Elasticsearch.Inference.PutAzureaistudioRequestDescriptor

/// <summary>
/// <para>
/// Settings used to install the inference model. These settings are specific to the <c>openai</c> service.
/// Settings used to install the inference model. These settings are specific to the <c>azureaistudio</c> service.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.Inference.PutAzureaistudioRequestDescriptor ServiceSettings(Elastic.Clients.Elasticsearch.Inference.AzureAiStudioServiceSettings value)
Expand All @@ -250,7 +250,7 @@ public Elastic.Clients.Elasticsearch.Inference.PutAzureaistudioRequestDescriptor

/// <summary>
/// <para>
/// Settings used to install the inference model. These settings are specific to the <c>openai</c> service.
/// Settings used to install the inference model. These settings are specific to the <c>azureaistudio</c> service.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.Inference.PutAzureaistudioRequestDescriptor ServiceSettings(System.Action<Elastic.Clients.Elasticsearch.Inference.AzureAiStudioServiceSettingsDescriptor> action)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ internal SparseEmbeddingRequest(Elastic.Clients.Elasticsearch.Serialization.Json

/// <summary>
/// <para>
/// Optional task settings
/// Task settings for the individual inference request. These settings are specific to the &lt;task_type> you specified and override the task settings specified when initializing the service.
/// </para>
/// </summary>
public object? TaskSettings { get; set; }
Expand Down Expand Up @@ -188,7 +188,7 @@ public Elastic.Clients.Elasticsearch.Inference.SparseEmbeddingRequestDescriptor

/// <summary>
/// <para>
/// Optional task settings
/// Task settings for the individual inference request. These settings are specific to the &lt;task_type> you specified and override the task settings specified when initializing the service.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.Inference.SparseEmbeddingRequestDescriptor TaskSettings(object? value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ internal StreamCompletionRequest(Elastic.Clients.Elasticsearch.Serialization.Jso

/// <summary>
/// <para>
/// Optional task settings
/// Task settings for the individual inference request. These settings are specific to the &lt;task_type> you specified and override the task settings specified when initializing the service.
/// </para>
/// </summary>
public object? TaskSettings { get; set; }
Expand Down Expand Up @@ -213,7 +213,7 @@ public Elastic.Clients.Elasticsearch.Inference.StreamCompletionRequestDescriptor

/// <summary>
/// <para>
/// Optional task settings
/// Task settings for the individual inference request. These settings are specific to the &lt;task_type> you specified and override the task settings specified when initializing the service.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.Inference.StreamCompletionRequestDescriptor TaskSettings(object? value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ internal TextEmbeddingRequest(Elastic.Clients.Elasticsearch.Serialization.JsonCo

/// <summary>
/// <para>
/// Optional task settings
/// Task settings for the individual inference request. These settings are specific to the &lt;task_type> you specified and override the task settings specified when initializing the service.
/// </para>
/// </summary>
public object? TaskSettings { get; set; }
Expand Down Expand Up @@ -262,7 +262,7 @@ public Elastic.Clients.Elasticsearch.Inference.TextEmbeddingRequestDescriptor In

/// <summary>
/// <para>
/// Optional task settings
/// Task settings for the individual inference request. These settings are specific to the &lt;task_type> you specified and override the task settings specified when initializing the service.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.Inference.TextEmbeddingRequestDescriptor TaskSettings(object? value)
Expand Down
Loading
Loading