AdvertiserTransferableFundGetV2Api.java 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. /*
  2. * Oceanengine Open Api
  3. * 巨量引擎开放平台 Open Api
  4. *
  5. * The version of the OpenAPI document: 1.1.19
  6. *
  7. *
  8. * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  9. * https://openapi-generator.tech
  10. * Do not edit the class manually.
  11. */
  12. package com.bytedance.ads.api;
  13. import com.bytedance.ads.ApiCallback;
  14. import com.bytedance.ads.ApiClient;
  15. import com.bytedance.ads.ApiException;
  16. import com.bytedance.ads.ApiResponse;
  17. import com.bytedance.ads.Configuration;
  18. import com.bytedance.ads.Pair;
  19. import com.google.gson.reflect.TypeToken;
  20. import com.bytedance.ads.model.AdvertiserTransferableFundGetV2Response;
  21. import java.lang.reflect.Type;
  22. import java.util.ArrayList;
  23. import java.util.HashMap;
  24. import java.util.List;
  25. import java.util.Map;
  26. public class AdvertiserTransferableFundGetV2Api {
  27. private ApiClient localVarApiClient;
  28. private int localHostIndex;
  29. private String localCustomBaseUrl;
  30. public AdvertiserTransferableFundGetV2Api() {
  31. this(Configuration.getDefaultApiClient());
  32. }
  33. public AdvertiserTransferableFundGetV2Api(ApiClient apiClient) {
  34. this.localVarApiClient = apiClient;
  35. }
  36. public ApiClient getApiClient() {
  37. return localVarApiClient;
  38. }
  39. public void setApiClient(ApiClient apiClient) {
  40. this.localVarApiClient = apiClient;
  41. }
  42. public int getHostIndex() {
  43. return localHostIndex;
  44. }
  45. public void setHostIndex(int hostIndex) {
  46. this.localHostIndex = hostIndex;
  47. }
  48. public String getCustomBaseUrl() {
  49. return localCustomBaseUrl;
  50. }
  51. public void setCustomBaseUrl(String customBaseUrl) {
  52. this.localCustomBaseUrl = customBaseUrl;
  53. }
  54. /**
  55. * Build call for openApi2AdvertiserTransferableFundGetGet
  56. * @param advertiserId (optional)
  57. * @param _callback Callback for upload/download progress
  58. * @return Call to execute
  59. * @throws ApiException If fail to serialize the request body object
  60. * @http.response.details
  61. <table summary="Response Details" border="1">
  62. <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
  63. <tr><td> 200 </td><td> OK </td><td> - </td></tr>
  64. </table>
  65. */
  66. public okhttp3.Call openApi2AdvertiserTransferableFundGetGetCall(Long advertiserId, final ApiCallback _callback) throws ApiException {
  67. String basePath = null;
  68. // Operation Servers
  69. String[] localBasePaths = new String[] { };
  70. // Determine Base Path to Use
  71. if (localCustomBaseUrl != null){
  72. basePath = localCustomBaseUrl;
  73. } else if ( localBasePaths.length > 0 ) {
  74. basePath = localBasePaths[localHostIndex];
  75. } else {
  76. basePath = null;
  77. }
  78. Object localVarPostBody = null;
  79. // create path and map variables
  80. String localVarPath = "/open_api/2/advertiser/transferable_fund/get/";
  81. List<Pair> localVarQueryParams = new ArrayList<Pair>();
  82. List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
  83. Map<String, String> localVarHeaderParams = new HashMap<String, String>();
  84. Map<String, String> localVarCookieParams = new HashMap<String, String>();
  85. Map<String, Object> localVarFormParams = new HashMap<String, Object>();
  86. if (advertiserId != null) {
  87. localVarQueryParams.addAll(localVarApiClient.parameterToPair("advertiser_id", advertiserId));
  88. }
  89. final String[] localVarAccepts = {
  90. "application/json"
  91. };
  92. final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
  93. if (localVarAccept != null) {
  94. localVarHeaderParams.put("Accept", localVarAccept);
  95. }
  96. final String[] localVarContentTypes = {
  97. };
  98. final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
  99. if (localVarContentType != null) {
  100. localVarHeaderParams.put("Content-Type", localVarContentType);
  101. }
  102. String[] localVarAuthNames = new String[] { "ApiKeyAuth" };
  103. return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
  104. }
  105. @SuppressWarnings("rawtypes")
  106. private okhttp3.Call openApi2AdvertiserTransferableFundGetGetValidateBeforeCall(Long advertiserId, final ApiCallback _callback) throws ApiException {
  107. return openApi2AdvertiserTransferableFundGetGetCall(advertiserId, _callback);
  108. }
  109. /**
  110. *
  111. *
  112. * @param advertiserId (optional)
  113. * @return AdvertiserTransferableFundGetV2Response
  114. * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
  115. * @http.response.details
  116. <table summary="Response Details" border="1">
  117. <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
  118. <tr><td> 200 </td><td> OK </td><td> - </td></tr>
  119. </table>
  120. */
  121. public AdvertiserTransferableFundGetV2Response openApi2AdvertiserTransferableFundGetGet(Long advertiserId) throws ApiException {
  122. ApiResponse<AdvertiserTransferableFundGetV2Response> localVarResp = openApi2AdvertiserTransferableFundGetGetWithHttpInfo(advertiserId);
  123. return localVarResp.getData();
  124. }
  125. /**
  126. *
  127. *
  128. * @param advertiserId (optional)
  129. * @return ApiResponse&lt;AdvertiserTransferableFundGetV2Response&gt;
  130. * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
  131. * @http.response.details
  132. <table summary="Response Details" border="1">
  133. <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
  134. <tr><td> 200 </td><td> OK </td><td> - </td></tr>
  135. </table>
  136. */
  137. public ApiResponse<AdvertiserTransferableFundGetV2Response> openApi2AdvertiserTransferableFundGetGetWithHttpInfo(Long advertiserId) throws ApiException {
  138. okhttp3.Call localVarCall = openApi2AdvertiserTransferableFundGetGetValidateBeforeCall(advertiserId, null);
  139. Type localVarReturnType = new TypeToken<AdvertiserTransferableFundGetV2Response>(){}.getType();
  140. return localVarApiClient.execute(localVarCall, localVarReturnType);
  141. }
  142. /**
  143. * (asynchronously)
  144. *
  145. * @param advertiserId (optional)
  146. * @param _callback The callback to be executed when the API call finishes
  147. * @return The request call
  148. * @throws ApiException If fail to process the API call, e.g. serializing the request body object
  149. * @http.response.details
  150. <table summary="Response Details" border="1">
  151. <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
  152. <tr><td> 200 </td><td> OK </td><td> - </td></tr>
  153. </table>
  154. */
  155. public okhttp3.Call openApi2AdvertiserTransferableFundGetGetAsync(Long advertiserId, final ApiCallback<AdvertiserTransferableFundGetV2Response> _callback) throws ApiException {
  156. okhttp3.Call localVarCall = openApi2AdvertiserTransferableFundGetGetValidateBeforeCall(advertiserId, _callback);
  157. Type localVarReturnType = new TypeToken<AdvertiserTransferableFundGetV2Response>(){}.getType();
  158. localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
  159. return localVarCall;
  160. }
  161. }