|
71 | 71 | import com.volcengine.acep.model.RestoreDataResponse; |
72 | 72 | import com.volcengine.acep.model.RestorePodRequest; |
73 | 73 | import com.volcengine.acep.model.RestorePodResponse; |
| 74 | +import com.volcengine.acep.model.StartRecordingRequest; |
| 75 | +import com.volcengine.acep.model.StartRecordingResponse; |
74 | 76 | import com.volcengine.acep.model.StartScreenShotRequest; |
75 | 77 | import com.volcengine.acep.model.StartScreenShotResponse; |
| 78 | +import com.volcengine.acep.model.StopRecordingRequest; |
| 79 | +import com.volcengine.acep.model.StopRecordingResponse; |
76 | 80 | import com.volcengine.acep.model.StopScreenShotRequest; |
77 | 81 | import com.volcengine.acep.model.StopScreenShotResponse; |
78 | 82 | import com.volcengine.acep.model.UpdateCustomRouteRequest; |
@@ -2835,6 +2839,130 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don |
2835 | 2839 | apiClient.executeAsync(call, localVarReturnType, callback); |
2836 | 2840 | return call; |
2837 | 2841 | } |
| 2842 | + /** |
| 2843 | + * Build call for startRecording |
| 2844 | + * @param body (required) |
| 2845 | + * @param progressListener Progress listener |
| 2846 | + * @param progressRequestListener Progress request listener |
| 2847 | + * @return Call to execute |
| 2848 | + * @throws ApiException If fail to serialize the request body object |
| 2849 | + */ |
| 2850 | + public com.squareup.okhttp.Call startRecordingCall(StartRecordingRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { |
| 2851 | + Object localVarPostBody = body; |
| 2852 | + |
| 2853 | + // create path and map variables |
| 2854 | + String localVarPath = "/StartRecording/2025-05-01/acep/post/application_json/"; |
| 2855 | + |
| 2856 | + List<Pair> localVarQueryParams = new ArrayList<Pair>(); |
| 2857 | + List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); |
| 2858 | + |
| 2859 | + Map<String, String> localVarHeaderParams = new HashMap<String, String>(); |
| 2860 | + |
| 2861 | + Map<String, Object> localVarFormParams = new HashMap<String, Object>(); |
| 2862 | + |
| 2863 | + final String[] localVarAccepts = { |
| 2864 | + "application/json" |
| 2865 | + }; |
| 2866 | + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); |
| 2867 | + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); |
| 2868 | + |
| 2869 | + final String[] localVarContentTypes = { |
| 2870 | + "text/plain" |
| 2871 | + }; |
| 2872 | + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); |
| 2873 | + localVarHeaderParams.put("Content-Type", localVarContentType); |
| 2874 | + |
| 2875 | + if(progressListener != null) { |
| 2876 | + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { |
| 2877 | + @Override |
| 2878 | + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { |
| 2879 | + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); |
| 2880 | + return originalResponse.newBuilder() |
| 2881 | + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) |
| 2882 | + .build(); |
| 2883 | + } |
| 2884 | + }); |
| 2885 | + } |
| 2886 | + |
| 2887 | + String[] localVarAuthNames = new String[] { "volcengineSign" }; |
| 2888 | + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); |
| 2889 | + } |
| 2890 | + |
| 2891 | + @SuppressWarnings("rawtypes") |
| 2892 | + private com.squareup.okhttp.Call startRecordingValidateBeforeCall(StartRecordingRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { |
| 2893 | + // verify the required parameter 'body' is set |
| 2894 | + if (body == null) { |
| 2895 | + throw new ApiException("Missing the required parameter 'body' when calling startRecording(Async)"); |
| 2896 | + } |
| 2897 | + |
| 2898 | + com.squareup.okhttp.Call call = startRecordingCall(body, progressListener, progressRequestListener); |
| 2899 | + return call; |
| 2900 | + |
| 2901 | + |
| 2902 | + |
| 2903 | + |
| 2904 | + |
| 2905 | + } |
| 2906 | + |
| 2907 | + /** |
| 2908 | + * |
| 2909 | + * |
| 2910 | + * @param body (required) |
| 2911 | + * @return StartRecordingResponse |
| 2912 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 2913 | + */ |
| 2914 | + public StartRecordingResponse startRecording(StartRecordingRequest body) throws ApiException { |
| 2915 | + ApiResponse<StartRecordingResponse> resp = startRecordingWithHttpInfo(body); |
| 2916 | + return resp.getData(); |
| 2917 | + } |
| 2918 | + |
| 2919 | + /** |
| 2920 | + * |
| 2921 | + * |
| 2922 | + * @param body (required) |
| 2923 | + * @return ApiResponse<StartRecordingResponse> |
| 2924 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 2925 | + */ |
| 2926 | + public ApiResponse<StartRecordingResponse> startRecordingWithHttpInfo( @NotNull StartRecordingRequest body) throws ApiException { |
| 2927 | + com.squareup.okhttp.Call call = startRecordingValidateBeforeCall(body, null, null); |
| 2928 | + Type localVarReturnType = new TypeToken<StartRecordingResponse>(){}.getType(); |
| 2929 | + return apiClient.execute(call, localVarReturnType); |
| 2930 | + } |
| 2931 | + |
| 2932 | + /** |
| 2933 | + * (asynchronously) |
| 2934 | + * |
| 2935 | + * @param body (required) |
| 2936 | + * @param callback The callback to be executed when the API call finishes |
| 2937 | + * @return The request call |
| 2938 | + * @throws ApiException If fail to process the API call, e.g. serializing the request body object |
| 2939 | + */ |
| 2940 | + public com.squareup.okhttp.Call startRecordingAsync(StartRecordingRequest body, final ApiCallback<StartRecordingResponse> callback) throws ApiException { |
| 2941 | + |
| 2942 | + ProgressResponseBody.ProgressListener progressListener = null; |
| 2943 | + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; |
| 2944 | + |
| 2945 | + if (callback != null) { |
| 2946 | + progressListener = new ProgressResponseBody.ProgressListener() { |
| 2947 | + @Override |
| 2948 | + public void update(long bytesRead, long contentLength, boolean done) { |
| 2949 | + callback.onDownloadProgress(bytesRead, contentLength, done); |
| 2950 | + } |
| 2951 | + }; |
| 2952 | + |
| 2953 | + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { |
| 2954 | + @Override |
| 2955 | + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { |
| 2956 | + callback.onUploadProgress(bytesWritten, contentLength, done); |
| 2957 | + } |
| 2958 | + }; |
| 2959 | + } |
| 2960 | + |
| 2961 | + com.squareup.okhttp.Call call = startRecordingValidateBeforeCall(body, progressListener, progressRequestListener); |
| 2962 | + Type localVarReturnType = new TypeToken<StartRecordingResponse>(){}.getType(); |
| 2963 | + apiClient.executeAsync(call, localVarReturnType, callback); |
| 2964 | + return call; |
| 2965 | + } |
2838 | 2966 | /** |
2839 | 2967 | * Build call for startScreenShot |
2840 | 2968 | * @param body (required) |
@@ -2959,6 +3087,130 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don |
2959 | 3087 | apiClient.executeAsync(call, localVarReturnType, callback); |
2960 | 3088 | return call; |
2961 | 3089 | } |
| 3090 | + /** |
| 3091 | + * Build call for stopRecording |
| 3092 | + * @param body (required) |
| 3093 | + * @param progressListener Progress listener |
| 3094 | + * @param progressRequestListener Progress request listener |
| 3095 | + * @return Call to execute |
| 3096 | + * @throws ApiException If fail to serialize the request body object |
| 3097 | + */ |
| 3098 | + public com.squareup.okhttp.Call stopRecordingCall(StopRecordingRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { |
| 3099 | + Object localVarPostBody = body; |
| 3100 | + |
| 3101 | + // create path and map variables |
| 3102 | + String localVarPath = "/StopRecording/2025-05-01/acep/post/application_json/"; |
| 3103 | + |
| 3104 | + List<Pair> localVarQueryParams = new ArrayList<Pair>(); |
| 3105 | + List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); |
| 3106 | + |
| 3107 | + Map<String, String> localVarHeaderParams = new HashMap<String, String>(); |
| 3108 | + |
| 3109 | + Map<String, Object> localVarFormParams = new HashMap<String, Object>(); |
| 3110 | + |
| 3111 | + final String[] localVarAccepts = { |
| 3112 | + "application/json" |
| 3113 | + }; |
| 3114 | + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); |
| 3115 | + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); |
| 3116 | + |
| 3117 | + final String[] localVarContentTypes = { |
| 3118 | + "text/plain" |
| 3119 | + }; |
| 3120 | + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); |
| 3121 | + localVarHeaderParams.put("Content-Type", localVarContentType); |
| 3122 | + |
| 3123 | + if(progressListener != null) { |
| 3124 | + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { |
| 3125 | + @Override |
| 3126 | + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { |
| 3127 | + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); |
| 3128 | + return originalResponse.newBuilder() |
| 3129 | + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) |
| 3130 | + .build(); |
| 3131 | + } |
| 3132 | + }); |
| 3133 | + } |
| 3134 | + |
| 3135 | + String[] localVarAuthNames = new String[] { "volcengineSign" }; |
| 3136 | + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); |
| 3137 | + } |
| 3138 | + |
| 3139 | + @SuppressWarnings("rawtypes") |
| 3140 | + private com.squareup.okhttp.Call stopRecordingValidateBeforeCall(StopRecordingRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { |
| 3141 | + // verify the required parameter 'body' is set |
| 3142 | + if (body == null) { |
| 3143 | + throw new ApiException("Missing the required parameter 'body' when calling stopRecording(Async)"); |
| 3144 | + } |
| 3145 | + |
| 3146 | + com.squareup.okhttp.Call call = stopRecordingCall(body, progressListener, progressRequestListener); |
| 3147 | + return call; |
| 3148 | + |
| 3149 | + |
| 3150 | + |
| 3151 | + |
| 3152 | + |
| 3153 | + } |
| 3154 | + |
| 3155 | + /** |
| 3156 | + * |
| 3157 | + * |
| 3158 | + * @param body (required) |
| 3159 | + * @return StopRecordingResponse |
| 3160 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 3161 | + */ |
| 3162 | + public StopRecordingResponse stopRecording(StopRecordingRequest body) throws ApiException { |
| 3163 | + ApiResponse<StopRecordingResponse> resp = stopRecordingWithHttpInfo(body); |
| 3164 | + return resp.getData(); |
| 3165 | + } |
| 3166 | + |
| 3167 | + /** |
| 3168 | + * |
| 3169 | + * |
| 3170 | + * @param body (required) |
| 3171 | + * @return ApiResponse<StopRecordingResponse> |
| 3172 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 3173 | + */ |
| 3174 | + public ApiResponse<StopRecordingResponse> stopRecordingWithHttpInfo( @NotNull StopRecordingRequest body) throws ApiException { |
| 3175 | + com.squareup.okhttp.Call call = stopRecordingValidateBeforeCall(body, null, null); |
| 3176 | + Type localVarReturnType = new TypeToken<StopRecordingResponse>(){}.getType(); |
| 3177 | + return apiClient.execute(call, localVarReturnType); |
| 3178 | + } |
| 3179 | + |
| 3180 | + /** |
| 3181 | + * (asynchronously) |
| 3182 | + * |
| 3183 | + * @param body (required) |
| 3184 | + * @param callback The callback to be executed when the API call finishes |
| 3185 | + * @return The request call |
| 3186 | + * @throws ApiException If fail to process the API call, e.g. serializing the request body object |
| 3187 | + */ |
| 3188 | + public com.squareup.okhttp.Call stopRecordingAsync(StopRecordingRequest body, final ApiCallback<StopRecordingResponse> callback) throws ApiException { |
| 3189 | + |
| 3190 | + ProgressResponseBody.ProgressListener progressListener = null; |
| 3191 | + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; |
| 3192 | + |
| 3193 | + if (callback != null) { |
| 3194 | + progressListener = new ProgressResponseBody.ProgressListener() { |
| 3195 | + @Override |
| 3196 | + public void update(long bytesRead, long contentLength, boolean done) { |
| 3197 | + callback.onDownloadProgress(bytesRead, contentLength, done); |
| 3198 | + } |
| 3199 | + }; |
| 3200 | + |
| 3201 | + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { |
| 3202 | + @Override |
| 3203 | + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { |
| 3204 | + callback.onUploadProgress(bytesWritten, contentLength, done); |
| 3205 | + } |
| 3206 | + }; |
| 3207 | + } |
| 3208 | + |
| 3209 | + com.squareup.okhttp.Call call = stopRecordingValidateBeforeCall(body, progressListener, progressRequestListener); |
| 3210 | + Type localVarReturnType = new TypeToken<StopRecordingResponse>(){}.getType(); |
| 3211 | + apiClient.executeAsync(call, localVarReturnType, callback); |
| 3212 | + return call; |
| 3213 | + } |
2962 | 3214 | /** |
2963 | 3215 | * Build call for stopScreenShot |
2964 | 3216 | * @param body (required) |
|
0 commit comments