All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.huaweicloud.sdk.imagesearch.v2.ImageSearchAsyncClient Maven / Gradle / Ivy

There is a newer version: 3.1.114
Show newest version
package com.huaweicloud.sdk.imagesearch.v2;

import com.huaweicloud.sdk.core.ClientBuilder;
import com.huaweicloud.sdk.core.HcClient;
import com.huaweicloud.sdk.core.invoker.AsyncInvoker;
import com.huaweicloud.sdk.imagesearch.v2.model.RunAddDataRequest;
import com.huaweicloud.sdk.imagesearch.v2.model.RunAddDataResponse;
import com.huaweicloud.sdk.imagesearch.v2.model.RunCheckDataRequest;
import com.huaweicloud.sdk.imagesearch.v2.model.RunCheckDataResponse;
import com.huaweicloud.sdk.imagesearch.v2.model.RunDeleteDataRequest;
import com.huaweicloud.sdk.imagesearch.v2.model.RunDeleteDataResponse;
import com.huaweicloud.sdk.imagesearch.v2.model.RunSearchRequest;
import com.huaweicloud.sdk.imagesearch.v2.model.RunSearchResponse;
import com.huaweicloud.sdk.imagesearch.v2.model.RunUpdateDataRequest;
import com.huaweicloud.sdk.imagesearch.v2.model.RunUpdateDataResponse;

import java.util.concurrent.CompletableFuture;

public class ImageSearchAsyncClient {

    protected HcClient hcClient;

    public ImageSearchAsyncClient(HcClient hcClient) {
        this.hcClient = hcClient;
    }

    public static ClientBuilder newBuilder() {
        ClientBuilder clientBuilder = new ClientBuilder<>(ImageSearchAsyncClient::new);
        return clientBuilder;
    }

    /**
     * 添加数据
     *
     * 添加数据到指定服务实例中。
     * 
     * Please refer to HUAWEI cloud API Explorer for details.
     *
     * @param request RunAddDataRequest 请求对象
     * @return CompletableFuture
     */
    public CompletableFuture runAddDataAsync(RunAddDataRequest request) {
        return hcClient.asyncInvokeHttp(request, ImageSearchMeta.runAddData);
    }

    /**
     * 添加数据
     *
     * 添加数据到指定服务实例中。
     * 
     * Please refer to HUAWEI cloud API Explorer for details.
     *
     * @param request RunAddDataRequest 请求对象
     * @return AsyncInvoker
     */
    public AsyncInvoker runAddDataAsyncInvoker(RunAddDataRequest request) {
        return new AsyncInvoker<>(request, ImageSearchMeta.runAddData, hcClient);
    }

    /**
     * 检查数据
     *
     * 检查指定服务实例中的对应数据,支持指定ID检查和条件检查。
     * 
     * Please refer to HUAWEI cloud API Explorer for details.
     *
     * @param request RunCheckDataRequest 请求对象
     * @return CompletableFuture
     */
    public CompletableFuture runCheckDataAsync(RunCheckDataRequest request) {
        return hcClient.asyncInvokeHttp(request, ImageSearchMeta.runCheckData);
    }

    /**
     * 检查数据
     *
     * 检查指定服务实例中的对应数据,支持指定ID检查和条件检查。
     * 
     * Please refer to HUAWEI cloud API Explorer for details.
     *
     * @param request RunCheckDataRequest 请求对象
     * @return AsyncInvoker
     */
    public AsyncInvoker runCheckDataAsyncInvoker(
        RunCheckDataRequest request) {
        return new AsyncInvoker<>(request, ImageSearchMeta.runCheckData, hcClient);
    }

    /**
     * 删除数据
     *
     * 删除指定服务实例中的对应数据,支持指定ID删除和条件删除。
     * 
     * Please refer to HUAWEI cloud API Explorer for details.
     *
     * @param request RunDeleteDataRequest 请求对象
     * @return CompletableFuture
     */
    public CompletableFuture runDeleteDataAsync(RunDeleteDataRequest request) {
        return hcClient.asyncInvokeHttp(request, ImageSearchMeta.runDeleteData);
    }

    /**
     * 删除数据
     *
     * 删除指定服务实例中的对应数据,支持指定ID删除和条件删除。
     * 
     * Please refer to HUAWEI cloud API Explorer for details.
     *
     * @param request RunDeleteDataRequest 请求对象
     * @return AsyncInvoker
     */
    public AsyncInvoker runDeleteDataAsyncInvoker(
        RunDeleteDataRequest request) {
        return new AsyncInvoker<>(request, ImageSearchMeta.runDeleteData, hcClient);
    }

    /**
     * 搜索
     *
     * 从指定服务实例中进行搜索。
     * 
     * Please refer to HUAWEI cloud API Explorer for details.
     *
     * @param request RunSearchRequest 请求对象
     * @return CompletableFuture
     */
    public CompletableFuture runSearchAsync(RunSearchRequest request) {
        return hcClient.asyncInvokeHttp(request, ImageSearchMeta.runSearch);
    }

    /**
     * 搜索
     *
     * 从指定服务实例中进行搜索。
     * 
     * Please refer to HUAWEI cloud API Explorer for details.
     *
     * @param request RunSearchRequest 请求对象
     * @return AsyncInvoker
     */
    public AsyncInvoker runSearchAsyncInvoker(RunSearchRequest request) {
        return new AsyncInvoker<>(request, ImageSearchMeta.runSearch, hcClient);
    }

    /**
     * 更新数据
     *
     * 更新指定服务实例中的对应数据。
     * 
     * Please refer to HUAWEI cloud API Explorer for details.
     *
     * @param request RunUpdateDataRequest 请求对象
     * @return CompletableFuture
     */
    public CompletableFuture runUpdateDataAsync(RunUpdateDataRequest request) {
        return hcClient.asyncInvokeHttp(request, ImageSearchMeta.runUpdateData);
    }

    /**
     * 更新数据
     *
     * 更新指定服务实例中的对应数据。
     * 
     * Please refer to HUAWEI cloud API Explorer for details.
     *
     * @param request RunUpdateDataRequest 请求对象
     * @return AsyncInvoker
     */
    public AsyncInvoker runUpdateDataAsyncInvoker(
        RunUpdateDataRequest request) {
        return new AsyncInvoker<>(request, ImageSearchMeta.runUpdateData, hcClient);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy