From 44ae066a94d5fe70a2c5af8a70d8f93f46fe20d8 Mon Sep 17 00:00:00 2001 From: Stuart Cam Date: Tue, 5 Feb 2019 15:42:34 +1100 Subject: [PATCH 01/10] ML Calendar APIs : Put Calendar, Put Calendar Job, Delete Calendar - implemented and tested --- .../ApiGenerator/ApiGenerator.cs | 4 - .../ApiGenerator/Domain/ApiUrlPart.cs | 2 + .../RequestParameters.Generated.cs | 20 ++++ .../ElasticLowLevelClient.Generated.cs | 46 +++++++++ .../IElasticLowLevelClient.Generated.cs | 38 +++++++ .../CommonAbstractions/Request/RouteValues.cs | 2 + .../PutMapping/PutMappingRequest.cs | 4 +- .../DeleteCalendar/DeleteCalendarRequest.cs | 9 ++ .../DeleteCalendar/DeleteCalendarResponse.cs | 6 ++ .../ElasticClient-DeleteCalendar.cs | 55 +++++++++++ .../DeleteCalendarEventRequest.cs | 9 ++ .../DeleteCalendarEventResponse.cs | 6 ++ .../ElasticClient-DeleteCalendarEvent.cs | 54 ++++++++++ .../PutCalendar/ElasticClient-PutCalendar.cs | 56 +++++++++++ .../PutCalendar/PutCalendarRequest.cs | 33 +++++++ .../PutCalendar/PutCalendarResponse.cs | 30 ++++++ .../ElasticClient-PutCalendarJob.cs | 56 +++++++++++ .../PutCalendarJob/PutCalendarJobRequest.cs | 15 +++ .../PutCalendarJob/PutCalendarJobResponse.cs | 30 ++++++ src/Nest/_Generated/_Descriptors.generated.cs | 52 ++++++++++ .../_Generated/_LowLevelDispatch.generated.cs | 88 +++++++++++++++++ src/Nest/_Generated/_Requests.generated.cs | 98 ++++++++++++++++--- .../Tests.Configuration/tests.default.yaml | 2 +- .../DeleteCalendar/DeleteCalendarApiTests.cs | 55 +++++++++++ .../DeleteCalendar/DeleteCalendarUrlTests.cs | 17 ++++ .../MachineLearningIntegrationTestBase.cs | 12 +++ .../PutCalendar/PutCalendarApiTests.cs | 61 ++++++++++++ .../PutCalendar/PutCalendarUrlTests.cs | 17 ++++ .../PutCalendarJob/PutCalendarJobApiTests.cs | 66 +++++++++++++ .../PutCalendarJob/PutCalendarJobUrlTests.cs | 17 ++++ 30 files changed, 941 insertions(+), 19 deletions(-) create mode 100644 src/Nest/XPack/MachineLearning/DeleteCalendar/DeleteCalendarRequest.cs create mode 100644 src/Nest/XPack/MachineLearning/DeleteCalendar/DeleteCalendarResponse.cs create mode 100644 src/Nest/XPack/MachineLearning/DeleteCalendar/ElasticClient-DeleteCalendar.cs create mode 100644 src/Nest/XPack/MachineLearning/DeleteCalendarEvent/DeleteCalendarEventRequest.cs create mode 100644 src/Nest/XPack/MachineLearning/DeleteCalendarEvent/DeleteCalendarEventResponse.cs create mode 100644 src/Nest/XPack/MachineLearning/DeleteCalendarEvent/ElasticClient-DeleteCalendarEvent.cs create mode 100644 src/Nest/XPack/MachineLearning/PutCalendar/ElasticClient-PutCalendar.cs create mode 100644 src/Nest/XPack/MachineLearning/PutCalendar/PutCalendarRequest.cs create mode 100644 src/Nest/XPack/MachineLearning/PutCalendar/PutCalendarResponse.cs create mode 100644 src/Nest/XPack/MachineLearning/PutCalendarJob/ElasticClient-PutCalendarJob.cs create mode 100644 src/Nest/XPack/MachineLearning/PutCalendarJob/PutCalendarJobRequest.cs create mode 100644 src/Nest/XPack/MachineLearning/PutCalendarJob/PutCalendarJobResponse.cs create mode 100644 src/Tests/Tests/XPack/MachineLearning/DeleteCalendar/DeleteCalendarApiTests.cs create mode 100644 src/Tests/Tests/XPack/MachineLearning/DeleteCalendar/DeleteCalendarUrlTests.cs create mode 100644 src/Tests/Tests/XPack/MachineLearning/PutCalendar/PutCalendarApiTests.cs create mode 100644 src/Tests/Tests/XPack/MachineLearning/PutCalendar/PutCalendarUrlTests.cs create mode 100644 src/Tests/Tests/XPack/MachineLearning/PutCalendarJob/PutCalendarJobApiTests.cs create mode 100644 src/Tests/Tests/XPack/MachineLearning/PutCalendarJob/PutCalendarJobUrlTests.cs diff --git a/src/CodeGeneration/ApiGenerator/ApiGenerator.cs b/src/CodeGeneration/ApiGenerator/ApiGenerator.cs index 405b0c1ee08..2665112c6ba 100644 --- a/src/CodeGeneration/ApiGenerator/ApiGenerator.cs +++ b/src/CodeGeneration/ApiGenerator/ApiGenerator.cs @@ -27,15 +27,11 @@ public class ApiGenerator "rank_eval.json", // these API's are new and need to be mapped - "xpack.ml.delete_calendar.json", - "xpack.ml.delete_calendar_event.json", "xpack.ml.delete_calendar_job.json", "xpack.ml.get_calendar_events.json", "xpack.ml.get_calendars.json", "xpack.ml.info.json", "xpack.ml.post_calendar_events.json", - "xpack.ml.put_calendar.json", - "xpack.ml.put_calendar_job.json", "xpack.ml.get_calendar_job.json", "xpack.ml.delete_forecast.json", "xpack.ml.find_file_structure.json", diff --git a/src/CodeGeneration/ApiGenerator/Domain/ApiUrlPart.cs b/src/CodeGeneration/ApiGenerator/Domain/ApiUrlPart.cs index dcdfd1bfbce..6eb846f2a09 100644 --- a/src/CodeGeneration/ApiGenerator/Domain/ApiUrlPart.cs +++ b/src/CodeGeneration/ApiGenerator/Domain/ApiUrlPart.cs @@ -43,6 +43,8 @@ public string ClrTypeName case "type": return Type == "string" ? "TypeName" : "Types"; case "watch_id": case "job_id": + case "calendar_id": + case "event_id": case "datafeed_id": case "snapshot_id": case "filter_id": diff --git a/src/Elasticsearch.Net/Domain/RequestParameters/RequestParameters.Generated.cs b/src/Elasticsearch.Net/Domain/RequestParameters/RequestParameters.Generated.cs index e032c8e5e69..a8636c44979 100644 --- a/src/Elasticsearch.Net/Domain/RequestParameters/RequestParameters.Generated.cs +++ b/src/Elasticsearch.Net/Domain/RequestParameters/RequestParameters.Generated.cs @@ -2311,6 +2311,16 @@ public partial class CloseJobRequestParameters : RequestParametersControls the time to wait until a job has closed. Default to 30 minutes public TimeSpan Timeout { get => Q("timeout"); set => Q("timeout", value); } } + ///Request options for XpackMlDeleteCalendar
+ public partial class DeleteCalendarRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; + } + ///Request options for XpackMlDeleteCalendarEvent
+ public partial class DeleteCalendarEventRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; + } ///Request options for XpackMlDeleteDatafeed
http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-datafeed.html
public partial class DeleteDatafeedRequestParameters : RequestParameters { @@ -2426,6 +2436,16 @@ public partial class PreviewDatafeedRequestParameters : RequestParameters HttpMethod.GET; } + ///Request options for XpackMlPutCalendar
+ public partial class PutCalendarRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; + } + ///Request options for XpackMlPutCalendarJob
+ public partial class PutCalendarJobRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; + } ///Request options for XpackMlPutDatafeed
http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-datafeed.html
public partial class PutDatafeedRequestParameters : RequestParameters { diff --git a/src/Elasticsearch.Net/ElasticLowLevelClient.Generated.cs b/src/Elasticsearch.Net/ElasticLowLevelClient.Generated.cs index 39279aeed86..4c430591cfc 100644 --- a/src/Elasticsearch.Net/ElasticLowLevelClient.Generated.cs +++ b/src/Elasticsearch.Net/ElasticLowLevelClient.Generated.cs @@ -3164,6 +3164,28 @@ public TResponse XpackMlCloseJob(string job_id, CloseJobRequestParame ///A func that allows you to describe the querystring parameters & request specific connection settings. public Task XpackMlCloseJobAsync(string job_id, CloseJobRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new() => this.DoRequestAsync(POST, Url($"_xpack/ml/anomaly_detectors/{job_id.NotNull("job_id")}/_close"), ctx, null, _params(requestParameters)); + ///DELETE on /_xpack/ml/calendars/{calendar_id} + ///The ID of the calendar to delete + ///A func that allows you to describe the querystring parameters & request specific connection settings. + public TResponse XpackMlDeleteCalendar(string calendar_id, DeleteCalendarRequestParameters requestParameters = null) + where TResponse : class, IElasticsearchResponse, new() => this.DoRequest(DELETE, Url($"_xpack/ml/calendars/{calendar_id.NotNull("calendar_id")}"), null, _params(requestParameters)); + ///DELETE on /_xpack/ml/calendars/{calendar_id} + ///The ID of the calendar to delete + ///A func that allows you to describe the querystring parameters & request specific connection settings. + public Task XpackMlDeleteCalendarAsync(string calendar_id, DeleteCalendarRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) + where TResponse : class, IElasticsearchResponse, new() => this.DoRequestAsync(DELETE, Url($"_xpack/ml/calendars/{calendar_id.NotNull("calendar_id")}"), ctx, null, _params(requestParameters)); + ///DELETE on /_xpack/ml/calendars/{calendar_id}/events/{event_id} + ///The ID of the calendar to modify + ///The ID of the event to remove from the calendar + ///A func that allows you to describe the querystring parameters & request specific connection settings. + public TResponse XpackMlDeleteCalendarEvent(string calendar_id, string event_id, DeleteCalendarEventRequestParameters requestParameters = null) + where TResponse : class, IElasticsearchResponse, new() => this.DoRequest(DELETE, Url($"_xpack/ml/calendars/{calendar_id.NotNull("calendar_id")}/events/{event_id.NotNull("event_id")}"), null, _params(requestParameters)); + ///DELETE on /_xpack/ml/calendars/{calendar_id}/events/{event_id} + ///The ID of the calendar to modify + ///The ID of the event to remove from the calendar + ///A func that allows you to describe the querystring parameters & request specific connection settings. + public Task XpackMlDeleteCalendarEventAsync(string calendar_id, string event_id, DeleteCalendarEventRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) + where TResponse : class, IElasticsearchResponse, new() => this.DoRequestAsync(DELETE, Url($"_xpack/ml/calendars/{calendar_id.NotNull("calendar_id")}/events/{event_id.NotNull("event_id")}"), ctx, null, _params(requestParameters)); ///DELETE on /_xpack/ml/datafeeds/{datafeed_id} http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-datafeed.html ///The ID of the datafeed to delete ///A func that allows you to describe the querystring parameters & request specific connection settings. @@ -3514,6 +3536,30 @@ public TResponse XpackMlPreviewDatafeed(string datafeed_id, PreviewDa ///A func that allows you to describe the querystring parameters & request specific connection settings. public Task XpackMlPreviewDatafeedAsync(string datafeed_id, PreviewDatafeedRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new() => this.DoRequestAsync(GET, Url($"_xpack/ml/datafeeds/{datafeed_id.NotNull("datafeed_id")}/_preview"), ctx, null, _params(requestParameters)); + ///PUT on /_xpack/ml/calendars/{calendar_id} + ///The ID of the calendar to create + ///The calendar details + ///A func that allows you to describe the querystring parameters & request specific connection settings. + public TResponse XpackMlPutCalendar(string calendar_id, PostData body, PutCalendarRequestParameters requestParameters = null) + where TResponse : class, IElasticsearchResponse, new() => this.DoRequest(PUT, Url($"_xpack/ml/calendars/{calendar_id.NotNull("calendar_id")}"), body, _params(requestParameters)); + ///PUT on /_xpack/ml/calendars/{calendar_id} + ///The ID of the calendar to create + ///The calendar details + ///A func that allows you to describe the querystring parameters & request specific connection settings. + public Task XpackMlPutCalendarAsync(string calendar_id, PostData body, PutCalendarRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) + where TResponse : class, IElasticsearchResponse, new() => this.DoRequestAsync(PUT, Url($"_xpack/ml/calendars/{calendar_id.NotNull("calendar_id")}"), ctx, body, _params(requestParameters)); + ///PUT on /_xpack/ml/calendars/{calendar_id}/jobs/{job_id} + ///The ID of the calendar to modify + ///The ID of the job to add to the calendar + ///A func that allows you to describe the querystring parameters & request specific connection settings. + public TResponse XpackMlPutCalendarJob(string calendar_id, string job_id, PutCalendarJobRequestParameters requestParameters = null) + where TResponse : class, IElasticsearchResponse, new() => this.DoRequest(PUT, Url($"_xpack/ml/calendars/{calendar_id.NotNull("calendar_id")}/jobs/{job_id.NotNull("job_id")}"), null, _params(requestParameters)); + ///PUT on /_xpack/ml/calendars/{calendar_id}/jobs/{job_id} + ///The ID of the calendar to modify + ///The ID of the job to add to the calendar + ///A func that allows you to describe the querystring parameters & request specific connection settings. + public Task XpackMlPutCalendarJobAsync(string calendar_id, string job_id, PutCalendarJobRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) + where TResponse : class, IElasticsearchResponse, new() => this.DoRequestAsync(PUT, Url($"_xpack/ml/calendars/{calendar_id.NotNull("calendar_id")}/jobs/{job_id.NotNull("job_id")}"), ctx, null, _params(requestParameters)); ///PUT on /_xpack/ml/datafeeds/{datafeed_id} http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-datafeed.html ///The ID of the datafeed to create ///The datafeed config diff --git a/src/Elasticsearch.Net/IElasticLowLevelClient.Generated.cs b/src/Elasticsearch.Net/IElasticLowLevelClient.Generated.cs index 53e7391e819..b9161b54f49 100644 --- a/src/Elasticsearch.Net/IElasticLowLevelClient.Generated.cs +++ b/src/Elasticsearch.Net/IElasticLowLevelClient.Generated.cs @@ -2562,6 +2562,24 @@ public partial interface IElasticLowLevelClient ///The name of the job to close ///A func that allows you to describe the querystring parameters & request specific connection settings. Task XpackMlCloseJobAsync(string job_id, CloseJobRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new(); + ///DELETE on /_xpack/ml/calendars/{calendar_id} + ///The ID of the calendar to delete + ///A func that allows you to describe the querystring parameters & request specific connection settings. + TResponse XpackMlDeleteCalendar(string calendar_id, DeleteCalendarRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new(); + ///DELETE on /_xpack/ml/calendars/{calendar_id} + ///The ID of the calendar to delete + ///A func that allows you to describe the querystring parameters & request specific connection settings. + Task XpackMlDeleteCalendarAsync(string calendar_id, DeleteCalendarRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new(); + ///DELETE on /_xpack/ml/calendars/{calendar_id}/events/{event_id} + ///The ID of the calendar to modify + ///The ID of the event to remove from the calendar + ///A func that allows you to describe the querystring parameters & request specific connection settings. + TResponse XpackMlDeleteCalendarEvent(string calendar_id, string event_id, DeleteCalendarEventRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new(); + ///DELETE on /_xpack/ml/calendars/{calendar_id}/events/{event_id} + ///The ID of the calendar to modify + ///The ID of the event to remove from the calendar + ///A func that allows you to describe the querystring parameters & request specific connection settings. + Task XpackMlDeleteCalendarEventAsync(string calendar_id, string event_id, DeleteCalendarEventRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new(); ///DELETE on /_xpack/ml/datafeeds/{datafeed_id} http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-datafeed.html ///The ID of the datafeed to delete ///A func that allows you to describe the querystring parameters & request specific connection settings. @@ -2846,6 +2864,26 @@ public partial interface IElasticLowLevelClient ///The ID of the datafeed to preview ///A func that allows you to describe the querystring parameters & request specific connection settings. Task XpackMlPreviewDatafeedAsync(string datafeed_id, PreviewDatafeedRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new(); + ///PUT on /_xpack/ml/calendars/{calendar_id} + ///The ID of the calendar to create + ///The calendar details + ///A func that allows you to describe the querystring parameters & request specific connection settings. + TResponse XpackMlPutCalendar(string calendar_id, PostData body, PutCalendarRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new(); + ///PUT on /_xpack/ml/calendars/{calendar_id} + ///The ID of the calendar to create + ///The calendar details + ///A func that allows you to describe the querystring parameters & request specific connection settings. + Task XpackMlPutCalendarAsync(string calendar_id, PostData body, PutCalendarRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new(); + ///PUT on /_xpack/ml/calendars/{calendar_id}/jobs/{job_id} + ///The ID of the calendar to modify + ///The ID of the job to add to the calendar + ///A func that allows you to describe the querystring parameters & request specific connection settings. + TResponse XpackMlPutCalendarJob(string calendar_id, string job_id, PutCalendarJobRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new(); + ///PUT on /_xpack/ml/calendars/{calendar_id}/jobs/{job_id} + ///The ID of the calendar to modify + ///The ID of the job to add to the calendar + ///A func that allows you to describe the querystring parameters & request specific connection settings. + Task XpackMlPutCalendarJobAsync(string calendar_id, string job_id, PutCalendarJobRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new(); ///PUT on /_xpack/ml/datafeeds/{datafeed_id} http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-datafeed.html ///The ID of the datafeed to create ///The datafeed config diff --git a/src/Nest/CommonAbstractions/Request/RouteValues.cs b/src/Nest/CommonAbstractions/Request/RouteValues.cs index 93821e94cbd..a8156ce2988 100644 --- a/src/Nest/CommonAbstractions/Request/RouteValues.cs +++ b/src/Nest/CommonAbstractions/Request/RouteValues.cs @@ -17,6 +17,8 @@ public class RouteValues public string Fields => GetResolved("fields"); public string FilterId => GetResolved("filter_id"); public string Id => GetResolved("id"); + public string CalendarId => GetResolved("calendar_id"); + public string EventId => GetResolved("event_id"); public string Index => GetResolved("index"); public string IndexMetric => GetResolved("index_metric"); diff --git a/src/Nest/Indices/MappingManagement/PutMapping/PutMappingRequest.cs b/src/Nest/Indices/MappingManagement/PutMapping/PutMappingRequest.cs index 83f599449ee..644abaaeaa2 100644 --- a/src/Nest/Indices/MappingManagement/PutMapping/PutMappingRequest.cs +++ b/src/Nest/Indices/MappingManagement/PutMapping/PutMappingRequest.cs @@ -123,9 +123,9 @@ public PutMappingDescriptor(IndexName index, TypeName type) : base(r => r.Requir /// /// Convenience method to map as much as it can based on ElasticType attributes set on the type. - ///
This method also automatically sets up mappings for known values types (int, long, double, datetime, etcetera)
+ ///
This method also automatically sets up mappings for primitive values types (e.g. int, long, double, DateTime...)
///
Class types default to object and Enums to int
- ///
Later calls can override whatever is set is by this call.
+ ///
Later calls can override whatever is set by this call.
///
public PutMappingDescriptor AutoMap(IPropertyVisitor visitor = null, int maxRecursion = 0) => Assign(a => a.Properties = a.Properties.AutoMap(visitor, maxRecursion)); diff --git a/src/Nest/XPack/MachineLearning/DeleteCalendar/DeleteCalendarRequest.cs b/src/Nest/XPack/MachineLearning/DeleteCalendar/DeleteCalendarRequest.cs new file mode 100644 index 00000000000..0b8609a5455 --- /dev/null +++ b/src/Nest/XPack/MachineLearning/DeleteCalendar/DeleteCalendarRequest.cs @@ -0,0 +1,9 @@ +namespace Nest +{ + public partial interface IDeleteCalendarRequest { } + + public partial class DeleteCalendarRequest { } + + [DescriptorFor("XpackMlDeleteCalendar")] + public partial class DeleteCalendarDescriptor { } +} diff --git a/src/Nest/XPack/MachineLearning/DeleteCalendar/DeleteCalendarResponse.cs b/src/Nest/XPack/MachineLearning/DeleteCalendar/DeleteCalendarResponse.cs new file mode 100644 index 00000000000..4533a084b8b --- /dev/null +++ b/src/Nest/XPack/MachineLearning/DeleteCalendar/DeleteCalendarResponse.cs @@ -0,0 +1,6 @@ +namespace Nest +{ + public interface IDeleteCalendarResponse : IAcknowledgedResponse { } + + public class DeleteCalendarResponse : AcknowledgedResponseBase, IDeleteCalendarResponse { } +} diff --git a/src/Nest/XPack/MachineLearning/DeleteCalendar/ElasticClient-DeleteCalendar.cs b/src/Nest/XPack/MachineLearning/DeleteCalendar/ElasticClient-DeleteCalendar.cs new file mode 100644 index 00000000000..19564c22321 --- /dev/null +++ b/src/Nest/XPack/MachineLearning/DeleteCalendar/ElasticClient-DeleteCalendar.cs @@ -0,0 +1,55 @@ +using System; +using System.Threading; +using System.Threading.Tasks; +using Elasticsearch.Net; + +namespace Nest +{ + public partial interface IElasticClient + { + /// + /// Deletes a machine learning calendar. + /// Removes all scheduled events from the calendar then deletes the calendar. + /// + IDeleteCalendarResponse DeleteCalendar(Id calendarId, Func selector = null); + + /// + IDeleteCalendarResponse DeleteCalendar(IDeleteCalendarRequest request); + + /// + Task DeleteCalendarAsync(Id calendarId, Func selector = null, + CancellationToken cancellationToken = default(CancellationToken) + ); + + /// + Task DeleteCalendarAsync(IDeleteCalendarRequest request, CancellationToken cancellationToken = default(CancellationToken)); + } + + public partial class ElasticClient + { + /// + public IDeleteCalendarResponse DeleteCalendar(Id calendarId, Func selector = null) => + DeleteCalendar(selector.InvokeOrDefault(new DeleteCalendarDescriptor(calendarId))); + + /// + public IDeleteCalendarResponse DeleteCalendar(IDeleteCalendarRequest request) => + Dispatcher.Dispatch( + request, + (p, d) => LowLevelDispatch.XpackMlDeleteCalendarDispatch(p) + ); + + /// + public Task DeleteCalendarAsync(Id calendarId, Func selector = null, + CancellationToken cancellationToken = default(CancellationToken) + ) => + DeleteCalendarAsync(selector.InvokeOrDefault(new DeleteCalendarDescriptor(calendarId)), cancellationToken); + + /// + public Task DeleteCalendarAsync(IDeleteCalendarRequest request, CancellationToken cancellationToken = default(CancellationToken)) => + Dispatcher.DispatchAsync( + request, + cancellationToken, + (p, d, c) => LowLevelDispatch.XpackMlDeleteCalendarDispatchAsync(p, c) + ); + } +} diff --git a/src/Nest/XPack/MachineLearning/DeleteCalendarEvent/DeleteCalendarEventRequest.cs b/src/Nest/XPack/MachineLearning/DeleteCalendarEvent/DeleteCalendarEventRequest.cs new file mode 100644 index 00000000000..e2f62c46d88 --- /dev/null +++ b/src/Nest/XPack/MachineLearning/DeleteCalendarEvent/DeleteCalendarEventRequest.cs @@ -0,0 +1,9 @@ +namespace Nest +{ + public partial interface IDeleteCalendarEventRequest { } + + public partial class DeleteCalendarEventRequest { } + + [DescriptorFor("XpackMlDeleteCalendarEvent")] + public partial class DeleteCalendarEventDescriptor { } +} diff --git a/src/Nest/XPack/MachineLearning/DeleteCalendarEvent/DeleteCalendarEventResponse.cs b/src/Nest/XPack/MachineLearning/DeleteCalendarEvent/DeleteCalendarEventResponse.cs new file mode 100644 index 00000000000..6a338b4eb66 --- /dev/null +++ b/src/Nest/XPack/MachineLearning/DeleteCalendarEvent/DeleteCalendarEventResponse.cs @@ -0,0 +1,6 @@ +namespace Nest +{ + public interface IDeleteCalendarEventResponse : IAcknowledgedResponse { } + + public class DeleteCalendarEventResponse : AcknowledgedResponseBase, IDeleteCalendarEventResponse { } +} diff --git a/src/Nest/XPack/MachineLearning/DeleteCalendarEvent/ElasticClient-DeleteCalendarEvent.cs b/src/Nest/XPack/MachineLearning/DeleteCalendarEvent/ElasticClient-DeleteCalendarEvent.cs new file mode 100644 index 00000000000..a24bb18ca61 --- /dev/null +++ b/src/Nest/XPack/MachineLearning/DeleteCalendarEvent/ElasticClient-DeleteCalendarEvent.cs @@ -0,0 +1,54 @@ +using System; +using System.Threading; +using System.Threading.Tasks; +using Elasticsearch.Net; + +namespace Nest +{ + public partial interface IElasticClient + { + /// + /// Deletes scheduled events from a machine learning calendar. + /// + IDeleteCalendarEventResponse DeleteCalendarEvent(Id calendarId, Id eventId, Func selector = null); + + /// + IDeleteCalendarEventResponse DeleteCalendarEvent(IDeleteCalendarEventRequest request); + + /// + Task DeleteCalendarEventAsync(Id calendarId, Id eventId, Func selector = null, + CancellationToken cancellationToken = default(CancellationToken) + ); + + /// + Task DeleteCalendarEventAsync(IDeleteCalendarEventRequest request, CancellationToken cancellationToken = default(CancellationToken)); + } + + public partial class ElasticClient + { + /// + public IDeleteCalendarEventResponse DeleteCalendarEvent(Id calendarId, Id eventId, Func selector = null) => + DeleteCalendarEvent(selector.InvokeOrDefault(new DeleteCalendarEventDescriptor(calendarId, eventId))); + + /// + public IDeleteCalendarEventResponse DeleteCalendarEvent(IDeleteCalendarEventRequest request) => + Dispatcher.Dispatch( + request, + (p, d) => LowLevelDispatch.XpackMlDeleteCalendarEventDispatch(p) + ); + + /// + public Task DeleteCalendarEventAsync(Id calendarId, Id eventId, Func selector = null, + CancellationToken cancellationToken = default(CancellationToken) + ) => + DeleteCalendarEventAsync(selector.InvokeOrDefault(new DeleteCalendarEventDescriptor(calendarId, eventId)), cancellationToken); + + /// + public Task DeleteCalendarEventAsync(IDeleteCalendarEventRequest request, CancellationToken cancellationToken = default(CancellationToken)) => + Dispatcher.DispatchAsync( + request, + cancellationToken, + (p, d, c) => LowLevelDispatch.XpackMlDeleteCalendarEventDispatchAsync(p, c) + ); + } +} diff --git a/src/Nest/XPack/MachineLearning/PutCalendar/ElasticClient-PutCalendar.cs b/src/Nest/XPack/MachineLearning/PutCalendar/ElasticClient-PutCalendar.cs new file mode 100644 index 00000000000..6c68dae8e78 --- /dev/null +++ b/src/Nest/XPack/MachineLearning/PutCalendar/ElasticClient-PutCalendar.cs @@ -0,0 +1,56 @@ +using System; +using System.Threading; +using System.Threading.Tasks; +using Elasticsearch.Net; + +namespace Nest +{ + public partial interface IElasticClient + { + /// + /// Instantiates a machine learning calendar. + /// + IPutCalendarResponse PutCalendar(Id calendarId, Func selector = null); + + /// + IPutCalendarResponse PutCalendar(IPutCalendarRequest request); + + /// + Task PutCalendarAsync(Id calendarId, Func selector = null, + CancellationToken cancellationToken = default(CancellationToken) + ); + + /// + Task PutCalendarAsync(IPutCalendarRequest request, CancellationToken cancellationToken = default(CancellationToken)); + } + + public partial class ElasticClient + { + /// + public IPutCalendarResponse PutCalendar(Id calendarId, Func selector = null) + => PutCalendar(selector.InvokeOrDefault(new PutCalendarDescriptor(calendarId))); + + /// + public IPutCalendarResponse PutCalendar(IPutCalendarRequest request) => + Dispatcher.Dispatch( + request, + LowLevelDispatch.XpackMlPutCalendarDispatch + ); + + /// + public Task PutCalendarAsync(Id calendarId, Func selector = null, + CancellationToken cancellationToken = default(CancellationToken) + ) => + PutCalendarAsync(selector.InvokeOrDefault(new PutCalendarDescriptor(calendarId)), cancellationToken); + + /// + public Task PutCalendarAsync(IPutCalendarRequest request, + CancellationToken cancellationToken = default(CancellationToken) + ) => + Dispatcher.DispatchAsync( + request, + cancellationToken, + LowLevelDispatch.XpackMlPutCalendarDispatchAsync + ); + } +} diff --git a/src/Nest/XPack/MachineLearning/PutCalendar/PutCalendarRequest.cs b/src/Nest/XPack/MachineLearning/PutCalendar/PutCalendarRequest.cs new file mode 100644 index 00000000000..10697e279da --- /dev/null +++ b/src/Nest/XPack/MachineLearning/PutCalendar/PutCalendarRequest.cs @@ -0,0 +1,33 @@ +using System; +using Newtonsoft.Json; + +namespace Nest +{ + /// + /// Creates a machine learning calendar. + /// + public partial interface IPutCalendarRequest + { + /// + /// A description of the calendar. + /// + [JsonProperty("description")] + string Description { get; set; } + } + + /// + public partial class PutCalendarRequest + { + /// + public string Description { get; set; } + } + + [DescriptorFor("XpackMlPutCalendar")] + public partial class PutCalendarDescriptor + { + string IPutCalendarRequest.Description { get; set; } + + /// + public PutCalendarDescriptor Description(string description) => Assign(a => a.Description = description); + } +} diff --git a/src/Nest/XPack/MachineLearning/PutCalendar/PutCalendarResponse.cs b/src/Nest/XPack/MachineLearning/PutCalendar/PutCalendarResponse.cs new file mode 100644 index 00000000000..cb3383d4402 --- /dev/null +++ b/src/Nest/XPack/MachineLearning/PutCalendar/PutCalendarResponse.cs @@ -0,0 +1,30 @@ +using System.Collections.Generic; +using Newtonsoft.Json; + +namespace Nest +{ + /// + /// The response from creating a calendar. + /// + public partial interface IPutCalendarResponse : IResponse + { + [JsonProperty("calendar_id")] + Id CalendarId { get; } + + [JsonProperty("description")] + string Description { get; } + + [JsonProperty("job_ids")] + IReadOnlyCollection JobIds { get; } + } + + /// + public class PutCalendarResponse : ResponseBase, IPutCalendarResponse + { + public Id CalendarId { get; internal set; } + + public string Description { get; internal set; } + + public IReadOnlyCollection JobIds { get; internal set; } = EmptyReadOnly.Collection; + } +} diff --git a/src/Nest/XPack/MachineLearning/PutCalendarJob/ElasticClient-PutCalendarJob.cs b/src/Nest/XPack/MachineLearning/PutCalendarJob/ElasticClient-PutCalendarJob.cs new file mode 100644 index 00000000000..d9c0180fbe3 --- /dev/null +++ b/src/Nest/XPack/MachineLearning/PutCalendarJob/ElasticClient-PutCalendarJob.cs @@ -0,0 +1,56 @@ +using System; +using System.Threading; +using System.Threading.Tasks; +using Elasticsearch.Net; + +namespace Nest +{ + public partial interface IElasticClient + { + /// + /// Adds a job to a machine learning calendar. + /// + IPutCalendarJobResponse PutCalendarJob(Id calendarId, Id jobId, Func selector = null); + + /// + IPutCalendarJobResponse PutCalendarJob(IPutCalendarJobRequest request); + + /// + Task PutCalendarJobAsync(Id calendarId, Id jobId, Func selector = null, + CancellationToken cancellationToken = default(CancellationToken) + ); + + /// + Task PutCalendarJobAsync(IPutCalendarJobRequest request, CancellationToken cancellationToken = default(CancellationToken)); + } + + public partial class ElasticClient + { + /// + public IPutCalendarJobResponse PutCalendarJob(Id calendarId, Id jobId, Func selector = null) + => PutCalendarJob(selector.InvokeOrDefault(new PutCalendarJobDescriptor(calendarId, jobId))); + + /// + public IPutCalendarJobResponse PutCalendarJob(IPutCalendarJobRequest request) => + Dispatcher.Dispatch( + request, + (p, d) => LowLevelDispatch.XpackMlPutCalendarJobDispatch(p) + ); + + /// + public Task PutCalendarJobAsync(Id calendarId, Id jobId, Func selector = null, + CancellationToken cancellationToken = default(CancellationToken) + ) => + PutCalendarJobAsync(selector.InvokeOrDefault(new PutCalendarJobDescriptor(calendarId, jobId)), cancellationToken); + + /// + public Task PutCalendarJobAsync(IPutCalendarJobRequest request, + CancellationToken cancellationToken = default(CancellationToken) + ) => + Dispatcher.DispatchAsync( + request, + cancellationToken, + (p, d, c) => LowLevelDispatch.XpackMlPutCalendarJobDispatchAsync(p, c) + ); + } +} diff --git a/src/Nest/XPack/MachineLearning/PutCalendarJob/PutCalendarJobRequest.cs b/src/Nest/XPack/MachineLearning/PutCalendarJob/PutCalendarJobRequest.cs new file mode 100644 index 00000000000..6d8e2890eb1 --- /dev/null +++ b/src/Nest/XPack/MachineLearning/PutCalendarJob/PutCalendarJobRequest.cs @@ -0,0 +1,15 @@ +using Newtonsoft.Json; + +namespace Nest +{ + /// + /// Adds a job to a calendar. + /// + public partial interface IPutCalendarJobRequest { } + + /// + public partial class PutCalendarJobRequest { } + + [DescriptorFor("XpackMlPutCalendarJob")] + public partial class PutCalendarJobDescriptor { } +} diff --git a/src/Nest/XPack/MachineLearning/PutCalendarJob/PutCalendarJobResponse.cs b/src/Nest/XPack/MachineLearning/PutCalendarJob/PutCalendarJobResponse.cs new file mode 100644 index 00000000000..7108d56659f --- /dev/null +++ b/src/Nest/XPack/MachineLearning/PutCalendarJob/PutCalendarJobResponse.cs @@ -0,0 +1,30 @@ +using System.Collections.Generic; +using Newtonsoft.Json; + +namespace Nest +{ + /// + /// The response from creating a calendar job. + /// + public partial interface IPutCalendarJobResponse : IResponse + { + [JsonProperty("calendar_id")] + Id CalendarId { get; } + + [JsonProperty("job_ids")] + IReadOnlyCollection JobIds { get; } + + [JsonProperty("description")] + string Description { get; } + } + + /// + public class PutCalendarJobResponse : ResponseBase, IPutCalendarJobResponse + { + public Id CalendarId { get; internal set; } + + public string Description { get; internal set; } + + public IReadOnlyCollection JobIds { get; internal set; } = EmptyReadOnly.Collection; + } +} diff --git a/src/Nest/_Generated/_Descriptors.generated.cs b/src/Nest/_Generated/_Descriptors.generated.cs index f82cea82ac4..74cfe3f5a00 100644 --- a/src/Nest/_Generated/_Descriptors.generated.cs +++ b/src/Nest/_Generated/_Descriptors.generated.cs @@ -4114,6 +4114,32 @@ public CloseJobDescriptor(Id job_id) : base(r=>r.Required("job_id", job_id)){} ///Controls the time to wait until a job has closed. Default to 30 minutes public CloseJobDescriptor Timeout(Time timeout) => Qs("timeout", timeout); } + ///descriptor for XpackMlDeleteCalendar
+ public partial class DeleteCalendarDescriptor : RequestDescriptorBase, IDeleteCalendarRequest + { + /// /_xpack/ml/calendars/{calendar_id} + /// this parameter is required + public DeleteCalendarDescriptor(Id calendar_id) : base(r=>r.Required("calendar_id", calendar_id)){} + // values part of the url path + Id IDeleteCalendarRequest.CalendarId => Self.RouteValues.Get("calendar_id"); + + // Request parameters + + } + ///descriptor for XpackMlDeleteCalendarEvent
+ public partial class DeleteCalendarEventDescriptor : RequestDescriptorBase, IDeleteCalendarEventRequest + { + /// /_xpack/ml/calendars/{calendar_id}/events/{event_id} + /// this parameter is required + /// this parameter is required + public DeleteCalendarEventDescriptor(Id calendar_id, Id event_id) : base(r=>r.Required("calendar_id", calendar_id).Required("event_id", event_id)){} + // values part of the url path + Id IDeleteCalendarEventRequest.CalendarId => Self.RouteValues.Get("calendar_id"); + Id IDeleteCalendarEventRequest.EventId => Self.RouteValues.Get("event_id"); + + // Request parameters + + } ///descriptor for XpackMlDeleteDatafeed
http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-datafeed.html
public partial class DeleteDatafeedDescriptor : RequestDescriptorBase, IDeleteDatafeedRequest { @@ -4375,6 +4401,32 @@ public PreviewDatafeedDescriptor(Id datafeed_id) : base(r=>r.Required("datafeed_ // Request parameters + } + ///descriptor for XpackMlPutCalendar
+ public partial class PutCalendarDescriptor : RequestDescriptorBase, IPutCalendarRequest + { + /// /_xpack/ml/calendars/{calendar_id} + /// this parameter is required + public PutCalendarDescriptor(Id calendar_id) : base(r=>r.Required("calendar_id", calendar_id)){} + // values part of the url path + Id IPutCalendarRequest.CalendarId => Self.RouteValues.Get("calendar_id"); + + // Request parameters + + } + ///descriptor for XpackMlPutCalendarJob
+ public partial class PutCalendarJobDescriptor : RequestDescriptorBase, IPutCalendarJobRequest + { + /// /_xpack/ml/calendars/{calendar_id}/jobs/{job_id} + /// this parameter is required + /// this parameter is required + public PutCalendarJobDescriptor(Id calendar_id, Id job_id) : base(r=>r.Required("calendar_id", calendar_id).Required("job_id", job_id)){} + // values part of the url path + Id IPutCalendarJobRequest.CalendarId => Self.RouteValues.Get("calendar_id"); + Id IPutCalendarJobRequest.JobId => Self.RouteValues.Get("job_id"); + + // Request parameters + } ///descriptor for XpackMlPutDatafeed
http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-datafeed.html
public partial class PutDatafeedDescriptor : RequestDescriptorBase,PutDatafeedRequestParameters, IPutDatafeedRequest>, IPutDatafeedRequest diff --git a/src/Nest/_Generated/_LowLevelDispatch.generated.cs b/src/Nest/_Generated/_LowLevelDispatch.generated.cs index f85c3f6fab6..932711cd12e 100644 --- a/src/Nest/_Generated/_LowLevelDispatch.generated.cs +++ b/src/Nest/_Generated/_LowLevelDispatch.generated.cs @@ -3354,6 +3354,50 @@ internal partial class LowLevelDispatch throw InvalidDispatch("XpackMlCloseJob", p, new [] { POST }, "/_xpack/ml/anomaly_detectors/{job_id}/_close"); } + internal TResponse XpackMlDeleteCalendarDispatch(IRequest p) where TResponse : class, IElasticsearchResponse, new() + { + switch(p.HttpMethod) + { + case DELETE: + if (AllSetNoFallback(p.RouteValues.CalendarId)) return _lowLevel.XpackMlDeleteCalendar(p.RouteValues.CalendarId,p.RequestParameters); + break; + } + throw InvalidDispatch("XpackMlDeleteCalendar", p, new [] { DELETE }, "/_xpack/ml/calendars/{calendar_id}"); + } + + internal Task XpackMlDeleteCalendarDispatchAsync(IRequest p, CancellationToken ct) where TResponse : class, IElasticsearchResponse, new() + { + switch(p.HttpMethod) + { + case DELETE: + if (AllSetNoFallback(p.RouteValues.CalendarId)) return _lowLevel.XpackMlDeleteCalendarAsync(p.RouteValues.CalendarId,p.RequestParameters,ct); + break; + } + throw InvalidDispatch("XpackMlDeleteCalendar", p, new [] { DELETE }, "/_xpack/ml/calendars/{calendar_id}"); + } + + internal TResponse XpackMlDeleteCalendarEventDispatch(IRequest p) where TResponse : class, IElasticsearchResponse, new() + { + switch(p.HttpMethod) + { + case DELETE: + if (AllSetNoFallback(p.RouteValues.CalendarId, p.RouteValues.EventId)) return _lowLevel.XpackMlDeleteCalendarEvent(p.RouteValues.CalendarId,p.RouteValues.EventId,p.RequestParameters); + break; + } + throw InvalidDispatch("XpackMlDeleteCalendarEvent", p, new [] { DELETE }, "/_xpack/ml/calendars/{calendar_id}/events/{event_id}"); + } + + internal Task XpackMlDeleteCalendarEventDispatchAsync(IRequest p, CancellationToken ct) where TResponse : class, IElasticsearchResponse, new() + { + switch(p.HttpMethod) + { + case DELETE: + if (AllSetNoFallback(p.RouteValues.CalendarId, p.RouteValues.EventId)) return _lowLevel.XpackMlDeleteCalendarEventAsync(p.RouteValues.CalendarId,p.RouteValues.EventId,p.RequestParameters,ct); + break; + } + throw InvalidDispatch("XpackMlDeleteCalendarEvent", p, new [] { DELETE }, "/_xpack/ml/calendars/{calendar_id}/events/{event_id}"); + } + internal TResponse XpackMlDeleteDatafeedDispatch(IRequest p) where TResponse : class, IElasticsearchResponse, new() { switch(p.HttpMethod) @@ -3814,6 +3858,50 @@ internal partial class LowLevelDispatch throw InvalidDispatch("XpackMlPreviewDatafeed", p, new [] { GET }, "/_xpack/ml/datafeeds/{datafeed_id}/_preview"); } + internal TResponse XpackMlPutCalendarDispatch(IRequest p,SerializableData body) where TResponse : class, IElasticsearchResponse, new() + { + switch(p.HttpMethod) + { + case PUT: + if (AllSetNoFallback(p.RouteValues.CalendarId)) return _lowLevel.XpackMlPutCalendar(p.RouteValues.CalendarId,body,p.RequestParameters); + break; + } + throw InvalidDispatch("XpackMlPutCalendar", p, new [] { PUT }, "/_xpack/ml/calendars/{calendar_id}"); + } + + internal Task XpackMlPutCalendarDispatchAsync(IRequest p,SerializableData body, CancellationToken ct) where TResponse : class, IElasticsearchResponse, new() + { + switch(p.HttpMethod) + { + case PUT: + if (AllSetNoFallback(p.RouteValues.CalendarId)) return _lowLevel.XpackMlPutCalendarAsync(p.RouteValues.CalendarId,body,p.RequestParameters,ct); + break; + } + throw InvalidDispatch("XpackMlPutCalendar", p, new [] { PUT }, "/_xpack/ml/calendars/{calendar_id}"); + } + + internal TResponse XpackMlPutCalendarJobDispatch(IRequest p) where TResponse : class, IElasticsearchResponse, new() + { + switch(p.HttpMethod) + { + case PUT: + if (AllSetNoFallback(p.RouteValues.CalendarId, p.RouteValues.JobId)) return _lowLevel.XpackMlPutCalendarJob(p.RouteValues.CalendarId,p.RouteValues.JobId,p.RequestParameters); + break; + } + throw InvalidDispatch("XpackMlPutCalendarJob", p, new [] { PUT }, "/_xpack/ml/calendars/{calendar_id}/jobs/{job_id}"); + } + + internal Task XpackMlPutCalendarJobDispatchAsync(IRequest p, CancellationToken ct) where TResponse : class, IElasticsearchResponse, new() + { + switch(p.HttpMethod) + { + case PUT: + if (AllSetNoFallback(p.RouteValues.CalendarId, p.RouteValues.JobId)) return _lowLevel.XpackMlPutCalendarJobAsync(p.RouteValues.CalendarId,p.RouteValues.JobId,p.RequestParameters,ct); + break; + } + throw InvalidDispatch("XpackMlPutCalendarJob", p, new [] { PUT }, "/_xpack/ml/calendars/{calendar_id}/jobs/{job_id}"); + } + internal TResponse XpackMlPutDatafeedDispatch(IRequest p,SerializableData body) where TResponse : class, IElasticsearchResponse, new() { switch(p.HttpMethod) diff --git a/src/Nest/_Generated/_Requests.generated.cs b/src/Nest/_Generated/_Requests.generated.cs index b95093f2b27..c323ebc53cf 100644 --- a/src/Nest/_Generated/_Requests.generated.cs +++ b/src/Nest/_Generated/_Requests.generated.cs @@ -1778,6 +1778,43 @@ public DeleteByQueryRequest(Indices index, Types type) : base(r=>r.Required("ind public long? Slices { get => Q("slices"); set => Q("slices", value); } } [JsonObject(MemberSerialization = MemberSerialization.OptIn)] + public partial interface IDeleteCalendarEventRequest : IRequest + { + Id CalendarId { get; } + Id EventId { get; } + } + ///Request parameters for XpackMlDeleteCalendarEvent
+ public partial class DeleteCalendarEventRequest : PlainRequestBase, IDeleteCalendarEventRequest + { + protected IDeleteCalendarEventRequest Self => this; + ////_xpack/ml/calendars/{calendar_id}/events/{event_id} + ///this parameter is required + ///this parameter is required + public DeleteCalendarEventRequest(Id calendar_id, Id event_id) : base(r=>r.Required("calendar_id", calendar_id).Required("event_id", event_id)){} + // values part of the url path + Id IDeleteCalendarEventRequest.CalendarId => Self.RouteValues.Get("calendar_id"); + Id IDeleteCalendarEventRequest.EventId => Self.RouteValues.Get("event_id"); + + // Request parameters + } + [JsonObject(MemberSerialization = MemberSerialization.OptIn)] + public partial interface IDeleteCalendarRequest : IRequest + { + Id CalendarId { get; } + } + ///Request parameters for XpackMlDeleteCalendar
+ public partial class DeleteCalendarRequest : PlainRequestBase, IDeleteCalendarRequest + { + protected IDeleteCalendarRequest Self => this; + ////_xpack/ml/calendars/{calendar_id} + ///this parameter is required + public DeleteCalendarRequest(Id calendar_id) : base(r=>r.Required("calendar_id", calendar_id)){} + // values part of the url path + Id IDeleteCalendarRequest.CalendarId => Self.RouteValues.Get("calendar_id"); + + // Request parameters + } + [JsonObject(MemberSerialization = MemberSerialization.OptIn)] public partial interface IDeleteDatafeedRequest : IRequest { Id DatafeedId { get; } @@ -2673,18 +2710,6 @@ public GetAnomalyRecordsRequest(Id job_id) : base(r=>r.Required("job_id", job_id // Request parameters } [JsonObject(MemberSerialization = MemberSerialization.OptIn)] - public partial interface IGetBasicLicenseStatusRequest : IRequest - { - } - ///Request parameters for XpackLicenseGetBasicStatus
https://www.elastic.co/guide/en/x-pack/current/license-management.html
- public partial class GetBasicLicenseStatusRequest : PlainRequestBase, IGetBasicLicenseStatusRequest - { - protected IGetBasicLicenseStatusRequest Self => this; - // values part of the url path - - // Request parameters - } - [JsonObject(MemberSerialization = MemberSerialization.OptIn)] public partial interface IGetAutoFollowPatternRequest : IRequest { Name Name { get; } @@ -2704,6 +2729,18 @@ public GetAutoFollowPatternRequest(Name name) : base(r=>r.Optional("name", name) // Request parameters } [JsonObject(MemberSerialization = MemberSerialization.OptIn)] + public partial interface IGetBasicLicenseStatusRequest : IRequest + { + } + ///Request parameters for XpackLicenseGetBasicStatus
https://www.elastic.co/guide/en/x-pack/current/license-management.html
+ public partial class GetBasicLicenseStatusRequest : PlainRequestBase, IGetBasicLicenseStatusRequest + { + protected IGetBasicLicenseStatusRequest Self => this; + // values part of the url path + + // Request parameters + } + [JsonObject(MemberSerialization = MemberSerialization.OptIn)] public partial interface IGetBucketsRequest : IRequest { Id JobId { get; } @@ -4309,6 +4346,43 @@ public PutAliasRequest(Indices index, Name name) : base(r=>r.Required("index", i public Time MasterTimeout { get => Q