@@ -640,8 +640,7 @@ Response<BinaryData> listFilesSync(@HostParam("endpoint") String endpoint, @Head
640640 @ UnexpectedResponseExceptionType (HttpResponseException .class )
641641 Mono <Response <BinaryData >> uploadFile (@ HostParam ("endpoint" ) String endpoint ,
642642 @ HeaderParam ("content-type" ) String contentType , @ HeaderParam ("Accept" ) String accept ,
643- @ BodyParam ("multipart/form-data" ) BinaryData uploadFileRequest , RequestOptions requestOptions ,
644- Context context );
643+ @ BodyParam ("multipart/form-data" ) BinaryData file , RequestOptions requestOptions , Context context );
645644
646645 // @Multipart not supported by RestProxy
647646 @ Post ("/files" )
@@ -652,8 +651,7 @@ Mono<Response<BinaryData>> uploadFile(@HostParam("endpoint") String endpoint,
652651 @ UnexpectedResponseExceptionType (HttpResponseException .class )
653652 Response <BinaryData > uploadFileSync (@ HostParam ("endpoint" ) String endpoint ,
654653 @ HeaderParam ("content-type" ) String contentType , @ HeaderParam ("Accept" ) String accept ,
655- @ BodyParam ("multipart/form-data" ) BinaryData uploadFileRequest , RequestOptions requestOptions ,
656- Context context );
654+ @ BodyParam ("multipart/form-data" ) BinaryData file , RequestOptions requestOptions , Context context );
657655
658656 @ Delete ("/files/{fileId}" )
659657 @ ExpectedResponses ({ 200 })
@@ -4560,7 +4558,7 @@ public Response<BinaryData> listFilesWithResponse(RequestOptions requestOptions)
45604558 * }
45614559 * </pre>
45624560 *
4563- * @param uploadFileRequest The uploadFileRequest parameter .
4561+ * @param file The file data to upload and its purpose .
45644562 * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
45654563 * @throws HttpResponseException thrown if the request is rejected by server.
45664564 * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
@@ -4570,12 +4568,11 @@ public Response<BinaryData> listFilesWithResponse(RequestOptions requestOptions)
45704568 * completion of {@link Mono}.
45714569 */
45724570 @ ServiceMethod (returns = ReturnType .SINGLE )
4573- public Mono <Response <BinaryData >> uploadFileWithResponseAsync (BinaryData uploadFileRequest ,
4574- RequestOptions requestOptions ) {
4571+ public Mono <Response <BinaryData >> uploadFileWithResponseAsync (BinaryData file , RequestOptions requestOptions ) {
45754572 final String contentType = "multipart/form-data" ;
45764573 final String accept = "application/json" ;
4577- return FluxUtil .withContext (context -> service . uploadFile ( this . getEndpoint (), contentType , accept ,
4578- uploadFileRequest , requestOptions , context ));
4574+ return FluxUtil .withContext (
4575+ context -> service . uploadFile ( this . getEndpoint (), contentType , accept , file , requestOptions , context ));
45794576 }
45804577
45814578 /**
@@ -4597,7 +4594,7 @@ public Mono<Response<BinaryData>> uploadFileWithResponseAsync(BinaryData uploadF
45974594 * }
45984595 * </pre>
45994596 *
4600- * @param uploadFileRequest The uploadFileRequest parameter .
4597+ * @param file The file data to upload and its purpose .
46014598 * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
46024599 * @throws HttpResponseException thrown if the request is rejected by server.
46034600 * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
@@ -4606,11 +4603,10 @@ public Mono<Response<BinaryData>> uploadFileWithResponseAsync(BinaryData uploadF
46064603 * @return represents an assistant that can call the model and use tools along with {@link Response}.
46074604 */
46084605 @ ServiceMethod (returns = ReturnType .SINGLE )
4609- public Response <BinaryData > uploadFileWithResponse (BinaryData uploadFileRequest , RequestOptions requestOptions ) {
4606+ public Response <BinaryData > uploadFileWithResponse (BinaryData file , RequestOptions requestOptions ) {
46104607 final String contentType = "multipart/form-data" ;
46114608 final String accept = "application/json" ;
4612- return service .uploadFileSync (this .getEndpoint (), contentType , accept , uploadFileRequest , requestOptions ,
4613- Context .NONE );
4609+ return service .uploadFileSync (this .getEndpoint (), contentType , accept , file , requestOptions , Context .NONE );
46144610 }
46154611
46164612 /**
0 commit comments