using Amazon.S3;
using Amazon.S3.Model;
using Amazon.S3.Wrapper.Enums;
using System.Collections.Generic;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
namespace Amazon.S3.Wrapper
{
///
/// Provides a simple implementation to upload files to Amazon Simple Storage Service (Amazon S3)
///
public interface IS3Client
{
///
/// Upload an object to S3 bucket
///
/// This key is used to identify the object in S3
/// content to be uploaded
/// PutObjectResponse object
Task UploadObjectAsync(string key, Stream content, CancellationToken cancellationToken = default);
///
/// Upload an object to S3 bucket
///
/// This key is used to identify the object in S3
/// content to be uploaded
/// PutObjectResponse object
Task PutObjectAsync(string key, string content, CancellationToken cancellationToken = default);
///
/// Upload an object to S3 bucket
///
/// This key is used to identify the object in S3
/// content to be uploaded
/// Overrides contentype provided in registry
/// Overrides storageClass provided in registry
/// PutObjectResponse object
Task PutObjectAsync(string key, string content, ContentType? contentType = null, S3StorageClass storageClass = null, CancellationToken cancellationToken = default);
///
/// Get an object from S3 bucket
///
/// This key is used to identify the object in S3
/// GetObjectResponse object
Task GetObjectAsync(string key, CancellationToken cancellationToken = default);
///
/// Delete an object from bucket.
///
/// This key is used to identify the object in S3
/// Propagates notification that operations should be canceled.
/// GetObjectResponse
Task DeleteObjectAsync(string key, CancellationToken cancellationToken = default);
///
/// Delete list of objects from bucket.
///
/// List of object keys to delete.
/// Propagates notification that operations should be canceled.
/// DeleteObjectsResponse
Task DeleteObjectsAsync(IEnumerable keys, CancellationToken cancellationToken = default);
///
/// Check if the file exists or not.
///
/// List of object keys to delete.
/// Propagates notification that operations should be canceled.
/// DeleteObjectsResponse
Task IsFileExistsAsync(string fileName, string versionId);
}
}