@@ -403,8 +403,7 @@ Response<BinaryData> listFilesSync(@HostParam("endpoint") String endpoint, @Head
403403 @ UnexpectedResponseExceptionType (HttpResponseException .class )
404404 Mono <Response <BinaryData >> uploadFile (@ HostParam ("endpoint" ) String endpoint ,
405405 @ HeaderParam ("content-type" ) String contentType , @ HeaderParam ("Accept" ) String accept ,
406- @ BodyParam ("multipart/form-data" ) BinaryData uploadFileRequest , RequestOptions requestOptions ,
407- Context context );
406+ @ BodyParam ("multipart/form-data" ) BinaryData file , RequestOptions requestOptions , Context context );
408407
409408 // @Multipart not supported by RestProxy
410409 @ Post ("/files" )
@@ -415,8 +414,7 @@ Mono<Response<BinaryData>> uploadFile(@HostParam("endpoint") String endpoint,
415414 @ UnexpectedResponseExceptionType (HttpResponseException .class )
416415 Response <BinaryData > uploadFileSync (@ HostParam ("endpoint" ) String endpoint ,
417416 @ HeaderParam ("content-type" ) String contentType , @ HeaderParam ("Accept" ) String accept ,
418- @ BodyParam ("multipart/form-data" ) BinaryData uploadFileRequest , RequestOptions requestOptions ,
419- Context context );
417+ @ BodyParam ("multipart/form-data" ) BinaryData file , RequestOptions requestOptions , Context context );
420418
421419 @ Delete ("/files/{fileId}" )
422420 @ ExpectedResponses ({ 200 })
@@ -2473,7 +2471,7 @@ public Response<BinaryData> listFilesWithResponse(RequestOptions requestOptions)
24732471 * }
24742472 * </pre>
24752473 *
2476- * @param uploadFileRequest The uploadFileRequest parameter .
2474+ * @param file The file and its purpose to upload .
24772475 * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
24782476 * @throws HttpResponseException thrown if the request is rejected by server.
24792477 * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
@@ -2483,12 +2481,11 @@ public Response<BinaryData> listFilesWithResponse(RequestOptions requestOptions)
24832481 * completion of {@link Mono}.
24842482 */
24852483 @ ServiceMethod (returns = ReturnType .SINGLE )
2486- public Mono <Response <BinaryData >> uploadFileWithResponseAsync (BinaryData uploadFileRequest ,
2487- RequestOptions requestOptions ) {
2484+ public Mono <Response <BinaryData >> uploadFileWithResponseAsync (BinaryData file , RequestOptions requestOptions ) {
24882485 final String contentType = "multipart/form-data" ;
24892486 final String accept = "application/json" ;
2490- return FluxUtil .withContext (context -> service . uploadFile ( this . getEndpoint (), contentType , accept ,
2491- uploadFileRequest , requestOptions , context ));
2487+ return FluxUtil .withContext (
2488+ context -> service . uploadFile ( this . getEndpoint (), contentType , accept , file , requestOptions , context ));
24922489 }
24932490
24942491 /**
@@ -2510,7 +2507,7 @@ public Mono<Response<BinaryData>> uploadFileWithResponseAsync(BinaryData uploadF
25102507 * }
25112508 * </pre>
25122509 *
2513- * @param uploadFileRequest The uploadFileRequest parameter .
2510+ * @param file The file and its purpose to upload .
25142511 * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
25152512 * @throws HttpResponseException thrown if the request is rejected by server.
25162513 * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
@@ -2519,11 +2516,10 @@ public Mono<Response<BinaryData>> uploadFileWithResponseAsync(BinaryData uploadF
25192516 * @return represents an assistant that can call the model and use tools along with {@link Response}.
25202517 */
25212518 @ ServiceMethod (returns = ReturnType .SINGLE )
2522- public Response <BinaryData > uploadFileWithResponse (BinaryData uploadFileRequest , RequestOptions requestOptions ) {
2519+ public Response <BinaryData > uploadFileWithResponse (BinaryData file , RequestOptions requestOptions ) {
25232520 final String contentType = "multipart/form-data" ;
25242521 final String accept = "application/json" ;
2525- return service .uploadFileSync (this .getEndpoint (), contentType , accept , uploadFileRequest , requestOptions ,
2526- Context .NONE );
2522+ return service .uploadFileSync (this .getEndpoint (), contentType , accept , file , requestOptions , Context .NONE );
25272523 }
25282524
25292525 /**
0 commit comments