content: /*
   * 支付宝开放平台API
   * 支付宝开放平台v3协议文档
   *
   * The version of the OpenAPI document: 2025-08-26
   * 
   *
   * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
   * https://openapi-generator.tech
   * Do not edit the class manually.
   */
  
  
  package com.alipay.v3.api;
  
  import com.alipay.v3.ApiCallback;
  import com.alipay.v3.ApiClient;
  import com.alipay.v3.ApiException;
  import com.alipay.v3.ApiResponse;
  import com.alipay.v3.Configuration;
  import com.alipay.v3.Pair;
  import com.alipay.v3.ProgressRequestBody;
  import com.alipay.v3.ProgressResponseBody;
  import com.alipay.v3.util.AlipayLogger;
  import com.alipay.v3.util.model.CustomizedParams;
  
  import com.google.common.base.Strings;
  import com.google.gson.reflect.TypeToken;
  
  import java.io.IOException;
  
  
  import com.alipay.v3.model.AlipayOpenSearchBoxApplyDefaultResponse;
  import com.alipay.v3.model.AlipayOpenSearchBoxApplyModel;
  import com.alipay.v3.model.AlipayOpenSearchBoxApplyResponseModel;
  import com.alipay.v3.model.AlipayOpenSearchBoxBatchqueryDefaultResponse;
  import com.alipay.v3.model.AlipayOpenSearchBoxBatchqueryModel;
  import com.alipay.v3.model.AlipayOpenSearchBoxBatchqueryResponseModel;
  import com.alipay.v3.model.AlipayOpenSearchBoxConsultDefaultResponse;
  import com.alipay.v3.model.AlipayOpenSearchBoxConsultModel;
  import com.alipay.v3.model.AlipayOpenSearchBoxConsultResponseModel;
  import com.alipay.v3.model.AlipayOpenSearchBoxModifyDefaultResponse;
  import com.alipay.v3.model.AlipayOpenSearchBoxModifyModel;
  import com.alipay.v3.model.AlipayOpenSearchBoxModifyResponseModel;
  import com.alipay.v3.model.AlipayOpenSearchBoxOfflineDefaultResponse;
  import com.alipay.v3.model.AlipayOpenSearchBoxOfflineModel;
  import com.alipay.v3.model.AlipayOpenSearchBoxOnlineDefaultResponse;
  import com.alipay.v3.model.AlipayOpenSearchBoxOnlineModel;
  import com.alipay.v3.model.AlipayOpenSearchBoxQueryDefaultResponse;
  import com.alipay.v3.model.AlipayOpenSearchBoxQueryResponseModel;
  
  import java.lang.reflect.Type;
  import java.util.ArrayList;
  import java.util.HashMap;
  import java.util.List;
  import java.util.Map;
  import javax.ws.rs.core.GenericType;
  
  public class AlipayOpenSearchBoxApi {
      private ApiClient localVarApiClient;
      private int localHostIndex;
      private String localCustomBaseUrl;
  
      public AlipayOpenSearchBoxApi() {
          this(Configuration.getDefaultApiClient());
      }
  
      public AlipayOpenSearchBoxApi(ApiClient apiClient) {
          this.localVarApiClient = apiClient;
      }
  
      public ApiClient getApiClient() {
          return localVarApiClient;
      }
  
      public void setApiClient(ApiClient apiClient) {
          this.localVarApiClient = apiClient;
      }
  
      public int getHostIndex() {
          return localHostIndex;
      }
  
      public void setHostIndex(int hostIndex) {
          this.localHostIndex = hostIndex;
      }
  
      public String getCustomBaseUrl() {
          return localCustomBaseUrl;
      }
  
      public void setCustomBaseUrl(String customBaseUrl) {
          this.localCustomBaseUrl = customBaseUrl;
      }
  
      /**
       * Build call for apply
       * @param alipayOpenSearchBoxApplyModel  (optional)
       * @param _callback Callback for upload/download progress
       * @param customizedParams
       * @return Call to execute
       * @throws ApiException If fail to serialize the request body object
       * @http.response.details
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       */
      public okhttp3.Call applyCall(AlipayOpenSearchBoxApplyModel alipayOpenSearchBoxApplyModel, final ApiCallback _callback, CustomizedParams customizedParams) throws ApiException {
          String basePath = null;
          // Operation Servers
          String[] localBasePaths = new String[] {  };
  
          // Determine Base Path to Use
          if (localCustomBaseUrl != null){
              basePath = localCustomBaseUrl;
          } else if ( localBasePaths.length > 0 ) {
              basePath = localBasePaths[localHostIndex];
          } else {
              basePath = null;
          }
  
          Object localVarPostBody = (customizedParams != null && !Strings.isNullOrEmpty(customizedParams.getBodyContent()))
                  ? customizedParams.getBodyContent() : alipayOpenSearchBoxApplyModel;
  
          // create path and map variables
          String localVarPath = "/v3/alipay/open/search/box/apply";
  
          List<Pair> localVarQueryParams = new ArrayList<Pair>();
          List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
          Map<String, String> localVarHeaderParams = new HashMap<String, String>();
          Map<String, String> localVarCookieParams = new HashMap<String, String>();
          Map<String, Object> localVarFormParams = new HashMap<String, Object>();
  
          final String[] localVarAccepts = {
              "application/json"
          };
          final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
          if (localVarAccept != null) {
              localVarHeaderParams.put("Accept", localVarAccept);
          }
  
          final String[] localVarContentTypes = {
              "application/json"
          };
          final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
          if (localVarContentType != null) {
              localVarHeaderParams.put("Content-Type", localVarContentType);
          }
  
          if (customizedParams != null) {
              //额外query参数
              if (customizedParams.getQueryParams() != null && customizedParams.getQueryParams().size() > 0) {
                  for (Map.Entry<String, String> entry : customizedParams.getQueryParams().entrySet()) {
                      localVarQueryParams.addAll(localVarApiClient.parameterToPair(entry.getKey(), entry.getValue()));
                  }
              }
  
              if (!Strings.isNullOrEmpty(customizedParams.getAppAuthToken())) {
                  localVarHeaderParams.put("alipay-app-auth-token", customizedParams.getAppAuthToken());
              }
  
              //额外非全局header参数
              if (customizedParams.getHeaderParams() != null && customizedParams.getHeaderParams().size() > 0) {
                  localVarHeaderParams.putAll(customizedParams.getHeaderParams());
              }
          }
  
          String[] localVarAuthNames = new String[] {  };
          return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
      }
  
      @SuppressWarnings("rawtypes")
      private okhttp3.Call applyValidateBeforeCall(AlipayOpenSearchBoxApplyModel alipayOpenSearchBoxApplyModel, final ApiCallback _callback, CustomizedParams customizedParams) throws ApiException {
          
  
          okhttp3.Call localVarCall = applyCall(alipayOpenSearchBoxApplyModel, _callback, customizedParams);
          return localVarCall;
  
      }
  
      /**
       * 申请创建搜索直达配置
       * 申请创建搜索直达配置，相关概念说明及准入条件详见 &lt;a href&#x3D;\&quot;https://opendocs.alipay.com/mini/03fjba\&quot;&gt; 搜索直达 &lt;/a&gt; 通过该接口创建搜索直达，满足准入门槛时，创建后立马生效。
       * @param alipayOpenSearchBoxApplyModel  (optional)
       * @return AlipayOpenSearchBoxApplyResponseModel
       * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
       * @http.response.details
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       */
      public AlipayOpenSearchBoxApplyResponseModel apply(AlipayOpenSearchBoxApplyModel alipayOpenSearchBoxApplyModel) throws ApiException {
          ApiResponse<AlipayOpenSearchBoxApplyResponseModel> localVarResp = applyWithHttpInfo(alipayOpenSearchBoxApplyModel, null);
          return localVarResp.getData();
      }
  
      public AlipayOpenSearchBoxApplyResponseModel apply(AlipayOpenSearchBoxApplyModel alipayOpenSearchBoxApplyModel, CustomizedParams customizedParams) throws ApiException {
          ApiResponse<AlipayOpenSearchBoxApplyResponseModel> localVarResp = applyWithHttpInfo(alipayOpenSearchBoxApplyModel, customizedParams);
          return localVarResp.getData();
      }
  
      /**
       * 申请创建搜索直达配置
       * 申请创建搜索直达配置，相关概念说明及准入条件详见 &lt;a href&#x3D;\&quot;https://opendocs.alipay.com/mini/03fjba\&quot;&gt; 搜索直达 &lt;/a&gt; 通过该接口创建搜索直达，满足准入门槛时，创建后立马生效。
       * @param alipayOpenSearchBoxApplyModel  (optional)
       * @return ApiResponse&lt;AlipayOpenSearchBoxApplyResponseModel&gt;
       * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
       * @http.response.details
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       */
      public ApiResponse<AlipayOpenSearchBoxApplyResponseModel> applyWithHttpInfo(AlipayOpenSearchBoxApplyModel alipayOpenSearchBoxApplyModel, CustomizedParams customizedParams) throws ApiException {
          okhttp3.Call localVarCall = applyValidateBeforeCall(alipayOpenSearchBoxApplyModel, null, customizedParams);
          try {
              Type localVarReturnType = new TypeToken<AlipayOpenSearchBoxApplyResponseModel>(){}.getType();
              return localVarApiClient.execute(localVarCall, localVarReturnType);
          } catch (ApiException e) {
              try {
                  e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken<AlipayOpenSearchBoxApplyDefaultResponse>(){}.getType()));
              } catch (Exception ex) {
                  AlipayLogger.logBizWarn(ex);
              }
              throw e;
          }
      }
  
      /**
       * 申请创建搜索直达配置 (asynchronously)
       * 申请创建搜索直达配置，相关概念说明及准入条件详见 &lt;a href&#x3D;\&quot;https://opendocs.alipay.com/mini/03fjba\&quot;&gt; 搜索直达 &lt;/a&gt; 通过该接口创建搜索直达，满足准入门槛时，创建后立马生效。
       * @param alipayOpenSearchBoxApplyModel  (optional)
       * @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
       * @http.response.details
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       * @deprecated
       */
      @Deprecated
      public okhttp3.Call applyAsync(AlipayOpenSearchBoxApplyModel alipayOpenSearchBoxApplyModel, final ApiCallback<AlipayOpenSearchBoxApplyResponseModel> _callback) throws ApiException {
  
          okhttp3.Call localVarCall = applyValidateBeforeCall(alipayOpenSearchBoxApplyModel, _callback, null);
          Type localVarReturnType = new TypeToken<AlipayOpenSearchBoxApplyResponseModel>(){}.getType();
          localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
          return localVarCall;
      }
  
      @Deprecated
      public okhttp3.Call applyAsync(AlipayOpenSearchBoxApplyModel alipayOpenSearchBoxApplyModel, final ApiCallback<AlipayOpenSearchBoxApplyResponseModel> _callback, CustomizedParams customizedParams) throws ApiException {
  
          okhttp3.Call localVarCall = applyValidateBeforeCall(alipayOpenSearchBoxApplyModel, _callback, customizedParams);
          Type localVarReturnType = new TypeToken<AlipayOpenSearchBoxApplyResponseModel>(){}.getType();
          localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
          return localVarCall;
      }
      /**
       * Build call for batchquery
       * @param alipayOpenSearchBoxBatchqueryModel  (optional)
       * @param _callback Callback for upload/download progress
       * @param customizedParams
       * @return Call to execute
       * @throws ApiException If fail to serialize the request body object
       * @http.response.details
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       */
      public okhttp3.Call batchqueryCall(AlipayOpenSearchBoxBatchqueryModel alipayOpenSearchBoxBatchqueryModel, final ApiCallback _callback, CustomizedParams customizedParams) throws ApiException {
          String basePath = null;
          // Operation Servers
          String[] localBasePaths = new String[] {  };
  
          // Determine Base Path to Use
          if (localCustomBaseUrl != null){
              basePath = localCustomBaseUrl;
          } else if ( localBasePaths.length > 0 ) {
              basePath = localBasePaths[localHostIndex];
          } else {
              basePath = null;
          }
  
          Object localVarPostBody = (customizedParams != null && !Strings.isNullOrEmpty(customizedParams.getBodyContent()))
                  ? customizedParams.getBodyContent() : alipayOpenSearchBoxBatchqueryModel;
  
          // create path and map variables
          String localVarPath = "/v3/alipay/open/search/box/batchquery";
  
          List<Pair> localVarQueryParams = new ArrayList<Pair>();
          List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
          Map<String, String> localVarHeaderParams = new HashMap<String, String>();
          Map<String, String> localVarCookieParams = new HashMap<String, String>();
          Map<String, Object> localVarFormParams = new HashMap<String, Object>();
  
          final String[] localVarAccepts = {
              "application/json"
          };
          final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
          if (localVarAccept != null) {
              localVarHeaderParams.put("Accept", localVarAccept);
          }
  
          final String[] localVarContentTypes = {
              "application/json"
          };
          final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
          if (localVarContentType != null) {
              localVarHeaderParams.put("Content-Type", localVarContentType);
          }
  
          if (customizedParams != null) {
              //额外query参数
              if (customizedParams.getQueryParams() != null && customizedParams.getQueryParams().size() > 0) {
                  for (Map.Entry<String, String> entry : customizedParams.getQueryParams().entrySet()) {
                      localVarQueryParams.addAll(localVarApiClient.parameterToPair(entry.getKey(), entry.getValue()));
                  }
              }
  
              if (!Strings.isNullOrEmpty(customizedParams.getAppAuthToken())) {
                  localVarHeaderParams.put("alipay-app-auth-token", customizedParams.getAppAuthToken());
              }
  
              //额外非全局header参数
              if (customizedParams.getHeaderParams() != null && customizedParams.getHeaderParams().size() > 0) {
                  localVarHeaderParams.putAll(customizedParams.getHeaderParams());
              }
          }
  
          String[] localVarAuthNames = new String[] {  };
          return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
      }
  
      @SuppressWarnings("rawtypes")
      private okhttp3.Call batchqueryValidateBeforeCall(AlipayOpenSearchBoxBatchqueryModel alipayOpenSearchBoxBatchqueryModel, final ApiCallback _callback, CustomizedParams customizedParams) throws ApiException {
          
  
          okhttp3.Call localVarCall = batchqueryCall(alipayOpenSearchBoxBatchqueryModel, _callback, customizedParams);
          return localVarCall;
  
      }
  
      /**
       * 批量查询搜索直达配置列表
       * 批量查询商户已开通搜索直达的小程序及直达信息（搜索直达名称和id）
       * @param alipayOpenSearchBoxBatchqueryModel  (optional)
       * @return AlipayOpenSearchBoxBatchqueryResponseModel
       * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
       * @http.response.details
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       */
      public AlipayOpenSearchBoxBatchqueryResponseModel batchquery(AlipayOpenSearchBoxBatchqueryModel alipayOpenSearchBoxBatchqueryModel) throws ApiException {
          ApiResponse<AlipayOpenSearchBoxBatchqueryResponseModel> localVarResp = batchqueryWithHttpInfo(alipayOpenSearchBoxBatchqueryModel, null);
          return localVarResp.getData();
      }
  
      public AlipayOpenSearchBoxBatchqueryResponseModel batchquery(AlipayOpenSearchBoxBatchqueryModel alipayOpenSearchBoxBatchqueryModel, CustomizedParams customizedParams) throws ApiException {
          ApiResponse<AlipayOpenSearchBoxBatchqueryResponseModel> localVarResp = batchqueryWithHttpInfo(alipayOpenSearchBoxBatchqueryModel, customizedParams);
          return localVarResp.getData();
      }
  
      /**
       * 批量查询搜索直达配置列表
       * 批量查询商户已开通搜索直达的小程序及直达信息（搜索直达名称和id）
       * @param alipayOpenSearchBoxBatchqueryModel  (optional)
       * @return ApiResponse&lt;AlipayOpenSearchBoxBatchqueryResponseModel&gt;
       * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
       * @http.response.details
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       */
      public ApiResponse<AlipayOpenSearchBoxBatchqueryResponseModel> batchqueryWithHttpInfo(AlipayOpenSearchBoxBatchqueryModel alipayOpenSearchBoxBatchqueryModel, CustomizedParams customizedParams) throws ApiException {
          okhttp3.Call localVarCall = batchqueryValidateBeforeCall(alipayOpenSearchBoxBatchqueryModel, null, customizedParams);
          try {
              Type localVarReturnType = new TypeToken<AlipayOpenSearchBoxBatchqueryResponseModel>(){}.getType();
              return localVarApiClient.execute(localVarCall, localVarReturnType);
          } catch (ApiException e) {
              try {
                  e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken<AlipayOpenSearchBoxBatchqueryDefaultResponse>(){}.getType()));
              } catch (Exception ex) {
                  AlipayLogger.logBizWarn(ex);
              }
              throw e;
          }
      }
  
      /**
       * 批量查询搜索直达配置列表 (asynchronously)
       * 批量查询商户已开通搜索直达的小程序及直达信息（搜索直达名称和id）
       * @param alipayOpenSearchBoxBatchqueryModel  (optional)
       * @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
       * @http.response.details
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       * @deprecated
       */
      @Deprecated
      public okhttp3.Call batchqueryAsync(AlipayOpenSearchBoxBatchqueryModel alipayOpenSearchBoxBatchqueryModel, final ApiCallback<AlipayOpenSearchBoxBatchqueryResponseModel> _callback) throws ApiException {
  
          okhttp3.Call localVarCall = batchqueryValidateBeforeCall(alipayOpenSearchBoxBatchqueryModel, _callback, null);
          Type localVarReturnType = new TypeToken<AlipayOpenSearchBoxBatchqueryResponseModel>(){}.getType();
          localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
          return localVarCall;
      }
  
      @Deprecated
      public okhttp3.Call batchqueryAsync(AlipayOpenSearchBoxBatchqueryModel alipayOpenSearchBoxBatchqueryModel, final ApiCallback<AlipayOpenSearchBoxBatchqueryResponseModel> _callback, CustomizedParams customizedParams) throws ApiException {
  
          okhttp3.Call localVarCall = batchqueryValidateBeforeCall(alipayOpenSearchBoxBatchqueryModel, _callback, customizedParams);
          Type localVarReturnType = new TypeToken<AlipayOpenSearchBoxBatchqueryResponseModel>(){}.getType();
          localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
          return localVarCall;
      }
      /**
       * Build call for consult
       * @param alipayOpenSearchBoxConsultModel  (optional)
       * @param _callback Callback for upload/download progress
       * @param customizedParams
       * @return Call to execute
       * @throws ApiException If fail to serialize the request body object
       * @http.response.details
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       */
      public okhttp3.Call consultCall(AlipayOpenSearchBoxConsultModel alipayOpenSearchBoxConsultModel, final ApiCallback _callback, CustomizedParams customizedParams) throws ApiException {
          String basePath = null;
          // Operation Servers
          String[] localBasePaths = new String[] {  };
  
          // Determine Base Path to Use
          if (localCustomBaseUrl != null){
              basePath = localCustomBaseUrl;
          } else if ( localBasePaths.length > 0 ) {
              basePath = localBasePaths[localHostIndex];
          } else {
              basePath = null;
          }
  
          Object localVarPostBody = (customizedParams != null && !Strings.isNullOrEmpty(customizedParams.getBodyContent()))
                  ? customizedParams.getBodyContent() : alipayOpenSearchBoxConsultModel;
  
          // create path and map variables
          String localVarPath = "/v3/alipay/open/search/box/consult";
  
          List<Pair> localVarQueryParams = new ArrayList<Pair>();
          List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
          Map<String, String> localVarHeaderParams = new HashMap<String, String>();
          Map<String, String> localVarCookieParams = new HashMap<String, String>();
          Map<String, Object> localVarFormParams = new HashMap<String, Object>();
  
          final String[] localVarAccepts = {
              "application/json"
          };
          final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
          if (localVarAccept != null) {
              localVarHeaderParams.put("Accept", localVarAccept);
          }
  
          final String[] localVarContentTypes = {
              "application/json"
          };
          final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
          if (localVarContentType != null) {
              localVarHeaderParams.put("Content-Type", localVarContentType);
          }
  
          if (customizedParams != null) {
              //额外query参数
              if (customizedParams.getQueryParams() != null && customizedParams.getQueryParams().size() > 0) {
                  for (Map.Entry<String, String> entry : customizedParams.getQueryParams().entrySet()) {
                      localVarQueryParams.addAll(localVarApiClient.parameterToPair(entry.getKey(), entry.getValue()));
                  }
              }
  
              if (!Strings.isNullOrEmpty(customizedParams.getAppAuthToken())) {
                  localVarHeaderParams.put("alipay-app-auth-token", customizedParams.getAppAuthToken());
              }
  
              //额外非全局header参数
              if (customizedParams.getHeaderParams() != null && customizedParams.getHeaderParams().size() > 0) {
                  localVarHeaderParams.putAll(customizedParams.getHeaderParams());
              }
          }
  
          String[] localVarAuthNames = new String[] {  };
          return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
      }
  
      @SuppressWarnings("rawtypes")
      private okhttp3.Call consultValidateBeforeCall(AlipayOpenSearchBoxConsultModel alipayOpenSearchBoxConsultModel, final ApiCallback _callback, CustomizedParams customizedParams) throws ApiException {
          
  
          okhttp3.Call localVarCall = consultCall(alipayOpenSearchBoxConsultModel, _callback, customizedParams);
          return localVarCall;
  
      }
  
      /**
       * 搜索直达创建预校验
       * 用于对搜索直达创建申请的入参和条件进行提前判断校验。 具体准入条件参考&lt;a href&#x3D;\&quot;https://opendocs.alipay.com/pre-open/0311q3#%E5%87%86%E5%85%A5%E6%9D%A1%E4%BB%B6\&quot;&gt;搜索直达准入条件&lt;/a&gt;
       * @param alipayOpenSearchBoxConsultModel  (optional)
       * @return AlipayOpenSearchBoxConsultResponseModel
       * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
       * @http.response.details
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       */
      public AlipayOpenSearchBoxConsultResponseModel consult(AlipayOpenSearchBoxConsultModel alipayOpenSearchBoxConsultModel) throws ApiException {
          ApiResponse<AlipayOpenSearchBoxConsultResponseModel> localVarResp = consultWithHttpInfo(alipayOpenSearchBoxConsultModel, null);
          return localVarResp.getData();
      }
  
      public AlipayOpenSearchBoxConsultResponseModel consult(AlipayOpenSearchBoxConsultModel alipayOpenSearchBoxConsultModel, CustomizedParams customizedParams) throws ApiException {
          ApiResponse<AlipayOpenSearchBoxConsultResponseModel> localVarResp = consultWithHttpInfo(alipayOpenSearchBoxConsultModel, customizedParams);
          return localVarResp.getData();
      }
  
      /**
       * 搜索直达创建预校验
       * 用于对搜索直达创建申请的入参和条件进行提前判断校验。 具体准入条件参考&lt;a href&#x3D;\&quot;https://opendocs.alipay.com/pre-open/0311q3#%E5%87%86%E5%85%A5%E6%9D%A1%E4%BB%B6\&quot;&gt;搜索直达准入条件&lt;/a&gt;
       * @param alipayOpenSearchBoxConsultModel  (optional)
       * @return ApiResponse&lt;AlipayOpenSearchBoxConsultResponseModel&gt;
       * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
       * @http.response.details
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       */
      public ApiResponse<AlipayOpenSearchBoxConsultResponseModel> consultWithHttpInfo(AlipayOpenSearchBoxConsultModel alipayOpenSearchBoxConsultModel, CustomizedParams customizedParams) throws ApiException {
          okhttp3.Call localVarCall = consultValidateBeforeCall(alipayOpenSearchBoxConsultModel, null, customizedParams);
          try {
              Type localVarReturnType = new TypeToken<AlipayOpenSearchBoxConsultResponseModel>(){}.getType();
              return localVarApiClient.execute(localVarCall, localVarReturnType);
          } catch (ApiException e) {
              try {
                  e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken<AlipayOpenSearchBoxConsultDefaultResponse>(){}.getType()));
              } catch (Exception ex) {
                  AlipayLogger.logBizWarn(ex);
              }
              throw e;
          }
      }
  
      /**
       * 搜索直达创建预校验 (asynchronously)
       * 用于对搜索直达创建申请的入参和条件进行提前判断校验。 具体准入条件参考&lt;a href&#x3D;\&quot;https://opendocs.alipay.com/pre-open/0311q3#%E5%87%86%E5%85%A5%E6%9D%A1%E4%BB%B6\&quot;&gt;搜索直达准入条件&lt;/a&gt;
       * @param alipayOpenSearchBoxConsultModel  (optional)
       * @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
       * @http.response.details
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       * @deprecated
       */
      @Deprecated
      public okhttp3.Call consultAsync(AlipayOpenSearchBoxConsultModel alipayOpenSearchBoxConsultModel, final ApiCallback<AlipayOpenSearchBoxConsultResponseModel> _callback) throws ApiException {
  
          okhttp3.Call localVarCall = consultValidateBeforeCall(alipayOpenSearchBoxConsultModel, _callback, null);
          Type localVarReturnType = new TypeToken<AlipayOpenSearchBoxConsultResponseModel>(){}.getType();
          localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
          return localVarCall;
      }
  
      @Deprecated
      public okhttp3.Call consultAsync(AlipayOpenSearchBoxConsultModel alipayOpenSearchBoxConsultModel, final ApiCallback<AlipayOpenSearchBoxConsultResponseModel> _callback, CustomizedParams customizedParams) throws ApiException {
  
          okhttp3.Call localVarCall = consultValidateBeforeCall(alipayOpenSearchBoxConsultModel, _callback, customizedParams);
          Type localVarReturnType = new TypeToken<AlipayOpenSearchBoxConsultResponseModel>(){}.getType();
          localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
          return localVarCall;
      }
      /**
       * Build call for modify
       * @param alipayOpenSearchBoxModifyModel  (optional)
       * @param _callback Callback for upload/download progress
       * @param customizedParams
       * @return Call to execute
       * @throws ApiException If fail to serialize the request body object
       * @http.response.details
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       */
      public okhttp3.Call modifyCall(AlipayOpenSearchBoxModifyModel alipayOpenSearchBoxModifyModel, final ApiCallback _callback, CustomizedParams customizedParams) throws ApiException {
          String basePath = null;
          // Operation Servers
          String[] localBasePaths = new String[] {  };
  
          // Determine Base Path to Use
          if (localCustomBaseUrl != null){
              basePath = localCustomBaseUrl;
          } else if ( localBasePaths.length > 0 ) {
              basePath = localBasePaths[localHostIndex];
          } else {
              basePath = null;
          }
  
          Object localVarPostBody = (customizedParams != null && !Strings.isNullOrEmpty(customizedParams.getBodyContent()))
                  ? customizedParams.getBodyContent() : alipayOpenSearchBoxModifyModel;
  
          // create path and map variables
          String localVarPath = "/v3/alipay/open/search/box/modify";
  
          List<Pair> localVarQueryParams = new ArrayList<Pair>();
          List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
          Map<String, String> localVarHeaderParams = new HashMap<String, String>();
          Map<String, String> localVarCookieParams = new HashMap<String, String>();
          Map<String, Object> localVarFormParams = new HashMap<String, Object>();
  
          final String[] localVarAccepts = {
              "application/json"
          };
          final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
          if (localVarAccept != null) {
              localVarHeaderParams.put("Accept", localVarAccept);
          }
  
          final String[] localVarContentTypes = {
              "application/json"
          };
          final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
          if (localVarContentType != null) {
              localVarHeaderParams.put("Content-Type", localVarContentType);
          }
  
          if (customizedParams != null) {
              //额外query参数
              if (customizedParams.getQueryParams() != null && customizedParams.getQueryParams().size() > 0) {
                  for (Map.Entry<String, String> entry : customizedParams.getQueryParams().entrySet()) {
                      localVarQueryParams.addAll(localVarApiClient.parameterToPair(entry.getKey(), entry.getValue()));
                  }
              }
  
              if (!Strings.isNullOrEmpty(customizedParams.getAppAuthToken())) {
                  localVarHeaderParams.put("alipay-app-auth-token", customizedParams.getAppAuthToken());
              }
  
              //额外非全局header参数
              if (customizedParams.getHeaderParams() != null && customizedParams.getHeaderParams().size() > 0) {
                  localVarHeaderParams.putAll(customizedParams.getHeaderParams());
              }
          }
  
          String[] localVarAuthNames = new String[] {  };
          return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
      }
  
      @SuppressWarnings("rawtypes")
      private okhttp3.Call modifyValidateBeforeCall(AlipayOpenSearchBoxModifyModel alipayOpenSearchBoxModifyModel, final ApiCallback _callback, CustomizedParams customizedParams) throws ApiException {
          
  
          okhttp3.Call localVarCall = modifyCall(alipayOpenSearchBoxModifyModel, _callback, customizedParams);
          return localVarCall;
  
      }
  
      /**
       * 修改搜索直达配置
       * 修改搜索直达配置模块，配置对应的模块参考：&lt;a href&#x3D;\&quot;https://opendocs.alipay.com/mini/03fjba#%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E\&quot;&gt; 搜索直达模块说明 &lt;/a&gt;
       * @param alipayOpenSearchBoxModifyModel  (optional)
       * @return AlipayOpenSearchBoxModifyResponseModel
       * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
       * @http.response.details
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       */
      public AlipayOpenSearchBoxModifyResponseModel modify(AlipayOpenSearchBoxModifyModel alipayOpenSearchBoxModifyModel) throws ApiException {
          ApiResponse<AlipayOpenSearchBoxModifyResponseModel> localVarResp = modifyWithHttpInfo(alipayOpenSearchBoxModifyModel, null);
          return localVarResp.getData();
      }
  
      public AlipayOpenSearchBoxModifyResponseModel modify(AlipayOpenSearchBoxModifyModel alipayOpenSearchBoxModifyModel, CustomizedParams customizedParams) throws ApiException {
          ApiResponse<AlipayOpenSearchBoxModifyResponseModel> localVarResp = modifyWithHttpInfo(alipayOpenSearchBoxModifyModel, customizedParams);
          return localVarResp.getData();
      }
  
      /**
       * 修改搜索直达配置
       * 修改搜索直达配置模块，配置对应的模块参考：&lt;a href&#x3D;\&quot;https://opendocs.alipay.com/mini/03fjba#%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E\&quot;&gt; 搜索直达模块说明 &lt;/a&gt;
       * @param alipayOpenSearchBoxModifyModel  (optional)
       * @return ApiResponse&lt;AlipayOpenSearchBoxModifyResponseModel&gt;
       * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
       * @http.response.details
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       */
      public ApiResponse<AlipayOpenSearchBoxModifyResponseModel> modifyWithHttpInfo(AlipayOpenSearchBoxModifyModel alipayOpenSearchBoxModifyModel, CustomizedParams customizedParams) throws ApiException {
          okhttp3.Call localVarCall = modifyValidateBeforeCall(alipayOpenSearchBoxModifyModel, null, customizedParams);
          try {
              Type localVarReturnType = new TypeToken<AlipayOpenSearchBoxModifyResponseModel>(){}.getType();
              return localVarApiClient.execute(localVarCall, localVarReturnType);
          } catch (ApiException e) {
              try {
                  e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken<AlipayOpenSearchBoxModifyDefaultResponse>(){}.getType()));
              } catch (Exception ex) {
                  AlipayLogger.logBizWarn(ex);
              }
              throw e;
          }
      }
  
      /**
       * 修改搜索直达配置 (asynchronously)
       * 修改搜索直达配置模块，配置对应的模块参考：&lt;a href&#x3D;\&quot;https://opendocs.alipay.com/mini/03fjba#%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E\&quot;&gt; 搜索直达模块说明 &lt;/a&gt;
       * @param alipayOpenSearchBoxModifyModel  (optional)
       * @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
       * @http.response.details
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       * @deprecated
       */
      @Deprecated
      public okhttp3.Call modifyAsync(AlipayOpenSearchBoxModifyModel alipayOpenSearchBoxModifyModel, final ApiCallback<AlipayOpenSearchBoxModifyResponseModel> _callback) throws ApiException {
  
          okhttp3.Call localVarCall = modifyValidateBeforeCall(alipayOpenSearchBoxModifyModel, _callback, null);
          Type localVarReturnType = new TypeToken<AlipayOpenSearchBoxModifyResponseModel>(){}.getType();
          localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
          return localVarCall;
      }
  
      @Deprecated
      public okhttp3.Call modifyAsync(AlipayOpenSearchBoxModifyModel alipayOpenSearchBoxModifyModel, final ApiCallback<AlipayOpenSearchBoxModifyResponseModel> _callback, CustomizedParams customizedParams) throws ApiException {
  
          okhttp3.Call localVarCall = modifyValidateBeforeCall(alipayOpenSearchBoxModifyModel, _callback, customizedParams);
          Type localVarReturnType = new TypeToken<AlipayOpenSearchBoxModifyResponseModel>(){}.getType();
          localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
          return localVarCall;
      }
      /**
       * Build call for offline
       * @param alipayOpenSearchBoxOfflineModel  (optional)
       * @param _callback Callback for upload/download progress
       * @param customizedParams
       * @return Call to execute
       * @throws ApiException If fail to serialize the request body object
       * @http.response.details
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       */
      public okhttp3.Call offlineCall(AlipayOpenSearchBoxOfflineModel alipayOpenSearchBoxOfflineModel, final ApiCallback _callback, CustomizedParams customizedParams) throws ApiException {
          String basePath = null;
          // Operation Servers
          String[] localBasePaths = new String[] {  };
  
          // Determine Base Path to Use
          if (localCustomBaseUrl != null){
              basePath = localCustomBaseUrl;
          } else if ( localBasePaths.length > 0 ) {
              basePath = localBasePaths[localHostIndex];
          } else {
              basePath = null;
          }
  
          Object localVarPostBody = (customizedParams != null && !Strings.isNullOrEmpty(customizedParams.getBodyContent()))
                  ? customizedParams.getBodyContent() : alipayOpenSearchBoxOfflineModel;
  
          // create path and map variables
          String localVarPath = "/v3/alipay/open/search/box/offline";
  
          List<Pair> localVarQueryParams = new ArrayList<Pair>();
          List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
          Map<String, String> localVarHeaderParams = new HashMap<String, String>();
          Map<String, String> localVarCookieParams = new HashMap<String, String>();
          Map<String, Object> localVarFormParams = new HashMap<String, Object>();
  
          final String[] localVarAccepts = {
              "application/json"
          };
          final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
          if (localVarAccept != null) {
              localVarHeaderParams.put("Accept", localVarAccept);
          }
  
          final String[] localVarContentTypes = {
              "application/json"
          };
          final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
          if (localVarContentType != null) {
              localVarHeaderParams.put("Content-Type", localVarContentType);
          }
  
          if (customizedParams != null) {
              //额外query参数
              if (customizedParams.getQueryParams() != null && customizedParams.getQueryParams().size() > 0) {
                  for (Map.Entry<String, String> entry : customizedParams.getQueryParams().entrySet()) {
                      localVarQueryParams.addAll(localVarApiClient.parameterToPair(entry.getKey(), entry.getValue()));
                  }
              }
  
              if (!Strings.isNullOrEmpty(customizedParams.getAppAuthToken())) {
                  localVarHeaderParams.put("alipay-app-auth-token", customizedParams.getAppAuthToken());
              }
  
              //额外非全局header参数
              if (customizedParams.getHeaderParams() != null && customizedParams.getHeaderParams().size() > 0) {
                  localVarHeaderParams.putAll(customizedParams.getHeaderParams());
              }
          }
  
          String[] localVarAuthNames = new String[] {  };
          return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
      }
  
      @SuppressWarnings("rawtypes")
      private okhttp3.Call offlineValidateBeforeCall(AlipayOpenSearchBoxOfflineModel alipayOpenSearchBoxOfflineModel, final ApiCallback _callback, CustomizedParams customizedParams) throws ApiException {
          
  
          okhttp3.Call localVarCall = offlineCall(alipayOpenSearchBoxOfflineModel, _callback, customizedParams);
          return localVarCall;
  
      }
  
      /**
       * 下架搜索直达
       * 若不需要运营搜索直达时，可调用次接口下架搜索直达
       * @param alipayOpenSearchBoxOfflineModel  (optional)
       * @return Object
       * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
       * @http.response.details
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       */
      public Object offline(AlipayOpenSearchBoxOfflineModel alipayOpenSearchBoxOfflineModel) throws ApiException {
          ApiResponse<Object> localVarResp = offlineWithHttpInfo(alipayOpenSearchBoxOfflineModel, null);
          return localVarResp.getData();
      }
  
      public Object offline(AlipayOpenSearchBoxOfflineModel alipayOpenSearchBoxOfflineModel, CustomizedParams customizedParams) throws ApiException {
          ApiResponse<Object> localVarResp = offlineWithHttpInfo(alipayOpenSearchBoxOfflineModel, customizedParams);
          return localVarResp.getData();
      }
  
      /**
       * 下架搜索直达
       * 若不需要运营搜索直达时，可调用次接口下架搜索直达
       * @param alipayOpenSearchBoxOfflineModel  (optional)
       * @return ApiResponse&lt;Object&gt;
       * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
       * @http.response.details
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       */
      public ApiResponse<Object> offlineWithHttpInfo(AlipayOpenSearchBoxOfflineModel alipayOpenSearchBoxOfflineModel, CustomizedParams customizedParams) throws ApiException {
          okhttp3.Call localVarCall = offlineValidateBeforeCall(alipayOpenSearchBoxOfflineModel, null, customizedParams);
          try {
              Type localVarReturnType = new TypeToken<Object>(){}.getType();
              return localVarApiClient.execute(localVarCall, localVarReturnType);
          } catch (ApiException e) {
              try {
                  e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken<AlipayOpenSearchBoxOfflineDefaultResponse>(){}.getType()));
              } catch (Exception ex) {
                  AlipayLogger.logBizWarn(ex);
              }
              throw e;
          }
      }
  
      /**
       * 下架搜索直达 (asynchronously)
       * 若不需要运营搜索直达时，可调用次接口下架搜索直达
       * @param alipayOpenSearchBoxOfflineModel  (optional)
       * @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
       * @http.response.details
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       * @deprecated
       */
      @Deprecated
      public okhttp3.Call offlineAsync(AlipayOpenSearchBoxOfflineModel alipayOpenSearchBoxOfflineModel, final ApiCallback<Object> _callback) throws ApiException {
  
          okhttp3.Call localVarCall = offlineValidateBeforeCall(alipayOpenSearchBoxOfflineModel, _callback, null);
          Type localVarReturnType = new TypeToken<Object>(){}.getType();
          localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
          return localVarCall;
      }
  
      @Deprecated
      public okhttp3.Call offlineAsync(AlipayOpenSearchBoxOfflineModel alipayOpenSearchBoxOfflineModel, final ApiCallback<Object> _callback, CustomizedParams customizedParams) throws ApiException {
  
          okhttp3.Call localVarCall = offlineValidateBeforeCall(alipayOpenSearchBoxOfflineModel, _callback, customizedParams);
          Type localVarReturnType = new TypeToken<Object>(){}.getType();
          localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
          return localVarCall;
      }
      /**
       * Build call for online
       * @param alipayOpenSearchBoxOnlineModel  (optional)
       * @param _callback Callback for upload/download progress
       * @param customizedParams
       * @return Call to execute
       * @throws ApiException If fail to serialize the request body object
       * @http.response.details
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       */
      public okhttp3.Call onlineCall(AlipayOpenSearchBoxOnlineModel alipayOpenSearchBoxOnlineModel, final ApiCallback _callback, CustomizedParams customizedParams) throws ApiException {
          String basePath = null;
          // Operation Servers
          String[] localBasePaths = new String[] {  };
  
          // Determine Base Path to Use
          if (localCustomBaseUrl != null){
              basePath = localCustomBaseUrl;
          } else if ( localBasePaths.length > 0 ) {
              basePath = localBasePaths[localHostIndex];
          } else {
              basePath = null;
          }
  
          Object localVarPostBody = (customizedParams != null && !Strings.isNullOrEmpty(customizedParams.getBodyContent()))
                  ? customizedParams.getBodyContent() : alipayOpenSearchBoxOnlineModel;
  
          // create path and map variables
          String localVarPath = "/v3/alipay/open/search/box/online";
  
          List<Pair> localVarQueryParams = new ArrayList<Pair>();
          List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
          Map<String, String> localVarHeaderParams = new HashMap<String, String>();
          Map<String, String> localVarCookieParams = new HashMap<String, String>();
          Map<String, Object> localVarFormParams = new HashMap<String, Object>();
  
          final String[] localVarAccepts = {
              "application/json"
          };
          final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
          if (localVarAccept != null) {
              localVarHeaderParams.put("Accept", localVarAccept);
          }
  
          final String[] localVarContentTypes = {
              "application/json"
          };
          final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
          if (localVarContentType != null) {
              localVarHeaderParams.put("Content-Type", localVarContentType);
          }
  
          if (customizedParams != null) {
              //额外query参数
              if (customizedParams.getQueryParams() != null && customizedParams.getQueryParams().size() > 0) {
                  for (Map.Entry<String, String> entry : customizedParams.getQueryParams().entrySet()) {
                      localVarQueryParams.addAll(localVarApiClient.parameterToPair(entry.getKey(), entry.getValue()));
                  }
              }
  
              if (!Strings.isNullOrEmpty(customizedParams.getAppAuthToken())) {
                  localVarHeaderParams.put("alipay-app-auth-token", customizedParams.getAppAuthToken());
              }
  
              //额外非全局header参数
              if (customizedParams.getHeaderParams() != null && customizedParams.getHeaderParams().size() > 0) {
                  localVarHeaderParams.putAll(customizedParams.getHeaderParams());
              }
          }
  
          String[] localVarAuthNames = new String[] {  };
          return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
      }
  
      @SuppressWarnings("rawtypes")
      private okhttp3.Call onlineValidateBeforeCall(AlipayOpenSearchBoxOnlineModel alipayOpenSearchBoxOnlineModel, final ApiCallback _callback, CustomizedParams customizedParams) throws ApiException {
          
  
          okhttp3.Call localVarCall = onlineCall(alipayOpenSearchBoxOnlineModel, _callback, customizedParams);
          return localVarCall;
  
      }
  
      /**
       * 上架搜索直达
       * 若搜索直达处于下架状态时，可通过此接口来重新上架直达，上架须满足搜索直达准入门槛，若不满足，则会上架失败并报错
       * @param alipayOpenSearchBoxOnlineModel  (optional)
       * @return Object
       * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
       * @http.response.details
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       */
      public Object online(AlipayOpenSearchBoxOnlineModel alipayOpenSearchBoxOnlineModel) throws ApiException {
          ApiResponse<Object> localVarResp = onlineWithHttpInfo(alipayOpenSearchBoxOnlineModel, null);
          return localVarResp.getData();
      }
  
      public Object online(AlipayOpenSearchBoxOnlineModel alipayOpenSearchBoxOnlineModel, CustomizedParams customizedParams) throws ApiException {
          ApiResponse<Object> localVarResp = onlineWithHttpInfo(alipayOpenSearchBoxOnlineModel, customizedParams);
          return localVarResp.getData();
      }
  
      /**
       * 上架搜索直达
       * 若搜索直达处于下架状态时，可通过此接口来重新上架直达，上架须满足搜索直达准入门槛，若不满足，则会上架失败并报错
       * @param alipayOpenSearchBoxOnlineModel  (optional)
       * @return ApiResponse&lt;Object&gt;
       * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
       * @http.response.details
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       */
      public ApiResponse<Object> onlineWithHttpInfo(AlipayOpenSearchBoxOnlineModel alipayOpenSearchBoxOnlineModel, CustomizedParams customizedParams) throws ApiException {
          okhttp3.Call localVarCall = onlineValidateBeforeCall(alipayOpenSearchBoxOnlineModel, null, customizedParams);
          try {
              Type localVarReturnType = new TypeToken<Object>(){}.getType();
              return localVarApiClient.execute(localVarCall, localVarReturnType);
          } catch (ApiException e) {
              try {
                  e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken<AlipayOpenSearchBoxOnlineDefaultResponse>(){}.getType()));
              } catch (Exception ex) {
                  AlipayLogger.logBizWarn(ex);
              }
              throw e;
          }
      }
  
      /**
       * 上架搜索直达 (asynchronously)
       * 若搜索直达处于下架状态时，可通过此接口来重新上架直达，上架须满足搜索直达准入门槛，若不满足，则会上架失败并报错
       * @param alipayOpenSearchBoxOnlineModel  (optional)
       * @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
       * @http.response.details
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       * @deprecated
       */
      @Deprecated
      public okhttp3.Call onlineAsync(AlipayOpenSearchBoxOnlineModel alipayOpenSearchBoxOnlineModel, final ApiCallback<Object> _callback) throws ApiException {
  
          okhttp3.Call localVarCall = onlineValidateBeforeCall(alipayOpenSearchBoxOnlineModel, _callback, null);
          Type localVarReturnType = new TypeToken<Object>(){}.getType();
          localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
          return localVarCall;
      }
  
      @Deprecated
      public okhttp3.Call onlineAsync(AlipayOpenSearchBoxOnlineModel alipayOpenSearchBoxOnlineModel, final ApiCallback<Object> _callback, CustomizedParams customizedParams) throws ApiException {
  
          okhttp3.Call localVarCall = onlineValidateBeforeCall(alipayOpenSearchBoxOnlineModel, _callback, customizedParams);
          Type localVarReturnType = new TypeToken<Object>(){}.getType();
          localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
          return localVarCall;
      }
      /**
       * Build call for query
       * @param boxId 搜索直达配置id (optional)
       * @param merchantId 商户id，代运营模式下传入。代运营模式，需要服务商已获得商家\&quot;运营支付宝小程序\&quot;授权。 (optional)
       * @param _callback Callback for upload/download progress
       * @param customizedParams
       * @return Call to execute
       * @throws ApiException If fail to serialize the request body object
       * @http.response.details
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       */
      public okhttp3.Call queryCall(String boxId, String merchantId, final ApiCallback _callback, CustomizedParams customizedParams) throws ApiException {
          String basePath = null;
          // Operation Servers
          String[] localBasePaths = new String[] {  };
  
          // Determine Base Path to Use
          if (localCustomBaseUrl != null){
              basePath = localCustomBaseUrl;
          } else if ( localBasePaths.length > 0 ) {
              basePath = localBasePaths[localHostIndex];
          } else {
              basePath = null;
          }
  
          Object localVarPostBody = null;
  
          // create path and map variables
          String localVarPath = "/v3/alipay/open/search/box/query";
  
          List<Pair> localVarQueryParams = new ArrayList<Pair>();
          List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
          Map<String, String> localVarHeaderParams = new HashMap<String, String>();
          Map<String, String> localVarCookieParams = new HashMap<String, String>();
          Map<String, Object> localVarFormParams = new HashMap<String, Object>();
  
          if (boxId != null) {
              localVarQueryParams.addAll(localVarApiClient.parameterToPair("box_id", boxId));
          }
  
          if (merchantId != null) {
              localVarQueryParams.addAll(localVarApiClient.parameterToPair("merchant_id", merchantId));
          }
  
          final String[] localVarAccepts = {
              "application/json"
          };
          final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
          if (localVarAccept != null) {
              localVarHeaderParams.put("Accept", localVarAccept);
          }
  
          final String[] localVarContentTypes = {
              
          };
          final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
          if (localVarContentType != null) {
              localVarHeaderParams.put("Content-Type", localVarContentType);
          }
  
          if (customizedParams != null) {
              //额外query参数
              if (customizedParams.getQueryParams() != null && customizedParams.getQueryParams().size() > 0) {
                  for (Map.Entry<String, String> entry : customizedParams.getQueryParams().entrySet()) {
                      localVarQueryParams.addAll(localVarApiClient.parameterToPair(entry.getKey(), entry.getValue()));
                  }
              }
  
              if (!Strings.isNullOrEmpty(customizedParams.getAppAuthToken())) {
                  localVarHeaderParams.put("alipay-app-auth-token", customizedParams.getAppAuthToken());
              }
  
              //额外非全局header参数
              if (customizedParams.getHeaderParams() != null && customizedParams.getHeaderParams().size() > 0) {
                  localVarHeaderParams.putAll(customizedParams.getHeaderParams());
              }
          }
  
          String[] localVarAuthNames = new String[] {  };
          return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
      }
  
      @SuppressWarnings("rawtypes")
      private okhttp3.Call queryValidateBeforeCall(String boxId, String merchantId, final ApiCallback _callback, CustomizedParams customizedParams) throws ApiException {
          
  
          okhttp3.Call localVarCall = queryCall(boxId, merchantId, _callback, customizedParams);
          return localVarCall;
  
      }
  
      /**
       * 查询搜索直达配置详情
       * 查询商户已开通搜索直达的小程序及直达信息（搜索直达名称和id），各模块说明详见 &lt;a href&#x3D;\&quot;https://opendocs.alipay.com/mini/03fjba\&quot;&gt; 搜索直达 &lt;/a&gt;。
       * @param boxId 搜索直达配置id (optional)
       * @param merchantId 商户id，代运营模式下传入。代运营模式，需要服务商已获得商家\&quot;运营支付宝小程序\&quot;授权。 (optional)
       * @return AlipayOpenSearchBoxQueryResponseModel
       * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
       * @http.response.details
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       */
      public AlipayOpenSearchBoxQueryResponseModel query(String boxId, String merchantId) throws ApiException {
          ApiResponse<AlipayOpenSearchBoxQueryResponseModel> localVarResp = queryWithHttpInfo(boxId, merchantId, null);
          return localVarResp.getData();
      }
  
      public AlipayOpenSearchBoxQueryResponseModel query(String boxId, String merchantId, CustomizedParams customizedParams) throws ApiException {
          ApiResponse<AlipayOpenSearchBoxQueryResponseModel> localVarResp = queryWithHttpInfo(boxId, merchantId, customizedParams);
          return localVarResp.getData();
      }
  
      /**
       * 查询搜索直达配置详情
       * 查询商户已开通搜索直达的小程序及直达信息（搜索直达名称和id），各模块说明详见 &lt;a href&#x3D;\&quot;https://opendocs.alipay.com/mini/03fjba\&quot;&gt; 搜索直达 &lt;/a&gt;。
       * @param boxId 搜索直达配置id (optional)
       * @param merchantId 商户id，代运营模式下传入。代运营模式，需要服务商已获得商家\&quot;运营支付宝小程序\&quot;授权。 (optional)
       * @return ApiResponse&lt;AlipayOpenSearchBoxQueryResponseModel&gt;
       * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
       * @http.response.details
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       */
      public ApiResponse<AlipayOpenSearchBoxQueryResponseModel> queryWithHttpInfo(String boxId, String merchantId, CustomizedParams customizedParams) throws ApiException {
          okhttp3.Call localVarCall = queryValidateBeforeCall(boxId, merchantId, null, customizedParams);
          try {
              Type localVarReturnType = new TypeToken<AlipayOpenSearchBoxQueryResponseModel>(){}.getType();
              return localVarApiClient.execute(localVarCall, localVarReturnType);
          } catch (ApiException e) {
              try {
                  e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken<AlipayOpenSearchBoxQueryDefaultResponse>(){}.getType()));
              } catch (Exception ex) {
                  AlipayLogger.logBizWarn(ex);
              }
              throw e;
          }
      }
  
      /**
       * 查询搜索直达配置详情 (asynchronously)
       * 查询商户已开通搜索直达的小程序及直达信息（搜索直达名称和id），各模块说明详见 &lt;a href&#x3D;\&quot;https://opendocs.alipay.com/mini/03fjba\&quot;&gt; 搜索直达 &lt;/a&gt;。
       * @param boxId 搜索直达配置id (optional)
       * @param merchantId 商户id，代运营模式下传入。代运营模式，需要服务商已获得商家\&quot;运营支付宝小程序\&quot;授权。 (optional)
       * @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
       * @http.response.details
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       * @deprecated
       */
      @Deprecated
      public okhttp3.Call queryAsync(String boxId, String merchantId, final ApiCallback<AlipayOpenSearchBoxQueryResponseModel> _callback) throws ApiException {
  
          okhttp3.Call localVarCall = queryValidateBeforeCall(boxId, merchantId, _callback, null);
          Type localVarReturnType = new TypeToken<AlipayOpenSearchBoxQueryResponseModel>(){}.getType();
          localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
          return localVarCall;
      }
  
      @Deprecated
      public okhttp3.Call queryAsync(String boxId, String merchantId, final ApiCallback<AlipayOpenSearchBoxQueryResponseModel> _callback, CustomizedParams customizedParams) throws ApiException {
  
          okhttp3.Call localVarCall = queryValidateBeforeCall(boxId, merchantId, _callback, customizedParams);
          Type localVarReturnType = new TypeToken<AlipayOpenSearchBoxQueryResponseModel>(){}.getType();
          localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
          return localVarCall;
      }
  }
  