-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
Copy pathDeleteExpiredDataRequest.g.cs
137 lines (111 loc) · 5.93 KB
/
DeleteExpiredDataRequest.g.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
//
// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
// ------------------------------------------------
//
// This file is automatically generated.
// Please do not edit these files manually.
//
// ------------------------------------------------
#nullable restore
using Elastic.Clients.Elasticsearch.Serverless.Fluent;
using Elastic.Clients.Elasticsearch.Serverless.Requests;
using Elastic.Clients.Elasticsearch.Serverless.Serialization;
using Elastic.Transport;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning;
public sealed partial class DeleteExpiredDataRequestParameters : RequestParameters
{
}
/// <summary>
/// <para>Delete expired ML data.<br/>Deletes all job results, model snapshots and forecast data that have exceeded<br/>their retention days period. Machine learning state documents that are not<br/>associated with any job are also deleted.<br/>You can limit the request to a single or set of anomaly detection jobs by<br/>using a job identifier, a group name, a comma-separated list of jobs, or a<br/>wildcard expression. You can delete expired data for all anomaly detection<br/>jobs by using _all, by specifying * as the <job_id>, or by omitting the<br/><job_id>.</para>
/// </summary>
public sealed partial class DeleteExpiredDataRequest : PlainRequest<DeleteExpiredDataRequestParameters>
{
public DeleteExpiredDataRequest()
{
}
public DeleteExpiredDataRequest(Elastic.Clients.Elasticsearch.Serverless.Id? jobId) : base(r => r.Optional("job_id", jobId))
{
}
internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningDeleteExpiredData;
protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE;
internal override bool SupportsBody => true;
internal override string OperationName => "ml.delete_expired_data";
/// <summary>
/// <para>The desired requests per second for the deletion processes. The default<br/>behavior is no throttling.</para>
/// </summary>
[JsonInclude, JsonPropertyName("requests_per_second")]
public float? RequestsPerSecond { get; set; }
/// <summary>
/// <para>How long can the underlying delete processes run until they are canceled.</para>
/// </summary>
[JsonInclude, JsonPropertyName("timeout")]
public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get; set; }
}
/// <summary>
/// <para>Delete expired ML data.<br/>Deletes all job results, model snapshots and forecast data that have exceeded<br/>their retention days period. Machine learning state documents that are not<br/>associated with any job are also deleted.<br/>You can limit the request to a single or set of anomaly detection jobs by<br/>using a job identifier, a group name, a comma-separated list of jobs, or a<br/>wildcard expression. You can delete expired data for all anomaly detection<br/>jobs by using _all, by specifying * as the <job_id>, or by omitting the<br/><job_id>.</para>
/// </summary>
public sealed partial class DeleteExpiredDataRequestDescriptor : RequestDescriptor<DeleteExpiredDataRequestDescriptor, DeleteExpiredDataRequestParameters>
{
internal DeleteExpiredDataRequestDescriptor(Action<DeleteExpiredDataRequestDescriptor> configure) => configure.Invoke(this);
public DeleteExpiredDataRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id? jobId) : base(r => r.Optional("job_id", jobId))
{
}
public DeleteExpiredDataRequestDescriptor()
{
}
internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningDeleteExpiredData;
protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE;
internal override bool SupportsBody => true;
internal override string OperationName => "ml.delete_expired_data";
public DeleteExpiredDataRequestDescriptor JobId(Elastic.Clients.Elasticsearch.Serverless.Id? jobId)
{
RouteValues.Optional("job_id", jobId);
return Self;
}
private float? RequestsPerSecondValue { get; set; }
private Elastic.Clients.Elasticsearch.Serverless.Duration? TimeoutValue { get; set; }
/// <summary>
/// <para>The desired requests per second for the deletion processes. The default<br/>behavior is no throttling.</para>
/// </summary>
public DeleteExpiredDataRequestDescriptor RequestsPerSecond(float? requestsPerSecond)
{
RequestsPerSecondValue = requestsPerSecond;
return Self;
}
/// <summary>
/// <para>How long can the underlying delete processes run until they are canceled.</para>
/// </summary>
public DeleteExpiredDataRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout)
{
TimeoutValue = timeout;
return Self;
}
protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
{
writer.WriteStartObject();
if (RequestsPerSecondValue.HasValue)
{
writer.WritePropertyName("requests_per_second");
writer.WriteNumberValue(RequestsPerSecondValue.Value);
}
if (TimeoutValue is not null)
{
writer.WritePropertyName("timeout");
JsonSerializer.Serialize(writer, TimeoutValue, options);
}
writer.WriteEndObject();
}
}