|
41 | 41 | import com.volcengine.mcdn.model.DescribeCdnOriginDataOfflineResponse; |
42 | 42 | import com.volcengine.mcdn.model.DescribeCdnRegionAndIspRequest; |
43 | 43 | import com.volcengine.mcdn.model.DescribeCdnRegionAndIspResponse; |
| 44 | +import com.volcengine.mcdn.model.DescribeCdnTopIpRequest; |
| 45 | +import com.volcengine.mcdn.model.DescribeCdnTopIpResponse; |
| 46 | +import com.volcengine.mcdn.model.DescribeCdnTopUrlRequest; |
| 47 | +import com.volcengine.mcdn.model.DescribeCdnTopUrlResponse; |
44 | 48 | import com.volcengine.mcdn.model.DescribeContentQuotaRequest; |
45 | 49 | import com.volcengine.mcdn.model.DescribeContentQuotaResponse; |
46 | 50 | import com.volcengine.mcdn.model.DescribeContentTaskByTaskIdRequest; |
@@ -973,6 +977,254 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don |
973 | 977 | apiClient.executeAsync(call, localVarReturnType, callback); |
974 | 978 | return call; |
975 | 979 | } |
| 980 | + /** |
| 981 | + * Build call for describeCdnTopIp |
| 982 | + * @param body (required) |
| 983 | + * @param progressListener Progress listener |
| 984 | + * @param progressRequestListener Progress request listener |
| 985 | + * @return Call to execute |
| 986 | + * @throws ApiException If fail to serialize the request body object |
| 987 | + */ |
| 988 | + public com.squareup.okhttp.Call describeCdnTopIpCall(DescribeCdnTopIpRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { |
| 989 | + Object localVarPostBody = body; |
| 990 | + |
| 991 | + // create path and map variables |
| 992 | + String localVarPath = "/DescribeCdnTopIp/2022-03-01/mcdn/post/application_json/"; |
| 993 | + |
| 994 | + List<Pair> localVarQueryParams = new ArrayList<Pair>(); |
| 995 | + List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); |
| 996 | + |
| 997 | + Map<String, String> localVarHeaderParams = new HashMap<String, String>(); |
| 998 | + |
| 999 | + Map<String, Object> localVarFormParams = new HashMap<String, Object>(); |
| 1000 | + |
| 1001 | + final String[] localVarAccepts = { |
| 1002 | + "application/json" |
| 1003 | + }; |
| 1004 | + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); |
| 1005 | + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); |
| 1006 | + |
| 1007 | + final String[] localVarContentTypes = { |
| 1008 | + "text/plain" |
| 1009 | + }; |
| 1010 | + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); |
| 1011 | + localVarHeaderParams.put("Content-Type", localVarContentType); |
| 1012 | + |
| 1013 | + if(progressListener != null) { |
| 1014 | + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { |
| 1015 | + @Override |
| 1016 | + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { |
| 1017 | + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); |
| 1018 | + return originalResponse.newBuilder() |
| 1019 | + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) |
| 1020 | + .build(); |
| 1021 | + } |
| 1022 | + }); |
| 1023 | + } |
| 1024 | + |
| 1025 | + String[] localVarAuthNames = new String[] { "volcengineSign" }; |
| 1026 | + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); |
| 1027 | + } |
| 1028 | + |
| 1029 | + @SuppressWarnings("rawtypes") |
| 1030 | + private com.squareup.okhttp.Call describeCdnTopIpValidateBeforeCall(DescribeCdnTopIpRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { |
| 1031 | + // verify the required parameter 'body' is set |
| 1032 | + if (body == null) { |
| 1033 | + throw new ApiException("Missing the required parameter 'body' when calling describeCdnTopIp(Async)"); |
| 1034 | + } |
| 1035 | + |
| 1036 | + com.squareup.okhttp.Call call = describeCdnTopIpCall(body, progressListener, progressRequestListener); |
| 1037 | + return call; |
| 1038 | + |
| 1039 | + |
| 1040 | + |
| 1041 | + |
| 1042 | + |
| 1043 | + } |
| 1044 | + |
| 1045 | + /** |
| 1046 | + * |
| 1047 | + * |
| 1048 | + * @param body (required) |
| 1049 | + * @return DescribeCdnTopIpResponse |
| 1050 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 1051 | + */ |
| 1052 | + public DescribeCdnTopIpResponse describeCdnTopIp(DescribeCdnTopIpRequest body) throws ApiException { |
| 1053 | + ApiResponse<DescribeCdnTopIpResponse> resp = describeCdnTopIpWithHttpInfo(body); |
| 1054 | + return resp.getData(); |
| 1055 | + } |
| 1056 | + |
| 1057 | + /** |
| 1058 | + * |
| 1059 | + * |
| 1060 | + * @param body (required) |
| 1061 | + * @return ApiResponse<DescribeCdnTopIpResponse> |
| 1062 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 1063 | + */ |
| 1064 | + public ApiResponse<DescribeCdnTopIpResponse> describeCdnTopIpWithHttpInfo( @NotNull DescribeCdnTopIpRequest body) throws ApiException { |
| 1065 | + com.squareup.okhttp.Call call = describeCdnTopIpValidateBeforeCall(body, null, null); |
| 1066 | + Type localVarReturnType = new TypeToken<DescribeCdnTopIpResponse>(){}.getType(); |
| 1067 | + return apiClient.execute(call, localVarReturnType); |
| 1068 | + } |
| 1069 | + |
| 1070 | + /** |
| 1071 | + * (asynchronously) |
| 1072 | + * |
| 1073 | + * @param body (required) |
| 1074 | + * @param callback The callback to be executed when the API call finishes |
| 1075 | + * @return The request call |
| 1076 | + * @throws ApiException If fail to process the API call, e.g. serializing the request body object |
| 1077 | + */ |
| 1078 | + public com.squareup.okhttp.Call describeCdnTopIpAsync(DescribeCdnTopIpRequest body, final ApiCallback<DescribeCdnTopIpResponse> callback) throws ApiException { |
| 1079 | + |
| 1080 | + ProgressResponseBody.ProgressListener progressListener = null; |
| 1081 | + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; |
| 1082 | + |
| 1083 | + if (callback != null) { |
| 1084 | + progressListener = new ProgressResponseBody.ProgressListener() { |
| 1085 | + @Override |
| 1086 | + public void update(long bytesRead, long contentLength, boolean done) { |
| 1087 | + callback.onDownloadProgress(bytesRead, contentLength, done); |
| 1088 | + } |
| 1089 | + }; |
| 1090 | + |
| 1091 | + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { |
| 1092 | + @Override |
| 1093 | + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { |
| 1094 | + callback.onUploadProgress(bytesWritten, contentLength, done); |
| 1095 | + } |
| 1096 | + }; |
| 1097 | + } |
| 1098 | + |
| 1099 | + com.squareup.okhttp.Call call = describeCdnTopIpValidateBeforeCall(body, progressListener, progressRequestListener); |
| 1100 | + Type localVarReturnType = new TypeToken<DescribeCdnTopIpResponse>(){}.getType(); |
| 1101 | + apiClient.executeAsync(call, localVarReturnType, callback); |
| 1102 | + return call; |
| 1103 | + } |
| 1104 | + /** |
| 1105 | + * Build call for describeCdnTopUrl |
| 1106 | + * @param body (required) |
| 1107 | + * @param progressListener Progress listener |
| 1108 | + * @param progressRequestListener Progress request listener |
| 1109 | + * @return Call to execute |
| 1110 | + * @throws ApiException If fail to serialize the request body object |
| 1111 | + */ |
| 1112 | + public com.squareup.okhttp.Call describeCdnTopUrlCall(DescribeCdnTopUrlRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { |
| 1113 | + Object localVarPostBody = body; |
| 1114 | + |
| 1115 | + // create path and map variables |
| 1116 | + String localVarPath = "/DescribeCdnTopUrl/2022-03-01/mcdn/post/application_json/"; |
| 1117 | + |
| 1118 | + List<Pair> localVarQueryParams = new ArrayList<Pair>(); |
| 1119 | + List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); |
| 1120 | + |
| 1121 | + Map<String, String> localVarHeaderParams = new HashMap<String, String>(); |
| 1122 | + |
| 1123 | + Map<String, Object> localVarFormParams = new HashMap<String, Object>(); |
| 1124 | + |
| 1125 | + final String[] localVarAccepts = { |
| 1126 | + "application/json" |
| 1127 | + }; |
| 1128 | + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); |
| 1129 | + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); |
| 1130 | + |
| 1131 | + final String[] localVarContentTypes = { |
| 1132 | + "text/plain" |
| 1133 | + }; |
| 1134 | + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); |
| 1135 | + localVarHeaderParams.put("Content-Type", localVarContentType); |
| 1136 | + |
| 1137 | + if(progressListener != null) { |
| 1138 | + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { |
| 1139 | + @Override |
| 1140 | + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { |
| 1141 | + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); |
| 1142 | + return originalResponse.newBuilder() |
| 1143 | + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) |
| 1144 | + .build(); |
| 1145 | + } |
| 1146 | + }); |
| 1147 | + } |
| 1148 | + |
| 1149 | + String[] localVarAuthNames = new String[] { "volcengineSign" }; |
| 1150 | + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); |
| 1151 | + } |
| 1152 | + |
| 1153 | + @SuppressWarnings("rawtypes") |
| 1154 | + private com.squareup.okhttp.Call describeCdnTopUrlValidateBeforeCall(DescribeCdnTopUrlRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { |
| 1155 | + // verify the required parameter 'body' is set |
| 1156 | + if (body == null) { |
| 1157 | + throw new ApiException("Missing the required parameter 'body' when calling describeCdnTopUrl(Async)"); |
| 1158 | + } |
| 1159 | + |
| 1160 | + com.squareup.okhttp.Call call = describeCdnTopUrlCall(body, progressListener, progressRequestListener); |
| 1161 | + return call; |
| 1162 | + |
| 1163 | + |
| 1164 | + |
| 1165 | + |
| 1166 | + |
| 1167 | + } |
| 1168 | + |
| 1169 | + /** |
| 1170 | + * |
| 1171 | + * |
| 1172 | + * @param body (required) |
| 1173 | + * @return DescribeCdnTopUrlResponse |
| 1174 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 1175 | + */ |
| 1176 | + public DescribeCdnTopUrlResponse describeCdnTopUrl(DescribeCdnTopUrlRequest body) throws ApiException { |
| 1177 | + ApiResponse<DescribeCdnTopUrlResponse> resp = describeCdnTopUrlWithHttpInfo(body); |
| 1178 | + return resp.getData(); |
| 1179 | + } |
| 1180 | + |
| 1181 | + /** |
| 1182 | + * |
| 1183 | + * |
| 1184 | + * @param body (required) |
| 1185 | + * @return ApiResponse<DescribeCdnTopUrlResponse> |
| 1186 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 1187 | + */ |
| 1188 | + public ApiResponse<DescribeCdnTopUrlResponse> describeCdnTopUrlWithHttpInfo( @NotNull DescribeCdnTopUrlRequest body) throws ApiException { |
| 1189 | + com.squareup.okhttp.Call call = describeCdnTopUrlValidateBeforeCall(body, null, null); |
| 1190 | + Type localVarReturnType = new TypeToken<DescribeCdnTopUrlResponse>(){}.getType(); |
| 1191 | + return apiClient.execute(call, localVarReturnType); |
| 1192 | + } |
| 1193 | + |
| 1194 | + /** |
| 1195 | + * (asynchronously) |
| 1196 | + * |
| 1197 | + * @param body (required) |
| 1198 | + * @param callback The callback to be executed when the API call finishes |
| 1199 | + * @return The request call |
| 1200 | + * @throws ApiException If fail to process the API call, e.g. serializing the request body object |
| 1201 | + */ |
| 1202 | + public com.squareup.okhttp.Call describeCdnTopUrlAsync(DescribeCdnTopUrlRequest body, final ApiCallback<DescribeCdnTopUrlResponse> callback) throws ApiException { |
| 1203 | + |
| 1204 | + ProgressResponseBody.ProgressListener progressListener = null; |
| 1205 | + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; |
| 1206 | + |
| 1207 | + if (callback != null) { |
| 1208 | + progressListener = new ProgressResponseBody.ProgressListener() { |
| 1209 | + @Override |
| 1210 | + public void update(long bytesRead, long contentLength, boolean done) { |
| 1211 | + callback.onDownloadProgress(bytesRead, contentLength, done); |
| 1212 | + } |
| 1213 | + }; |
| 1214 | + |
| 1215 | + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { |
| 1216 | + @Override |
| 1217 | + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { |
| 1218 | + callback.onUploadProgress(bytesWritten, contentLength, done); |
| 1219 | + } |
| 1220 | + }; |
| 1221 | + } |
| 1222 | + |
| 1223 | + com.squareup.okhttp.Call call = describeCdnTopUrlValidateBeforeCall(body, progressListener, progressRequestListener); |
| 1224 | + Type localVarReturnType = new TypeToken<DescribeCdnTopUrlResponse>(){}.getType(); |
| 1225 | + apiClient.executeAsync(call, localVarReturnType, callback); |
| 1226 | + return call; |
| 1227 | + } |
976 | 1228 | /** |
977 | 1229 | * Build call for describeContentQuota |
978 | 1230 | * @param body (required) |
|
0 commit comments