co.elastic.clients.elasticsearch.transform.ElasticsearchTransformAsyncClient 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.transform;
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 transform namespace.
*/
public class ElasticsearchTransformAsyncClient
extends
ApiClient {
public ElasticsearchTransformAsyncClient(ElasticsearchTransport transport) {
super(transport, null);
}
public ElasticsearchTransformAsyncClient(ElasticsearchTransport transport,
@Nullable TransportOptions transportOptions) {
super(transport, transportOptions);
}
@Override
public ElasticsearchTransformAsyncClient withTransportOptions(@Nullable TransportOptions transportOptions) {
return new ElasticsearchTransformAsyncClient(this.transport, transportOptions);
}
// ----- Endpoint: transform.delete_transform
/**
* Deletes an existing transform.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture deleteTransform(DeleteTransformRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) DeleteTransformRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Deletes an existing transform.
*
* @param fn
* a function that initializes a builder to create the
* {@link DeleteTransformRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture deleteTransform(
Function> fn) {
return deleteTransform(fn.apply(new DeleteTransformRequest.Builder()).build());
}
// ----- Endpoint: transform.get_transform
/**
* Retrieves configuration information for transforms.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture getTransform(GetTransformRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) GetTransformRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Retrieves configuration information for transforms.
*
* @param fn
* a function that initializes a builder to create the
* {@link GetTransformRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture getTransform(
Function> fn) {
return getTransform(fn.apply(new GetTransformRequest.Builder()).build());
}
/**
* Retrieves configuration information for transforms.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture getTransform() {
return this.transport.performRequestAsync(new GetTransformRequest.Builder().build(),
GetTransformRequest._ENDPOINT, this.transportOptions);
}
// ----- Endpoint: transform.get_transform_stats
/**
* Retrieves usage information for transforms.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture getTransformStats(GetTransformStatsRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) GetTransformStatsRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Retrieves usage information for transforms.
*
* @param fn
* a function that initializes a builder to create the
* {@link GetTransformStatsRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture getTransformStats(
Function> fn) {
return getTransformStats(fn.apply(new GetTransformStatsRequest.Builder()).build());
}
// ----- Endpoint: transform.preview_transform
/**
* Previews a transform.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture> previewTransform(
PreviewTransformRequest request, Class tTransformClass) {
@SuppressWarnings("unchecked")
JsonEndpoint, ErrorResponse> endpoint = (JsonEndpoint, ErrorResponse>) PreviewTransformRequest._ENDPOINT;
endpoint = new EndpointWithResponseMapperAttr<>(endpoint,
"co.elastic.clients:Deserializer:transform.preview_transform.TTransform",
getDeserializer(tTransformClass));
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Previews a transform.
*
* @param fn
* a function that initializes a builder to create the
* {@link PreviewTransformRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture> previewTransform(
Function> fn,
Class tTransformClass) {
return previewTransform(fn.apply(new PreviewTransformRequest.Builder()).build(), tTransformClass);
}
// ----- Endpoint: transform.put_transform
/**
* Instantiates a transform.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture putTransform(PutTransformRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) PutTransformRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Instantiates a transform.
*
* @param fn
* a function that initializes a builder to create the
* {@link PutTransformRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture putTransform(
Function> fn) {
return putTransform(fn.apply(new PutTransformRequest.Builder()).build());
}
// ----- Endpoint: transform.reset_transform
/**
* Resets an existing transform.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture resetTransform(ResetTransformRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) ResetTransformRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Resets an existing transform.
*
* @param fn
* a function that initializes a builder to create the
* {@link ResetTransformRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture resetTransform(
Function> fn) {
return resetTransform(fn.apply(new ResetTransformRequest.Builder()).build());
}
// ----- Endpoint: transform.start_transform
/**
* Starts one or more transforms.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture startTransform(StartTransformRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) StartTransformRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Starts one or more transforms.
*
* @param fn
* a function that initializes a builder to create the
* {@link StartTransformRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture startTransform(
Function> fn) {
return startTransform(fn.apply(new StartTransformRequest.Builder()).build());
}
// ----- Endpoint: transform.stop_transform
/**
* Stops one or more transforms.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture stopTransform(StopTransformRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) StopTransformRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Stops one or more transforms.
*
* @param fn
* a function that initializes a builder to create the
* {@link StopTransformRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture stopTransform(
Function> fn) {
return stopTransform(fn.apply(new StopTransformRequest.Builder()).build());
}
// ----- Endpoint: transform.update_transform
/**
* Updates certain properties of a transform.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture updateTransform(UpdateTransformRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) UpdateTransformRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Updates certain properties of a transform.
*
* @param fn
* a function that initializes a builder to create the
* {@link UpdateTransformRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture updateTransform(
Function> fn) {
return updateTransform(fn.apply(new UpdateTransformRequest.Builder()).build());
}
// ----- Endpoint: transform.upgrade_transforms
/**
* Upgrades all transforms.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture upgradeTransforms(UpgradeTransformsRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) UpgradeTransformsRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Upgrades all transforms.
*
* @param fn
* a function that initializes a builder to create the
* {@link UpgradeTransformsRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture upgradeTransforms(
Function> fn) {
return upgradeTransforms(fn.apply(new UpgradeTransformsRequest.Builder()).build());
}
/**
* Upgrades all transforms.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture upgradeTransforms() {
return this.transport.performRequestAsync(new UpgradeTransformsRequest.Builder().build(),
UpgradeTransformsRequest._ENDPOINT, this.transportOptions);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy