|
31 | 31 | import com.volcengine.aiotvideo.model.CancelBindTemplateResponse; |
32 | 32 | import com.volcengine.aiotvideo.model.CancelStreamTemplateRequest; |
33 | 33 | import com.volcengine.aiotvideo.model.CancelStreamTemplateResponse; |
| 34 | +import com.volcengine.aiotvideo.model.CancelStreamTemplateV2Request; |
| 35 | +import com.volcengine.aiotvideo.model.CancelStreamTemplateV2Response; |
34 | 36 | import com.volcengine.aiotvideo.model.CreateDeviceRequest; |
35 | 37 | import com.volcengine.aiotvideo.model.CreateDeviceResponse; |
36 | 38 | import com.volcengine.aiotvideo.model.CreateScreenshotTemplateRequest; |
|
87 | 89 | import com.volcengine.aiotvideo.model.SetSpaceTemplateResponse; |
88 | 90 | import com.volcengine.aiotvideo.model.SetStreamTemplateRequest; |
89 | 91 | import com.volcengine.aiotvideo.model.SetStreamTemplateResponse; |
| 92 | +import com.volcengine.aiotvideo.model.SetStreamTemplateV2Request; |
| 93 | +import com.volcengine.aiotvideo.model.SetStreamTemplateV2Response; |
90 | 94 | import com.volcengine.aiotvideo.model.StartSpaceRequest; |
91 | 95 | import com.volcengine.aiotvideo.model.StartSpaceResponse; |
92 | 96 | import com.volcengine.aiotvideo.model.StartStreamRequest; |
@@ -385,6 +389,130 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don |
385 | 389 | apiClient.executeAsync(call, localVarReturnType, callback); |
386 | 390 | return call; |
387 | 391 | } |
| 392 | + /** |
| 393 | + * Build call for cancelStreamTemplateV2 |
| 394 | + * @param body (required) |
| 395 | + * @param progressListener Progress listener |
| 396 | + * @param progressRequestListener Progress request listener |
| 397 | + * @return Call to execute |
| 398 | + * @throws ApiException If fail to serialize the request body object |
| 399 | + */ |
| 400 | + public com.squareup.okhttp.Call cancelStreamTemplateV2Call(CancelStreamTemplateV2Request body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { |
| 401 | + Object localVarPostBody = body; |
| 402 | + |
| 403 | + // create path and map variables |
| 404 | + String localVarPath = "/CancelStreamTemplateV2/2021-01-01/aiotvideo/post/application_json/"; |
| 405 | + |
| 406 | + List<Pair> localVarQueryParams = new ArrayList<Pair>(); |
| 407 | + List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); |
| 408 | + |
| 409 | + Map<String, String> localVarHeaderParams = new HashMap<String, String>(); |
| 410 | + |
| 411 | + Map<String, Object> localVarFormParams = new HashMap<String, Object>(); |
| 412 | + |
| 413 | + final String[] localVarAccepts = { |
| 414 | + "application/json" |
| 415 | + }; |
| 416 | + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); |
| 417 | + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); |
| 418 | + |
| 419 | + final String[] localVarContentTypes = { |
| 420 | + "text/plain" |
| 421 | + }; |
| 422 | + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); |
| 423 | + localVarHeaderParams.put("Content-Type", localVarContentType); |
| 424 | + |
| 425 | + if(progressListener != null) { |
| 426 | + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { |
| 427 | + @Override |
| 428 | + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { |
| 429 | + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); |
| 430 | + return originalResponse.newBuilder() |
| 431 | + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) |
| 432 | + .build(); |
| 433 | + } |
| 434 | + }); |
| 435 | + } |
| 436 | + |
| 437 | + String[] localVarAuthNames = new String[] { "volcengineSign" }; |
| 438 | + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); |
| 439 | + } |
| 440 | + |
| 441 | + @SuppressWarnings("rawtypes") |
| 442 | + private com.squareup.okhttp.Call cancelStreamTemplateV2ValidateBeforeCall(CancelStreamTemplateV2Request body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { |
| 443 | + // verify the required parameter 'body' is set |
| 444 | + if (body == null) { |
| 445 | + throw new ApiException("Missing the required parameter 'body' when calling cancelStreamTemplateV2(Async)"); |
| 446 | + } |
| 447 | + |
| 448 | + com.squareup.okhttp.Call call = cancelStreamTemplateV2Call(body, progressListener, progressRequestListener); |
| 449 | + return call; |
| 450 | + |
| 451 | + |
| 452 | + |
| 453 | + |
| 454 | + |
| 455 | + } |
| 456 | + |
| 457 | + /** |
| 458 | + * |
| 459 | + * |
| 460 | + * @param body (required) |
| 461 | + * @return CancelStreamTemplateV2Response |
| 462 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 463 | + */ |
| 464 | + public CancelStreamTemplateV2Response cancelStreamTemplateV2(CancelStreamTemplateV2Request body) throws ApiException { |
| 465 | + ApiResponse<CancelStreamTemplateV2Response> resp = cancelStreamTemplateV2WithHttpInfo(body); |
| 466 | + return resp.getData(); |
| 467 | + } |
| 468 | + |
| 469 | + /** |
| 470 | + * |
| 471 | + * |
| 472 | + * @param body (required) |
| 473 | + * @return ApiResponse<CancelStreamTemplateV2Response> |
| 474 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 475 | + */ |
| 476 | + public ApiResponse<CancelStreamTemplateV2Response> cancelStreamTemplateV2WithHttpInfo( @NotNull CancelStreamTemplateV2Request body) throws ApiException { |
| 477 | + com.squareup.okhttp.Call call = cancelStreamTemplateV2ValidateBeforeCall(body, null, null); |
| 478 | + Type localVarReturnType = new TypeToken<CancelStreamTemplateV2Response>(){}.getType(); |
| 479 | + return apiClient.execute(call, localVarReturnType); |
| 480 | + } |
| 481 | + |
| 482 | + /** |
| 483 | + * (asynchronously) |
| 484 | + * |
| 485 | + * @param body (required) |
| 486 | + * @param callback The callback to be executed when the API call finishes |
| 487 | + * @return The request call |
| 488 | + * @throws ApiException If fail to process the API call, e.g. serializing the request body object |
| 489 | + */ |
| 490 | + public com.squareup.okhttp.Call cancelStreamTemplateV2Async(CancelStreamTemplateV2Request body, final ApiCallback<CancelStreamTemplateV2Response> callback) throws ApiException { |
| 491 | + |
| 492 | + ProgressResponseBody.ProgressListener progressListener = null; |
| 493 | + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; |
| 494 | + |
| 495 | + if (callback != null) { |
| 496 | + progressListener = new ProgressResponseBody.ProgressListener() { |
| 497 | + @Override |
| 498 | + public void update(long bytesRead, long contentLength, boolean done) { |
| 499 | + callback.onDownloadProgress(bytesRead, contentLength, done); |
| 500 | + } |
| 501 | + }; |
| 502 | + |
| 503 | + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { |
| 504 | + @Override |
| 505 | + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { |
| 506 | + callback.onUploadProgress(bytesWritten, contentLength, done); |
| 507 | + } |
| 508 | + }; |
| 509 | + } |
| 510 | + |
| 511 | + com.squareup.okhttp.Call call = cancelStreamTemplateV2ValidateBeforeCall(body, progressListener, progressRequestListener); |
| 512 | + Type localVarReturnType = new TypeToken<CancelStreamTemplateV2Response>(){}.getType(); |
| 513 | + apiClient.executeAsync(call, localVarReturnType, callback); |
| 514 | + return call; |
| 515 | + } |
388 | 516 | /** |
389 | 517 | * Build call for createDevice |
390 | 518 | * @param body (required) |
@@ -2009,7 +2137,7 @@ public com.squareup.okhttp.Call getLocalDownloadCall(GetLocalDownloadRequest bod |
2009 | 2137 | Object localVarPostBody = body; |
2010 | 2138 |
|
2011 | 2139 | // create path and map variables |
2012 | | - String localVarPath = "/GetLocalDownload/2021-01-01/aiotvideo/get/text_plain/"; |
| 2140 | + String localVarPath = "/GetLocalDownload/2021-01-01/aiotvideo/post/application_json/"; |
2013 | 2141 |
|
2014 | 2142 | List<Pair> localVarQueryParams = new ArrayList<Pair>(); |
2015 | 2143 | List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); |
@@ -3857,6 +3985,130 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don |
3857 | 3985 | apiClient.executeAsync(call, localVarReturnType, callback); |
3858 | 3986 | return call; |
3859 | 3987 | } |
| 3988 | + /** |
| 3989 | + * Build call for setStreamTemplateV2 |
| 3990 | + * @param body (required) |
| 3991 | + * @param progressListener Progress listener |
| 3992 | + * @param progressRequestListener Progress request listener |
| 3993 | + * @return Call to execute |
| 3994 | + * @throws ApiException If fail to serialize the request body object |
| 3995 | + */ |
| 3996 | + public com.squareup.okhttp.Call setStreamTemplateV2Call(SetStreamTemplateV2Request body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { |
| 3997 | + Object localVarPostBody = body; |
| 3998 | + |
| 3999 | + // create path and map variables |
| 4000 | + String localVarPath = "/SetStreamTemplateV2/2021-01-01/aiotvideo/post/application_json/"; |
| 4001 | + |
| 4002 | + List<Pair> localVarQueryParams = new ArrayList<Pair>(); |
| 4003 | + List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); |
| 4004 | + |
| 4005 | + Map<String, String> localVarHeaderParams = new HashMap<String, String>(); |
| 4006 | + |
| 4007 | + Map<String, Object> localVarFormParams = new HashMap<String, Object>(); |
| 4008 | + |
| 4009 | + final String[] localVarAccepts = { |
| 4010 | + "application/json" |
| 4011 | + }; |
| 4012 | + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); |
| 4013 | + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); |
| 4014 | + |
| 4015 | + final String[] localVarContentTypes = { |
| 4016 | + "text/plain" |
| 4017 | + }; |
| 4018 | + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); |
| 4019 | + localVarHeaderParams.put("Content-Type", localVarContentType); |
| 4020 | + |
| 4021 | + if(progressListener != null) { |
| 4022 | + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { |
| 4023 | + @Override |
| 4024 | + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { |
| 4025 | + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); |
| 4026 | + return originalResponse.newBuilder() |
| 4027 | + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) |
| 4028 | + .build(); |
| 4029 | + } |
| 4030 | + }); |
| 4031 | + } |
| 4032 | + |
| 4033 | + String[] localVarAuthNames = new String[] { "volcengineSign" }; |
| 4034 | + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); |
| 4035 | + } |
| 4036 | + |
| 4037 | + @SuppressWarnings("rawtypes") |
| 4038 | + private com.squareup.okhttp.Call setStreamTemplateV2ValidateBeforeCall(SetStreamTemplateV2Request body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { |
| 4039 | + // verify the required parameter 'body' is set |
| 4040 | + if (body == null) { |
| 4041 | + throw new ApiException("Missing the required parameter 'body' when calling setStreamTemplateV2(Async)"); |
| 4042 | + } |
| 4043 | + |
| 4044 | + com.squareup.okhttp.Call call = setStreamTemplateV2Call(body, progressListener, progressRequestListener); |
| 4045 | + return call; |
| 4046 | + |
| 4047 | + |
| 4048 | + |
| 4049 | + |
| 4050 | + |
| 4051 | + } |
| 4052 | + |
| 4053 | + /** |
| 4054 | + * |
| 4055 | + * |
| 4056 | + * @param body (required) |
| 4057 | + * @return SetStreamTemplateV2Response |
| 4058 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 4059 | + */ |
| 4060 | + public SetStreamTemplateV2Response setStreamTemplateV2(SetStreamTemplateV2Request body) throws ApiException { |
| 4061 | + ApiResponse<SetStreamTemplateV2Response> resp = setStreamTemplateV2WithHttpInfo(body); |
| 4062 | + return resp.getData(); |
| 4063 | + } |
| 4064 | + |
| 4065 | + /** |
| 4066 | + * |
| 4067 | + * |
| 4068 | + * @param body (required) |
| 4069 | + * @return ApiResponse<SetStreamTemplateV2Response> |
| 4070 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 4071 | + */ |
| 4072 | + public ApiResponse<SetStreamTemplateV2Response> setStreamTemplateV2WithHttpInfo( @NotNull SetStreamTemplateV2Request body) throws ApiException { |
| 4073 | + com.squareup.okhttp.Call call = setStreamTemplateV2ValidateBeforeCall(body, null, null); |
| 4074 | + Type localVarReturnType = new TypeToken<SetStreamTemplateV2Response>(){}.getType(); |
| 4075 | + return apiClient.execute(call, localVarReturnType); |
| 4076 | + } |
| 4077 | + |
| 4078 | + /** |
| 4079 | + * (asynchronously) |
| 4080 | + * |
| 4081 | + * @param body (required) |
| 4082 | + * @param callback The callback to be executed when the API call finishes |
| 4083 | + * @return The request call |
| 4084 | + * @throws ApiException If fail to process the API call, e.g. serializing the request body object |
| 4085 | + */ |
| 4086 | + public com.squareup.okhttp.Call setStreamTemplateV2Async(SetStreamTemplateV2Request body, final ApiCallback<SetStreamTemplateV2Response> callback) throws ApiException { |
| 4087 | + |
| 4088 | + ProgressResponseBody.ProgressListener progressListener = null; |
| 4089 | + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; |
| 4090 | + |
| 4091 | + if (callback != null) { |
| 4092 | + progressListener = new ProgressResponseBody.ProgressListener() { |
| 4093 | + @Override |
| 4094 | + public void update(long bytesRead, long contentLength, boolean done) { |
| 4095 | + callback.onDownloadProgress(bytesRead, contentLength, done); |
| 4096 | + } |
| 4097 | + }; |
| 4098 | + |
| 4099 | + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { |
| 4100 | + @Override |
| 4101 | + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { |
| 4102 | + callback.onUploadProgress(bytesWritten, contentLength, done); |
| 4103 | + } |
| 4104 | + }; |
| 4105 | + } |
| 4106 | + |
| 4107 | + com.squareup.okhttp.Call call = setStreamTemplateV2ValidateBeforeCall(body, progressListener, progressRequestListener); |
| 4108 | + Type localVarReturnType = new TypeToken<SetStreamTemplateV2Response>(){}.getType(); |
| 4109 | + apiClient.executeAsync(call, localVarReturnType, callback); |
| 4110 | + return call; |
| 4111 | + } |
3860 | 4112 | /** |
3861 | 4113 | * Build call for startSpace |
3862 | 4114 | * @param body (required) |
|
0 commit comments