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 @@ -449,6 +449,9 @@ internal static class ApiUrlLookup
internal static ApiUrls SqlGetAsyncStatus = new ApiUrls(new[] { "_sql/async/status/{id}" });
internal static ApiUrls SqlQuery = new ApiUrls(new[] { "_sql" });
internal static ApiUrls SqlTranslate = new ApiUrls(new[] { "_sql/translate" });
internal static ApiUrls StreamsLogsDisable = new ApiUrls(new[] { "_streams/logs/_disable" });
internal static ApiUrls StreamsLogsEnable = new ApiUrls(new[] { "_streams/logs/_enable" });
internal static ApiUrls StreamsStatus = new ApiUrls(new[] { "_streams/status" });
internal static ApiUrls SynonymsDeleteSynonym = new ApiUrls(new[] { "_synonyms/{id}" });
internal static ApiUrls SynonymsDeleteSynonymRule = new ApiUrls(new[] { "_synonyms/{set_id}/{rule_id}" });
internal static ApiUrls SynonymsGetSynonym = new ApiUrls(new[] { "_synonyms/{id}" });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public sealed partial class AsyncQueryRequestConverter : System.Text.Json.Serial
private static readonly System.Text.Json.JsonEncodedText PropColumnar = System.Text.Json.JsonEncodedText.Encode("columnar");
private static readonly System.Text.Json.JsonEncodedText PropFilter = System.Text.Json.JsonEncodedText.Encode("filter");
private static readonly System.Text.Json.JsonEncodedText PropIncludeCcsMetadata = System.Text.Json.JsonEncodedText.Encode("include_ccs_metadata");
private static readonly System.Text.Json.JsonEncodedText PropIncludeCcsMetadata1 = System.Text.Json.JsonEncodedText.Encode("include_execution_metadata");
private static readonly System.Text.Json.JsonEncodedText PropKeepAlive = System.Text.Json.JsonEncodedText.Encode("keep_alive");
private static readonly System.Text.Json.JsonEncodedText PropKeepOnCompletion = System.Text.Json.JsonEncodedText.Encode("keep_on_completion");
private static readonly System.Text.Json.JsonEncodedText PropLocale = System.Text.Json.JsonEncodedText.Encode("locale");
Expand Down Expand Up @@ -61,7 +62,7 @@ public override Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequest Read(ref Sy
continue;
}

