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 @@ -457,6 +457,7 @@ internal static class ApiUrlLookup
internal static ApiUrls TransformManagementPutTransform = new ApiUrls(new[] { "_transform/{transform_id}" });
internal static ApiUrls TransformManagementResetTransform = new ApiUrls(new[] { "_transform/{transform_id}/_reset" });
internal static ApiUrls TransformManagementScheduleNowTransform = new ApiUrls(new[] { "_transform/{transform_id}/_schedule_now" });
internal static ApiUrls TransformManagementSetUpgradeMode = new ApiUrls(new[] { "_transform/set_upgrade_mode" });
internal static ApiUrls TransformManagementStartTransform = new ApiUrls(new[] { "_transform/{transform_id}/_start" });
internal static ApiUrls TransformManagementStopTransform = new ApiUrls(new[] { "_transform/{transform_id}/_stop" });
internal static ApiUrls TransformManagementUpdateTransform = new ApiUrls(new[] { "_transform/{transform_id}/_update" });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@ public sealed partial class DeleteByQueryRequestConverter : System.Text.Json.Ser
private static readonly System.Text.Json.JsonEncodedText PropMaxDocs = System.Text.Json.JsonEncodedText.Encode("max_docs");
private static readonly System.Text.Json.JsonEncodedText PropQuery = System.Text.Json.JsonEncodedText.Encode("query");
private static readonly System.Text.Json.JsonEncodedText PropSlice = System.Text.Json.JsonEncodedText.Encode("slice");
private static readonly System.Text.Json.JsonEncodedText PropSort = System.Text.Json.JsonEncodedText.Encode("sort");

public override Elastic.Clients.Elasticsearch.DeleteByQueryRequest Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
{
reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
LocalJsonValue<long?> propMaxDocs = default;
LocalJsonValue<Elastic.Clients.Elasticsearch.QueryDsl.Query?> propQuery = default;
LocalJsonValue<Elastic.Clients.Elasticsearch.SlicedScroll?> propSlice = default;
LocalJsonValue<System.Collections.Generic.ICollection<Elastic.Clients.Elasticsearch.SortOptions>?> propSort = default;
while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
{
if (propMaxDocs.TryReadProperty(ref reader, options, PropMaxDocs, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue<long>(o)))
Expand All @@ -52,6 +54,11 @@ public override Elastic.Clients.Elasticsearch.DeleteByQueryRequest Read(ref Syst
continue;
}

if (propSort.TryReadProperty(ref reader, options, PropSort, static System.Collections.Generic.ICollection<Elastic.Clients.Elasticsearch.SortOptions>? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadSingleOrManyCollectionValue<Elastic.Clients.Elasticsearch.SortOptions>(o, null)))
{
continue;
}

if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
{
reader.Skip();
Expand All @@ -66,7 +73,8 @@ public override Elastic.Clients.Elasticsearch.DeleteByQueryRequest Read(ref Syst
{
MaxDocs = propMaxDocs.Value,
Query = propQuery.Value,
Slice = propSlice.Value
Slice = propSlice.Value,
Sort = propSort.Value
};
}

Expand All @@ -76,6 +84,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien
writer.WriteProperty(options, PropMaxDocs, value.MaxDocs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue<long>(o, v));
writer.WriteProperty(options, PropQuery, value.Query, null, null);
writer.WriteProperty(options, PropSlice, value.Slice, null, null);
writer.WriteProperty(options, PropSort, value.Sort, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection<Elastic.Clients.Elasticsearch.SortOptions>? v) => w.WriteSingleOrManyCollectionValue<Elastic.Clients.Elasticsearch.SortOptions>(o, v, null));
writer.WriteEndObject();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,6 @@ public sealed partial class DeleteByQueryRequestParameters : Elastic.Transport.R
/// </summary>
public Elastic.Clients.Elasticsearch.Slices? Slices { get => Q<Elastic.Clients.Elasticsearch.Slices?>("slices"); set => Q("slices", value); }

/// <summary>
/// <para>
/// A comma-separated list of <c>&lt;field>:&lt;direction></c> pairs.
/// </para>
/// </summary>
public System.Collections.Generic.ICollection<string>? Sort { get => Q<System.Collections.Generic.ICollection<string>?>("sort"); set => Q("sort", value); }

/// <summary>
/// <para>
/// The specific <c>tag</c> of the request for logging and statistical purposes.
Expand Down Expand Up @@ -601,13 +594,6 @@ internal DeleteByQueryRequest(Elastic.Clients.Elasticsearch.Serialization.JsonCo
/// </summary>
public Elastic.Clients.Elasticsearch.Slices? Slices { get => Q<Elastic.Clients.Elasticsearch.Slices?>("slices"); set => Q("slices", value); }

/// <summary>
/// <para>
/// A comma-separated list of <c>&lt;field>:&lt;direction></c> pairs.
/// </para>
/// </summary>
public System.Collections.Generic.ICollection<string>? Sort { get => Q<System.Collections.Generic.ICollection<string>?>("sort"); set => Q("sort", value); }

/// <summary>
/// <para>
/// The specific <c>tag</c> of the request for logging and statistical purposes.
Expand Down Expand Up @@ -681,6 +667,13 @@ internal DeleteByQueryRequest(Elastic.Clients.Elasticsearch.Serialization.JsonCo
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.SlicedScroll? Slice { get; set; }

/// <summary>
/// <para>
/// A sort object that specifies the order of deleted documents.
/// </para>
/// </summary>
public System.Collections.Generic.ICollection<Elastic.Clients.Elasticsearch.SortOptions>? Sort { get; set; }
}

/// <summary>
Expand Down Expand Up @@ -1142,28 +1135,6 @@ public Elastic.Clients.Elasticsearch.DeleteByQueryRequestDescriptor Slices(Syste
return this;
}

/// <summary>
/// <para>
/// A comma-separated list of <c>&lt;field>:&lt;direction></c> pairs.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.DeleteByQueryRequestDescriptor Sort(System.Collections.Generic.ICollection<string>? value)
{
Instance.Sort = value;
return this;
}

/// <summary>
/// <para>
/// A comma-separated list of <c>&lt;field>:&lt;direction></c> pairs.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.DeleteByQueryRequestDescriptor Sort(params string[] values)
{
Instance.Sort = [.. values];
return this;
}

/// <summary>
/// <para>
/// The specific <c>tag</c> of the request for logging and statistical purposes.
Expand Down Expand Up @@ -1329,6 +1300,62 @@ public Elastic.Clients.Elasticsearch.DeleteByQueryRequestDescriptor Slice<T>(Sys
return this;
}

/// <summary>
/// <para>
/// A sort object that specifies the order of deleted documents.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.DeleteByQueryRequestDescriptor Sort(System.Collections.Generic.ICollection<Elastic.Clients.Elasticsearch.SortOptions>? value)
{
Instance.Sort = value;
return this;
}

/// <summary>
/// <para>
/// A sort object that specifies the order of deleted documents.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.DeleteByQueryRequestDescriptor Sort(params Elastic.Clients.Elasticsearch.SortOptions[] values)
{
Instance.Sort = [.. values];
return this;
}

/// <summary>
/// <para>
/// A sort object that specifies the order of deleted documents.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.DeleteByQueryRequestDescriptor Sort(params System.Action<Elastic.Clients.Elasticsearch.SortOptionsDescriptor>[] actions)
{
var items = new System.Collections.Generic.List<Elastic.Clients.Elasticsearch.SortOptions>();
foreach (var action in actions)
{
items.Add(Elastic.Clients.Elasticsearch.SortOptionsDescriptor.Build(action));
}

Instance.Sort = items;
return this;
}

/// <summary>
/// <para>
/// A sort object that specifies the order of deleted documents.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.DeleteByQueryRequestDescriptor Sort<T>(params System.Action<Elastic.Clients.Elasticsearch.SortOptionsDescriptor<T>>[] actions)
{
var items = new System.Collections.Generic.List<Elastic.Clients.Elasticsearch.SortOptions>();
foreach (var action in actions)
{
items.Add(Elastic.Clients.Elasticsearch.SortOptionsDescriptor<T>.Build(action));
}

Instance.Sort = items;
return this;
}

[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
internal static Elastic.Clients.Elasticsearch.DeleteByQueryRequest Build(System.Action<Elastic.Clients.Elasticsearch.DeleteByQueryRequestDescriptor> action)
{
Expand Down Expand Up @@ -1838,28 +1865,6 @@ public Elastic.Clients.Elasticsearch.DeleteByQueryRequestDescriptor<TDocument> S
return this;
}

/// <summary>
/// <para>
/// A comma-separated list of <c>&lt;field>:&lt;direction></c> pairs.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.DeleteByQueryRequestDescriptor<TDocument> Sort(System.Collections.Generic.ICollection<string>? value)
{
Instance.Sort = value;
return this;
}

/// <summary>
/// <para>
/// A comma-separated list of <c>&lt;field>:&lt;direction></c> pairs.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.DeleteByQueryRequestDescriptor<TDocument> Sort(params string[] values)
{
Instance.Sort = [.. values];
return this;
}

/// <summary>
/// <para>
/// The specific <c>tag</c> of the request for logging and statistical purposes.
Expand Down Expand Up @@ -2003,6 +2008,45 @@ public Elastic.Clients.Elasticsearch.DeleteByQueryRequestDescriptor<TDocument> S
return this;
}

/// <summary>
/// <para>
/// A sort object that specifies the order of deleted documents.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.DeleteByQueryRequestDescriptor<TDocument> Sort(System.Collections.Generic.ICollection<Elastic.Clients.Elasticsearch.SortOptions>? value)
{
Instance.Sort = value;
return this;
}

/// <summary>
/// <para>
/// A sort object that specifies the order of deleted documents.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.DeleteByQueryRequestDescriptor<TDocument> Sort(params Elastic.Clients.Elasticsearch.SortOptions[] values)
{
Instance.Sort = [.. values];
return this;
}

/// <summary>
/// <para>
/// A sort object that specifies the order of deleted documents.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.DeleteByQueryRequestDescriptor<TDocument> Sort(params System.Action<Elastic.Clients.Elasticsearch.SortOptionsDescriptor<TDocument>>[] actions)
{
var items = new System.Collections.Generic.List<Elastic.Clients.Elasticsearch.SortOptions>();
foreach (var action in actions)
{
items.Add(Elastic.Clients.Elasticsearch.SortOptionsDescriptor<TDocument>.Build(action));
}

Instance.Sort = items;
return this;
}

[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
internal static Elastic.Clients.Elasticsearch.DeleteByQueryRequest Build(System.Action<Elastic.Clients.Elasticsearch.DeleteByQueryRequestDescriptor<TDocument>> action)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public sealed partial class RolloverRequestParameters : Elastic.Transport.Reques
/// <summary>
/// <para>
/// Roll over to a new index.
/// TIP: It is recommended to use the index lifecycle rollover action to automate rollovers.
/// TIP: We recommend using the index lifecycle rollover action to automate rollovers. However, Serverless does not support Index Lifecycle Management (ILM), so don't use this approach in the Serverless context.
/// </para>
/// <para>
/// The rollover API creates a new index for a data stream or index alias.
Expand Down Expand Up @@ -248,7 +248,7 @@ internal RolloverRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstru
/// <summary>
/// <para>
/// Roll over to a new index.
/// TIP: It is recommended to use the index lifecycle rollover action to automate rollovers.
/// TIP: We recommend using the index lifecycle rollover action to automate rollovers. However, Serverless does not support Index Lifecycle Management (ILM), so don't use this approach in the Serverless context.
/// </para>
/// <para>
/// The rollover API creates a new index for a data stream or index alias.
Expand Down Expand Up @@ -707,7 +707,7 @@ public Elastic.Clients.Elasticsearch.IndexManagement.RolloverRequestDescriptor R
/// <summary>
/// <para>
/// Roll over to a new index.
/// TIP: It is recommended to use the index lifecycle rollover action to automate rollovers.
/// TIP: We recommend using the index lifecycle rollover action to automate rollovers. However, Serverless does not support Index Lifecycle Management (ILM), so don't use this approach in the Serverless context.
/// </para>
/// <para>
/// The rollover API creates a new index for a data stream or index alias.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,18 @@ public sealed partial class CleanupRepositoryRequestParameters : Elastic.Transpo
{
/// <summary>
/// <para>
/// Period to wait for a connection to the master node.
/// The period to wait for a connection to the master node.
/// If the master node is not available before the timeout expires, the request fails and returns an error.
/// To indicate that the request should never timeout, set it to <c>-1</c>
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q<Elastic.Clients.Elasticsearch.Duration?>("master_timeout"); set => Q("master_timeout", value); }

/// <summary>
/// <para>
/// Period to wait for a response.
/// The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata.
/// If no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged.
/// To indicate that the request should never timeout, set it to <c>-1</c>.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q<Elastic.Clients.Elasticsearch.Duration?>("timeout"); set => Q("timeout", value); }
Expand Down Expand Up @@ -74,7 +78,7 @@ internal CleanupRepositoryRequest(Elastic.Clients.Elasticsearch.Serialization.Js

/// <summary>
/// <para>
/// Snapshot repository to clean up.
/// The name of the snapshot repository to clean up.
/// </para>
/// </summary>
public
Expand All @@ -85,14 +89,18 @@ internal CleanupRepositoryRequest(Elastic.Clients.Elasticsearch.Serialization.Js

/// <summary>
/// <para>
/// Period to wait for a connection to the master node.
/// The period to wait for a connection to the master node.
/// If the master node is not available before the timeout expires, the request fails and returns an error.
/// To indicate that the request should never timeout, set it to <c>-1</c>
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q<Elastic.Clients.Elasticsearch.Duration?>("master_timeout"); set => Q("master_timeout", value); }

/// <summary>
/// <para>
/// Period to wait for a response.
/// The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata.
/// If no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged.
/// To indicate that the request should never timeout, set it to <c>-1</c>.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q<Elastic.Clients.Elasticsearch.Duration?>("timeout"); set => Q("timeout", value); }
Expand Down Expand Up @@ -130,7 +138,7 @@ public CleanupRepositoryRequestDescriptor()

/// <summary>
/// <para>
/// Snapshot repository to clean up.
/// The name of the snapshot repository to clean up.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.Snapshot.CleanupRepositoryRequestDescriptor Name(Elastic.Clients.Elasticsearch.Name value)
Expand All @@ -141,7 +149,9 @@ public Elastic.Clients.Elasticsearch.Snapshot.CleanupRepositoryRequestDescriptor

/// <summary>
/// <para>
/// Period to wait for a connection to the master node.
/// The period to wait for a connection to the master node.
/// If the master node is not available before the timeout expires, the request fails and returns an error.
/// To indicate that the request should never timeout, set it to <c>-1</c>
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.Snapshot.CleanupRepositoryRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? value)
Expand All @@ -152,7 +162,9 @@ public Elastic.Clients.Elasticsearch.Snapshot.CleanupRepositoryRequestDescriptor

/// <summary>
/// <para>
/// Period to wait for a response.
/// The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata.
/// If no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged.
/// To indicate that the request should never timeout, set it to <c>-1</c>.
/// </para>
/// </summary>
public Elastic.Clients.Elasticsearch.Snapshot.CleanupRepositoryRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? value)
Expand Down
Loading
Loading