@@ -64,6 +64,29 @@ partial void ProcessDeleteFileResponseContent(
6464 /// <exception cref="global::MiniMax.ApiException"></exception>
6565 public async global ::System . Threading . Tasks . Task < global ::MiniMax . FileDeleteResponse > DeleteFileAsync (
6666
67+ global ::MiniMax . FileDeleteRequest request ,
68+ global ::MiniMax . AutoSDKRequestOptions ? requestOptions = default ,
69+ global ::System . Threading . CancellationToken cancellationToken = default )
70+ {
71+ var __response = await DeleteFileAsResponseAsync (
72+
73+ request : request ,
74+ requestOptions : requestOptions ,
75+ cancellationToken : cancellationToken
76+ ) . ConfigureAwait ( false ) ;
77+
78+ return __response . Body ;
79+ }
80+ /// <summary>
81+ /// Delete a file.<br/>
82+ /// Deletes a previously uploaded file.
83+ /// </summary>
84+ /// <param name="request"></param>
85+ /// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
86+ /// <param name="cancellationToken">The token to cancel the operation with</param>
87+ /// <exception cref="global::MiniMax.ApiException"></exception>
88+ public async global ::System . Threading . Tasks . Task < global ::MiniMax . AutoSDKHttpResponse < global ::MiniMax . FileDeleteResponse > > DeleteFileAsResponseAsync (
89+
6790 global ::MiniMax . FileDeleteRequest request ,
6891 global ::MiniMax . AutoSDKRequestOptions ? requestOptions = default ,
6992 global ::System . Threading . CancellationToken cancellationToken = default )
@@ -98,6 +121,7 @@ partial void ProcessDeleteFileResponseContent(
98121
99122 global ::System . Net . Http . HttpRequestMessage __CreateHttpRequest ( )
100123 {
124+
101125 var __pathBuilder = new global ::MiniMax . PathBuilder (
102126 path : "/v1/files/delete" ,
103127 baseUri : ResolveBaseUri (
@@ -179,6 +203,8 @@ partial void ProcessDeleteFileResponseContent(
179203 attempt : __attempt ,
180204 maxAttempts : __maxAttempts ,
181205 willRetry : false ,
206+ retryDelay : null ,
207+ retryReason : global ::System . String . Empty ,
182208 cancellationToken : __effectiveCancellationToken ) ) . ConfigureAwait ( false ) ;
183209 try
184210 {
@@ -189,6 +215,11 @@ partial void ProcessDeleteFileResponseContent(
189215 }
190216 catch ( global ::System . Net . Http . HttpRequestException __exception )
191217 {
218+ var __retryDelay = global ::MiniMax . AutoSDKRequestOptionsSupport . GetRetryDelay (
219+ clientOptions : Options ,
220+ requestOptions : requestOptions ,
221+ response : null ,
222+ attempt : __attempt ) ;
192223 var __willRetry = __attempt < __maxAttempts && ! __effectiveCancellationToken . IsCancellationRequested ;
193224 await global ::MiniMax . AutoSDKRequestOptionsSupport . OnAfterErrorAsync (
194225 clientOptions : Options ,
@@ -206,6 +237,8 @@ partial void ProcessDeleteFileResponseContent(
206237 attempt : __attempt ,
207238 maxAttempts : __maxAttempts ,
208239 willRetry : __willRetry ,
240+ retryDelay : __willRetry ? __retryDelay : ( global ::System . TimeSpan ? ) null ,
241+ retryReason : "exception" ,
209242 cancellationToken : __effectiveCancellationToken ) ) . ConfigureAwait ( false ) ;
210243 if ( ! __willRetry )
211244 {
@@ -215,8 +248,7 @@ partial void ProcessDeleteFileResponseContent(
215248 __httpRequest . Dispose ( ) ;
216249 __httpRequest = null ;
217250 await global ::MiniMax . AutoSDKRequestOptionsSupport . DelayBeforeRetryAsync (
218- clientOptions : Options ,
219- requestOptions : requestOptions ,
251+ retryDelay : __retryDelay ,
220252 cancellationToken : __effectiveCancellationToken ) . ConfigureAwait ( false ) ;
221253 continue ;
222254 }
@@ -225,6 +257,11 @@ partial void ProcessDeleteFileResponseContent(
225257 __attempt < __maxAttempts &&
226258 global ::MiniMax . AutoSDKRequestOptionsSupport . ShouldRetryStatusCode ( __response . StatusCode ) )
227259 {
260+ var __retryDelay = global ::MiniMax . AutoSDKRequestOptionsSupport . GetRetryDelay (
261+ clientOptions : Options ,
262+ requestOptions : requestOptions ,
263+ response : __response ,
264+ attempt : __attempt ) ;
228265 await global ::MiniMax . AutoSDKRequestOptionsSupport . OnAfterErrorAsync (
229266 clientOptions : Options ,
230267 context : global ::MiniMax . AutoSDKRequestOptionsSupport . CreateHookContext (
@@ -241,14 +278,15 @@ partial void ProcessDeleteFileResponseContent(
241278 attempt : __attempt ,
242279 maxAttempts : __maxAttempts ,
243280 willRetry : true ,
281+ retryDelay : __retryDelay ,
282+ retryReason : "status:" + ( ( int ) __response . StatusCode ) . ToString ( global ::System . Globalization . CultureInfo . InvariantCulture ) ,
244283 cancellationToken : __effectiveCancellationToken ) ) . ConfigureAwait ( false ) ;
245284 __response . Dispose ( ) ;
246285 __response = null ;
247286 __httpRequest . Dispose ( ) ;
248287 __httpRequest = null ;
249288 await global ::MiniMax . AutoSDKRequestOptionsSupport . DelayBeforeRetryAsync (
250- clientOptions : Options ,
251- requestOptions : requestOptions ,
289+ retryDelay : __retryDelay ,
252290 cancellationToken : __effectiveCancellationToken ) . ConfigureAwait ( false ) ;
253291 continue ;
254292 }
@@ -288,6 +326,8 @@ partial void ProcessDeleteFileResponseContent(
288326 attempt : __attemptNumber ,
289327 maxAttempts : __maxAttempts ,
290328 willRetry : false ,
329+ retryDelay : null ,
330+ retryReason : global ::System . String . Empty ,
291331 cancellationToken : __effectiveCancellationToken ) ) . ConfigureAwait ( false ) ;
292332 }
293333 else
@@ -308,6 +348,8 @@ partial void ProcessDeleteFileResponseContent(
308348 attempt : __attemptNumber ,
309349 maxAttempts : __maxAttempts ,
310350 willRetry : false ,
351+ retryDelay : null ,
352+ retryReason : global ::System . String . Empty ,
311353 cancellationToken : __effectiveCancellationToken ) ) . ConfigureAwait ( false ) ;
312354 }
313355
@@ -332,9 +374,13 @@ partial void ProcessDeleteFileResponseContent(
332374 {
333375 __response . EnsureSuccessStatusCode ( ) ;
334376
335- return
336- global ::MiniMax . FileDeleteResponse . FromJson ( __content , JsonSerializerContext ) ??
377+ var __value = global ::MiniMax . FileDeleteResponse . FromJson ( __content , JsonSerializerContext ) ??
337378 throw new global ::System . InvalidOperationException ( $ "Response deserialization failed for \" { __content } \" ") ;
379+ return new global ::MiniMax . AutoSDKHttpResponse < global ::MiniMax . FileDeleteResponse > (
380+ statusCode : __response . StatusCode ,
381+ headers : global ::MiniMax . AutoSDKHttpResponse . CreateHeaders ( __response ) ,
382+ requestUri : __response . RequestMessage ? . RequestUri ,
383+ body : __value ) ;
338384 }
339385 catch ( global ::System . Exception __ex )
340386 {
@@ -362,9 +408,13 @@ partial void ProcessDeleteFileResponseContent(
362408 #endif
363409 ) . ConfigureAwait ( false ) ;
364410
365- return
366- await global ::MiniMax . FileDeleteResponse . FromJsonStreamAsync ( __content , JsonSerializerContext ) . ConfigureAwait ( false ) ??
411+ var __value = await global ::MiniMax . FileDeleteResponse . FromJsonStreamAsync ( __content , JsonSerializerContext ) . ConfigureAwait ( false ) ??
367412 throw new global ::System . InvalidOperationException ( "Response deserialization failed." ) ;
413+ return new global ::MiniMax . AutoSDKHttpResponse < global ::MiniMax . FileDeleteResponse > (
414+ statusCode : __response . StatusCode ,
415+ headers : global ::MiniMax . AutoSDKHttpResponse . CreateHeaders ( __response ) ,
416+ requestUri : __response . RequestMessage ? . RequestUri ,
417+ body : __value ) ;
368418 }
369419 catch ( global ::System . Exception __ex )
370420 {
0 commit comments