diff --git a/README.md b/README.md
new file mode 100644
index 000000000..fe0d71bdd
--- /dev/null
+++ b/README.md
@@ -0,0 +1,145 @@
+![](https://aliyunsdk-pages.alicdn.com/icons/AlibabaCloud.svg)
+
+# YuanJing OpenAPI SDK for Java
+
+## Requirements
+
+Building the API client library requires:
+1. Java 1.7+
+2. Maven
+
+## Installation
+
+### Maven users
+
+Add this dependency to your project's POM:
+
+```xml
+
+ com.alibaba
+ alibabacloud-yjopenapi-java-client
+ 1.1.20240521
+
+
+or
+
+
+ com.alibaba
+ alibabacloud-yjopenapi-java-client
+ 1.1.20240521
+ shaded
+
+
+ *
+ *
+
+
+
+```
+
+## Usage
+
+```java
+import com.alibaba.yjopenapi.client.api.*;
+import com.alibaba.yjopenapi.client.model.*;
+
+Configuration configuration = Configuration.getDefaultConfiguration();
+configuration
+ .host("host")
+ .accessKey("Your Access Key")
+ .secretKey("Your Secret Key");
+
+try {
+ // {{Api}},{{Method}},{{Param}},{{Result}} is placeholder, take a look at Explain Of Usage Placeholder
+ {{Api}} api = new {{Api}}(new ApiClient(), configuration);
+ // OpenAPI result
+ {{Result}} result = api.{{Method}}({{Param}});
+
+ // OpenAPI result with header
+ ApiResponse<{{Result}}> tripleWithHttpInfo = api. {{Method}}WithHttpInfo();
+ result = tripleWithHttpInfo.getData();
+ // OpenAPI TraceId
+ String traceId = tripleWithHttpInfo.getHeaders().get(ApiClient.Trace_Id).get(0);
+ // OpenAPI Status Code
+ String resultStatus = tripleWithHttpInfo.getHeaders().get(ApiClient.Result_Status).get(0);
+
+} catch (ApiException e) {
+ // handle exception
+}
+```
+
+## Explain Of Usage Placeholder
+
+| Api | Method | Params | Result | Description |
+| ------------ | ------------- | ------------- | ------------- | ------------- |
+ | *AdaptApi* | **createAndSubmitAll** | *createAndSubmitAllForms* | *AdaptCreateAndSubmitAllResult* | createAndSubmitAll |
+ | *AdaptApi* | **queryRequestById** | *queryRequestByIdForms* | *AdaptQueryRequestByIdResult* | queryRequestById |
+ | *ConsoleAdminApi* | **activateDeployment** | *activateDeploymentForms* | *ConsoleAdminActivateDeploymentResult* | |
+ | *ConsoleAdminApi* | **adaptGameVersion** | *adaptGameVersionForms* | *ConsoleAdminAdaptGameVersionResult* | |
+ | *ConsoleAdminApi* | **addGameToProject** | *addGameToProjectForms* | *ConsoleAdminAddGameToProjectResult* | |
+ | *ConsoleAdminApi* | **batchUpdateDispatchConfig** | *batchUpdateDispatchConfigForms* | *ConsoleAdminBatchUpdateDispatchConfigResult* | 批量更新游戏各自调度配置 |
+ | *ConsoleAdminApi* | **createGame** | *createGameForms* | *ConsoleAdminCreateGameResult* | |
+ | *ConsoleAdminApi* | **createOrder** | *createOrderForms* | *ConsoleAdminCreateOrderResult* | 订单下单 |
+ | *ConsoleAdminApi* | **createProject** | *createProjectForms* | *ConsoleAdminCreateProjectResult* | |
+ | *ConsoleAdminApi* | **deleteGame** | *deleteGameForms* | *ConsoleAdminDeleteGameResult* | |
+ | *ConsoleAdminApi* | **deleteGameVersion** | *deleteGameVersionForms* | *ConsoleAdminDeleteGameVersionResult* | |
+ | *ConsoleAdminApi* | **deleteProject** | *deleteProjectForms* | *ConsoleAdminDeleteProjectResult* | |
+ | *ConsoleAdminApi* | **getBillFlowInfo** | *getBillFlowInfoForms* | *ConsoleAdminGetBillFlowInfoResult* | |
+ | *ConsoleAdminApi* | **getGameVersion** | *getGameVersionForms* | *ConsoleAdminGetGameVersionResult* | |
+ | *ConsoleAdminApi* | **getGameVersionProgress** | *getGameVersionProgressForms* | *ConsoleAdminGetGameVersionProgressResult* | |
+ | *ConsoleAdminApi* | **getOrder** | *getOrderForms* | *ConsoleAdminGetOrderResult* | 查询订单 |
+ | *ConsoleAdminApi* | **listActivateableInstances** | *listActivateableInstancesForms* | *ConsoleAdminListActivateableInstancesResult* | |
+ | *ConsoleAdminApi* | **listActivatedInstances** | *listActivatedInstancesForms* | *ConsoleAdminListActivatedInstancesResult* | |
+ | *ConsoleAdminApi* | **listControllersOfGame** | *listControllersOfGameForms* | *ConsoleAdminListControllersOfGameResult* | |
+ | *ConsoleAdminApi* | **listDeployableInstances** | *listDeployableInstancesForms* | *ConsoleAdminListDeployableInstancesResult* | |
+ | *ConsoleAdminApi* | **listGameDeployDetailsOfProject** | *listGameDeployDetailsOfProjectForms* | *ConsoleAdminListGameDeployDetailsOfProjectResult* | 获取项目下游戏部署版本信息。 |
+ | *ConsoleAdminApi* | **listGameVersions** | *listGameVersionsForms* | *ConsoleAdminListGameVersionsResult* | |
+ | *ConsoleAdminApi* | **listGames** | *listGamesForms* | *ConsoleAdminListGamesResult* | |
+ | *ConsoleAdminApi* | **listInstancesOfProject** | *listInstancesOfProjectForms* | *ConsoleAdminListInstancesOfProjectResult* | 分页获取项目中的实例 |
+ | *ConsoleAdminApi* | **listMonthBill** | *listMonthBillForms* | *ConsoleAdminListMonthBillResult* | 月度账单列表 |
+ | *ConsoleAdminApi* | **listProjects** | *listProjectsForms* | *ConsoleAdminListProjectsResult* | |
+ | *ConsoleAdminApi* | **listVersionDeployInstances** | *listVersionDeployInstancesForms* | *ConsoleAdminListVersionDeployInstancesResult* | 获取项目下游戏版本的部署实例信息。 |
+ | *ConsoleAdminApi* | **queryAdaptResultByVersionId** | *queryAdaptResultByVersionIdForms* | *ConsoleAdminQueryAdaptResultByVersionIdResult* | 查询适配结果 |
+ | *ConsoleAdminApi* | **recommendSpecification** | *recommendSpecificationForms* | *ConsoleAdminRecommendSpecificationResult* | |
+ | *ConsoleAdminApi* | **removeGameFromProject** | *removeGameFromProjectForms* | *ConsoleAdminRemoveGameFromProjectResult* | |
+ | *ConsoleAdminApi* | **submitDeployment** | *submitDeploymentForms* | *ConsoleAdminSubmitDeploymentResult* | |
+ | *ConsoleAdminApi* | **uploadGameVersionByDownload** | *uploadGameVersionByDownloadForms* | *ConsoleAdminUploadGameVersionByDownloadResult* | |
+ | *DispatchApi* | **batchStopGame** | *batchStopGameForms* | *BatchStopGameResult* | |
+ | *DispatchApi* | **cancelGameHang** | *cancelGameHangForms* | *CancelGameHangResult* | 取消游戏挂机 |
+ | *DispatchApi* | **clientNotify** | *clientNotifyForms* | *ClientNotifyResult* | clientNotify |
+ | *DispatchApi* | **gameNotify** | *gameNotifyForms* | *GameNotifyResult* | 游戏通知接口 |
+ | *DispatchApi* | **getGameConcurrency** | *getGameConcurrencyForms* | *GetGameConcurrencyResult* | 调用GetGameConcurrency获取游戏当前并发数 |
+ | *DispatchApi* | **getStock** | *getStockForms* | *GetStockResult* | 调用GetStock获取游戏当前库存 |
+ | *DispatchApi* | **getStopGameToken** | *getStopGameTokenForms* | *GetStopGameTokenResult* | 全量踢下线获取token |
+ | *DispatchApi* | **listGameServerIp** | *listGameServerIpForms* | *ListGameServerIpResult* | |
+ | *DispatchApi* | **queryGameHang** | *queryGameHangForms* | *QueryGameHangResult* | 查询游戏挂机状态 |
+ | *DispatchApi* | **querySessionStatus** | *querySessionStatusForms* | *QuerySessionStatusResult* | 查询会话当前状态 |
+ | *DispatchApi* | **setGameAlive** | *setGameAliveForms* | *SetGameAliveResult* | 设置游戏可运行时长 |
+ | *DispatchApi* | **setGameHang** | *setGameHangForms* | *SetGameHangResult* | 设置游戏挂机 |
+ | *DispatchApi* | **stopGame** | *stopGameForms* | *StopGameResult* | 服务端发起,停止某个用户的某个游戏的某个会话 |
+ | *DispatchApi* | **stopPreopenContainer** | *stopPreopenContainerForms* | *StopPreopenContainerResult* | 停止预开容器 |
+ | *DispatchApi* | **tryToGetSlot** | *tryToGetSlotForms* | *TryToGetSlotResult* | 为用户调度分配游戏容器,容器一旦分配成功会被锁住,一段时间内不再分配给其他用户,过期释放。 |
+ | *DispatchApi* | **tryToGetSlots** | *tryToGetSlotsForms* | *TryToGetSlotsResult* | tryToGetSlots |
+ | *DispatchApi* | **updatePreopenStrategy** | *updatePreopenStrategyForms* | *UpdatePreopenStrategyResult* | 更新预开预起策略 |
+ | *LiveApi* | **queryStatus** | *queryStatusForms* | *LiveQueryStatusResult* | |
+ | *LiveApi* | **startGameLive** | *startGameLiveForms* | *LiveStartGameLiveResult* | |
+ | *LiveApi* | **stopGameLive** | *stopGameLiveForms* | *LiveStopGameLiveResult* | |
+ | *MultiplayApi* | **close** | *closeForms* | *MultiplayCloseResult* | |
+ | *MultiplayApi* | **init** | *initForms* | *MultiplayInitResult* | |
+ | *MultiplayApi* | **join** | *joinForms* | *MultiplayJoinResult* | |
+ | *MultiplayApi* | **leave** | *leaveForms* | *MultiplayLeaveResult* | |
+ | *MultiplayApi* | **modify** | *modifyForms* | *MultiplayModifyResult* | |
+ | *MultiplayApi* | **query** | *queryForms* | *MultiplayQueryResult* | |
+ | *TokenApi* | **getPair** | | *GetPairResult* | 获取临时安全令牌(二元组) |
+ | *TokenApi* | **getTriple** | | *GetTripleResult* | 获取临时安全令牌 |
+ | *UsercontrollerApi* | **deleteGameArchive** | *deleteGameArchiveForms* | *UsercontrollerDeleteGameArchiveResult* | |
+ | *UsercontrollerApi* | **getGameTrialSurplusDuration** | *getGameTrialSurplusDurationForms* | *UsercontrollerGetGameTrialSurplusDurationResult* | |
+ | *UsercontrollerApi* | **getUserGameArchive** | *getUserGameArchiveForms* | *UsercontrollerGetUserGameArchiveResult* | |
+ | *UsercontrollerApi* | **listLatestGameArchive** | *listLatestGameArchiveForms* | *UsercontrollerListLatestGameArchiveResult* | |
+ | *UsercontrollerApi* | **restoreGameArchive** | *restoreGameArchiveForms* | *UsercontrollerRestoreGameArchiveResult* | |
+ | *UsercontrollerApi* | **updateGameArchiveTagStatus** | *updateGameArchiveTagStatusForms* | *UsercontrollerUpdateGameArchiveTagStatusResult* | |
+
+## License
+[Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0)
+
+Copyright (c) 2009-present, Alibaba Cloud All rights reserved.
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 000000000..298119952
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,176 @@
+
+ 4.0.0
+ com.alibaba
+ alibabacloud-yjopenapi-java-client
+ jar
+ alibabacloud-yjopenapi-java-client
+ 1.1.20240521
+ https://github.com/aliyun/alibabacloud-yjopenapi-java-client
+ YuanJing OpenAPI SDK for Java
+
+
+
+ The Apache License, Version 2.0
+ http://www.apache.org/licenses/LICENSE-2.0.txt
+
+
+
+
+
+ yuanjingproducts
+ yuanjing-sdk-team
+
+
+
+
+ sonatype-nexus-snapshots
+ https://s01.oss.sonatype.org/content/repositories/snapshots
+
+
+ sonatype-nexus-staging
+ https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/
+
+
+
+
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.6.1
+
+
+ 7
+
+
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+ 1.6
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+
+
+
+ org.sonatype.plugins
+ nexus-staging-maven-plugin
+ 1.6.3
+ true
+
+ sonatype-nexus-staging
+ https://s01.oss.sonatype.org/
+ true
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 3.1.1
+
+ UTF-8
+ none
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+ 2.22.1
+
+
+ org.apache.maven.plugins
+ maven-shade-plugin
+ 3.2.4
+
+
+ package
+
+ shade
+
+
+
+
+ com.squareup.okhttp
+ com.alibaba.external.okhttp
+
+
+ okio
+ com.alibaba.external.okio
+
+
+ com.alibaba.fastjson
+ com.alibaba.external.fastjson
+
+
+
+
+ org.jacoco:*
+
+
+
+
+ *:*
+
+ META-INF/*.SF
+ META-INF/*.DSA
+ META-INF/*.RSA
+ META-INF/*.MF
+ **/pom.xml
+
+
+
+
+
+
+ true
+ shaded
+
+
+
+
+
+
+
+
+
+
+ com.squareup.okhttp
+ okhttp
+ ${okhttp-version}
+
+
+ com.squareup.okhttp
+ logging-interceptor
+ ${okhttp-version}
+
+
+ com.alibaba
+ fastjson
+ ${fastjson-version}
+
+
+
+
+
+
+ 1.7
+ ${java.version}
+ ${java.version}
+
+ 2.7.5
+ 1.2.83
+ 1.0.0
+ UTF-8
+
+
diff --git a/src/main/java/com/alibaba/yjopenapi/client/api/AdaptApi.java b/src/main/java/com/alibaba/yjopenapi/client/api/AdaptApi.java
new file mode 100644
index 000000000..738391c25
--- /dev/null
+++ b/src/main/java/com/alibaba/yjopenapi/client/api/AdaptApi.java
@@ -0,0 +1,257 @@
+/*
+ *
+ * YuanJing OpenAPI SDK
+ *
+ */
+
+package com.alibaba.yjopenapi.client.api;
+
+import java.io.IOException;
+
+import com.alibaba.yjopenapi.client.model.AdaptCreateAndSubmitAllResult;
+import com.alibaba.yjopenapi.client.model.AdaptQueryRequestByIdResult;
+
+import com.alibaba.yjopenapi.client.model.*;
+
+import java.util.Arrays;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class AdaptApi {
+ private ApiClient apiClient;
+ private Configuration configuration;
+
+ public AdaptApi() {
+ this(new ApiClient(), Configuration.getDefaultConfiguration());
+ }
+
+ public AdaptApi(ApiClient apiClient, Configuration configuration) {
+ this.apiClient = apiClient;
+ this.configuration = configuration;
+ }
+
+ public ApiClient getApiClient() {
+ return apiClient;
+ }
+
+ public void setApiClient(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ public Configuration getConfiguration() {
+ return configuration;
+ }
+
+ public void setConfiguration(Configuration configuration) {
+ this.configuration = configuration;
+ }
+
+ /**
+ * Build call for createAndSubmitAll
+ * @param varForms AdaptCreateAndSubmitAllForms
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ */
+ public com.squareup.okhttp.Call createAndSubmitAllCall(AdaptCreateAndSubmitAllForms varForms) throws ApiException {
+
+ // create path and map variables
+ String localVarPath = "/adapt/createAndSubmitAll";
+
+ Map localVarQueryParams = new HashMap();
+
+ Map localVarHeaderParams = new HashMap();
+
+ Map localVarFormParams = new HashMap();
+ if (varForms.getGameId() != null) {
+ localVarFormParams.put("gameId", varForms.getGameId());
+ }
+ if (varForms.getGameName() != null) {
+ localVarFormParams.put("gameName", varForms.getGameName());
+ }
+ if (varForms.getGameVersionId() != null) {
+ localVarFormParams.put("gameVersionId", varForms.getGameVersionId());
+ }
+ if (varForms.getGameVersion() != null) {
+ localVarFormParams.put("gameVersion", varForms.getGameVersion());
+ }
+ if (varForms.getResolutionList() != null) {
+ localVarFormParams.put("resolutionList", varForms.getResolutionList());
+ }
+ if (varForms.getFrameRateList() != null) {
+ localVarFormParams.put("frameRateList", varForms.getFrameRateList());
+ }
+ localVarFormParams.put("platformType", varForms.getPlatformType());
+ localVarFormParams.put("sourcePlatform", varForms.getSourcePlatform());
+ localVarFormParams.put("records", varForms.getRecords());
+ localVarFormParams.put("mixGameVersionId", varForms.getMixGameVersionId());
+ localVarFormParams.put("mixGameId", varForms.getMixGameId());
+
+ final List localVarAccepts = Arrays.asList(
+ "application/json"
+ );
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final List localVarContentTypes = Arrays.asList(
+ "application/x-www-form-urlencoded"
+ );
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ String path = configuration.getScheme() + "://" + configuration.getHost() + localVarPath;
+ return apiClient.buildCall(path, "POST", localVarQueryParams, localVarHeaderParams, localVarFormParams, configuration);
+ }
+
+ private com.squareup.okhttp.Call createAndSubmitAllValidateBeforeCall(AdaptCreateAndSubmitAllForms varForms) throws ApiException {
+ // verify the required parameter 'platformType' is set
+ if (varForms.getPlatformType() == null) {
+ throw new ApiException("Missing the required parameter 'platformType' when calling createAndSubmitAll(Async)");
+ }
+ // verify the required parameter 'sourcePlatform' is set
+ if (varForms.getSourcePlatform() == null) {
+ throw new ApiException("Missing the required parameter 'sourcePlatform' when calling createAndSubmitAll(Async)");
+ }
+ // verify the required parameter 'records' is set
+ if (varForms.getRecords() == null) {
+ throw new ApiException("Missing the required parameter 'records' when calling createAndSubmitAll(Async)");
+ }
+ // verify the required parameter 'mixGameVersionId' is set
+ if (varForms.getMixGameVersionId() == null) {
+ throw new ApiException("Missing the required parameter 'mixGameVersionId' when calling createAndSubmitAll(Async)");
+ }
+ // verify the required parameter 'mixGameId' is set
+ if (varForms.getMixGameId() == null) {
+ throw new ApiException("Missing the required parameter 'mixGameId' when calling createAndSubmitAll(Async)");
+ }
+
+ com.squareup.okhttp.Call call = createAndSubmitAllCall(varForms);
+ return call;
+ }
+
+ /**
+ *
+ * createAndSubmitAll
+ * @param varForms AdaptCreateAndSubmitAllForms
+ * @return AdaptCreateAndSubmitAllResult
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public AdaptCreateAndSubmitAllResult createAndSubmitAll(AdaptCreateAndSubmitAllForms varForms) throws ApiException {
+ ApiResponse resp = createAndSubmitAllWithHttpInfo(varForms);
+ return resp.getData();
+ }
+
+ /**
+ *
+ * createAndSubmitAll
+ * @param varForms AdaptCreateAndSubmitAllForms
+ * @return ApiResponse<AdaptCreateAndSubmitAllResult>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public ApiResponse createAndSubmitAllWithHttpInfo(AdaptCreateAndSubmitAllForms varForms) throws ApiException {
+ com.squareup.okhttp.Call call = createAndSubmitAllValidateBeforeCall(varForms);
+ return apiClient.execute(call, AdaptCreateAndSubmitAllResult.class);
+ }
+
+ /**
+ * (asynchronously)
+ * createAndSubmitAll
+ * @param varForms AdaptCreateAndSubmitAllForms
+ * @param callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ */
+ public com.squareup.okhttp.Call createAndSubmitAllAsync(AdaptCreateAndSubmitAllForms varForms, final ApiCallback callback) throws ApiException {
+
+ com.squareup.okhttp.Call call = createAndSubmitAllValidateBeforeCall(varForms);
+ apiClient.executeAsync(call, AdaptCreateAndSubmitAllResult.class, callback);
+ return call;
+ }
+ /**
+ * Build call for queryRequestById
+ * @param varForms AdaptQueryRequestByIdForms
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ */
+ public com.squareup.okhttp.Call queryRequestByIdCall(AdaptQueryRequestByIdForms varForms) throws ApiException {
+
+ // create path and map variables
+ String localVarPath = "/adapt/queryRequestById";
+
+ Map localVarQueryParams = new HashMap();
+
+ Map localVarHeaderParams = new HashMap();
+
+ Map localVarFormParams = new HashMap();
+ localVarFormParams.put("id", varForms.getId());
+
+ final List localVarAccepts = Arrays.asList(
+ "application/json"
+ );
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final List localVarContentTypes = Arrays.asList(
+ "application/x-www-form-urlencoded"
+ );
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ String path = configuration.getScheme() + "://" + configuration.getHost() + localVarPath;
+ return apiClient.buildCall(path, "POST", localVarQueryParams, localVarHeaderParams, localVarFormParams, configuration);
+ }
+
+ private com.squareup.okhttp.Call queryRequestByIdValidateBeforeCall(AdaptQueryRequestByIdForms varForms) throws ApiException {
+ // verify the required parameter 'id' is set
+ if (varForms.getId() == null) {
+ throw new ApiException("Missing the required parameter 'id' when calling queryRequestById(Async)");
+ }
+
+ com.squareup.okhttp.Call call = queryRequestByIdCall(varForms);
+ return call;
+ }
+
+ /**
+ *
+ * queryRequestById
+ * @param varForms AdaptQueryRequestByIdForms
+ * @return AdaptQueryRequestByIdResult
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public AdaptQueryRequestByIdResult queryRequestById(AdaptQueryRequestByIdForms varForms) throws ApiException {
+ ApiResponse resp = queryRequestByIdWithHttpInfo(varForms);
+ return resp.getData();
+ }
+
+ /**
+ *
+ * queryRequestById
+ * @param varForms AdaptQueryRequestByIdForms
+ * @return ApiResponse<AdaptQueryRequestByIdResult>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public ApiResponse queryRequestByIdWithHttpInfo(AdaptQueryRequestByIdForms varForms) throws ApiException {
+ com.squareup.okhttp.Call call = queryRequestByIdValidateBeforeCall(varForms);
+ return apiClient.execute(call, AdaptQueryRequestByIdResult.class);
+ }
+
+ /**
+ * (asynchronously)
+ * queryRequestById
+ * @param varForms AdaptQueryRequestByIdForms
+ * @param callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ */
+ public com.squareup.okhttp.Call queryRequestByIdAsync(AdaptQueryRequestByIdForms varForms, final ApiCallback callback) throws ApiException {
+
+ com.squareup.okhttp.Call call = queryRequestByIdValidateBeforeCall(varForms);
+ apiClient.executeAsync(call, AdaptQueryRequestByIdResult.class, callback);
+ return call;
+ }
+}
diff --git a/src/main/java/com/alibaba/yjopenapi/client/api/ApiCallback.java b/src/main/java/com/alibaba/yjopenapi/client/api/ApiCallback.java
new file mode 100644
index 000000000..4b3f2a83a
--- /dev/null
+++ b/src/main/java/com/alibaba/yjopenapi/client/api/ApiCallback.java
@@ -0,0 +1,38 @@
+/*
+ *
+ * YuanJing OpenAPI SDK
+ *
+ */
+
+package com.alibaba.yjopenapi.client.api;
+
+import java.io.IOException;
+
+import java.util.Map;
+import java.util.List;
+
+/**
+ * Callback for asynchronous API call.
+ *
+ * @param The return type
+ */
+public interface ApiCallback {
+ /**
+ * This is called when the API call fails.
+ *
+ * @param e The exception causing the failure
+ * @param statusCode Status code of the response if available, otherwise it would be 0
+ * @param responseHeaders Headers of the response if available, otherwise it would be null
+ */
+ void onFailure(ApiException e, int statusCode, Map> responseHeaders);
+
+ /**
+ * This is called when the API call succeeded.
+ *
+ * @param result The result deserialized from response
+ * @param statusCode Status code of the response
+ * @param responseHeaders Headers of the response
+ */
+ void onSuccess(T result, int statusCode, Map> responseHeaders);
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/alibaba/yjopenapi/client/api/ApiClient.java b/src/main/java/com/alibaba/yjopenapi/client/api/ApiClient.java
new file mode 100644
index 000000000..8422978f3
--- /dev/null
+++ b/src/main/java/com/alibaba/yjopenapi/client/api/ApiClient.java
@@ -0,0 +1,745 @@
+/*
+ *
+ * YuanJing OpenAPI SDK
+ *
+ */
+
+package com.alibaba.yjopenapi.client.api;
+
+import com.squareup.okhttp.*;
+import com.squareup.okhttp.internal.http.HttpMethod;
+import javax.xml.bind.DatatypeConverter;
+
+import javax.net.ssl.*;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
+import java.net.URLConnection;
+import java.net.URLEncoder;
+import java.security.MessageDigest;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.*;
+import java.util.Arrays;
+import java.util.Map.Entry;
+import java.util.concurrent.TimeUnit;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import com.alibaba.fastjson.JSON;
+
+public class ApiClient {
+
+ public static final String Trace_Id = "Traceid";
+ public static final String Result_Status = "Result-Status";
+
+ private String basePath = "/";
+
+ private Map defaultHeaderMap = new HashMap();
+
+ private OkHttpClient httpClient;
+
+ /*
+ * Constructor for ApiClient
+ */
+ public ApiClient() {
+ httpClient = new OkHttpClient();
+
+ }
+
+ /**
+ * Get base path
+ *
+ * @return Baes path
+ */
+ public String getBasePath() {
+ return basePath;
+ }
+
+ /**
+ * Set base path
+ *
+ * @param basePath Base path of the URL (e.g /
+ * @return An instance of OkHttpClient
+ */
+ public ApiClient setBasePath(String basePath) {
+ this.basePath = basePath;
+ return this;
+ }
+
+ /**
+ * Get HTTP client
+ *
+ * @return An instance of OkHttpClient
+ */
+ public OkHttpClient getHttpClient() {
+ return httpClient;
+ }
+
+ /**
+ * Set HTTP client
+ *
+ * @param httpClient An instance of OkHttpClient
+ * @return Api Client
+ */
+ public ApiClient setHttpClient(OkHttpClient httpClient) {
+ this.httpClient = httpClient;
+ return this;
+ }
+
+ /**
+ * Add a default header.
+ *
+ * @param key The header's key
+ * @param value The header's value
+ * @return ApiClient
+ */
+ public ApiClient addDefaultHeader(String key, String value) {
+ defaultHeaderMap.put(key, value);
+ return this;
+ }
+
+ /**
+ * Get connection timeout (in milliseconds).
+ *
+ * @return Timeout in milliseconds
+ */
+ public int getConnectTimeout() {
+ return httpClient.getConnectTimeout();
+ }
+
+ /**
+ * Sets the connect timeout (in milliseconds).
+ * A value of 0 means no timeout, otherwise values must be between 1 and
+ *
+ * @param connectionTimeout connection timeout in milliseconds
+ * @return Api client
+ */
+ public ApiClient setConnectTimeout(int connectionTimeout) {
+ httpClient.setConnectTimeout(connectionTimeout, TimeUnit.MILLISECONDS);
+ return this;
+ }
+
+ /**
+ * Get read timeout (in milliseconds).
+ *
+ * @return Timeout in milliseconds
+ */
+ public int getReadTimeout() {
+ return httpClient.getReadTimeout();
+ }
+
+ /**
+ * Sets the read timeout (in milliseconds).
+ * A value of 0 means no timeout, otherwise values must be between 1 and
+ * {@link Integer#MAX_VALUE}.
+ *
+ * @param readTimeout read timeout in milliseconds
+ * @return Api client
+ */
+ public ApiClient setReadTimeout(int readTimeout) {
+ httpClient.setReadTimeout(readTimeout, TimeUnit.MILLISECONDS);
+ return this;
+ }
+
+ /**
+ * Get write timeout (in milliseconds).
+ *
+ * @return Timeout in milliseconds
+ */
+ public int getWriteTimeout() {
+ return httpClient.getWriteTimeout();
+ }
+
+ /**
+ * Sets the write timeout (in milliseconds).
+ * A value of 0 means no timeout, otherwise values must be between 1 and
+ * {@link Integer#MAX_VALUE}.
+ *
+ * @param writeTimeout connection timeout in milliseconds
+ * @return Api client
+ */
+ public ApiClient setWriteTimeout(int writeTimeout) {
+ httpClient.setWriteTimeout(writeTimeout, TimeUnit.MILLISECONDS);
+ return this;
+ }
+
+ /**
+ * Format the given parameter object into string.
+ *
+ * @param param Parameter
+ * @return String representation of the parameter
+ */
+ public static String parameterToString(Object param) {
+
+ List extends Class>> primitives = Arrays.asList(String.class,Boolean.class,Double.class,Integer.class,Long.class,Float.class);
+
+ if (param == null) {
+ return "";
+ } else if (param instanceof Date) {
+ return new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'").format((Date) param);
+ } else if (param.getClass().isPrimitive() || primitives.contains(param.getClass())) {
+ return String.valueOf(param);
+ } else {
+ //Serialize to json string and remove the " enclosing characters
+ return JSON.toJSONString(param);
+ // return jsonStr.substring(1, jsonStr.length() - 1);
+ }
+ }
+
+ /**
+ * Formats the specified query parameter to a list containing a single {@code Pair} object.
+ *
+ * Note that {@code value} must not be a collection.
+ *
+ * @param name The name of the parameter.
+ * @param value The value of the parameter.
+ * @return A list containing a single {@code Pair} object.
+ */
+ //public List parameterToPair(String name, Object value) {
+ // List params = new ArrayList();
+ //
+ // // preconditions
+ // if (name == null || name.isEmpty() || value == null || value instanceof Collection) {
+ // return params;
+ // }
+ //
+ // params.add(new Pair(name, parameterToString(value)));
+ // return params;
+ //}
+
+ /**
+ * Formats the specified collection query parameters to a list of {@code Pair} objects.
+ *
+ * Note that the values of each of the returned Pair objects are percent-encoded.
+ *
+ * @param collectionFormat The collection format of the parameter.
+ * @param name The name of the parameter.
+ * @param value The value of the parameter.
+ * @return A list of {@code Pair} objects.
+ */
+ //public List parameterToPairs(String collectionFormat, String name, Collection value) {
+ // List params = new ArrayList();
+ //
+ // // preconditions
+ // if (name == null || name.isEmpty() || value == null || value.isEmpty()) {
+ // return params;
+ // }
+ //
+ // // create the params based on the collection format
+ // if ("multi".equals(collectionFormat)) {
+ // for (Object item : value) {
+ // params.add(new Pair(name, escapeString(parameterToString(item))));
+ // }
+ // return params;
+ // }
+ //
+ // // collectionFormat is assumed to be "csv" by default
+ // //String delimiter = ",";
+ //
+ // // escape all delimiters except commas, which are URI reserved
+ // // characters
+ // //if ("ssv".equals(collectionFormat)) {
+ // // delimiter = escapeString(" ");
+ // //} else if ("tsv".equals(collectionFormat)) {
+ // // delimiter = escapeString("\t");
+ // //} else if ("pipes".equals(collectionFormat)) {
+ // // delimiter = escapeString("|");
+ // //}
+ //
+ // //StringBuilder sb = new StringBuilder() ;
+ // //for (Object item : value) {
+ // // sb.append(delimiter);
+ // // sb.append(escapeString(parameterToString(item)));
+ // //}
+ //
+ // //params.add(new Pair(name, sb.substring(delimiter.length())));
+ //
+ // return params;
+ //}
+
+ /**
+ * Sanitize filename by removing path.
+ * e.g. ../../sun.gif becomes sun.gif
+ *
+ * @param filename The filename to be sanitized
+ * @return The sanitized filename
+ */
+ public String sanitizeFilename(String filename) {
+ return filename.replaceAll(".*[/\\\\]", "");
+ }
+
+ /**
+ * Check if the given MIME is a JSON MIME.
+ * JSON MIME examples:
+ * application/json
+ * application/json; charset=UTF8
+ * APPLICATION/JSON
+ * application/vnd.company+json
+ * "* / *" is also default to JSON
+ * @param mime MIME (Multipurpose Internet Mail Extensions)
+ * @return True if the given MIME is JSON, false otherwise.
+ */
+ public boolean isJsonMime(String mime) {
+ String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$";
+ return mime != null && (mime.matches(jsonMime) || mime.equals("*/*"));
+ }
+
+ /**
+ * Select the Accept header's value from the given accepts array:
+ * if JSON exists in the given array, use it;
+ * otherwise use all of them (joining into a string)
+ *
+ * @param accepts The accepts array to select from
+ * @return The Accept header to use. If the given array is empty,
+ * null will be returned (not to set the Accept header explicitly).
+ */
+ public String selectHeaderAccept(List accepts) {
+ if (accepts == null || accepts.isEmpty()) {
+ return null;
+ }
+ for (String accept : accepts) {
+ if (isJsonMime(accept)) {
+ return accept;
+ }
+ }
+ return join(accepts, ",");
+ }
+
+ /**
+ * Select the Content-Type header's value from the given array:
+ * if JSON exists in the given array, use it;
+ * otherwise use the first one of the array.
+ *
+ * @param contentTypes The Content-Type array to select from
+ * @return The Content-Type header to use. If the given array is empty,
+ * or matches "any", JSON will be used.
+ */
+ public String selectHeaderContentType(List contentTypes) {
+ if (contentTypes == null || contentTypes.isEmpty() || contentTypes.contains("*/*")) {
+ return "application/json";
+ }
+ for (String contentType : contentTypes) {
+ if (isJsonMime(contentType)) {
+ return contentType;
+ }
+ }
+ return contentTypes.get(0);
+ }
+
+ /**
+ * Escape the given string to be used as URL query value.
+ *
+ * @param str String to be escaped
+ * @return Escaped string
+ */
+ public String escapeString(String str) {
+ try {
+ return URLEncoder.encode(str, "utf8").replaceAll("\\+", "%20");
+ } catch (UnsupportedEncodingException e) {
+ return str;
+ }
+ }
+
+ /**
+ * Deserialize response body to Java object, according to the return type and
+ * the Content-Type response header.
+ *
+ * @param Type
+ * @param response HTTP response
+ * @param returnType The type of the Java object
+ * @return The deserialized Java object
+ * @throws ApiException If fail to deserialize response body, i.e. cannot read response body
+ * or the Content-Type of the response is not supported.
+ */
+ public T deserialize(Response response, Class returnType) throws ApiException {
+ if (response == null || returnType == null) {
+ return null;
+ }
+
+ String respBody;
+ try (ResponseBody body = response.body()) {
+ if (body != null) {
+ respBody = body.string();
+ } else {
+ respBody = null;
+ }
+ } catch (IOException e) {
+ throw new ApiException(e);
+ }
+
+ if (respBody == null || "".equals(respBody)) {
+ return null;
+ }
+
+ String contentType = response.headers().get("Content-Type");
+ if (contentType == null) {
+ // ensuring a default content type
+ contentType = "application/json";
+ }
+ if (isJsonMime(contentType)) {
+ return JSON.parseObject(respBody, returnType);
+ } else {
+ throw new ApiException(
+ "Content type \"" + contentType + "\" is not supported for type: " + returnType,
+ response.code(),
+ response.headers().toMultimap(),
+ respBody);
+ }
+ }
+
+ /**
+ * Serialize the given Java object into request body according to the object's
+ * class and the request Content-Type.
+ *
+ * @param obj The Java object
+ * @param contentType The request Content-Type
+ * @return The serialized request body
+ * @throws ApiException If fail to serialize the given object
+ */
+ public RequestBody serialize(Object obj, String contentType) throws ApiException {
+ if (isJsonMime(contentType)) {
+ String content;
+ if (obj != null) {
+ content = JSON.toJSONString(obj);
+ } else {
+ content = "";
+ }
+ return RequestBody.create(MediaType.parse(contentType), content);
+ } else {
+ throw new ApiException("Content type \"" + contentType + "\" is not supported");
+ }
+ }
+
+ /**
+ * {@link #execute(Call, Class)}
+ *
+ * @param Type
+ * @param call An instance of the Call object
+ * @throws ApiException If fail to execute the call
+ * @return ApiResponse<T>
+ */
+ public ApiResponse execute(Call call) throws ApiException {
+ return execute(call, null);
+ }
+
+ /**
+ * Execute HTTP call and deserialize the HTTP response body into the given return type.
+ *
+ * @param returnType The return type used to deserialize HTTP response body
+ * @param The return type corresponding to (same with) returnType
+ * @param call Call
+ * @return ApiResponse object containing response status, headers and
+ * data, which is a Java object deserialized from response body and would be null
+ * when returnType is null.
+ * @throws ApiException If fail to execute the call
+ */
+ public ApiResponse execute(Call call, Class returnType) throws ApiException {
+ try {
+ Response response = call.execute();
+ T data = handleResponse(response, returnType);
+ return new ApiResponse(response.code(), response.headers().toMultimap(), data);
+ } catch (IOException e) {
+ throw new ApiException(e);
+ }
+ }
+
+ /**
+ * {@link #executeAsync(Call, Class, ApiCallback)}
+ *
+ * @param Type
+ * @param call An instance of the Call object
+ * @param callback ApiCallback<T>
+ */
+ public void executeAsync(Call call, ApiCallback callback) {
+ executeAsync(call, null, callback);
+ }
+
+ /**
+ * Execute HTTP call asynchronously.
+ *
+ * @see #execute(Call, Class)
+ * @param Type
+ * @param call The callback to be executed when the API call finishes
+ * @param returnType Return type
+ * @param callback ApiCallback
+ */
+ public void executeAsync(Call call, final Class returnType, final ApiCallback callback) {
+ call.enqueue(new Callback() {
+ @Override
+ public void onFailure(Request request, IOException e) {
+ callback.onFailure(new ApiException(e), 0, null);
+ }
+
+ @Override
+ public void onResponse(Response response) throws IOException {
+ T result;
+ try {
+ result = (T) handleResponse(response, returnType);
+ } catch (ApiException e) {
+ callback.onFailure(e, response.code(), response.headers().toMultimap());
+ return;
+ }
+ callback.onSuccess(result, response.code(), response.headers().toMultimap());
+ }
+ });
+ }
+
+ /**
+ * Handle the given response, return the deserialized object when the response is successful.
+ *
+ * @param Type
+ * @param response Response
+ * @param returnType Return type
+ * @throws ApiException If the response has a unsuccessful status code or
+ * fail to deserialize the response body
+ * @return Type
+ */
+ public T handleResponse(Response response, Class returnType) throws ApiException {
+ if (response.isSuccessful()) {
+ if (returnType == null) {
+ // returning null if the returnType is not defined,
+ // or the status code is 204 (No Content)
+ try (ResponseBody body = response.body()) {
+ return null;
+ } catch (IOException e) {
+ throw new ApiException(response.message(), e, response.code(), response.headers().toMultimap());
+ }
+ } else {
+ return deserialize(response, returnType);
+ }
+ } else {
+ try (ResponseBody body = response.body()) {
+ String respBody = null;
+ if (body != null) {
+ respBody = body.string();
+ }
+ throw new ApiException(response.message(), response.code(), response.headers().toMultimap(), respBody);
+ } catch (IOException e) {
+ throw new ApiException(response.message(), e, response.code(), response.headers().toMultimap());
+ }
+ }
+ }
+
+ /**
+ * Build HTTP call with the given options.
+ *
+ * @param path The sub-path of the HTTP URL
+ * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE"
+ * @param queryParams The query parameters
+ * @param headerParams The header parameters
+ * @param formParams The form parameters
+ * @return The HTTP call
+ * @throws ApiException If fail to serialize the request body object
+ */
+ public Call buildCall(String path, String method, Map queryParams, Map headerParams, Map formParams, Configuration configuration) throws ApiException {
+ Request request = buildRequest(path, method, queryParams, headerParams, formParams, configuration);
+
+ return httpClient.newCall(request);
+ }
+
+ /**
+ * Build an HTTP request with the given options.
+ *
+ * @param path The sub-path of the HTTP URL
+ * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE"
+ * @param queryParams The query parameters
+ * @param headerParams The header parameters
+ * @param formParams The form parameters
+ * @return The HTTP request
+ * @throws ApiException If fail to serialize the request body object
+ */
+ public Request buildRequest(String path, String method, Map queryParams, Map headerParams, Map formParams, Configuration configuration) throws ApiException {
+
+ final String url = buildUrl(path, queryParams);
+ final Request.Builder reqBuilder = new Request.Builder().url(url);
+
+ Map signHeader = prepareSignHeader(queryParams, formParams, method, configuration);
+ headerParams.putAll(signHeader);
+
+ processHeaderParams(headerParams, reqBuilder);
+
+ String contentType = (String) headerParams.get("Content-Type");
+ // ensuring a default content type
+ if (contentType == null) {
+ contentType = "application/json";
+ }
+
+ RequestBody reqBody = null;
+ if (!HttpMethod.permitsRequestBody(method)) {
+ reqBody = null;
+ } else if ("application/x-www-form-urlencoded".equals(contentType)) {
+ reqBody = buildRequestBodyFormEncoding(formParams);
+ } else {
+ // use an empty request body (for POST, PUT and PATCH)
+ reqBody = RequestBody.create(MediaType.parse(contentType), "");
+ // reqBody = serialize(null, contentType);
+ }
+
+ Request request = reqBuilder.method(method, reqBody).build();
+ return request;
+ }
+
+ /**
+ * Build full URL by concatenating base path, the given sub path and query parameters.
+ *
+ * @param path The sub path
+ * @param queryParams The query parameters
+ * @return The full URL
+ */
+ public String buildUrl(String path, Map queryParams) {
+ final StringBuilder url = new StringBuilder(path);
+
+ if (queryParams != null && !queryParams.isEmpty()) {
+ // support (constant) query string in `path`, e.g. "/posts?draft=1"
+ String prefix = path.contains("?") ? "&" : "?";
+ for (Entry param : queryParams.entrySet()) {
+ if (param.getValue() != null) {
+ if (prefix != null) {
+ url.append(prefix);
+ prefix = null;
+ } else {
+ url.append("&");
+ }
+ String value = parameterToString(param.getValue());
+ url.append(escapeString(param.getKey())).append("=").append(escapeString(value));
+ }
+ }
+ }
+
+ //if (collectionQueryParams != null && !collectionQueryParams.isEmpty()) {
+ // String prefix = url.toString().contains("?") ? "&" : "?";
+ // for (Pair param : collectionQueryParams) {
+ // if (param.getValue() != null) {
+ // if (prefix != null) {
+ // url.append(prefix);
+ // prefix = null;
+ // } else {
+ // url.append("&");
+ // }
+ // String value = parameterToString(param.getValue());
+ // // collection query parameter value already escaped as part of parameterToPairs
+ // url.append(escapeString(param.getName())).append("=").append(value);
+ // }
+ // }
+ //}
+
+ return url.toString();
+ }
+
+ /**
+ * Set header parameters to the request builder, including default headers.
+ *
+ * @param headerParams Header parameters in the ofrm of Map
+ * @param reqBuilder Reqeust.Builder
+ */
+ public void processHeaderParams(Map headerParams, Request.Builder reqBuilder) {
+ reqBuilder.header("User-Agent", "cgw-client/1.0.0/java");
+
+ for (Entry param : headerParams.entrySet()) {
+ reqBuilder.header(param.getKey(), parameterToString(param.getValue()));
+ }
+ }
+
+ /**
+ * Build a form-encoding request body with the given form parameters.
+ *
+ * @param formParams Form parameters in the form of Map
+ * @return RequestBody
+ */
+ public RequestBody buildRequestBodyFormEncoding(Map formParams) {
+ FormEncodingBuilder formBuilder = new FormEncodingBuilder();
+ for (Entry param : formParams.entrySet()) {
+ formBuilder.add(param.getKey(), parameterToString(param.getValue()));
+ }
+ return formBuilder.build();
+ }
+
+ private static String join(List array, String separator) {
+ if (array == null || array.isEmpty()) {
+ return "";
+ }
+ StringBuilder out = new StringBuilder();
+ out.append(array.get(0));
+ for (int i = 1; i < array.size(); i++) {
+ out.append(separator).append(array.get(i));
+ }
+ return out.toString();
+ }
+
+ public static Map prepareSignHeader(Map queryParams, Map formParams, String method, Configuration configuration)
+ throws ApiException {
+
+ String nonce = UUID.randomUUID().toString().replaceAll("-", "");
+ SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
+ df.setTimeZone(new SimpleTimeZone(0, "GMT"));
+ String timestamp = df.format(new Date());
+ String signatureMethod = configuration.getSignatureMethod();
+ String signatureVersion = configuration.getSignatureVersion();
+ String accessKey = configuration.getAccessKey();
+
+ Map parameters = new HashMap();
+ // 加入公共请求参数
+ parameters.put("SignatureMethod", signatureMethod);
+ parameters.put("SignatureNonce", nonce);
+ parameters.put("SignatureVersion", signatureVersion);
+ parameters.put("AccessKey", accessKey);
+ parameters.put("Timestamp", timestamp);
+
+ if (queryParams != null && !queryParams.isEmpty()) {
+ parameters.putAll(queryParams);
+ }
+
+ if (formParams != null && !formParams.isEmpty()) {
+ for (Entry param : formParams.entrySet()) {
+ parameters.put(param.getKey(), parameterToString(param.getValue()));
+ }
+ }
+
+ try {
+ Map headers = new HashMap();
+ headers.put("Signature", md5(getSignRaw(parameters, method, configuration.getSecretKey())));
+ headers.put("Accesskey", accessKey);
+ headers.put("Signaturenonce", nonce);
+ headers.put("Signatureversion", signatureVersion);
+ headers.put("Timestamp", timestamp);
+ headers.put("Signaturemethod", signatureMethod);
+
+ return headers;
+ } catch (Exception e) {
+ throw new ApiException(e);
+ }
+ }
+
+ private static String getSignRaw(Map parameters, String method, String sk) throws Exception {
+ return sk + "&" + keySignInput(parameters, method);
+ }
+
+ private static String keySignInput(Map parameters, String method) throws Exception {
+
+ Map order = new TreeMap<>(parameters);
+ StringBuilder stringToSign = new StringBuilder();
+ stringToSign.append(method).append("&").append(encode("/"));
+
+ List keyValPairs = new ArrayList<>();
+ for (Entry param : order.entrySet()) {
+ keyValPairs.add(param.getKey() + "=" + encode(param.getValue()));
+ }
+ String queryString = join(keyValPairs, "&");
+
+ stringToSign.append("&").append(encode(queryString));
+ return stringToSign.toString();
+
+ }
+
+ private static String encode(String stringToEncode) throws Exception {
+ return URLEncoder.encode(stringToEncode, "utf8").replaceAll("\\+", "%20").replaceAll("\\*", "%2A").replaceAll("%7E", "~");
+ }
+
+ private static String md5(String str) throws Exception {
+ MessageDigest md = MessageDigest.getInstance("MD5");
+ md.update(str.getBytes());
+ byte[] digest = md.digest();
+ return DatatypeConverter.printHexBinary(digest).toLowerCase();
+ }
+}
diff --git a/src/main/java/com/alibaba/yjopenapi/client/api/ApiException.java b/src/main/java/com/alibaba/yjopenapi/client/api/ApiException.java
new file mode 100644
index 000000000..580630767
--- /dev/null
+++ b/src/main/java/com/alibaba/yjopenapi/client/api/ApiException.java
@@ -0,0 +1,83 @@
+/*
+ *
+ * YuanJing OpenAPI SDK
+ *
+ */
+
+package com.alibaba.yjopenapi.client.api;
+
+import java.util.Map;
+import java.util.List;
+
+public class ApiException extends Exception {
+ private int code = 0;
+ private Map> responseHeaders = null;
+ private String responseBody = null;
+
+ public ApiException() {}
+
+ public ApiException(Throwable throwable) {
+ super(throwable);
+ }
+
+ public ApiException(String message) {
+ super(message);
+ }
+
+ public ApiException(String message, Throwable throwable, int code, Map> responseHeaders, String responseBody) {
+ super(message, throwable);
+ this.code = code;
+ this.responseHeaders = responseHeaders;
+ this.responseBody = responseBody;
+ }
+
+ public ApiException(String message, int code, Map> responseHeaders, String responseBody) {
+ this(message, (Throwable) null, code, responseHeaders, responseBody);
+ }
+
+ public ApiException(String message, Throwable throwable, int code, Map> responseHeaders) {
+ this(message, throwable, code, responseHeaders, null);
+ }
+
+ public ApiException(int code, Map> responseHeaders, String responseBody) {
+ this((String) null, (Throwable) null, code, responseHeaders, responseBody);
+ }
+
+ public ApiException(int code, String message) {
+ super(message);
+ this.code = code;
+ }
+
+ public ApiException(int code, String message, Map> responseHeaders, String responseBody) {
+ this(code, message);
+ this.responseHeaders = responseHeaders;
+ this.responseBody = responseBody;
+ }
+
+ /**
+ * Get the HTTP status code.
+ *
+ * @return HTTP status code
+ */
+ public int getCode() {
+ return code;
+ }
+
+ /**
+ * Get the HTTP response headers.
+ *
+ * @return A map of list of string
+ */
+ public Map> getResponseHeaders() {
+ return responseHeaders;
+ }
+
+ /**
+ * Get the HTTP response body.
+ *
+ * @return Response body in the form of string
+ */
+ public String getResponseBody() {
+ return responseBody;
+ }
+}
diff --git a/src/main/java/com/alibaba/yjopenapi/client/api/ApiResponse.java b/src/main/java/com/alibaba/yjopenapi/client/api/ApiResponse.java
new file mode 100644
index 000000000..cd495f22e
--- /dev/null
+++ b/src/main/java/com/alibaba/yjopenapi/client/api/ApiResponse.java
@@ -0,0 +1,52 @@
+/*
+ *
+ * YuanJing OpenAPI SDK
+ *
+ */
+
+package com.alibaba.yjopenapi.client.api;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * API response returned by API call.
+ *
+ * @param The type of data that is deserialized from response body
+ */
+public class ApiResponse {
+ final private int statusCode;
+ final private Map> headers;
+ final private T data;
+
+ /**
+ * @param statusCode The status code of HTTP response
+ * @param headers The headers of HTTP response
+ */
+ public ApiResponse(int statusCode, Map> headers) {
+ this(statusCode, headers, null);
+ }
+
+ /**
+ * @param statusCode The status code of HTTP response
+ * @param headers The headers of HTTP response
+ * @param data The object deserialized from response bod
+ */
+ public ApiResponse(int statusCode, Map> headers, T data) {
+ this.statusCode = statusCode;
+ this.headers = headers;
+ this.data = data;
+ }
+
+ public int getStatusCode() {
+ return statusCode;
+ }
+
+ public Map> getHeaders() {
+ return headers;
+ }
+
+ public T getData() {
+ return data;
+ }
+}
diff --git a/src/main/java/com/alibaba/yjopenapi/client/api/Configuration.java b/src/main/java/com/alibaba/yjopenapi/client/api/Configuration.java
new file mode 100644
index 000000000..f28a115f0
--- /dev/null
+++ b/src/main/java/com/alibaba/yjopenapi/client/api/Configuration.java
@@ -0,0 +1,212 @@
+/*
+ *
+ * YuanJing OpenAPI SDK
+ *
+ */
+
+package com.alibaba.yjopenapi.client.api;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class Configuration {
+
+ private static Configuration defaultConfiguration = new Configuration();
+
+ /**
+ * DefaultHeaders
+ *
+ */
+ protected Map defaultHeaders = new HashMap();
+
+ /**
+ * SignatureVersion
+ *
+ */
+ protected String signatureVersion = "1.0";
+
+ /**
+ * SignatureMethod
+ *
+ */
+ protected String signatureMethod = "MD5";
+
+ /**
+ * AccessKey
+ *
+ */
+ protected String accessKey = null;
+
+ /**
+ * SecretKey
+ *
+ */
+ protected String secretKey = null;
+
+ /**
+ * HTTP scheme
+ *
+ */
+ protected String scheme = "https";
+
+ /**
+ * Host
+ *
+ */
+ protected String host = "/";
+
+ /**
+ *
+ * @return default configuration
+ */
+ public static Configuration getDefaultConfiguration() {
+ return defaultConfiguration;
+ }
+
+ /**
+ *
+ * @return headers
+ */
+ public Map getDefaultHeaders() {
+ return defaultHeaders;
+ }
+
+ /**
+ * @param key
+ * @param value
+ */
+ public Configuration addHeader(String key, String value) {
+ this.defaultHeaders.put(key, value);
+ return this;
+ }
+
+ public void setHeaders(Map headers) {
+ this.defaultHeaders = headers;
+ }
+
+ /**
+ *
+ * @return signature version
+ */
+ public String getSignatureVersion() {
+ return signatureVersion;
+ }
+
+ /**
+ *
+ * @param signatureVersion
+ */
+ public Configuration signatureVersion(String signatureVersion) {
+ this.signatureVersion = signatureVersion;
+ return this;
+ }
+
+ public void setSignatureVersion(String signatureVersion) {
+ this.signatureVersion = signatureVersion;
+ }
+
+ /**
+ *
+ * @return signature method
+ */
+ public String getSignatureMethod() {
+ return signatureMethod;
+ }
+
+ /**
+ *
+ * @param signatureMethod
+ */
+ public Configuration signatureMethod(String signatureMethod) {
+ this.signatureMethod = signatureMethod;
+ return this;
+ }
+
+ public void setSignatureMethod(String signatureMethod) {
+ this.signatureMethod = signatureMethod;
+ }
+
+ /**
+ *
+ * @return access key
+ */
+ public String getAccessKey() {
+ return accessKey;
+ }
+
+ /**
+ *
+ * @param accessKey
+ */
+ public Configuration accessKey(String accessKey) {
+ this.accessKey = accessKey;
+ return this;
+ }
+
+ public void setAccessKey(String accessKey) {
+ this.accessKey = accessKey;
+ }
+
+ /**
+ *
+ * @return secret key
+ */
+ public String getSecretKey() {
+ return secretKey;
+ }
+
+ /**
+ *
+ * @param secretKey
+ */
+ public Configuration secretKey(String secretKey) {
+ this.secretKey = secretKey;
+ return this;
+ }
+
+ public void setSecretKey(String secretKey) {
+ this.secretKey = secretKey;
+ }
+
+ /**
+ *
+ * @return scheme
+ */
+ public String getScheme() {
+ return scheme;
+ }
+
+ /**
+ *
+ * @param scheme
+ */
+ public Configuration scheme(String scheme) {
+ this.scheme = scheme;
+ return this;
+ }
+
+ public void setScheme(String scheme) {
+ this.scheme = scheme;
+ }
+
+ /**
+ *
+ * @return host
+ */
+ public String getHost() {
+ return host;
+ }
+
+ /**
+ *
+ * @param host
+ */
+ public Configuration host(String host) {
+ this.host = host;
+ return this;
+ }
+
+ public void setHost(String host) {
+ this.host = host;
+ }
+}
diff --git a/src/main/java/com/alibaba/yjopenapi/client/api/ConsoleAdminApi.java b/src/main/java/com/alibaba/yjopenapi/client/api/ConsoleAdminApi.java
new file mode 100644
index 000000000..ac19ee980
--- /dev/null
+++ b/src/main/java/com/alibaba/yjopenapi/client/api/ConsoleAdminApi.java
@@ -0,0 +1,2814 @@
+/*
+ *
+ * YuanJing OpenAPI SDK
+ *
+ */
+
+package com.alibaba.yjopenapi.client.api;
+
+import java.io.IOException;
+
+import com.alibaba.yjopenapi.client.model.ConsoleAdminActivateDeploymentResult;
+import com.alibaba.yjopenapi.client.model.ConsoleAdminAdaptGameVersionResult;
+import com.alibaba.yjopenapi.client.model.ConsoleAdminAddGameToProjectResult;
+import com.alibaba.yjopenapi.client.model.ConsoleAdminBatchUpdateDispatchConfigFormsConfigList;
+import com.alibaba.yjopenapi.client.model.ConsoleAdminBatchUpdateDispatchConfigResult;
+import com.alibaba.yjopenapi.client.model.ConsoleAdminCreateGameResult;
+import com.alibaba.yjopenapi.client.model.ConsoleAdminCreateOrderFormsAttributeRequestList;
+import com.alibaba.yjopenapi.client.model.ConsoleAdminCreateOrderResult;
+import com.alibaba.yjopenapi.client.model.ConsoleAdminCreateProjectResult;
+import com.alibaba.yjopenapi.client.model.ConsoleAdminDeleteGameResult;
+import com.alibaba.yjopenapi.client.model.ConsoleAdminDeleteGameVersionResult;
+import com.alibaba.yjopenapi.client.model.ConsoleAdminDeleteProjectResult;
+import com.alibaba.yjopenapi.client.model.ConsoleAdminGetBillFlowInfoResult;
+import com.alibaba.yjopenapi.client.model.ConsoleAdminGetGameVersionProgressResult;
+import com.alibaba.yjopenapi.client.model.ConsoleAdminGetGameVersionResult;
+import com.alibaba.yjopenapi.client.model.ConsoleAdminGetOrderResult;
+import com.alibaba.yjopenapi.client.model.ConsoleAdminListActivateableInstancesResult;
+import com.alibaba.yjopenapi.client.model.ConsoleAdminListActivatedInstancesResult;
+import com.alibaba.yjopenapi.client.model.ConsoleAdminListControllersOfGameResult;
+import com.alibaba.yjopenapi.client.model.ConsoleAdminListDeployableInstancesResult;
+import com.alibaba.yjopenapi.client.model.ConsoleAdminListGameDeployDetailsOfProjectResult;
+import com.alibaba.yjopenapi.client.model.ConsoleAdminListGameVersionsResult;
+import com.alibaba.yjopenapi.client.model.ConsoleAdminListGamesResult;
+import com.alibaba.yjopenapi.client.model.ConsoleAdminListInstancesOfProjectResult;
+import com.alibaba.yjopenapi.client.model.ConsoleAdminListMonthBillResult;
+import com.alibaba.yjopenapi.client.model.ConsoleAdminListProjectsResult;
+import com.alibaba.yjopenapi.client.model.ConsoleAdminListVersionDeployInstancesResult;
+import com.alibaba.yjopenapi.client.model.ConsoleAdminQueryAdaptResultByVersionIdResult;
+import com.alibaba.yjopenapi.client.model.ConsoleAdminRecommendSpecificationResult;
+import com.alibaba.yjopenapi.client.model.ConsoleAdminRemoveGameFromProjectResult;
+import com.alibaba.yjopenapi.client.model.ConsoleAdminSubmitDeploymentResult;
+import com.alibaba.yjopenapi.client.model.ConsoleAdminUploadGameVersionByDownloadFormsDownloadType;
+import com.alibaba.yjopenapi.client.model.ConsoleAdminUploadGameVersionByDownloadResult;
+
+import com.alibaba.yjopenapi.client.model.*;
+
+import java.util.Arrays;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class ConsoleAdminApi {
+ private ApiClient apiClient;
+ private Configuration configuration;
+
+ public ConsoleAdminApi() {
+ this(new ApiClient(), Configuration.getDefaultConfiguration());
+ }
+
+ public ConsoleAdminApi(ApiClient apiClient, Configuration configuration) {
+ this.apiClient = apiClient;
+ this.configuration = configuration;
+ }
+
+ public ApiClient getApiClient() {
+ return apiClient;
+ }
+
+ public void setApiClient(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ public Configuration getConfiguration() {
+ return configuration;
+ }
+
+ public void setConfiguration(Configuration configuration) {
+ this.configuration = configuration;
+ }
+
+ /**
+ * Build call for activateDeployment
+ * @param varForms ConsoleAdminActivateDeploymentForms
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ */
+ public com.squareup.okhttp.Call activateDeploymentCall(ConsoleAdminActivateDeploymentForms varForms) throws ApiException {
+
+ // create path and map variables
+ String localVarPath = "/consoleAdmin/activateDeployment";
+
+ Map localVarQueryParams = new HashMap();
+
+ Map localVarHeaderParams = new HashMap();
+
+ Map localVarFormParams = new HashMap();
+ localVarFormParams.put("gameId", varForms.getGameId());
+ localVarFormParams.put("projectId", varForms.getProjectId());
+ localVarFormParams.put("versionId", varForms.getVersionId());
+ if (varForms.getMaxConcurrency() != null) {
+ localVarFormParams.put("maxConcurrency", varForms.getMaxConcurrency());
+ }
+
+ final List localVarAccepts = Arrays.asList(
+ "application/json"
+ );
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final List localVarContentTypes = Arrays.asList(
+ "application/x-www-form-urlencoded"
+ );
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ String path = configuration.getScheme() + "://" + configuration.getHost() + localVarPath;
+ return apiClient.buildCall(path, "POST", localVarQueryParams, localVarHeaderParams, localVarFormParams, configuration);
+ }
+
+ private com.squareup.okhttp.Call activateDeploymentValidateBeforeCall(ConsoleAdminActivateDeploymentForms varForms) throws ApiException {
+ // verify the required parameter 'gameId' is set
+ if (varForms.getGameId() == null) {
+ throw new ApiException("Missing the required parameter 'gameId' when calling activateDeployment(Async)");
+ }
+ // verify the required parameter 'projectId' is set
+ if (varForms.getProjectId() == null) {
+ throw new ApiException("Missing the required parameter 'projectId' when calling activateDeployment(Async)");
+ }
+ // verify the required parameter 'versionId' is set
+ if (varForms.getVersionId() == null) {
+ throw new ApiException("Missing the required parameter 'versionId' when calling activateDeployment(Async)");
+ }
+
+ com.squareup.okhttp.Call call = activateDeploymentCall(varForms);
+ return call;
+ }
+
+ /**
+ *
+ *
+ * @param varForms ConsoleAdminActivateDeploymentForms
+ * @return ConsoleAdminActivateDeploymentResult
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public ConsoleAdminActivateDeploymentResult activateDeployment(ConsoleAdminActivateDeploymentForms varForms) throws ApiException {
+ ApiResponse resp = activateDeploymentWithHttpInfo(varForms);
+ return resp.getData();
+ }
+
+ /**
+ *
+ *
+ * @param varForms ConsoleAdminActivateDeploymentForms
+ * @return ApiResponse<ConsoleAdminActivateDeploymentResult>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public ApiResponse activateDeploymentWithHttpInfo(ConsoleAdminActivateDeploymentForms varForms) throws ApiException {
+ com.squareup.okhttp.Call call = activateDeploymentValidateBeforeCall(varForms);
+ return apiClient.execute(call, ConsoleAdminActivateDeploymentResult.class);
+ }
+
+ /**
+ * (asynchronously)
+ *
+ * @param varForms ConsoleAdminActivateDeploymentForms
+ * @param callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ */
+ public com.squareup.okhttp.Call activateDeploymentAsync(ConsoleAdminActivateDeploymentForms varForms, final ApiCallback callback) throws ApiException {
+
+ com.squareup.okhttp.Call call = activateDeploymentValidateBeforeCall(varForms);
+ apiClient.executeAsync(call, ConsoleAdminActivateDeploymentResult.class, callback);
+ return call;
+ }
+ /**
+ * Build call for adaptGameVersion
+ * @param varForms ConsoleAdminAdaptGameVersionForms
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ */
+ public com.squareup.okhttp.Call adaptGameVersionCall(ConsoleAdminAdaptGameVersionForms varForms) throws ApiException {
+
+ // create path and map variables
+ String localVarPath = "/consoleAdmin/adaptGameVersion";
+
+ Map localVarQueryParams = new HashMap();
+
+ Map localVarHeaderParams = new HashMap();
+
+ Map localVarFormParams = new HashMap();
+ localVarFormParams.put("versionId", varForms.getVersionId());
+
+ final List localVarAccepts = Arrays.asList(
+ "application/json"
+ );
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final List localVarContentTypes = Arrays.asList(
+ "application/x-www-form-urlencoded"
+ );
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ String path = configuration.getScheme() + "://" + configuration.getHost() + localVarPath;
+ return apiClient.buildCall(path, "POST", localVarQueryParams, localVarHeaderParams, localVarFormParams, configuration);
+ }
+
+ private com.squareup.okhttp.Call adaptGameVersionValidateBeforeCall(ConsoleAdminAdaptGameVersionForms varForms) throws ApiException {
+ // verify the required parameter 'versionId' is set
+ if (varForms.getVersionId() == null) {
+ throw new ApiException("Missing the required parameter 'versionId' when calling adaptGameVersion(Async)");
+ }
+
+ com.squareup.okhttp.Call call = adaptGameVersionCall(varForms);
+ return call;
+ }
+
+ /**
+ *
+ *
+ * @param varForms ConsoleAdminAdaptGameVersionForms
+ * @return ConsoleAdminAdaptGameVersionResult
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public ConsoleAdminAdaptGameVersionResult adaptGameVersion(ConsoleAdminAdaptGameVersionForms varForms) throws ApiException {
+ ApiResponse resp = adaptGameVersionWithHttpInfo(varForms);
+ return resp.getData();
+ }
+
+ /**
+ *
+ *
+ * @param varForms ConsoleAdminAdaptGameVersionForms
+ * @return ApiResponse<ConsoleAdminAdaptGameVersionResult>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public ApiResponse adaptGameVersionWithHttpInfo(ConsoleAdminAdaptGameVersionForms varForms) throws ApiException {
+ com.squareup.okhttp.Call call = adaptGameVersionValidateBeforeCall(varForms);
+ return apiClient.execute(call, ConsoleAdminAdaptGameVersionResult.class);
+ }
+
+ /**
+ * (asynchronously)
+ *
+ * @param varForms ConsoleAdminAdaptGameVersionForms
+ * @param callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ */
+ public com.squareup.okhttp.Call adaptGameVersionAsync(ConsoleAdminAdaptGameVersionForms varForms, final ApiCallback callback) throws ApiException {
+
+ com.squareup.okhttp.Call call = adaptGameVersionValidateBeforeCall(varForms);
+ apiClient.executeAsync(call, ConsoleAdminAdaptGameVersionResult.class, callback);
+ return call;
+ }
+ /**
+ * Build call for addGameToProject
+ * @param varForms ConsoleAdminAddGameToProjectForms
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ */
+ public com.squareup.okhttp.Call addGameToProjectCall(ConsoleAdminAddGameToProjectForms varForms) throws ApiException {
+
+ // create path and map variables
+ String localVarPath = "/consoleAdmin/addGameToProject";
+
+ Map localVarQueryParams = new HashMap();
+
+ Map localVarHeaderParams = new HashMap();
+
+ Map localVarFormParams = new HashMap();
+ localVarFormParams.put("projectId", varForms.getProjectId());
+ localVarFormParams.put("gameId", varForms.getGameId());
+
+ final List localVarAccepts = Arrays.asList(
+ "application/json"
+ );
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final List localVarContentTypes = Arrays.asList(
+ "application/x-www-form-urlencoded"
+ );
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ String path = configuration.getScheme() + "://" + configuration.getHost() + localVarPath;
+ return apiClient.buildCall(path, "POST", localVarQueryParams, localVarHeaderParams, localVarFormParams, configuration);
+ }
+
+ private com.squareup.okhttp.Call addGameToProjectValidateBeforeCall(ConsoleAdminAddGameToProjectForms varForms) throws ApiException {
+ // verify the required parameter 'projectId' is set
+ if (varForms.getProjectId() == null) {
+ throw new ApiException("Missing the required parameter 'projectId' when calling addGameToProject(Async)");
+ }
+ // verify the required parameter 'gameId' is set
+ if (varForms.getGameId() == null) {
+ throw new ApiException("Missing the required parameter 'gameId' when calling addGameToProject(Async)");
+ }
+
+ com.squareup.okhttp.Call call = addGameToProjectCall(varForms);
+ return call;
+ }
+
+ /**
+ *
+ *
+ * @param varForms ConsoleAdminAddGameToProjectForms
+ * @return ConsoleAdminAddGameToProjectResult
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public ConsoleAdminAddGameToProjectResult addGameToProject(ConsoleAdminAddGameToProjectForms varForms) throws ApiException {
+ ApiResponse resp = addGameToProjectWithHttpInfo(varForms);
+ return resp.getData();
+ }
+
+ /**
+ *
+ *
+ * @param varForms ConsoleAdminAddGameToProjectForms
+ * @return ApiResponse<ConsoleAdminAddGameToProjectResult>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public ApiResponse addGameToProjectWithHttpInfo(ConsoleAdminAddGameToProjectForms varForms) throws ApiException {
+ com.squareup.okhttp.Call call = addGameToProjectValidateBeforeCall(varForms);
+ return apiClient.execute(call, ConsoleAdminAddGameToProjectResult.class);
+ }
+
+ /**
+ * (asynchronously)
+ *
+ * @param varForms ConsoleAdminAddGameToProjectForms
+ * @param callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ */
+ public com.squareup.okhttp.Call addGameToProjectAsync(ConsoleAdminAddGameToProjectForms varForms, final ApiCallback callback) throws ApiException {
+
+ com.squareup.okhttp.Call call = addGameToProjectValidateBeforeCall(varForms);
+ apiClient.executeAsync(call, ConsoleAdminAddGameToProjectResult.class, callback);
+ return call;
+ }
+ /**
+ * Build call for batchUpdateDispatchConfig
+ * @param varForms ConsoleAdminBatchUpdateDispatchConfigForms
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ */
+ public com.squareup.okhttp.Call batchUpdateDispatchConfigCall(ConsoleAdminBatchUpdateDispatchConfigForms varForms) throws ApiException {
+
+ // create path and map variables
+ String localVarPath = "/consoleAdmin/batchUpdateDispatchConfig";
+
+ Map localVarQueryParams = new HashMap();
+
+ Map localVarHeaderParams = new HashMap();
+
+ Map localVarFormParams = new HashMap();
+ localVarFormParams.put("mixProjectId", varForms.getMixProjectId());
+ localVarFormParams.put("instanceId", varForms.getInstanceId());
+ localVarFormParams.put("appName", varForms.getAppName());
+ localVarFormParams.put("configList", varForms.getConfigList());
+
+ final List localVarAccepts = Arrays.asList(
+ "application/json"
+ );
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final List localVarContentTypes = Arrays.asList(
+ "application/x-www-form-urlencoded"
+ );
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ String path = configuration.getScheme() + "://" + configuration.getHost() + localVarPath;
+ return apiClient.buildCall(path, "POST", localVarQueryParams, localVarHeaderParams, localVarFormParams, configuration);
+ }
+
+ private com.squareup.okhttp.Call batchUpdateDispatchConfigValidateBeforeCall(ConsoleAdminBatchUpdateDispatchConfigForms varForms) throws ApiException {
+ // verify the required parameter 'mixProjectId' is set
+ if (varForms.getMixProjectId() == null) {
+ throw new ApiException("Missing the required parameter 'mixProjectId' when calling batchUpdateDispatchConfig(Async)");
+ }
+ // verify the required parameter 'instanceId' is set
+ if (varForms.getInstanceId() == null) {
+ throw new ApiException("Missing the required parameter 'instanceId' when calling batchUpdateDispatchConfig(Async)");
+ }
+ // verify the required parameter 'appName' is set
+ if (varForms.getAppName() == null) {
+ throw new ApiException("Missing the required parameter 'appName' when calling batchUpdateDispatchConfig(Async)");
+ }
+ // verify the required parameter 'configList' is set
+ if (varForms.getConfigList() == null) {
+ throw new ApiException("Missing the required parameter 'configList' when calling batchUpdateDispatchConfig(Async)");
+ }
+
+ com.squareup.okhttp.Call call = batchUpdateDispatchConfigCall(varForms);
+ return call;
+ }
+
+ /**
+ *
+ * 批量更新游戏各自调度配置
+ * @param varForms ConsoleAdminBatchUpdateDispatchConfigForms
+ * @return ConsoleAdminBatchUpdateDispatchConfigResult
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public ConsoleAdminBatchUpdateDispatchConfigResult batchUpdateDispatchConfig(ConsoleAdminBatchUpdateDispatchConfigForms varForms) throws ApiException {
+ ApiResponse resp = batchUpdateDispatchConfigWithHttpInfo(varForms);
+ return resp.getData();
+ }
+
+ /**
+ *
+ * 批量更新游戏各自调度配置
+ * @param varForms ConsoleAdminBatchUpdateDispatchConfigForms
+ * @return ApiResponse<ConsoleAdminBatchUpdateDispatchConfigResult>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public ApiResponse batchUpdateDispatchConfigWithHttpInfo(ConsoleAdminBatchUpdateDispatchConfigForms varForms) throws ApiException {
+ com.squareup.okhttp.Call call = batchUpdateDispatchConfigValidateBeforeCall(varForms);
+ return apiClient.execute(call, ConsoleAdminBatchUpdateDispatchConfigResult.class);
+ }
+
+ /**
+ * (asynchronously)
+ * 批量更新游戏各自调度配置
+ * @param varForms ConsoleAdminBatchUpdateDispatchConfigForms
+ * @param callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ */
+ public com.squareup.okhttp.Call batchUpdateDispatchConfigAsync(ConsoleAdminBatchUpdateDispatchConfigForms varForms, final ApiCallback callback) throws ApiException {
+
+ com.squareup.okhttp.Call call = batchUpdateDispatchConfigValidateBeforeCall(varForms);
+ apiClient.executeAsync(call, ConsoleAdminBatchUpdateDispatchConfigResult.class, callback);
+ return call;
+ }
+ /**
+ * Build call for createGame
+ * @param varForms ConsoleAdminCreateGameForms
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ */
+ public com.squareup.okhttp.Call createGameCall(ConsoleAdminCreateGameForms varForms) throws ApiException {
+
+ // create path and map variables
+ String localVarPath = "/consoleAdmin/createGame";
+
+ Map localVarQueryParams = new HashMap();
+
+ Map localVarHeaderParams = new HashMap();
+
+ Map localVarFormParams = new HashMap();
+ localVarFormParams.put("gameName", varForms.getGameName());
+ localVarFormParams.put("platformType", varForms.getPlatformType());
+ if (varForms.getOsType() != null) {
+ localVarFormParams.put("osType", varForms.getOsType());
+ }
+
+ final List localVarAccepts = Arrays.asList(
+ "application/json"
+ );
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final List localVarContentTypes = Arrays.asList(
+ "application/x-www-form-urlencoded"
+ );
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ String path = configuration.getScheme() + "://" + configuration.getHost() + localVarPath;
+ return apiClient.buildCall(path, "POST", localVarQueryParams, localVarHeaderParams, localVarFormParams, configuration);
+ }
+
+ private com.squareup.okhttp.Call createGameValidateBeforeCall(ConsoleAdminCreateGameForms varForms) throws ApiException {
+ // verify the required parameter 'gameName' is set
+ if (varForms.getGameName() == null) {
+ throw new ApiException("Missing the required parameter 'gameName' when calling createGame(Async)");
+ }
+ // verify the required parameter 'platformType' is set
+ if (varForms.getPlatformType() == null) {
+ throw new ApiException("Missing the required parameter 'platformType' when calling createGame(Async)");
+ }
+
+ com.squareup.okhttp.Call call = createGameCall(varForms);
+ return call;
+ }
+
+ /**
+ *
+ *
+ * @param varForms ConsoleAdminCreateGameForms
+ * @return ConsoleAdminCreateGameResult
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public ConsoleAdminCreateGameResult createGame(ConsoleAdminCreateGameForms varForms) throws ApiException {
+ ApiResponse resp = createGameWithHttpInfo(varForms);
+ return resp.getData();
+ }
+
+ /**
+ *
+ *
+ * @param varForms ConsoleAdminCreateGameForms
+ * @return ApiResponse<ConsoleAdminCreateGameResult>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public ApiResponse createGameWithHttpInfo(ConsoleAdminCreateGameForms varForms) throws ApiException {
+ com.squareup.okhttp.Call call = createGameValidateBeforeCall(varForms);
+ return apiClient.execute(call, ConsoleAdminCreateGameResult.class);
+ }
+
+ /**
+ * (asynchronously)
+ *
+ * @param varForms ConsoleAdminCreateGameForms
+ * @param callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ */
+ public com.squareup.okhttp.Call createGameAsync(ConsoleAdminCreateGameForms varForms, final ApiCallback callback) throws ApiException {
+
+ com.squareup.okhttp.Call call = createGameValidateBeforeCall(varForms);
+ apiClient.executeAsync(call, ConsoleAdminCreateGameResult.class, callback);
+ return call;
+ }
+ /**
+ * Build call for createOrder
+ * @param varForms ConsoleAdminCreateOrderForms
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ */
+ public com.squareup.okhttp.Call createOrderCall(ConsoleAdminCreateOrderForms varForms) throws ApiException {
+
+ // create path and map variables
+ String localVarPath = "/consoleAdmin/createOrder";
+
+ Map localVarQueryParams = new HashMap();
+
+ Map localVarHeaderParams = new HashMap();
+
+ Map localVarFormParams = new HashMap();
+ localVarFormParams.put("categoryCode", varForms.getCategoryCode());
+ localVarFormParams.put("commodityCode", varForms.getCommodityCode());
+ if (varForms.getInstanceId() != null) {
+ localVarFormParams.put("instanceId", varForms.getInstanceId());
+ }
+ localVarFormParams.put("primaryChargeItemCode", varForms.getPrimaryChargeItemCode());
+ localVarFormParams.put("attributeRequestList", varForms.getAttributeRequestList());
+ localVarFormParams.put("orderType", varForms.getOrderType());
+ if (varForms.getAutoRenew() != null) {
+ localVarFormParams.put("autoRenew", varForms.getAutoRenew());
+ }
+ if (varForms.getCreateOrderExtParams() != null) {
+ localVarFormParams.put("createOrderExtParams", varForms.getCreateOrderExtParams());
+ }
+
+ final List localVarAccepts = Arrays.asList(
+ "application/json"
+ );
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final List localVarContentTypes = Arrays.asList(
+ "application/x-www-form-urlencoded"
+ );
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ String path = configuration.getScheme() + "://" + configuration.getHost() + localVarPath;
+ return apiClient.buildCall(path, "POST", localVarQueryParams, localVarHeaderParams, localVarFormParams, configuration);
+ }
+
+ private com.squareup.okhttp.Call createOrderValidateBeforeCall(ConsoleAdminCreateOrderForms varForms) throws ApiException {
+ // verify the required parameter 'categoryCode' is set
+ if (varForms.getCategoryCode() == null) {
+ throw new ApiException("Missing the required parameter 'categoryCode' when calling createOrder(Async)");
+ }
+ // verify the required parameter 'commodityCode' is set
+ if (varForms.getCommodityCode() == null) {
+ throw new ApiException("Missing the required parameter 'commodityCode' when calling createOrder(Async)");
+ }
+ // verify the required parameter 'primaryChargeItemCode' is set
+ if (varForms.getPrimaryChargeItemCode() == null) {
+ throw new ApiException("Missing the required parameter 'primaryChargeItemCode' when calling createOrder(Async)");
+ }
+ // verify the required parameter 'attributeRequestList' is set
+ if (varForms.getAttributeRequestList() == null) {
+ throw new ApiException("Missing the required parameter 'attributeRequestList' when calling createOrder(Async)");
+ }
+ // verify the required parameter 'orderType' is set
+ if (varForms.getOrderType() == null) {
+ throw new ApiException("Missing the required parameter 'orderType' when calling createOrder(Async)");
+ }
+
+ com.squareup.okhttp.Call call = createOrderCall(varForms);
+ return call;
+ }
+
+ /**
+ *
+ * 订单下单
+ * @param varForms ConsoleAdminCreateOrderForms
+ * @return ConsoleAdminCreateOrderResult
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public ConsoleAdminCreateOrderResult createOrder(ConsoleAdminCreateOrderForms varForms) throws ApiException {
+ ApiResponse resp = createOrderWithHttpInfo(varForms);
+ return resp.getData();
+ }
+
+ /**
+ *
+ * 订单下单
+ * @param varForms ConsoleAdminCreateOrderForms
+ * @return ApiResponse<ConsoleAdminCreateOrderResult>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public ApiResponse createOrderWithHttpInfo(ConsoleAdminCreateOrderForms varForms) throws ApiException {
+ com.squareup.okhttp.Call call = createOrderValidateBeforeCall(varForms);
+ return apiClient.execute(call, ConsoleAdminCreateOrderResult.class);
+ }
+
+ /**
+ * (asynchronously)
+ * 订单下单
+ * @param varForms ConsoleAdminCreateOrderForms
+ * @param callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ */
+ public com.squareup.okhttp.Call createOrderAsync(ConsoleAdminCreateOrderForms varForms, final ApiCallback callback) throws ApiException {
+
+ com.squareup.okhttp.Call call = createOrderValidateBeforeCall(varForms);
+ apiClient.executeAsync(call, ConsoleAdminCreateOrderResult.class, callback);
+ return call;
+ }
+ /**
+ * Build call for createProject
+ * @param varForms ConsoleAdminCreateProjectForms
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ */
+ public com.squareup.okhttp.Call createProjectCall(ConsoleAdminCreateProjectForms varForms) throws ApiException {
+
+ // create path and map variables
+ String localVarPath = "/consoleAdmin/createProject";
+
+ Map localVarQueryParams = new HashMap();
+
+ Map localVarHeaderParams = new HashMap();
+
+ Map localVarFormParams = new HashMap();
+ localVarFormParams.put("projectName", varForms.getProjectName());
+
+ final List localVarAccepts = Arrays.asList(
+ "application/json"
+ );
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final List localVarContentTypes = Arrays.asList(
+ "application/x-www-form-urlencoded"
+ );
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ String path = configuration.getScheme() + "://" + configuration.getHost() + localVarPath;
+ return apiClient.buildCall(path, "POST", localVarQueryParams, localVarHeaderParams, localVarFormParams, configuration);
+ }
+
+ private com.squareup.okhttp.Call createProjectValidateBeforeCall(ConsoleAdminCreateProjectForms varForms) throws ApiException {
+ // verify the required parameter 'projectName' is set
+ if (varForms.getProjectName() == null) {
+ throw new ApiException("Missing the required parameter 'projectName' when calling createProject(Async)");
+ }
+
+ com.squareup.okhttp.Call call = createProjectCall(varForms);
+ return call;
+ }
+
+ /**
+ *
+ *
+ * @param varForms ConsoleAdminCreateProjectForms
+ * @return ConsoleAdminCreateProjectResult
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public ConsoleAdminCreateProjectResult createProject(ConsoleAdminCreateProjectForms varForms) throws ApiException {
+ ApiResponse resp = createProjectWithHttpInfo(varForms);
+ return resp.getData();
+ }
+
+ /**
+ *
+ *
+ * @param varForms ConsoleAdminCreateProjectForms
+ * @return ApiResponse<ConsoleAdminCreateProjectResult>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public ApiResponse createProjectWithHttpInfo(ConsoleAdminCreateProjectForms varForms) throws ApiException {
+ com.squareup.okhttp.Call call = createProjectValidateBeforeCall(varForms);
+ return apiClient.execute(call, ConsoleAdminCreateProjectResult.class);
+ }
+
+ /**
+ * (asynchronously)
+ *
+ * @param varForms ConsoleAdminCreateProjectForms
+ * @param callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ */
+ public com.squareup.okhttp.Call createProjectAsync(ConsoleAdminCreateProjectForms varForms, final ApiCallback callback) throws ApiException {
+
+ com.squareup.okhttp.Call call = createProjectValidateBeforeCall(varForms);
+ apiClient.executeAsync(call, ConsoleAdminCreateProjectResult.class, callback);
+ return call;
+ }
+ /**
+ * Build call for deleteGame
+ * @param varForms ConsoleAdminDeleteGameForms
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ */
+ public com.squareup.okhttp.Call deleteGameCall(ConsoleAdminDeleteGameForms varForms) throws ApiException {
+
+ // create path and map variables
+ String localVarPath = "/consoleAdmin/deleteGame";
+
+ Map localVarQueryParams = new HashMap();
+
+ Map localVarHeaderParams = new HashMap();
+
+ Map localVarFormParams = new HashMap();
+ localVarFormParams.put("gameId", varForms.getGameId());
+
+ final List localVarAccepts = Arrays.asList(
+ "application/json"
+ );
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final List localVarContentTypes = Arrays.asList(
+ "application/x-www-form-urlencoded"
+ );
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ String path = configuration.getScheme() + "://" + configuration.getHost() + localVarPath;
+ return apiClient.buildCall(path, "POST", localVarQueryParams, localVarHeaderParams, localVarFormParams, configuration);
+ }
+
+ private com.squareup.okhttp.Call deleteGameValidateBeforeCall(ConsoleAdminDeleteGameForms varForms) throws ApiException {
+ // verify the required parameter 'gameId' is set
+ if (varForms.getGameId() == null) {
+ throw new ApiException("Missing the required parameter 'gameId' when calling deleteGame(Async)");
+ }
+
+ com.squareup.okhttp.Call call = deleteGameCall(varForms);
+ return call;
+ }
+
+ /**
+ *
+ *
+ * @param varForms ConsoleAdminDeleteGameForms
+ * @return ConsoleAdminDeleteGameResult
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public ConsoleAdminDeleteGameResult deleteGame(ConsoleAdminDeleteGameForms varForms) throws ApiException {
+ ApiResponse resp = deleteGameWithHttpInfo(varForms);
+ return resp.getData();
+ }
+
+ /**
+ *
+ *
+ * @param varForms ConsoleAdminDeleteGameForms
+ * @return ApiResponse<ConsoleAdminDeleteGameResult>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public ApiResponse deleteGameWithHttpInfo(ConsoleAdminDeleteGameForms varForms) throws ApiException {
+ com.squareup.okhttp.Call call = deleteGameValidateBeforeCall(varForms);
+ return apiClient.execute(call, ConsoleAdminDeleteGameResult.class);
+ }
+
+ /**
+ * (asynchronously)
+ *
+ * @param varForms ConsoleAdminDeleteGameForms
+ * @param callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ */
+ public com.squareup.okhttp.Call deleteGameAsync(ConsoleAdminDeleteGameForms varForms, final ApiCallback callback) throws ApiException {
+
+ com.squareup.okhttp.Call call = deleteGameValidateBeforeCall(varForms);
+ apiClient.executeAsync(call, ConsoleAdminDeleteGameResult.class, callback);
+ return call;
+ }
+ /**
+ * Build call for deleteGameVersion
+ * @param varForms ConsoleAdminDeleteGameVersionForms
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ */
+ public com.squareup.okhttp.Call deleteGameVersionCall(ConsoleAdminDeleteGameVersionForms varForms) throws ApiException {
+
+ // create path and map variables
+ String localVarPath = "/consoleAdmin/deleteGameVersion";
+
+ Map localVarQueryParams = new HashMap();
+
+ Map localVarHeaderParams = new HashMap();
+
+ Map localVarFormParams = new HashMap();
+ localVarFormParams.put("versionId", varForms.getVersionId());
+
+ final List localVarAccepts = Arrays.asList(
+ "application/json"
+ );
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final List localVarContentTypes = Arrays.asList(
+ "application/x-www-form-urlencoded"
+ );
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ String path = configuration.getScheme() + "://" + configuration.getHost() + localVarPath;
+ return apiClient.buildCall(path, "POST", localVarQueryParams, localVarHeaderParams, localVarFormParams, configuration);
+ }
+
+ private com.squareup.okhttp.Call deleteGameVersionValidateBeforeCall(ConsoleAdminDeleteGameVersionForms varForms) throws ApiException {
+ // verify the required parameter 'versionId' is set
+ if (varForms.getVersionId() == null) {
+ throw new ApiException("Missing the required parameter 'versionId' when calling deleteGameVersion(Async)");
+ }
+
+ com.squareup.okhttp.Call call = deleteGameVersionCall(varForms);
+ return call;
+ }
+
+ /**
+ *
+ *
+ * @param varForms ConsoleAdminDeleteGameVersionForms
+ * @return ConsoleAdminDeleteGameVersionResult
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public ConsoleAdminDeleteGameVersionResult deleteGameVersion(ConsoleAdminDeleteGameVersionForms varForms) throws ApiException {
+ ApiResponse resp = deleteGameVersionWithHttpInfo(varForms);
+ return resp.getData();
+ }
+
+ /**
+ *
+ *
+ * @param varForms ConsoleAdminDeleteGameVersionForms
+ * @return ApiResponse<ConsoleAdminDeleteGameVersionResult>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public ApiResponse deleteGameVersionWithHttpInfo(ConsoleAdminDeleteGameVersionForms varForms) throws ApiException {
+ com.squareup.okhttp.Call call = deleteGameVersionValidateBeforeCall(varForms);
+ return apiClient.execute(call, ConsoleAdminDeleteGameVersionResult.class);
+ }
+
+ /**
+ * (asynchronously)
+ *
+ * @param varForms ConsoleAdminDeleteGameVersionForms
+ * @param callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ */
+ public com.squareup.okhttp.Call deleteGameVersionAsync(ConsoleAdminDeleteGameVersionForms varForms, final ApiCallback callback) throws ApiException {
+
+ com.squareup.okhttp.Call call = deleteGameVersionValidateBeforeCall(varForms);
+ apiClient.executeAsync(call, ConsoleAdminDeleteGameVersionResult.class, callback);
+ return call;
+ }
+ /**
+ * Build call for deleteProject
+ * @param varForms ConsoleAdminDeleteProjectForms
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ */
+ public com.squareup.okhttp.Call deleteProjectCall(ConsoleAdminDeleteProjectForms varForms) throws ApiException {
+
+ // create path and map variables
+ String localVarPath = "/consoleAdmin/deleteProject";
+
+ Map localVarQueryParams = new HashMap();
+
+ Map localVarHeaderParams = new HashMap();
+
+ Map localVarFormParams = new HashMap();
+ localVarFormParams.put("projectId", varForms.getProjectId());
+
+ final List localVarAccepts = Arrays.asList(
+ "application/json"
+ );
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final List localVarContentTypes = Arrays.asList(
+ "application/x-www-form-urlencoded"
+ );
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ String path = configuration.getScheme() + "://" + configuration.getHost() + localVarPath;
+ return apiClient.buildCall(path, "POST", localVarQueryParams, localVarHeaderParams, localVarFormParams, configuration);
+ }
+
+ private com.squareup.okhttp.Call deleteProjectValidateBeforeCall(ConsoleAdminDeleteProjectForms varForms) throws ApiException {
+ // verify the required parameter 'projectId' is set
+ if (varForms.getProjectId() == null) {
+ throw new ApiException("Missing the required parameter 'projectId' when calling deleteProject(Async)");
+ }
+
+ com.squareup.okhttp.Call call = deleteProjectCall(varForms);
+ return call;
+ }
+
+ /**
+ *
+ *
+ * @param varForms ConsoleAdminDeleteProjectForms
+ * @return ConsoleAdminDeleteProjectResult
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public ConsoleAdminDeleteProjectResult deleteProject(ConsoleAdminDeleteProjectForms varForms) throws ApiException {
+ ApiResponse resp = deleteProjectWithHttpInfo(varForms);
+ return resp.getData();
+ }
+
+ /**
+ *
+ *
+ * @param varForms ConsoleAdminDeleteProjectForms
+ * @return ApiResponse<ConsoleAdminDeleteProjectResult>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public ApiResponse deleteProjectWithHttpInfo(ConsoleAdminDeleteProjectForms varForms) throws ApiException {
+ com.squareup.okhttp.Call call = deleteProjectValidateBeforeCall(varForms);
+ return apiClient.execute(call, ConsoleAdminDeleteProjectResult.class);
+ }
+
+ /**
+ * (asynchronously)
+ *
+ * @param varForms ConsoleAdminDeleteProjectForms
+ * @param callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ */
+ public com.squareup.okhttp.Call deleteProjectAsync(ConsoleAdminDeleteProjectForms varForms, final ApiCallback callback) throws ApiException {
+
+ com.squareup.okhttp.Call call = deleteProjectValidateBeforeCall(varForms);
+ apiClient.executeAsync(call, ConsoleAdminDeleteProjectResult.class, callback);
+ return call;
+ }
+ /**
+ * Build call for getBillFlowInfo
+ * @param varForms ConsoleAdminGetBillFlowInfoForms
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ */
+ public com.squareup.okhttp.Call getBillFlowInfoCall(ConsoleAdminGetBillFlowInfoForms varForms) throws ApiException {
+
+ // create path and map variables
+ String localVarPath = "/consoleAdmin/getBillFlowInfo";
+
+ Map localVarQueryParams = new HashMap();
+
+ Map localVarHeaderParams = new HashMap();
+
+ Map localVarFormParams = new HashMap();
+ localVarFormParams.put("accountingPeriodFrom", varForms.getAccountingPeriodFrom());
+ localVarFormParams.put("accountingPeriodTo", varForms.getAccountingPeriodTo());
+ if (varForms.getCommodityCode() != null) {
+ localVarFormParams.put("commodityCode", varForms.getCommodityCode());
+ }
+ if (varForms.getTenantId() != null) {
+ localVarFormParams.put("tenantId", varForms.getTenantId());
+ }
+ if (varForms.getOrderId() != null) {
+ localVarFormParams.put("orderId", varForms.getOrderId());
+ }
+ if (varForms.getStatus() != null) {
+ localVarFormParams.put("status", varForms.getStatus());
+ }
+ if (varForms.getConsumeType() != null) {
+ localVarFormParams.put("consumeType", varForms.getConsumeType());
+ }
+ if (varForms.getBillType() != null) {
+ localVarFormParams.put("billType", varForms.getBillType());
+ }
+ if (varForms.getPageNumber() != null) {
+ localVarFormParams.put("pageNumber", varForms.getPageNumber());
+ }
+ if (varForms.getPageSize() != null) {
+ localVarFormParams.put("pageSize", varForms.getPageSize());
+ }
+
+ final List localVarAccepts = Arrays.asList(
+ "application/json"
+ );
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final List localVarContentTypes = Arrays.asList(
+ "application/x-www-form-urlencoded"
+ );
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ String path = configuration.getScheme() + "://" + configuration.getHost() + localVarPath;
+ return apiClient.buildCall(path, "POST", localVarQueryParams, localVarHeaderParams, localVarFormParams, configuration);
+ }
+
+ private com.squareup.okhttp.Call getBillFlowInfoValidateBeforeCall(ConsoleAdminGetBillFlowInfoForms varForms) throws ApiException {
+ // verify the required parameter 'accountingPeriodFrom' is set
+ if (varForms.getAccountingPeriodFrom() == null) {
+ throw new ApiException("Missing the required parameter 'accountingPeriodFrom' when calling getBillFlowInfo(Async)");
+ }
+ // verify the required parameter 'accountingPeriodTo' is set
+ if (varForms.getAccountingPeriodTo() == null) {
+ throw new ApiException("Missing the required parameter 'accountingPeriodTo' when calling getBillFlowInfo(Async)");
+ }
+
+ com.squareup.okhttp.Call call = getBillFlowInfoCall(varForms);
+ return call;
+ }
+
+ /**
+ *
+ *
+ * @param varForms ConsoleAdminGetBillFlowInfoForms
+ * @return ConsoleAdminGetBillFlowInfoResult
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public ConsoleAdminGetBillFlowInfoResult getBillFlowInfo(ConsoleAdminGetBillFlowInfoForms varForms) throws ApiException {
+ ApiResponse resp = getBillFlowInfoWithHttpInfo(varForms);
+ return resp.getData();
+ }
+
+ /**
+ *
+ *
+ * @param varForms ConsoleAdminGetBillFlowInfoForms
+ * @return ApiResponse<ConsoleAdminGetBillFlowInfoResult>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public ApiResponse getBillFlowInfoWithHttpInfo(ConsoleAdminGetBillFlowInfoForms varForms) throws ApiException {
+ com.squareup.okhttp.Call call = getBillFlowInfoValidateBeforeCall(varForms);
+ return apiClient.execute(call, ConsoleAdminGetBillFlowInfoResult.class);
+ }
+
+ /**
+ * (asynchronously)
+ *
+ * @param varForms ConsoleAdminGetBillFlowInfoForms
+ * @param callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ */
+ public com.squareup.okhttp.Call getBillFlowInfoAsync(ConsoleAdminGetBillFlowInfoForms varForms, final ApiCallback callback) throws ApiException {
+
+ com.squareup.okhttp.Call call = getBillFlowInfoValidateBeforeCall(varForms);
+ apiClient.executeAsync(call, ConsoleAdminGetBillFlowInfoResult.class, callback);
+ return call;
+ }
+ /**
+ * Build call for getGameVersion
+ * @param varForms ConsoleAdminGetGameVersionForms
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ */
+ public com.squareup.okhttp.Call getGameVersionCall(ConsoleAdminGetGameVersionForms varForms) throws ApiException {
+
+ // create path and map variables
+ String localVarPath = "/consoleAdmin/getGameVersion";
+
+ Map localVarQueryParams = new HashMap();
+
+ Map localVarHeaderParams = new HashMap();
+
+ Map localVarFormParams = new HashMap();
+ localVarFormParams.put("versionId", varForms.getVersionId());
+
+ final List localVarAccepts = Arrays.asList(
+ "application/json"
+ );
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final List localVarContentTypes = Arrays.asList(
+ "application/x-www-form-urlencoded"
+ );
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ String path = configuration.getScheme() + "://" + configuration.getHost() + localVarPath;
+ return apiClient.buildCall(path, "POST", localVarQueryParams, localVarHeaderParams, localVarFormParams, configuration);
+ }
+
+ private com.squareup.okhttp.Call getGameVersionValidateBeforeCall(ConsoleAdminGetGameVersionForms varForms) throws ApiException {
+ // verify the required parameter 'versionId' is set
+ if (varForms.getVersionId() == null) {
+ throw new ApiException("Missing the required parameter 'versionId' when calling getGameVersion(Async)");
+ }
+
+ com.squareup.okhttp.Call call = getGameVersionCall(varForms);
+ return call;
+ }
+
+ /**
+ *
+ *
+ * @param varForms ConsoleAdminGetGameVersionForms
+ * @return ConsoleAdminGetGameVersionResult
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public ConsoleAdminGetGameVersionResult getGameVersion(ConsoleAdminGetGameVersionForms varForms) throws ApiException {
+ ApiResponse resp = getGameVersionWithHttpInfo(varForms);
+ return resp.getData();
+ }
+
+ /**
+ *
+ *
+ * @param varForms ConsoleAdminGetGameVersionForms
+ * @return ApiResponse<ConsoleAdminGetGameVersionResult>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public ApiResponse getGameVersionWithHttpInfo(ConsoleAdminGetGameVersionForms varForms) throws ApiException {
+ com.squareup.okhttp.Call call = getGameVersionValidateBeforeCall(varForms);
+ return apiClient.execute(call, ConsoleAdminGetGameVersionResult.class);
+ }
+
+ /**
+ * (asynchronously)
+ *
+ * @param varForms ConsoleAdminGetGameVersionForms
+ * @param callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ */
+ public com.squareup.okhttp.Call getGameVersionAsync(ConsoleAdminGetGameVersionForms varForms, final ApiCallback callback) throws ApiException {
+
+ com.squareup.okhttp.Call call = getGameVersionValidateBeforeCall(varForms);
+ apiClient.executeAsync(call, ConsoleAdminGetGameVersionResult.class, callback);
+ return call;
+ }
+ /**
+ * Build call for getGameVersionProgress
+ * @param varForms ConsoleAdminGetGameVersionProgressForms
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ */
+ public com.squareup.okhttp.Call getGameVersionProgressCall(ConsoleAdminGetGameVersionProgressForms varForms) throws ApiException {
+
+ // create path and map variables
+ String localVarPath = "/consoleAdmin/getGameVersionProgress";
+
+ Map localVarQueryParams = new HashMap();
+
+ Map localVarHeaderParams = new HashMap();
+
+ Map localVarFormParams = new HashMap();
+ localVarFormParams.put("taskId", varForms.getTaskId());
+
+ final List localVarAccepts = Arrays.asList(
+ "application/json"
+ );
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final List localVarContentTypes = Arrays.asList(
+ "application/x-www-form-urlencoded"
+ );
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ String path = configuration.getScheme() + "://" + configuration.getHost() + localVarPath;
+ return apiClient.buildCall(path, "POST", localVarQueryParams, localVarHeaderParams, localVarFormParams, configuration);
+ }
+
+ private com.squareup.okhttp.Call getGameVersionProgressValidateBeforeCall(ConsoleAdminGetGameVersionProgressForms varForms) throws ApiException {
+ // verify the required parameter 'taskId' is set
+ if (varForms.getTaskId() == null) {
+ throw new ApiException("Missing the required parameter 'taskId' when calling getGameVersionProgress(Async)");
+ }
+
+ com.squareup.okhttp.Call call = getGameVersionProgressCall(varForms);
+ return call;
+ }
+
+ /**
+ *
+ *
+ * @param varForms ConsoleAdminGetGameVersionProgressForms
+ * @return ConsoleAdminGetGameVersionProgressResult
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public ConsoleAdminGetGameVersionProgressResult getGameVersionProgress(ConsoleAdminGetGameVersionProgressForms varForms) throws ApiException {
+ ApiResponse resp = getGameVersionProgressWithHttpInfo(varForms);
+ return resp.getData();
+ }
+
+ /**
+ *
+ *
+ * @param varForms ConsoleAdminGetGameVersionProgressForms
+ * @return ApiResponse<ConsoleAdminGetGameVersionProgressResult>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public ApiResponse getGameVersionProgressWithHttpInfo(ConsoleAdminGetGameVersionProgressForms varForms) throws ApiException {
+ com.squareup.okhttp.Call call = getGameVersionProgressValidateBeforeCall(varForms);
+ return apiClient.execute(call, ConsoleAdminGetGameVersionProgressResult.class);
+ }
+
+ /**
+ * (asynchronously)
+ *
+ * @param varForms ConsoleAdminGetGameVersionProgressForms
+ * @param callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ */
+ public com.squareup.okhttp.Call getGameVersionProgressAsync(ConsoleAdminGetGameVersionProgressForms varForms, final ApiCallback callback) throws ApiException {
+
+ com.squareup.okhttp.Call call = getGameVersionProgressValidateBeforeCall(varForms);
+ apiClient.executeAsync(call, ConsoleAdminGetGameVersionProgressResult.class, callback);
+ return call;
+ }
+ /**
+ * Build call for getOrder
+ * @param varForms ConsoleAdminGetOrderForms
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ */
+ public com.squareup.okhttp.Call getOrderCall(ConsoleAdminGetOrderForms varForms) throws ApiException {
+
+ // create path and map variables
+ String localVarPath = "/consoleAdmin/getOrder";
+
+ Map localVarQueryParams = new HashMap();
+
+ Map localVarHeaderParams = new HashMap();
+
+ Map localVarFormParams = new HashMap();
+ localVarFormParams.put("orderId", varForms.getOrderId());
+
+ final List localVarAccepts = Arrays.asList(
+ "application/json"
+ );
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final List localVarContentTypes = Arrays.asList(
+ "application/x-www-form-urlencoded"
+ );
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ String path = configuration.getScheme() + "://" + configuration.getHost() + localVarPath;
+ return apiClient.buildCall(path, "POST", localVarQueryParams, localVarHeaderParams, localVarFormParams, configuration);
+ }
+
+ private com.squareup.okhttp.Call getOrderValidateBeforeCall(ConsoleAdminGetOrderForms varForms) throws ApiException {
+ // verify the required parameter 'orderId' is set
+ if (varForms.getOrderId() == null) {
+ throw new ApiException("Missing the required parameter 'orderId' when calling getOrder(Async)");
+ }
+
+ com.squareup.okhttp.Call call = getOrderCall(varForms);
+ return call;
+ }
+
+ /**
+ *
+ * 查询订单
+ * @param varForms ConsoleAdminGetOrderForms
+ * @return ConsoleAdminGetOrderResult
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public ConsoleAdminGetOrderResult getOrder(ConsoleAdminGetOrderForms varForms) throws ApiException {
+ ApiResponse resp = getOrderWithHttpInfo(varForms);
+ return resp.getData();
+ }
+
+ /**
+ *
+ * 查询订单
+ * @param varForms ConsoleAdminGetOrderForms
+ * @return ApiResponse<ConsoleAdminGetOrderResult>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public ApiResponse getOrderWithHttpInfo(ConsoleAdminGetOrderForms varForms) throws ApiException {
+ com.squareup.okhttp.Call call = getOrderValidateBeforeCall(varForms);
+ return apiClient.execute(call, ConsoleAdminGetOrderResult.class);
+ }
+
+ /**
+ * (asynchronously)
+ * 查询订单
+ * @param varForms ConsoleAdminGetOrderForms
+ * @param callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ */
+ public com.squareup.okhttp.Call getOrderAsync(ConsoleAdminGetOrderForms varForms, final ApiCallback