Skip to content

Regenerate client using the latest specification #7920

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 @@ -32,18 +32,18 @@ namespace Elastic.Clients.Elasticsearch.Cluster;
public sealed class ClusterStatsRequestParameters : RequestParameters
{
/// <summary>
/// <para>Return settings in flat format (default: false)</para>
/// <para>If `true`, returns settings in flat format.</para>
/// </summary>
public bool? FlatSettings { get => Q<bool?>("flat_settings"); set => Q("flat_settings", value); }

/// <summary>
/// <para>Period to wait for each node to respond. If a node does not respond before its timeout expires, the response does not include its stats. However, timed out nodes are included in the response’s _nodes.failed property. Defaults to no timeout.</para>
/// <para>Period to wait for each node to respond.<br/>If a node does not respond before its timeout expires, the response does not include its stats.<br/>However, timed out nodes are included in the response’s `_nodes.failed` property. Defaults to no timeout.</para>
/// </summary>
public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q<Elastic.Clients.Elasticsearch.Duration?>("timeout"); set => Q("timeout", value); }
}

/// <summary>
/// <para>Returns high-level overview of cluster statistics.</para>
/// <para>Returns cluster statistics.<br/>It returns basic index metrics (shard numbers, store size, memory usage) and information about the current nodes that form the cluster (number, roles, os, jvm versions, memory usage, cpu and installed plugins).</para>
/// </summary>
public sealed partial class ClusterStatsRequest : PlainRequest<ClusterStatsRequestParameters>
{
Expand All @@ -62,20 +62,20 @@ public ClusterStatsRequest(Elastic.Clients.Elasticsearch.NodeIds? node_id) : bas
internal override bool SupportsBody => false;

/// <summary>
/// <para>Return settings in flat format (default: false)</para>
/// <para>If `true`, returns settings in flat format.</para>
/// </summary>
[JsonIgnore]
public bool? FlatSettings { get => Q<bool?>("flat_settings"); set => Q("flat_settings", value); }

/// <summary>
/// <para>Period to wait for each node to respond. If a node does not respond before its timeout expires, the response does not include its stats. However, timed out nodes are included in the response’s _nodes.failed property. Defaults to no timeout.</para>
/// <para>Period to wait for each node to respond.<br/>If a node does not respond before its timeout expires, the response does not include its stats.<br/>However, timed out nodes are included in the response’s `_nodes.failed` property. Defaults to no timeout.</para>
/// </summary>
[JsonIgnore]
public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q<Elastic.Clients.Elasticsearch.Duration?>("timeout"); set => Q("timeout", value); }
}

/// <summary>
/// <para>Returns high-level overview of cluster statistics.</para>
/// <para>Returns cluster statistics.<br/>It returns basic index metrics (shard numbers, store size, memory usage) and information about the current nodes that form the cluster (number, roles, os, jvm versions, memory usage, cpu and installed plugins).</para>
/// </summary>
public sealed partial class ClusterStatsRequestDescriptor : RequestDescriptor<ClusterStatsRequestDescriptor, ClusterStatsRequestParameters>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace Elastic.Clients.Elasticsearch.Cluster;
public sealed partial class ClusterStatsResponse : ElasticsearchResponse
{
/// <summary>
/// <para>Name of the cluster, based on the Cluster name setting setting.</para>
/// <para>Name of the cluster, based on the cluster name setting.</para>
/// </summary>
[JsonInclude, JsonPropertyName("cluster_name")]
public string ClusterName { get; init; }
Expand Down Expand Up @@ -60,7 +60,7 @@ public sealed partial class ClusterStatsResponse : ElasticsearchResponse
public Elastic.Clients.Elasticsearch.HealthStatus Status { get; init; }

/// <summary>
/// <para>Unix timestamp, in milliseconds, of the last time the cluster statistics were refreshed.</para>
/// <para>Unix timestamp, in milliseconds, for the last time the cluster statistics were refreshed.</para>
/// </summary>
[JsonInclude, JsonPropertyName("timestamp")]
public long Timestamp { get; init; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,28 +32,28 @@ namespace Elastic.Clients.Elasticsearch.Cluster;
public sealed class GetClusterSettingsRequestParameters : RequestParameters
{
/// <summary>
/// <para>Return settings in flat format (default: false)</para>
/// <para>If `true`, returns settings in flat format.</para>
/// </summary>
public bool? FlatSettings { get => Q<bool?>("flat_settings"); set => Q("flat_settings", value); }

/// <summary>
/// <para>Whether to return all default clusters setting.</para>
/// <para>If `true`, returns default cluster settings from the local node.</para>
/// </summary>
public bool? IncludeDefaults { get => Q<bool?>("include_defaults"); set => Q("include_defaults", value); }

/// <summary>
/// <para>Explicit operation timeout for connection to master node</para>
/// <para>Period to wait for a connection to the master node.<br/>If no response is received before the timeout expires, the request fails and returns an error.</para>
/// </summary>
public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q<Elastic.Clients.Elasticsearch.Duration?>("master_timeout"); set => Q("master_timeout", value); }

/// <summary>
/// <para>Explicit operation timeout</para>
/// <para>Period to wait for a response.<br/>If no response is received before the timeout expires, the request fails and returns an error.</para>
/// </summary>
public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q<Elastic.Clients.Elasticsearch.Duration?>("timeout"); set => Q("timeout", value); }
}

/// <summary>
/// <para>Returns cluster settings.</para>
/// <para>Returns cluster-wide settings.<br/>By default, it returns only settings that have been explicitly defined.</para>
/// </summary>
public sealed partial class GetClusterSettingsRequest : PlainRequest<GetClusterSettingsRequestParameters>
{
Expand All @@ -64,32 +64,32 @@ public sealed partial class GetClusterSettingsRequest : PlainRequest<GetClusterS
internal override bool SupportsBody => false;

/// <summary>
/// <para>Return settings in flat format (default: false)</para>
/// <para>If `true`, returns settings in flat format.</para>
/// </summary>
[JsonIgnore]
public bool? FlatSettings { get => Q<bool?>("flat_settings"); set => Q("flat_settings", value); }

/// <summary>
/// <para>Whether to return all default clusters setting.</para>
/// <para>If `true`, returns default cluster settings from the local node.</para>
/// </summary>
[JsonIgnore]
public bool? IncludeDefaults { get => Q<bool?>("include_defaults"); set => Q("include_defaults", value); }

/// <summary>
/// <para>Explicit operation timeout for connection to master node</para>
/// <para>Period to wait for a connection to the master node.<br/>If no response is received before the timeout expires, the request fails and returns an error.</para>
/// </summary>
[JsonIgnore]
public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q<Elastic.Clients.Elasticsearch.Duration?>("master_timeout"); set => Q("master_timeout", value); }

/// <summary>
/// <para>Explicit operation timeout</para>
/// <para>Period to wait for a response.<br/>If no response is received before the timeout expires, the request fails and returns an error.</para>
/// </summary>
[JsonIgnore]
public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q<Elastic.Clients.Elasticsearch.Duration?>("timeout"); set => Q("timeout", value); }
}

/// <summary>
/// <para>Returns cluster settings.</para>
/// <para>Returns cluster-wide settings.<br/>By default, it returns only settings that have been explicitly defined.</para>
/// </summary>
public sealed partial class GetClusterSettingsRequestDescriptor : RequestDescriptor<GetClusterSettingsRequestDescriptor, GetClusterSettingsRequestParameters>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,18 @@ namespace Elastic.Clients.Elasticsearch.Cluster;
public sealed class PendingTasksRequestParameters : RequestParameters
{
/// <summary>
/// <para>Return local information, do not retrieve the state from master node (default: false)</para>
/// <para>If `true`, the request retrieves information from the local node only.<br/>If `false`, information is retrieved from the master node.</para>
/// </summary>
public bool? Local { get => Q<bool?>("local"); set => Q("local", value); }

/// <summary>
/// <para>Specify timeout for connection to master</para>
/// <para>Period to wait for a connection to the master node.<br/>If no response is received before the timeout expires, the request fails and returns an error.</para>
/// </summary>
public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q<Elastic.Clients.Elasticsearch.Duration?>("master_timeout"); set => Q("master_timeout", value); }
}

/// <summary>
/// <para>Returns a list of any cluster-level changes (e.g. create index, update mapping,<br/>allocate or fail shard) which have not yet been executed.</para>
/// <para>Returns cluster-level changes (such as create index, update mapping, allocate or fail shard) that have not yet been executed.<br/>NOTE: This API returns a list of any pending updates to the cluster state.<br/>These are distinct from the tasks reported by the Task Management API which include periodic tasks and tasks initiated by the user, such as node stats, search queries, or create index requests.<br/>However, if a user-initiated task such as a create index command causes a cluster state update, the activity of this task might be reported by both task api and pending cluster tasks API.</para>
/// </summary>
public sealed partial class PendingTasksRequest : PlainRequest<PendingTasksRequestParameters>
{
Expand All @@ -54,20 +54,20 @@ public sealed partial class PendingTasksRequest : PlainRequest<PendingTasksReque
internal override bool SupportsBody => false;

/// <summary>
/// <para>Return local information, do not retrieve the state from master node (default: false)</para>
/// <para>If `true`, the request retrieves information from the local node only.<br/>If `false`, information is retrieved from the master node.</para>
/// </summary>
[JsonIgnore]
public bool? Local { get => Q<bool?>("local"); set => Q("local", value); }

/// <summary>
/// <para>Specify timeout for connection to master</para>
/// <para>Period to wait for a connection to the master node.<br/>If no response is received before the timeout expires, the request fails and returns an error.</para>
/// </summary>
[JsonIgnore]
public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q<Elastic.Clients.Elasticsearch.Duration?>("master_timeout"); set => Q("master_timeout", value); }
}

/// <summary>
/// <para>Returns a list of any cluster-level changes (e.g. create index, update mapping,<br/>allocate or fail shard) which have not yet been executed.</para>
/// <para>Returns cluster-level changes (such as create index, update mapping, allocate or fail shard) that have not yet been executed.<br/>NOTE: This API returns a list of any pending updates to the cluster state.<br/>These are distinct from the tasks reported by the Task Management API which include periodic tasks and tasks initiated by the user, such as node stats, search queries, or create index requests.<br/>However, if a user-initiated task such as a create index command causes a cluster state update, the activity of this task might be reported by both task api and pending cluster tasks API.</para>
/// </summary>
public sealed partial class PendingTasksRequestDescriptor : RequestDescriptor<PendingTasksRequestDescriptor, PendingTasksRequestParameters>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public sealed class EnrichStatsRequestParameters : RequestParameters
}

/// <summary>
/// <para>Gets enrich coordinator statistics and information about enrich policies that are currently executing.</para>
/// <para>Returns enrich coordinator statistics and information about enrich policies that are currently executing.</para>
/// </summary>
public sealed partial class EnrichStatsRequest : PlainRequest<EnrichStatsRequestParameters>
{
Expand All @@ -46,7 +46,7 @@ public sealed partial class EnrichStatsRequest : PlainRequest<EnrichStatsRequest
}

/// <summary>
/// <para>Gets enrich coordinator statistics and information about enrich policies that are currently executing.</para>
/// <para>Returns enrich coordinator statistics and information about enrich policies that are currently executing.</para>
/// </summary>
public sealed partial class EnrichStatsRequestDescriptor : RequestDescriptor<EnrichStatsRequestDescriptor, EnrichStatsRequestParameters>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,21 @@ namespace Elastic.Clients.Elasticsearch.Enrich;

public sealed partial class EnrichStatsResponse : ElasticsearchResponse
{
/// <summary>
/// <para>Objects containing information about the enrich cache stats on each ingest node.</para>
/// </summary>
[JsonInclude, JsonPropertyName("cache_stats")]
public IReadOnlyCollection<Elastic.Clients.Elasticsearch.Enrich.CacheStats>? CacheStats { get; init; }

/// <summary>
/// <para>Objects containing information about each coordinating ingest node for configured enrich processors.</para>
/// </summary>
[JsonInclude, JsonPropertyName("coordinator_stats")]
public IReadOnlyCollection<Elastic.Clients.Elasticsearch.Enrich.CoordinatorStats> CoordinatorStats { get; init; }

/// <summary>
/// <para>Objects containing information about each enrich policy that is currently executing.</para>
/// </summary>
[JsonInclude, JsonPropertyName("executing_policies")]
public IReadOnlyCollection<Elastic.Clients.Elasticsearch.Enrich.ExecutingPolicy> ExecutingPolicies { get; init; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace Elastic.Clients.Elasticsearch.Enrich;
public sealed class ExecutePolicyRequestParameters : RequestParameters
{
/// <summary>
/// <para>Should the request should block until the execution is complete.</para>
/// <para>If `true`, the request blocks other enrich policy execution requests until complete.</para>
/// </summary>
public bool? WaitForCompletion { get => Q<bool?>("wait_for_completion"); set => Q("wait_for_completion", value); }
}
Expand All @@ -53,7 +53,7 @@ public ExecutePolicyRequest(Elastic.Clients.Elasticsearch.Name name) : base(r =>
internal override bool SupportsBody => false;

/// <summary>
/// <para>Should the request should block until the execution is complete.</para>
/// <para>If `true`, the request blocks other enrich policy execution requests until complete.</para>
/// </summary>
[JsonIgnore]
public bool? WaitForCompletion { get => Q<bool?>("wait_for_completion"); set => Q("wait_for_completion", value); }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public sealed class GetPolicyRequestParameters : RequestParameters
}

/// <summary>
/// <para>Gets information about an enrich policy.</para>
/// <para>Returns information about an enrich policy.</para>
/// </summary>
public sealed partial class GetPolicyRequest : PlainRequest<GetPolicyRequestParameters>
{
Expand All @@ -54,7 +54,7 @@ public GetPolicyRequest(Elastic.Clients.Elasticsearch.Names? name) : base(r => r
}

/// <summary>
/// <para>Gets information about an enrich policy.</para>
/// <para>Returns information about an enrich policy.</para>
/// </summary>
public sealed partial class GetPolicyRequestDescriptor : RequestDescriptor<GetPolicyRequestDescriptor, GetPolicyRequestParameters>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public sealed class PutPolicyRequestParameters : RequestParameters
}

/// <summary>
/// <para>Creates a new enrich policy.</para>
/// <para>Creates an enrich policy.</para>
/// </summary>
public sealed partial class PutPolicyRequest : PlainRequest<PutPolicyRequestParameters>
{
Expand All @@ -48,16 +48,27 @@ public PutPolicyRequest(Elastic.Clients.Elasticsearch.Name name) : base(r => r.R

internal override bool SupportsBody => true;

/// <summary>
/// <para>Matches enrich data to incoming documents based on a `geo_shape` query.</para>
/// </summary>
[JsonInclude, JsonPropertyName("geo_match")]
public Elastic.Clients.Elasticsearch.Enrich.EnrichPolicy? GeoMatch { get; set; }

/// <summary>
/// <para>Matches enrich data to incoming documents based on a `term` query.</para>
/// </summary>
[JsonInclude, JsonPropertyName("match")]
public Elastic.Clients.Elasticsearch.Enrich.EnrichPolicy? Match { get; set; }

/// <summary>
/// <para>Matches a number, date, or IP address in incoming documents to a range in the enrich index based on a `term` query.</para>
/// </summary>
[JsonInclude, JsonPropertyName("range")]
public Elastic.Clients.Elasticsearch.Enrich.EnrichPolicy? Range { get; set; }
}

/// <summary>
/// <para>Creates a new enrich policy.</para>
/// <para>Creates an enrich policy.</para>
/// </summary>
public sealed partial class PutPolicyRequestDescriptor<TDocument> : RequestDescriptor<PutPolicyRequestDescriptor<TDocument>, PutPolicyRequestParameters>
{
Expand Down Expand Up @@ -93,6 +104,9 @@ public PutPolicyRequestDescriptor<TDocument> Name(Elastic.Clients.Elasticsearch.
private EnrichPolicyDescriptor<TDocument> RangeDescriptor { get; set; }
private Action<EnrichPolicyDescriptor<TDocument>> RangeDescriptorAction { get; set; }

/// <summary>
/// <para>Matches enrich data to incoming documents based on a `geo_shape` query.</para>
/// </summary>
public PutPolicyRequestDescriptor<TDocument> GeoMatch(Elastic.Clients.Elasticsearch.Enrich.EnrichPolicy? geoMatch)
{
GeoMatchDescriptor = null;
Expand All @@ -117,6 +131,9 @@ public PutPolicyRequestDescriptor<TDocument> GeoMatch(Action<EnrichPolicyDescrip
return Self;
}

/// <summary>
/// <para>Matches enrich data to incoming documents based on a `term` query.</para>
/// </summary>
public PutPolicyRequestDescriptor<TDocument> Match(Elastic.Clients.Elasticsearch.Enrich.EnrichPolicy? match)
{
MatchDescriptor = null;
Expand All @@ -141,6 +158,9 @@ public PutPolicyRequestDescriptor<TDocument> Match(Action<EnrichPolicyDescriptor
return Self;
}

/// <summary>
/// <para>Matches a number, date, or IP address in incoming documents to a range in the enrich index based on a `term` query.</para>
/// </summary>
public PutPolicyRequestDescriptor<TDocument> Range(Elastic.Clients.Elasticsearch.Enrich.EnrichPolicy? range)
{
RangeDescriptor = null;
Expand Down Expand Up @@ -221,7 +241,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
}

/// <summary>
/// <para>Creates a new enrich policy.</para>
/// <para>Creates an enrich policy.</para>
/// </summary>
public sealed partial class PutPolicyRequestDescriptor : RequestDescriptor<PutPolicyRequestDescriptor, PutPolicyRequestParameters>
{
Expand Down Expand Up @@ -257,6 +277,9 @@ public PutPolicyRequestDescriptor Name(Elastic.Clients.Elasticsearch.Name name)
private EnrichPolicyDescriptor RangeDescriptor { get; set; }
private Action<EnrichPolicyDescriptor> RangeDescriptorAction { get; set; }

/// <summary>
/// <para>Matches enrich data to incoming documents based on a `geo_shape` query.</para>
/// </summary>
public PutPolicyRequestDescriptor GeoMatch(Elastic.Clients.Elasticsearch.Enrich.EnrichPolicy? geoMatch)
{
GeoMatchDescriptor = null;
Expand All @@ -281,6 +304,9 @@ public PutPolicyRequestDescriptor GeoMatch(Action<EnrichPolicyDescriptor> config
return Self;
}

/// <summary>
/// <para>Matches enrich data to incoming documents based on a `term` query.</para>
/// </summary>
public PutPolicyRequestDescriptor Match(Elastic.Clients.Elasticsearch.Enrich.EnrichPolicy? match)
{
MatchDescriptor = null;
Expand All @@ -305,6 +331,9 @@ public PutPolicyRequestDescriptor Match(Action<EnrichPolicyDescriptor> configure
return Self;
}

/// <summary>
/// <para>Matches a number, date, or IP address in incoming documents to a range in the enrich index based on a `term` query.</para>
/// </summary>
public PutPolicyRequestDescriptor Range(Elastic.Clients.Elasticsearch.Enrich.EnrichPolicy? range)
{
RangeDescriptor = null;
Expand Down
Loading