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

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

The newest version!
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.sdk.service.appstream_center20210220;

import com.aliyun.core.http.*;
import com.aliyun.sdk.service.appstream_center20210220.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 = "appstream-center"; this.version = "2021-02-20"; 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(); } /** * @param request the request parameters of FindIdpListByLoginIdentifier FindIdpListByLoginIdentifierRequest * @return FindIdpListByLoginIdentifierResponse */ @Override public CompletableFuture findIdpListByLoginIdentifier(FindIdpListByLoginIdentifierRequest request) { try { this.handler.validateRequestModel(request); TeaRequest teaRequest = REQUEST.copy().setStyle(RequestStyle.RPC).setAction("FindIdpListByLoginIdentifier").setMethod(HttpMethod.POST).setPathRegex("/").setBodyType(BodyType.JSON).setBodyIsForm(true).setReqBodyType(BodyType.FORM).formModel(request); ClientExecutionParams params = new ClientExecutionParams().withInput(request).withRequest(teaRequest).withOutput(FindIdpListByLoginIdentifierResponse.create()); return this.handler.execute(params); } catch (Exception e) { CompletableFuture future = new CompletableFuture<>(); future.completeExceptionally(e); return future; } } /** * @param request the request parameters of GetLoginToken GetLoginTokenRequest * @return GetLoginTokenResponse */ @Override public CompletableFuture getLoginToken(GetLoginTokenRequest request) { try { this.handler.validateRequestModel(request); TeaRequest teaRequest = REQUEST.copy().setStyle(RequestStyle.RPC).setAction("GetLoginToken").setMethod(HttpMethod.POST).setPathRegex("/").setBodyType(BodyType.JSON).setBodyIsForm(false).setReqBodyType(BodyType.JSON).formModel(request); ClientExecutionParams params = new ClientExecutionParams().withInput(request).withRequest(teaRequest).withOutput(GetLoginTokenResponse.create()); return this.handler.execute(params); } catch (Exception e) { CompletableFuture future = new CompletableFuture<>(); future.completeExceptionally(e); return future; } } /** * @param request the request parameters of GetStsToken GetStsTokenRequest * @return GetStsTokenResponse */ @Override public CompletableFuture getStsToken(GetStsTokenRequest request) { try { this.handler.validateRequestModel(request); TeaRequest teaRequest = REQUEST.copy().setStyle(RequestStyle.RPC).setAction("GetStsToken").setMethod(HttpMethod.POST).setPathRegex("/").setBodyType(BodyType.JSON).setBodyIsForm(true).setReqBodyType(BodyType.FORM).formModel(request); ClientExecutionParams params = new ClientExecutionParams().withInput(request).withRequest(teaRequest).withOutput(GetStsTokenResponse.create()); return this.handler.execute(params); } catch (Exception e) { CompletableFuture future = new CompletableFuture<>(); future.completeExceptionally(e); return future; } } /** * @param request the request parameters of RefreshLoginToken RefreshLoginTokenRequest * @return RefreshLoginTokenResponse */ @Override public CompletableFuture refreshLoginToken(RefreshLoginTokenRequest request) { try { this.handler.validateRequestModel(request); TeaRequest teaRequest = REQUEST.copy().setStyle(RequestStyle.RPC).setAction("RefreshLoginToken").setMethod(HttpMethod.POST).setPathRegex("/").setBodyType(BodyType.JSON).setBodyIsForm(false).setReqBodyType(BodyType.JSON).formModel(request); ClientExecutionParams params = new ClientExecutionParams().withInput(request).withRequest(teaRequest).withOutput(RefreshLoginTokenResponse.create()); return this.handler.execute(params); } catch (Exception e) { CompletableFuture future = new CompletableFuture<>(); future.completeExceptionally(e); return future; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy