
co.elastic.clients.elasticsearch.eql.ElasticsearchEqlAsyncClient Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of org.apache.servicemix.bundles.elasticsearch-java
Show all versions of org.apache.servicemix.bundles.elasticsearch-java
This OSGi bundle wraps ${pkgArtifactId} ${pkgVersion} jar files.
The newest version!
/*
* 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.
*/
package co.elastic.clients.elasticsearch.eql;
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.lang.reflect.Type;
import java.util.concurrent.CompletableFuture;
import java.util.function.Function;
import javax.annotation.Nullable;
//----------------------------------------------------------------
// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST.
//----------------------------------------------------------------
//
// This code is generated from the Elasticsearch API specification
// at https://github.com/elastic/elasticsearch-specification
//
// Manual updates to this file will be lost when the code is
// re-generated.
//
// If you find a property that is missing or wrongly typed, please
// open an issue or a PR on the API specification repository.
//
//----------------------------------------------------------------
/**
* Client for the eql namespace.
*/
public class ElasticsearchEqlAsyncClient extends ApiClient {
public ElasticsearchEqlAsyncClient(ElasticsearchTransport transport) {
super(transport, null);
}
public ElasticsearchEqlAsyncClient(ElasticsearchTransport transport, @Nullable TransportOptions transportOptions) {
super(transport, transportOptions);
}
@Override
public ElasticsearchEqlAsyncClient withTransportOptions(@Nullable TransportOptions transportOptions) {
return new ElasticsearchEqlAsyncClient(this.transport, transportOptions);
}
// ----- Endpoint: eql.delete
/**
* Delete an async EQL search. Delete an async EQL search or a stored
* synchronous EQL search. The API also deletes results for the search.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture delete(EqlDeleteRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) EqlDeleteRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Delete an async EQL search. Delete an async EQL search or a stored
* synchronous EQL search. The API also deletes results for the search.
*
* @param fn
* a function that initializes a builder to create the
* {@link EqlDeleteRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture delete(
Function> fn) {
return delete(fn.apply(new EqlDeleteRequest.Builder()).build());
}
// ----- Endpoint: eql.get
/**
* Get async EQL search results. Get the current status and available results
* for an async EQL search or a stored synchronous EQL search.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture> get(EqlGetRequest request, Class tEventClass) {
@SuppressWarnings("unchecked")
JsonEndpoint, ErrorResponse> endpoint = (JsonEndpoint, ErrorResponse>) EqlGetRequest._ENDPOINT;
endpoint = new EndpointWithResponseMapperAttr<>(endpoint,
"co.elastic.clients:Deserializer:eql.get.Response.TEvent", getDeserializer(tEventClass));
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Get async EQL search results. Get the current status and available results
* for an async EQL search or a stored synchronous EQL search.
*
* @param fn
* a function that initializes a builder to create the
* {@link EqlGetRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture> get(
Function> fn, Class tEventClass) {
return get(fn.apply(new EqlGetRequest.Builder()).build(), tEventClass);
}
/**
* Overload of {@link #get(EqlGetRequest, Class)}, where Class is defined as
* Void, meaning the documents will not be deserialized.
*/
public CompletableFuture> get(EqlGetRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint, ErrorResponse> endpoint = (JsonEndpoint, ErrorResponse>) EqlGetRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Overload of {@link #get(Function, Class)}, where Class is defined as Void,
* meaning the documents will not be deserialized.
*/
public final CompletableFuture> get(
Function> fn) {
return get(fn.apply(new EqlGetRequest.Builder()).build(), Void.class);
}
/**
* Get async EQL search results. Get the current status and available results
* for an async EQL search or a stored synchronous EQL search.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture> get(EqlGetRequest request, Type tEventType) {
@SuppressWarnings("unchecked")
JsonEndpoint, ErrorResponse> endpoint = (JsonEndpoint, ErrorResponse>) EqlGetRequest._ENDPOINT;
endpoint = new EndpointWithResponseMapperAttr<>(endpoint,
"co.elastic.clients:Deserializer:eql.get.Response.TEvent", getDeserializer(tEventType));
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Get async EQL search results. Get the current status and available results
* for an async EQL search or a stored synchronous EQL search.
*
* @param fn
* a function that initializes a builder to create the
* {@link EqlGetRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture> get(
Function> fn, Type tEventType) {
return get(fn.apply(new EqlGetRequest.Builder()).build(), tEventType);
}
// ----- Endpoint: eql.get_status
/**
* Get the async EQL status. Get the current status for an async EQL search or a
* stored synchronous EQL search without returning results.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture getStatus(GetEqlStatusRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) GetEqlStatusRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Get the async EQL status. Get the current status for an async EQL search or a
* stored synchronous EQL search without returning results.
*
* @param fn
* a function that initializes a builder to create the
* {@link GetEqlStatusRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture getStatus(
Function> fn) {
return getStatus(fn.apply(new GetEqlStatusRequest.Builder()).build());
}
// ----- Endpoint: eql.search
/**
* Get EQL search results. Returns search results for an Event Query Language
* (EQL) query. EQL assumes each document in a data stream or index corresponds
* to an event.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture> search(EqlSearchRequest request,
Class tEventClass) {
@SuppressWarnings("unchecked")
JsonEndpoint, ErrorResponse> endpoint = (JsonEndpoint, ErrorResponse>) EqlSearchRequest._ENDPOINT;
endpoint = new EndpointWithResponseMapperAttr<>(endpoint,
"co.elastic.clients:Deserializer:eql.search.Response.TEvent", getDeserializer(tEventClass));
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Get EQL search results. Returns search results for an Event Query Language
* (EQL) query. EQL assumes each document in a data stream or index corresponds
* to an event.
*
* @param fn
* a function that initializes a builder to create the
* {@link EqlSearchRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture> search(
Function> fn, Class tEventClass) {
return search(fn.apply(new EqlSearchRequest.Builder()).build(), tEventClass);
}
/**
* Overload of {@link #search(EqlSearchRequest, Class)}, where Class is defined
* as Void, meaning the documents will not be deserialized.
*/
public CompletableFuture> search(EqlSearchRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint, ErrorResponse> endpoint = (JsonEndpoint, ErrorResponse>) EqlSearchRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Overload of {@link #search(Function, Class)}, where Class is defined as Void,
* meaning the documents will not be deserialized.
*/
public final CompletableFuture> search(
Function> fn) {
return search(fn.apply(new EqlSearchRequest.Builder()).build(), Void.class);
}
/**
* Get EQL search results. Returns search results for an Event Query Language
* (EQL) query. EQL assumes each document in a data stream or index corresponds
* to an event.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture> search(EqlSearchRequest request, Type tEventType) {
@SuppressWarnings("unchecked")
JsonEndpoint, ErrorResponse> endpoint = (JsonEndpoint, ErrorResponse>) EqlSearchRequest._ENDPOINT;
endpoint = new EndpointWithResponseMapperAttr<>(endpoint,
"co.elastic.clients:Deserializer:eql.search.Response.TEvent", getDeserializer(tEventType));
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Get EQL search results. Returns search results for an Event Query Language
* (EQL) query. EQL assumes each document in a data stream or index corresponds
* to an event.
*
* @param fn
* a function that initializes a builder to create the
* {@link EqlSearchRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture> search(
Function> fn, Type tEventType) {
return search(fn.apply(new EqlSearchRequest.Builder()).build(), tEventType);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy