co.elastic.clients.elasticsearch.ml.ElasticsearchMlAsyncClient Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of elasticsearch-java Show documentation
Show all versions of elasticsearch-java Show documentation
Elasticsearch Java API Client
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//----------------------------------------------------
// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST.
//----------------------------------------------------
package co.elastic.clients.elasticsearch.ml;
import co.elastic.clients.ApiClient;
import co.elastic.clients.elasticsearch._types.ErrorResponse;
import co.elastic.clients.transport.ElasticsearchTransport;
import co.elastic.clients.transport.Endpoint;
import co.elastic.clients.transport.JsonEndpoint;
import co.elastic.clients.transport.Transport;
import co.elastic.clients.transport.TransportOptions;
import co.elastic.clients.transport.endpoints.EndpointWithResponseMapperAttr;
import co.elastic.clients.util.ObjectBuilder;
import java.util.concurrent.CompletableFuture;
import java.util.function.Function;
import javax.annotation.Nullable;
/**
* Client for the ml namespace.
*/
public class ElasticsearchMlAsyncClient extends ApiClient {
public ElasticsearchMlAsyncClient(ElasticsearchTransport transport) {
super(transport, null);
}
public ElasticsearchMlAsyncClient(ElasticsearchTransport transport, @Nullable TransportOptions transportOptions) {
super(transport, transportOptions);
}
@Override
public ElasticsearchMlAsyncClient withTransportOptions(@Nullable TransportOptions transportOptions) {
return new ElasticsearchMlAsyncClient(this.transport, transportOptions);
}
// ----- Endpoint: ml.close_job
/**
* Closes one or more anomaly detection jobs. A job can be opened and closed
* multiple times throughout its lifecycle.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture closeJob(CloseJobRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) CloseJobRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Closes one or more anomaly detection jobs. A job can be opened and closed
* multiple times throughout its lifecycle.
*
* @param fn
* a function that initializes a builder to create the
* {@link CloseJobRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture closeJob(
Function> fn) {
return closeJob(fn.apply(new CloseJobRequest.Builder()).build());
}
// ----- Endpoint: ml.delete_calendar
/**
* Deletes a calendar.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture deleteCalendar(DeleteCalendarRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) DeleteCalendarRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Deletes a calendar.
*
* @param fn
* a function that initializes a builder to create the
* {@link DeleteCalendarRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture deleteCalendar(
Function> fn) {
return deleteCalendar(fn.apply(new DeleteCalendarRequest.Builder()).build());
}
// ----- Endpoint: ml.delete_calendar_event
/**
* Deletes scheduled events from a calendar.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture deleteCalendarEvent(DeleteCalendarEventRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) DeleteCalendarEventRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Deletes scheduled events from a calendar.
*
* @param fn
* a function that initializes a builder to create the
* {@link DeleteCalendarEventRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture deleteCalendarEvent(
Function> fn) {
return deleteCalendarEvent(fn.apply(new DeleteCalendarEventRequest.Builder()).build());
}
// ----- Endpoint: ml.delete_calendar_job
/**
* Deletes anomaly detection jobs from a calendar.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture deleteCalendarJob(DeleteCalendarJobRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) DeleteCalendarJobRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Deletes anomaly detection jobs from a calendar.
*
* @param fn
* a function that initializes a builder to create the
* {@link DeleteCalendarJobRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture deleteCalendarJob(
Function> fn) {
return deleteCalendarJob(fn.apply(new DeleteCalendarJobRequest.Builder()).build());
}
// ----- Endpoint: ml.delete_data_frame_analytics
/**
* Deletes an existing data frame analytics job.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture deleteDataFrameAnalytics(
DeleteDataFrameAnalyticsRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) DeleteDataFrameAnalyticsRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Deletes an existing data frame analytics job.
*
* @param fn
* a function that initializes a builder to create the
* {@link DeleteDataFrameAnalyticsRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture deleteDataFrameAnalytics(
Function> fn) {
return deleteDataFrameAnalytics(fn.apply(new DeleteDataFrameAnalyticsRequest.Builder()).build());
}
// ----- Endpoint: ml.delete_datafeed
/**
* Deletes an existing datafeed.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture deleteDatafeed(DeleteDatafeedRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) DeleteDatafeedRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Deletes an existing datafeed.
*
* @param fn
* a function that initializes a builder to create the
* {@link DeleteDatafeedRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture deleteDatafeed(
Function> fn) {
return deleteDatafeed(fn.apply(new DeleteDatafeedRequest.Builder()).build());
}
// ----- Endpoint: ml.delete_expired_data
/**
* Deletes expired and unused machine learning data.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture deleteExpiredData(DeleteExpiredDataRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) DeleteExpiredDataRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Deletes expired and unused machine learning data.
*
* @param fn
* a function that initializes a builder to create the
* {@link DeleteExpiredDataRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture deleteExpiredData(
Function> fn) {
return deleteExpiredData(fn.apply(new DeleteExpiredDataRequest.Builder()).build());
}
/**
* Deletes expired and unused machine learning data.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture deleteExpiredData() {
return this.transport.performRequestAsync(new DeleteExpiredDataRequest.Builder().build(),
DeleteExpiredDataRequest._ENDPOINT, this.transportOptions);
}
// ----- Endpoint: ml.delete_filter
/**
* Deletes a filter.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture deleteFilter(DeleteFilterRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) DeleteFilterRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Deletes a filter.
*
* @param fn
* a function that initializes a builder to create the
* {@link DeleteFilterRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture deleteFilter(
Function> fn) {
return deleteFilter(fn.apply(new DeleteFilterRequest.Builder()).build());
}
// ----- Endpoint: ml.delete_forecast
/**
* Deletes forecasts from a machine learning job.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture deleteForecast(DeleteForecastRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) DeleteForecastRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Deletes forecasts from a machine learning job.
*
* @param fn
* a function that initializes a builder to create the
* {@link DeleteForecastRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture deleteForecast(
Function> fn) {
return deleteForecast(fn.apply(new DeleteForecastRequest.Builder()).build());
}
// ----- Endpoint: ml.delete_job
/**
* Deletes an existing anomaly detection job.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture deleteJob(DeleteJobRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) DeleteJobRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Deletes an existing anomaly detection job.
*
* @param fn
* a function that initializes a builder to create the
* {@link DeleteJobRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture deleteJob(
Function> fn) {
return deleteJob(fn.apply(new DeleteJobRequest.Builder()).build());
}
// ----- Endpoint: ml.delete_model_snapshot
/**
* Deletes an existing model snapshot.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture deleteModelSnapshot(DeleteModelSnapshotRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) DeleteModelSnapshotRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Deletes an existing model snapshot.
*
* @param fn
* a function that initializes a builder to create the
* {@link DeleteModelSnapshotRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture deleteModelSnapshot(
Function> fn) {
return deleteModelSnapshot(fn.apply(new DeleteModelSnapshotRequest.Builder()).build());
}
// ----- Endpoint: ml.delete_trained_model
/**
* Deletes an existing trained inference model that is currently not referenced
* by an ingest pipeline.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture deleteTrainedModel(DeleteTrainedModelRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) DeleteTrainedModelRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Deletes an existing trained inference model that is currently not referenced
* by an ingest pipeline.
*
* @param fn
* a function that initializes a builder to create the
* {@link DeleteTrainedModelRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture deleteTrainedModel(
Function> fn) {
return deleteTrainedModel(fn.apply(new DeleteTrainedModelRequest.Builder()).build());
}
// ----- Endpoint: ml.delete_trained_model_alias
/**
* Deletes a model alias that refers to the trained model
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture deleteTrainedModelAlias(
DeleteTrainedModelAliasRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) DeleteTrainedModelAliasRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Deletes a model alias that refers to the trained model
*
* @param fn
* a function that initializes a builder to create the
* {@link DeleteTrainedModelAliasRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture deleteTrainedModelAlias(
Function> fn) {
return deleteTrainedModelAlias(fn.apply(new DeleteTrainedModelAliasRequest.Builder()).build());
}
// ----- Endpoint: ml.estimate_model_memory
/**
* Estimates the model memory
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture estimateModelMemory(EstimateModelMemoryRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) EstimateModelMemoryRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Estimates the model memory
*
* @param fn
* a function that initializes a builder to create the
* {@link EstimateModelMemoryRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture estimateModelMemory(
Function> fn) {
return estimateModelMemory(fn.apply(new EstimateModelMemoryRequest.Builder()).build());
}
/**
* Estimates the model memory
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture estimateModelMemory() {
return this.transport.performRequestAsync(new EstimateModelMemoryRequest.Builder().build(),
EstimateModelMemoryRequest._ENDPOINT, this.transportOptions);
}
// ----- Endpoint: ml.evaluate_data_frame
/**
* Evaluates the data frame analytics for an annotated index.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture evaluateDataFrame(EvaluateDataFrameRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) EvaluateDataFrameRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Evaluates the data frame analytics for an annotated index.
*
* @param fn
* a function that initializes a builder to create the
* {@link EvaluateDataFrameRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture evaluateDataFrame(
Function> fn) {
return evaluateDataFrame(fn.apply(new EvaluateDataFrameRequest.Builder()).build());
}
// ----- Endpoint: ml.explain_data_frame_analytics
/**
* Explains a data frame analytics config.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture explainDataFrameAnalytics(
ExplainDataFrameAnalyticsRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) ExplainDataFrameAnalyticsRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Explains a data frame analytics config.
*
* @param fn
* a function that initializes a builder to create the
* {@link ExplainDataFrameAnalyticsRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture explainDataFrameAnalytics(
Function> fn) {
return explainDataFrameAnalytics(fn.apply(new ExplainDataFrameAnalyticsRequest.Builder()).build());
}
/**
* Explains a data frame analytics config.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture explainDataFrameAnalytics() {
return this.transport.performRequestAsync(new ExplainDataFrameAnalyticsRequest.Builder().build(),
ExplainDataFrameAnalyticsRequest._ENDPOINT, this.transportOptions);
}
// ----- Endpoint: ml.flush_job
/**
* Forces any buffered data to be processed by the job.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture flushJob(FlushJobRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) FlushJobRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Forces any buffered data to be processed by the job.
*
* @param fn
* a function that initializes a builder to create the
* {@link FlushJobRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture flushJob(
Function> fn) {
return flushJob(fn.apply(new FlushJobRequest.Builder()).build());
}
// ----- Endpoint: ml.forecast
/**
* Predicts the future behavior of a time series by using its historical
* behavior.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture forecast(ForecastRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) ForecastRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Predicts the future behavior of a time series by using its historical
* behavior.
*
* @param fn
* a function that initializes a builder to create the
* {@link ForecastRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture forecast(
Function> fn) {
return forecast(fn.apply(new ForecastRequest.Builder()).build());
}
// ----- Endpoint: ml.get_buckets
/**
* Retrieves anomaly detection job results for one or more buckets.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture getBuckets(GetBucketsRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) GetBucketsRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Retrieves anomaly detection job results for one or more buckets.
*
* @param fn
* a function that initializes a builder to create the
* {@link GetBucketsRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture getBuckets(
Function> fn) {
return getBuckets(fn.apply(new GetBucketsRequest.Builder()).build());
}
// ----- Endpoint: ml.get_calendar_events
/**
* Retrieves information about the scheduled events in calendars.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture getCalendarEvents(GetCalendarEventsRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) GetCalendarEventsRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Retrieves information about the scheduled events in calendars.
*
* @param fn
* a function that initializes a builder to create the
* {@link GetCalendarEventsRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture getCalendarEvents(
Function> fn) {
return getCalendarEvents(fn.apply(new GetCalendarEventsRequest.Builder()).build());
}
// ----- Endpoint: ml.get_calendars
/**
* Retrieves configuration information for calendars.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture getCalendars(GetCalendarsRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) GetCalendarsRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Retrieves configuration information for calendars.
*
* @param fn
* a function that initializes a builder to create the
* {@link GetCalendarsRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture getCalendars(
Function> fn) {
return getCalendars(fn.apply(new GetCalendarsRequest.Builder()).build());
}
/**
* Retrieves configuration information for calendars.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture getCalendars() {
return this.transport.performRequestAsync(new GetCalendarsRequest.Builder().build(),
GetCalendarsRequest._ENDPOINT, this.transportOptions);
}
// ----- Endpoint: ml.get_categories
/**
* Retrieves anomaly detection job results for one or more categories.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture getCategories(GetCategoriesRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) GetCategoriesRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Retrieves anomaly detection job results for one or more categories.
*
* @param fn
* a function that initializes a builder to create the
* {@link GetCategoriesRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture getCategories(
Function> fn) {
return getCategories(fn.apply(new GetCategoriesRequest.Builder()).build());
}
// ----- Endpoint: ml.get_data_frame_analytics
/**
* Retrieves configuration information for data frame analytics jobs.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture getDataFrameAnalytics(
GetDataFrameAnalyticsRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) GetDataFrameAnalyticsRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Retrieves configuration information for data frame analytics jobs.
*
* @param fn
* a function that initializes a builder to create the
* {@link GetDataFrameAnalyticsRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture getDataFrameAnalytics(
Function> fn) {
return getDataFrameAnalytics(fn.apply(new GetDataFrameAnalyticsRequest.Builder()).build());
}
/**
* Retrieves configuration information for data frame analytics jobs.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture getDataFrameAnalytics() {
return this.transport.performRequestAsync(new GetDataFrameAnalyticsRequest.Builder().build(),
GetDataFrameAnalyticsRequest._ENDPOINT, this.transportOptions);
}
// ----- Endpoint: ml.get_data_frame_analytics_stats
/**
* Retrieves usage information for data frame analytics jobs.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture getDataFrameAnalyticsStats(
GetDataFrameAnalyticsStatsRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) GetDataFrameAnalyticsStatsRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Retrieves usage information for data frame analytics jobs.
*
* @param fn
* a function that initializes a builder to create the
* {@link GetDataFrameAnalyticsStatsRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture getDataFrameAnalyticsStats(
Function> fn) {
return getDataFrameAnalyticsStats(fn.apply(new GetDataFrameAnalyticsStatsRequest.Builder()).build());
}
/**
* Retrieves usage information for data frame analytics jobs.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture getDataFrameAnalyticsStats() {
return this.transport.performRequestAsync(new GetDataFrameAnalyticsStatsRequest.Builder().build(),
GetDataFrameAnalyticsStatsRequest._ENDPOINT, this.transportOptions);
}
// ----- Endpoint: ml.get_datafeed_stats
/**
* Retrieves usage information for datafeeds.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture getDatafeedStats(GetDatafeedStatsRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) GetDatafeedStatsRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Retrieves usage information for datafeeds.
*
* @param fn
* a function that initializes a builder to create the
* {@link GetDatafeedStatsRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture getDatafeedStats(
Function> fn) {
return getDatafeedStats(fn.apply(new GetDatafeedStatsRequest.Builder()).build());
}
/**
* Retrieves usage information for datafeeds.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture getDatafeedStats() {
return this.transport.performRequestAsync(new GetDatafeedStatsRequest.Builder().build(),
GetDatafeedStatsRequest._ENDPOINT, this.transportOptions);
}
// ----- Endpoint: ml.get_datafeeds
/**
* Retrieves configuration information for datafeeds.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture getDatafeeds(GetDatafeedsRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) GetDatafeedsRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Retrieves configuration information for datafeeds.
*
* @param fn
* a function that initializes a builder to create the
* {@link GetDatafeedsRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture getDatafeeds(
Function> fn) {
return getDatafeeds(fn.apply(new GetDatafeedsRequest.Builder()).build());
}
/**
* Retrieves configuration information for datafeeds.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture getDatafeeds() {
return this.transport.performRequestAsync(new GetDatafeedsRequest.Builder().build(),
GetDatafeedsRequest._ENDPOINT, this.transportOptions);
}
// ----- Endpoint: ml.get_filters
/**
* Retrieves filters.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture getFilters(GetFiltersRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) GetFiltersRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Retrieves filters.
*
* @param fn
* a function that initializes a builder to create the
* {@link GetFiltersRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture getFilters(
Function> fn) {
return getFilters(fn.apply(new GetFiltersRequest.Builder()).build());
}
/**
* Retrieves filters.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture getFilters() {
return this.transport.performRequestAsync(new GetFiltersRequest.Builder().build(), GetFiltersRequest._ENDPOINT,
this.transportOptions);
}
// ----- Endpoint: ml.get_influencers
/**
* Retrieves anomaly detection job results for one or more influencers.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture getInfluencers(GetInfluencersRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) GetInfluencersRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Retrieves anomaly detection job results for one or more influencers.
*
* @param fn
* a function that initializes a builder to create the
* {@link GetInfluencersRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture getInfluencers(
Function> fn) {
return getInfluencers(fn.apply(new GetInfluencersRequest.Builder()).build());
}
// ----- Endpoint: ml.get_job_stats
/**
* Retrieves usage information for anomaly detection jobs.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture getJobStats(GetJobStatsRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) GetJobStatsRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Retrieves usage information for anomaly detection jobs.
*
* @param fn
* a function that initializes a builder to create the
* {@link GetJobStatsRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture getJobStats(
Function> fn) {
return getJobStats(fn.apply(new GetJobStatsRequest.Builder()).build());
}
/**
* Retrieves usage information for anomaly detection jobs.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture getJobStats() {
return this.transport.performRequestAsync(new GetJobStatsRequest.Builder().build(),
GetJobStatsRequest._ENDPOINT, this.transportOptions);
}
// ----- Endpoint: ml.get_jobs
/**
* Retrieves configuration information for anomaly detection jobs.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture getJobs(GetJobsRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) GetJobsRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Retrieves configuration information for anomaly detection jobs.
*
* @param fn
* a function that initializes a builder to create the
* {@link GetJobsRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture getJobs(
Function> fn) {
return getJobs(fn.apply(new GetJobsRequest.Builder()).build());
}
/**
* Retrieves configuration information for anomaly detection jobs.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture getJobs() {
return this.transport.performRequestAsync(new GetJobsRequest.Builder().build(), GetJobsRequest._ENDPOINT,
this.transportOptions);
}
// ----- Endpoint: ml.get_memory_stats
/**
* Returns information on how ML is using memory.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture getMemoryStats(GetMemoryStatsRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) GetMemoryStatsRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Returns information on how ML is using memory.
*
* @param fn
* a function that initializes a builder to create the
* {@link GetMemoryStatsRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture getMemoryStats(
Function> fn) {
return getMemoryStats(fn.apply(new GetMemoryStatsRequest.Builder()).build());
}
/**
* Returns information on how ML is using memory.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture getMemoryStats() {
return this.transport.performRequestAsync(new GetMemoryStatsRequest.Builder().build(),
GetMemoryStatsRequest._ENDPOINT, this.transportOptions);
}
// ----- Endpoint: ml.get_model_snapshots
/**
* Retrieves information about model snapshots.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture getModelSnapshots(GetModelSnapshotsRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) GetModelSnapshotsRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Retrieves information about model snapshots.
*
* @param fn
* a function that initializes a builder to create the
* {@link GetModelSnapshotsRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture getModelSnapshots(
Function> fn) {
return getModelSnapshots(fn.apply(new GetModelSnapshotsRequest.Builder()).build());
}
// ----- Endpoint: ml.get_overall_buckets
/**
* Retrieves overall bucket results that summarize the bucket results of
* multiple anomaly detection jobs.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture getOverallBuckets(GetOverallBucketsRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) GetOverallBucketsRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Retrieves overall bucket results that summarize the bucket results of
* multiple anomaly detection jobs.
*
* @param fn
* a function that initializes a builder to create the
* {@link GetOverallBucketsRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture getOverallBuckets(
Function> fn) {
return getOverallBuckets(fn.apply(new GetOverallBucketsRequest.Builder()).build());
}
// ----- Endpoint: ml.get_records
/**
* Retrieves anomaly records for an anomaly detection job.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture getRecords(GetRecordsRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) GetRecordsRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Retrieves anomaly records for an anomaly detection job.
*
* @param fn
* a function that initializes a builder to create the
* {@link GetRecordsRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture getRecords(
Function> fn) {
return getRecords(fn.apply(new GetRecordsRequest.Builder()).build());
}
// ----- Endpoint: ml.get_trained_models
/**
* Retrieves configuration information for a trained inference model.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture getTrainedModels(GetTrainedModelsRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) GetTrainedModelsRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Retrieves configuration information for a trained inference model.
*
* @param fn
* a function that initializes a builder to create the
* {@link GetTrainedModelsRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture getTrainedModels(
Function> fn) {
return getTrainedModels(fn.apply(new GetTrainedModelsRequest.Builder()).build());
}
/**
* Retrieves configuration information for a trained inference model.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture getTrainedModels() {
return this.transport.performRequestAsync(new GetTrainedModelsRequest.Builder().build(),
GetTrainedModelsRequest._ENDPOINT, this.transportOptions);
}
// ----- Endpoint: ml.get_trained_models_stats
/**
* Retrieves usage information for trained inference models.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture getTrainedModelsStats(
GetTrainedModelsStatsRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) GetTrainedModelsStatsRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Retrieves usage information for trained inference models.
*
* @param fn
* a function that initializes a builder to create the
* {@link GetTrainedModelsStatsRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture getTrainedModelsStats(
Function> fn) {
return getTrainedModelsStats(fn.apply(new GetTrainedModelsStatsRequest.Builder()).build());
}
/**
* Retrieves usage information for trained inference models.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture getTrainedModelsStats() {
return this.transport.performRequestAsync(new GetTrainedModelsStatsRequest.Builder().build(),
GetTrainedModelsStatsRequest._ENDPOINT, this.transportOptions);
}
// ----- Endpoint: ml.infer_trained_model_deployment
/**
* Evaluate a trained model.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture inferTrainedModelDeployment(
InferTrainedModelDeploymentRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) InferTrainedModelDeploymentRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Evaluate a trained model.
*
* @param fn
* a function that initializes a builder to create the
* {@link InferTrainedModelDeploymentRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture inferTrainedModelDeployment(
Function> fn) {
return inferTrainedModelDeployment(fn.apply(new InferTrainedModelDeploymentRequest.Builder()).build());
}
// ----- Endpoint: ml.info
/**
* Returns defaults and limits used by machine learning.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture info() {
return this.transport.performRequestAsync(MlInfoRequest._INSTANCE, MlInfoRequest._ENDPOINT,
this.transportOptions);
}
// ----- Endpoint: ml.open_job
/**
* Opens one or more anomaly detection jobs.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture openJob(OpenJobRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) OpenJobRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Opens one or more anomaly detection jobs.
*
* @param fn
* a function that initializes a builder to create the
* {@link OpenJobRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture openJob(
Function> fn) {
return openJob(fn.apply(new OpenJobRequest.Builder()).build());
}
// ----- Endpoint: ml.post_calendar_events
/**
* Posts scheduled events in a calendar.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture postCalendarEvents(PostCalendarEventsRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) PostCalendarEventsRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Posts scheduled events in a calendar.
*
* @param fn
* a function that initializes a builder to create the
* {@link PostCalendarEventsRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture postCalendarEvents(
Function> fn) {
return postCalendarEvents(fn.apply(new PostCalendarEventsRequest.Builder()).build());
}
// ----- Endpoint: ml.post_data
/**
* Sends data to an anomaly detection job for analysis.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture postData(PostDataRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint, PostDataResponse, ErrorResponse> endpoint = (JsonEndpoint, PostDataResponse, ErrorResponse>) PostDataRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Sends data to an anomaly detection job for analysis.
*
* @param fn
* a function that initializes a builder to create the
* {@link PostDataRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture postData(
Function, ObjectBuilder>> fn) {
return postData(fn.apply(new PostDataRequest.Builder()).build());
}
// ----- Endpoint: ml.preview_data_frame_analytics
/**
* Previews that will be analyzed given a data frame analytics config.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture previewDataFrameAnalytics(
PreviewDataFrameAnalyticsRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) PreviewDataFrameAnalyticsRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Previews that will be analyzed given a data frame analytics config.
*
* @param fn
* a function that initializes a builder to create the
* {@link PreviewDataFrameAnalyticsRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture previewDataFrameAnalytics(
Function> fn) {
return previewDataFrameAnalytics(fn.apply(new PreviewDataFrameAnalyticsRequest.Builder()).build());
}
/**
* Previews that will be analyzed given a data frame analytics config.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture previewDataFrameAnalytics() {
return this.transport.performRequestAsync(new PreviewDataFrameAnalyticsRequest.Builder().build(),
PreviewDataFrameAnalyticsRequest._ENDPOINT, this.transportOptions);
}
// ----- Endpoint: ml.preview_datafeed
/**
* Previews a datafeed.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture> previewDatafeed(
PreviewDatafeedRequest request, Class tDocumentClass) {
@SuppressWarnings("unchecked")
JsonEndpoint, ErrorResponse> endpoint = (JsonEndpoint, ErrorResponse>) PreviewDatafeedRequest._ENDPOINT;
endpoint = new EndpointWithResponseMapperAttr<>(endpoint,
"co.elastic.clients:Deserializer:ml.preview_datafeed.TDocument", getDeserializer(tDocumentClass));
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Previews a datafeed.
*
* @param fn
* a function that initializes a builder to create the
* {@link PreviewDatafeedRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture> previewDatafeed(
Function> fn,
Class tDocumentClass) {
return previewDatafeed(fn.apply(new PreviewDatafeedRequest.Builder()).build(), tDocumentClass);
}
// ----- Endpoint: ml.put_calendar
/**
* Instantiates a calendar.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture putCalendar(PutCalendarRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) PutCalendarRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Instantiates a calendar.
*
* @param fn
* a function that initializes a builder to create the
* {@link PutCalendarRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture putCalendar(
Function> fn) {
return putCalendar(fn.apply(new PutCalendarRequest.Builder()).build());
}
// ----- Endpoint: ml.put_calendar_job
/**
* Adds an anomaly detection job to a calendar.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture putCalendarJob(PutCalendarJobRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) PutCalendarJobRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Adds an anomaly detection job to a calendar.
*
* @param fn
* a function that initializes a builder to create the
* {@link PutCalendarJobRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture putCalendarJob(
Function> fn) {
return putCalendarJob(fn.apply(new PutCalendarJobRequest.Builder()).build());
}
// ----- Endpoint: ml.put_data_frame_analytics
/**
* Instantiates a data frame analytics job.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture putDataFrameAnalytics(
PutDataFrameAnalyticsRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) PutDataFrameAnalyticsRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Instantiates a data frame analytics job.
*
* @param fn
* a function that initializes a builder to create the
* {@link PutDataFrameAnalyticsRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture putDataFrameAnalytics(
Function