// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) TypeSpec Code Generator.

package type.file;

import com.azure.core.annotation.Generated;
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceClient;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.exception.ClientAuthenticationException;
import com.azure.core.exception.HttpResponseException;
import com.azure.core.exception.ResourceModifiedException;
import com.azure.core.exception.ResourceNotFoundException;
import com.azure.core.http.rest.RequestOptions;
import com.azure.core.http.rest.Response;
import com.azure.core.util.BinaryData;
import type.file.implementation.BodiesImpl;

/**
 * Initializes a new instance of the synchronous FileClient type.
 */
@ServiceClient(builder = FileClientBuilder.class)
public final class FileClient {
    @Generated
    private final BodiesImpl serviceClient;

    /**
     * Initializes an instance of FileClient class.
     * 
     * @param serviceClient the service client implementation.
     */
    @Generated
    FileClient(BodiesImpl serviceClient) {
        this.serviceClient = serviceClient;
    }

    /**
     * The uploadFileSpecificContentType operation.
     * <p><strong>Request Body Schema</strong></p>
     * 
     * <pre>
     * {@code
     * BinaryData
     * }
     * </pre>
     * 
     * @param contentType Body parameter's content type. Known values are image/png.
     * @param file The file parameter.
     * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
     * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
     * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
     * @return the {@link Response}.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<Void> uploadFileSpecificContentTypeWithResponse(String contentType, BinaryData file,
        RequestOptions requestOptions) {
        return this.serviceClient.uploadFileSpecificContentTypeWithResponse(contentType, file, requestOptions);
    }

    /**
     * The uploadFileJsonContentType operation.
     * <p><strong>Request Body Schema</strong></p>
     * 
     * <pre>
     * {@code
     * BinaryData
     * }
     * </pre>
     * 
     * @param file The file parameter.
     * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
     * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
     * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
     * @return the {@link Response}.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<Void> uploadFileJsonContentTypeWithResponse(BinaryData file, RequestOptions requestOptions) {
        return this.serviceClient.uploadFileJsonContentTypeWithResponse(file, requestOptions);
    }

    /**
     * The downloadFileJsonContentType operation.
     * <p><strong>Response Body Schema</strong></p>
     * 
     * <pre>
     * {@code
     * BinaryData
     * }
     * </pre>
     * 
     * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
     * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
     * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
     * @return the response body along with {@link Response}.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<BinaryData> downloadFileJsonContentTypeWithResponse(RequestOptions requestOptions) {
        return this.serviceClient.downloadFileJsonContentTypeWithResponse(requestOptions);
    }

    /**
     * The downloadFileSpecificContentType operation.
     * <p><strong>Response Body Schema</strong></p>
     * 
     * <pre>
     * {@code
     * BinaryData
     * }
     * </pre>
     * 
     * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
     * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
     * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
     * @return the response body along with {@link Response}.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<BinaryData> downloadFileSpecificContentTypeWithResponse(RequestOptions requestOptions) {
        return this.serviceClient.downloadFileSpecificContentTypeWithResponse(requestOptions);
    }

    /**
     * The uploadFileMultipleContentTypes operation.
     * <p><strong>Request Body Schema</strong></p>
     * 
     * <pre>
     * {@code
     * BinaryData
     * }
     * </pre>
     * 
     * @param contentType Body parameter's content type. Known values are image/png,image/jpeg.
     * @param file The file parameter.
     * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
     * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
     * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
     * @return the {@link Response}.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<Void> uploadFileMultipleContentTypesWithResponse(String contentType, BinaryData file,
        RequestOptions requestOptions) {
        return this.serviceClient.uploadFileMultipleContentTypesWithResponse(contentType, file, requestOptions);
    }

    /**
     * The downloadFileMultipleContentTypes operation.
     * <p><strong>Response Body Schema</strong></p>
     * 
     * <pre>
     * {@code
     * BinaryData
     * }
     * </pre>
     * 
     * @param accept The accept parameter.
     * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
     * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
     * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
     * @return the response body along with {@link Response}.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<BinaryData> downloadFileMultipleContentTypesWithResponse(String accept,
        RequestOptions requestOptions) {
        return this.serviceClient.downloadFileMultipleContentTypesWithResponse(accept, requestOptions);
    }

    /**
     * The uploadFileDefaultContentType operation.
     * <p><strong>Request Body Schema</strong></p>
     * 
     * <pre>
     * {@code
     * BinaryData
     * }
     * </pre>
     * 
     * @param contentType Body parameter's content type. Known values are *&#47;*.
     * @param file The file parameter.
     * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
     * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
     * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
     * @return the {@link Response}.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<Void> uploadFileDefaultContentTypeWithResponse(String contentType, BinaryData file,
        RequestOptions requestOptions) {
        return this.serviceClient.uploadFileDefaultContentTypeWithResponse(contentType, file, requestOptions);
    }

    /**
     * The downloadFileDefaultContentType operation.
     * <p><strong>Response Body Schema</strong></p>
     * 
     * <pre>
     * {@code
     * BinaryData
     * }
     * </pre>
     * 
     * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
     * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
     * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
     * @return the response body along with {@link Response}.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<BinaryData> downloadFileDefaultContentTypeWithResponse(RequestOptions requestOptions) {
        return this.serviceClient.downloadFileDefaultContentTypeWithResponse(requestOptions);
    }

    /**
     * The uploadFileSpecificContentType operation.
     * 
     * @param contentType Body parameter's content type. Known values are image/png.
     * @param file The file parameter.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
     * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
     * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public void uploadFileSpecificContentType(String contentType, BinaryData file) {
        // Generated convenience method for uploadFileSpecificContentTypeWithResponse
        RequestOptions requestOptions = new RequestOptions();
        uploadFileSpecificContentTypeWithResponse(contentType, file, requestOptions).getValue();
    }

    /**
     * The uploadFileJsonContentType operation.
     * 
     * @param file The file parameter.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
     * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
     * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public void uploadFileJsonContentType(BinaryData file) {
        // Generated convenience method for uploadFileJsonContentTypeWithResponse
        RequestOptions requestOptions = new RequestOptions();
        uploadFileJsonContentTypeWithResponse(file, requestOptions).getValue();
    }

    /**
     * The downloadFileJsonContentType operation.
     * 
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
     * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
     * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the response.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public BinaryData downloadFileJsonContentType() {
        // Generated convenience method for downloadFileJsonContentTypeWithResponse
        RequestOptions requestOptions = new RequestOptions();
        return downloadFileJsonContentTypeWithResponse(requestOptions).getValue();
    }

    /**
     * The downloadFileSpecificContentType operation.
     * 
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
     * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
     * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the response.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public BinaryData downloadFileSpecificContentType() {
        // Generated convenience method for downloadFileSpecificContentTypeWithResponse
        RequestOptions requestOptions = new RequestOptions();
        return downloadFileSpecificContentTypeWithResponse(requestOptions).getValue();
    }

    /**
     * The uploadFileMultipleContentTypes operation.
     * 
     * @param contentType Body parameter's content type. Known values are image/png,image/jpeg.
     * @param file The file parameter.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
     * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
     * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public void uploadFileMultipleContentTypes(String contentType, BinaryData file) {
        // Generated convenience method for uploadFileMultipleContentTypesWithResponse
        RequestOptions requestOptions = new RequestOptions();
        uploadFileMultipleContentTypesWithResponse(contentType, file, requestOptions).getValue();
    }

    /**
     * The downloadFileMultipleContentTypes operation.
     * 
     * @param accept The accept parameter.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
     * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
     * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the response.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public BinaryData downloadFileMultipleContentTypes(String accept) {
        // Generated convenience method for downloadFileMultipleContentTypesWithResponse
        RequestOptions requestOptions = new RequestOptions();
        return downloadFileMultipleContentTypesWithResponse(accept, requestOptions).getValue();
    }

    /**
     * The uploadFileDefaultContentType operation.
     * 
     * @param contentType Body parameter's content type. Known values are *&#47;*.
     * @param file The file parameter.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
     * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
     * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public void uploadFileDefaultContentType(String contentType, BinaryData file) {
        // Generated convenience method for uploadFileDefaultContentTypeWithResponse
        RequestOptions requestOptions = new RequestOptions();
        uploadFileDefaultContentTypeWithResponse(contentType, file, requestOptions).getValue();
    }

    /**
     * The downloadFileDefaultContentType operation.
     * 
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
     * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
     * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the response.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public BinaryData downloadFileDefaultContentType() {
        // Generated convenience method for downloadFileDefaultContentTypeWithResponse
        RequestOptions requestOptions = new RequestOptions();
        return downloadFileDefaultContentTypeWithResponse(requestOptions).getValue();
    }
}