if (propIncludeCcsMetadata.TryReadProperty(ref reader, options, PropIncludeCcsMetadata, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue<bool>(o)))
if (propIncludeCcsMetadata.TryReadProperty(ref reader, options, PropIncludeCcsMetadata, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue<bool>(o)) || propIncludeCcsMetadata.TryReadProperty(ref reader, options, PropIncludeCcsMetadata1, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue<bool>(o)))
{
continue;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ internal AsyncQueryRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConst

/// <summary>
/// <para>
/// When set to <c>true</c> and performing a cross-cluster query, the response will include an extra <c>_clusters</c>
/// When set to <c>true</c> and performing a cross-cluster/cross-project query, the response will include an extra <c>_clusters</c>
/// object with information about the clusters that participated in the search along with info such as shards
/// count.
/// </para>
Expand Down Expand Up @@ -361,7 +361,7 @@ public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor Filter<T>(

/// <summary>
/// <para>
/// When set to <c>true</c> and performing a cross-cluster query, the response will include an extra <c>_clusters</c>
/// When set to <c>true</c> and performing a cross-cluster/cross-project query, the response will include an extra <c>_clusters</c>
/// object with information about the clusters that participated in the search along with info such as shards
/// count.
/// </para>
Expand Down Expand Up @@ -635,7 +635,7 @@ public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor<TDocument>

/// <summary>
/// <para>
/// When set to <c>true</c> and performing a cross-cluster query, the response will include an extra <c>_clusters</c>
/// When set to <c>true</c> and performing a cross-cluster/cross-project query, the response will include an extra <c>_clusters</c>
/// object with information about the clusters that participated in the search along with info such as shards
/// count.
/// </para>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public sealed partial class EsqlQueryRequestConverter : System.Text.Json.Seriali
private static readonly System.Text.Json.JsonEncodedText PropColumnar = System.Text.Json.JsonEncodedText.Encode("columnar");
private static readonly System.Text.Json.JsonEncodedText PropFilter = System.Text.Json.JsonEncodedText.Encode("filter");
private static readonly System.Text.Json.JsonEncodedText PropIncludeCcsMetadata = System.Text.Json.JsonEncodedText.Encode("include_ccs_metadata");
private static readonly System.Text.Json.JsonEncodedText PropIncludeCcsMetadata1 = System.Text.Json.JsonEncodedText.Encode("include_execution_metadata");
private static readonly System.Text.Json.JsonEncodedText PropLocale = System.Text.Json.JsonEncodedText.Encode("locale");
private static readonly System.Text.Json.JsonEncodedText PropParams = System.Text.Json.JsonEncodedText.Encode("params");
private static readonly System.Text.Json.JsonEncodedText PropProfile = System.Text.Json.JsonEncodedText.Encode("profile");
Expand Down Expand Up @@ -55,7 +56,7 @@ public override Elastic.Clients.Elasticsearch.Esql.EsqlQueryRequest Read(ref Sys
continue;
}

if (propIncludeCcsMetadata.TryReadProperty(ref reader, options, PropIncludeCcsMetadata, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue<bool>(o)))
if (propIncludeCcsMetadata.TryReadProperty(ref reader, options, PropIncludeCcsMetadata, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue<bool>(o)) || propIncludeCcsMetadata.TryReadProperty(ref reader, options, PropIncludeCcsMetadata1, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue<bool>(o)))
{
continue;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ internal EsqlQueryRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstr

/// <summary>
/// <para>
/// When set to <c>true</c> and performing a cross-cluster query, the response will include an extra <c>_clusters</c>
/// When set to <c>true</c> and performing a cross-cluster/cross-project query, the response will include an extra <c>_clusters</c>
/// object with information about the clusters that participated in the search along with info such as shards
/// count.
/// </para>
Expand Down Expand Up @@ -312,7 +312,7 @@ public Elastic.Clients.Elasticsearch.Esql.EsqlQueryRequestDescriptor Filter<T>(S

/// <summary>
/// <para>
/// When set to <c>true</c> and performing a cross-cluster query, the response will include an extra <c>_clusters</c>
/// When set to <c>true</c> and performing a cross-cluster/cross-project query, the response will include an extra <c>_clusters</c>
/// object with information about the clusters that participated in the search along with info such as shards
/// count.
/// </para>
Expand Down Expand Up @@ -538,7 +538,7 @@ public Elastic.Clients.Elasticsearch.Esql.EsqlQueryRequestDescriptor<TDocument>

/// <summary>
/// <para>
/// When set to <c>true</c> and performing a cross-cluster query, the response will include an extra <c>_clusters</c>
/// When set to <c>true</c> and performing a cross-cluster/cross-project query, the response will include an extra <c>_clusters</c>
/// object with information about the clusters that participated in the search along with info such as shards
/// count.
/// </para>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public sealed partial class CreateFromRequestConverter : System.Text.Json.Serial
{
public override Elastic.Clients.Elasticsearch.IndexManagement.CreateFromRequest Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
{
return new Elastic.Clients.Elasticsearch.IndexManagement.CreateFromRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { CreateFrom = reader.ReadValue<Elastic.Clients.Elasticsearch.IndexManagement.CreateFrom>(options, null) };
return new Elastic.Clients.Elasticsearch.IndexManagement.CreateFromRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { CreateFrom = reader.ReadValue<Elastic.Clients.Elasticsearch.IndexManagement.CreateFrom?>(options, null) };
}

public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.CreateFromRequest value, System.Text.Json.JsonSerializerOptions options)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,10 @@ public sealed partial class CreateFromRequestParameters : Elastic.Transport.Requ
[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.IndexManagement.Json.CreateFromRequestConverter))]
public sealed partial class CreateFromRequest : Elastic.Clients.Elasticsearch.Requests.PlainRequest<Elastic.Clients.Elasticsearch.IndexManagement.CreateFromRequestParameters>
{
[System.Obsolete("The request contains additional required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")]
[System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
public CreateFromRequest(Elastic.Clients.Elasticsearch.IndexName source, Elastic.Clients.Elasticsearch.IndexName dest) : base(r => r.Required("source", source).Required("dest", dest))
{
}

[System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
public CreateFromRequest(Elastic.Clients.Elasticsearch.IndexName source, Elastic.Clients.Elasticsearch.IndexName dest, Elastic.Clients.Elasticsearch.IndexManagement.CreateFrom createFrom) : base(r => r.Required("source", source).Required("dest", dest))
{
CreateFrom = createFrom;
}
#if NET7_0_OR_GREATER
public CreateFromRequest()
{
Expand Down Expand Up @@ -89,11 +82,7 @@ internal CreateFromRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConst
required
#endif
Elastic.Clients.Elasticsearch.IndexName Source { get => P<Elastic.Clients.Elasticsearch.IndexName>("source"); set => PR("source", value); }
public
#if NET7_0_OR_GREATER
required
#endif
Elastic.Clients.Elasticsearch.IndexManagement.CreateFrom CreateFrom { get; set; }
public Elastic.Clients.Elasticsearch.IndexManagement.CreateFrom? CreateFrom { get; set; }
}

/// <summary>
Expand All @@ -116,9 +105,7 @@ public CreateFromRequestDescriptor(Elastic.Clients.Elasticsearch.IndexManagement

public CreateFromRequestDescriptor(Elastic.Clients.Elasticsearch.IndexName source, Elastic.Clients.Elasticsearch.IndexName dest)
{
#pragma warning disable CS0618
Instance = new Elastic.Clients.Elasticsearch.IndexManagement.CreateFromRequest(source, dest);
#pragma warning restore CS0618
}

[System.Obsolete("The use of the parameterless constructor is not permitted for this type.")]
Expand Down Expand Up @@ -152,7 +139,7 @@ public Elastic.Clients.Elasticsearch.IndexManagement.CreateFromRequestDescriptor
return this;
}

public Elastic.Clients.Elasticsearch.IndexManagement.CreateFromRequestDescriptor CreateFrom(Elastic.Clients.Elasticsearch.IndexManagement.CreateFrom value)
public Elastic.Clients.Elasticsearch.IndexManagement.CreateFromRequestDescriptor CreateFrom(Elastic.Clients.Elasticsearch.IndexManagement.CreateFrom? value)
{
Instance.CreateFrom = value;
return this;
Expand Down Expand Up @@ -247,9 +234,7 @@ public CreateFromRequestDescriptor(Elastic.Clients.Elasticsearch.IndexManagement

public CreateFromRequestDescriptor(Elastic.Clients.Elasticsearch.IndexName source, Elastic.Clients.Elasticsearch.IndexName dest)
{
#pragma warning disable CS0618
Instance = new Elastic.Clients.Elasticsearch.IndexManagement.CreateFromRequest(source, dest);
#pragma warning restore CS0618
}

[System.Obsolete("The use of the parameterless constructor is not permitted for this type.")]
Expand Down Expand Up @@ -283,7 +268,7 @@ public Elastic.Clients.Elasticsearch.IndexManagement.CreateFromRequestDescriptor
return this;
}

public Elastic.Clients.Elasticsearch.IndexManagement.CreateFromRequestDescriptor<TDocument> CreateFrom(Elastic.Clients.Elasticsearch.IndexManagement.CreateFrom value)
public Elastic.Clients.Elasticsearch.IndexManagement.CreateFromRequestDescriptor<TDocument> CreateFrom(Elastic.Clients.Elasticsearch.IndexManagement.CreateFrom? value)
{
Instance.CreateFrom = value;
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ public sealed partial class DiskUsageRequestParameters : Elastic.Transport.Reque
/// Since stored fields are stored together in a compressed format, the sizes of stored fields are also estimates and can be inaccurate.
/// The stored size of the <c>_id</c> field is likely underestimated while the <c>_source</c> field is overestimated.
/// </para>
/// <para>
/// For usage examples see the External documentation or refer to <a href="https://www.elastic.co/docs/reference/elasticsearch/rest-apis/index-disk-usage">Analyze the index disk usage example</a> for an example.
/// </para>
/// </summary>
[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.IndexManagement.Json.DiskUsageRequestConverter))]
public sealed partial class DiskUsageRequest : Elastic.Clients.Elasticsearch.Requests.PlainRequest<Elastic.Clients.Elasticsearch.IndexManagement.DiskUsageRequestParameters>
Expand Down Expand Up @@ -172,6 +175,9 @@ internal DiskUsageRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstr
/// Since stored fields are stored together in a compressed format, the sizes of stored fields are also estimates and can be inaccurate.
/// The stored size of the <c>_id</c> field is likely underestimated while the <c>_source</c> field is overestimated.
/// </para>
/// <para>
/// For usage examples see the External documentation or refer to <a href="https://www.elastic.co/docs/reference/elasticsearch/rest-apis/index-disk-usage">Analyze the index disk usage example</a> for an example.
/// </para>
/// </summary>
public readonly partial struct DiskUsageRequestDescriptor
{
Expand Down Expand Up @@ -346,6 +352,9 @@ public Elastic.Clients.Elasticsearch.IndexManagement.DiskUsageRequestDescriptor
/// Since stored fields are stored together in a compressed format, the sizes of stored fields are also estimates and can be inaccurate.
/// The stored size of the <c>_id</c> field is likely underestimated while the <c>_source</c> field is overestimated.
/// </para>
/// <para>
/// For usage examples see the External documentation or refer to <a href="https://www.elastic.co/docs/reference/elasticsearch/rest-apis/index-disk-usage">Analyze the index disk usage example</a> for an example.
/// </para>
/// </summary>
public readonly partial struct DiskUsageRequestDescriptor<TDocument>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ public sealed partial class RefreshRequestParameters : Elastic.Transport.Request
/// You can change this default interval with the <c>index.refresh_interval</c> setting.
/// </para>
/// <para>
/// In Elastic Cloud Serverless, the default refresh interval is 5 seconds across all indices.
/// </para>
/// <para>
/// Refresh requests are synchronous and do not return a response until the refresh operation completes.
/// </para>
/// <para>
Expand Down Expand Up @@ -147,6 +150,9 @@ internal RefreshRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstruc
/// You can change this default interval with the <c>index.refresh_interval</c> setting.
/// </para>
/// <para>
/// In Elastic Cloud Serverless, the default refresh interval is 5 seconds across all indices.
/// </para>
/// <para>
/// Refresh requests are synchronous and do not return a response until the refresh operation completes.
/// </para>
/// <para>
Expand Down Expand Up @@ -310,6 +316,9 @@ public Elastic.Clients.Elasticsearch.IndexManagement.RefreshRequestDescriptor Re
/// You can change this default interval with the <c>index.refresh_interval</c> setting.
/// </para>
/// <para>
/// In Elastic Cloud Serverless, the default refresh interval is 5 seconds across all indices.
/// </para>
/// <para>
/// Refresh requests are synchronous and do not return a response until the refresh operation completes.
/// </para>
/// <para>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,11 @@ public sealed partial class SimulateIndexTemplateRequestConverter : System.Text.
{
public override Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTemplateRequest Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
{
reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
{
if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
{
reader.Skip();
continue;
}

throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'.");
}

reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject);
return new Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTemplateRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)
{
};
return new Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTemplateRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { IndexTemplate = reader.ReadValue<Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplate?>(options, null) };
}

public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTemplateRequest value, System.Text.Json.JsonSerializerOptions options)
{
writer.WriteStartObject();
writer.WriteEndObject();
writer.WriteValue(options, value.IndexTemplate, null);
}
}
Loading
Loading