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

com.aliyun.sdk.service.milvus20231012.DefaultAsyncClient Maven / Gradle / Ivy

There is a newer version: 1.0.5
Show newest version
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.sdk.service.milvus20231012;

import com.aliyun.core.http.*;
import com.aliyun.sdk.service.milvus20231012.models.*;
import darabonba.core.utils.*;
import com.aliyun.sdk.gateway.pop.*;
import darabonba.core.*;
import darabonba.core.async.*;
import darabonba.core.sync.*;
import darabonba.core.client.*;

import java.util.concurrent.CompletableFuture;


/**
 * 

Main client.

*/ public final class DefaultAsyncClient implements AsyncClient { protected final String product; protected final String version; protected final String endpointRule; protected final java.util.Map endpointMap; protected final TeaRequest REQUEST; protected final TeaAsyncHandler handler; protected DefaultAsyncClient(ClientConfiguration configuration) { this.handler = new TeaAsyncHandler(configuration); this.product = "milvus"; this.version = "2023-10-12"; this.endpointRule = ""; this.endpointMap = new java.util.HashMap<>(); this.REQUEST = TeaRequest.create().setProduct(product).setEndpointRule(endpointRule).setEndpointMap(endpointMap).setVersion(version); } @Override public void close() { this.handler.close(); } @Override public CompletableFuture describeAccessControlList(DescribeAccessControlListRequest request) { try { this.handler.validateRequestModel(request); TeaRequest teaRequest = REQUEST.copy().setStyle(RequestStyle.RESTFUL).setAction("DescribeAccessControlList").setMethod(HttpMethod.POST).setPathRegex("/webapi/milvus/describe_access_control_list").setBodyType(BodyType.JSON).setBodyIsForm(false).setReqBodyType(BodyType.JSON).formModel(request); ClientExecutionParams params = new ClientExecutionParams().withInput(request).withRequest(teaRequest).withOutput(DescribeAccessControlListResponse.create()); return this.handler.execute(params); } catch (Exception e) { CompletableFuture future = new CompletableFuture<>(); future.completeExceptionally(e); return future; } } @Override public CompletableFuture describeInstanceConfigs(DescribeInstanceConfigsRequest request) { try { this.handler.validateRequestModel(request); TeaRequest teaRequest = REQUEST.copy().setStyle(RequestStyle.RESTFUL).setAction("DescribeInstanceConfigs").setMethod(HttpMethod.POST).setPathRegex("/webapi/config/describe_milvus_user_config").setBodyType(BodyType.JSON).setBodyIsForm(false).setReqBodyType(BodyType.JSON).formModel(request); ClientExecutionParams params = new ClientExecutionParams().withInput(request).withRequest(teaRequest).withOutput(DescribeInstanceConfigsResponse.create()); return this.handler.execute(params); } catch (Exception e) { CompletableFuture future = new CompletableFuture<>(); future.completeExceptionally(e); return future; } } @Override public CompletableFuture getInstanceDetail(GetInstanceDetailRequest request) { try { this.handler.validateRequestModel(request); TeaRequest teaRequest = REQUEST.copy().setStyle(RequestStyle.RESTFUL).setAction("GetInstanceDetail").setMethod(HttpMethod.POST).setPathRegex("/webapi/cluster/detail").setBodyType(BodyType.JSON).setBodyIsForm(false).setReqBodyType(BodyType.JSON).formModel(request); ClientExecutionParams params = new ClientExecutionParams().withInput(request).withRequest(teaRequest).withOutput(GetInstanceDetailResponse.create()); return this.handler.execute(params); } catch (Exception e) { CompletableFuture future = new CompletableFuture<>(); future.completeExceptionally(e); return future; } } @Override public CompletableFuture listInstances(ListInstancesRequest request) { try { this.handler.validateRequestModel(request); TeaRequest teaRequest = REQUEST.copy().setStyle(RequestStyle.RESTFUL).setAction("ListInstances").setMethod(HttpMethod.POST).setPathRegex("/webapi/order/list").setBodyType(BodyType.JSON).setBodyIsForm(false).setReqBodyType(BodyType.JSON).formModel(request); ClientExecutionParams params = new ClientExecutionParams().withInput(request).withRequest(teaRequest).withOutput(ListInstancesResponse.create()); return this.handler.execute(params); } catch (Exception e) { CompletableFuture future = new CompletableFuture<>(); future.completeExceptionally(e); return future; } } @Override public CompletableFuture modifyInstanceConfig(ModifyInstanceConfigRequest request) { try { this.handler.validateRequestModel(request); TeaRequest teaRequest = REQUEST.copy().setStyle(RequestStyle.RESTFUL).setAction("ModifyInstanceConfig").setMethod(HttpMethod.POST).setPathRegex("/webapi/config/modify_milvus_config").setBodyType(BodyType.JSON).setBodyIsForm(false).setReqBodyType(BodyType.JSON).formModel(request); ClientExecutionParams params = new ClientExecutionParams().withInput(request).withRequest(teaRequest).withOutput(ModifyInstanceConfigResponse.create()); return this.handler.execute(params); } catch (Exception e) { CompletableFuture future = new CompletableFuture<>(); future.completeExceptionally(e); return future; } } @Override public CompletableFuture updateAccessControlList(UpdateAccessControlListRequest request) { try { this.handler.validateRequestModel(request); TeaRequest teaRequest = REQUEST.copy().setStyle(RequestStyle.RESTFUL).setAction("UpdateAccessControlList").setMethod(HttpMethod.POST).setPathRegex("/webapi/milvus/update_access_control_list").setBodyType(BodyType.JSON).setBodyIsForm(false).setReqBodyType(BodyType.JSON).formModel(request); ClientExecutionParams params = new ClientExecutionParams().withInput(request).withRequest(teaRequest).withOutput(UpdateAccessControlListResponse.create()); return this.handler.execute(params); } catch (Exception e) { CompletableFuture future = new CompletableFuture<>(); future.completeExceptionally(e); return future; } } @Override public CompletableFuture updateInstanceName(UpdateInstanceNameRequest request) { try { this.handler.validateRequestModel(request); TeaRequest teaRequest = REQUEST.copy().setStyle(RequestStyle.RESTFUL).setAction("UpdateInstanceName").setMethod(HttpMethod.POST).setPathRegex("/webapi/cluster/update_name").setBodyType(BodyType.JSON).setBodyIsForm(false).setReqBodyType(BodyType.JSON).formModel(request); ClientExecutionParams params = new ClientExecutionParams().withInput(request).withRequest(teaRequest).withOutput(UpdateInstanceNameResponse.create()); return this.handler.execute(params); } catch (Exception e) { CompletableFuture future = new CompletableFuture<>(); future.completeExceptionally(e); return future; } } @Override public CompletableFuture updatePublicNetworkStatus(UpdatePublicNetworkStatusRequest request) { try { this.handler.validateRequestModel(request); TeaRequest teaRequest = REQUEST.copy().setStyle(RequestStyle.RESTFUL).setAction("UpdatePublicNetworkStatus").setMethod(HttpMethod.POST).setPathRegex("/webapi/network/updatePublicNetworkStatus").setBodyType(BodyType.JSON).setBodyIsForm(false).setReqBodyType(BodyType.JSON).formModel(request); ClientExecutionParams params = new ClientExecutionParams().withInput(request).withRequest(teaRequest).withOutput(UpdatePublicNetworkStatusResponse.create()); return this.handler.execute(params); } catch (Exception e) { CompletableFuture future = new CompletableFuture<>(); future.completeExceptionally(e); return future; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy