using AnthropicClient.Utils; namespace AnthropicClient.Models; /// /// Represents a request to create a file. /// public class FileRequest { /// /// The file content as a byte array. /// public byte[] Content { get; } /// /// The filename of the file. /// public string Filename { get; } /// /// The MIME type of the file. /// public string ContentType { get; } /// /// The purpose of the file. /// public string Purpose { get; } /// /// Initializes a new instance of the class. /// /// The file content as a byte array. /// The filename of the file. /// The MIME type of the file. /// The purpose of the file (default: "user_upload"). /// Thrown when content, filename, or contentType is null. /// Thrown when filename or contentType is empty. public FileRequest(byte[] content, string filename, string contentType, string purpose = "user_upload") { ArgumentValidator.ThrowIfNull(content, nameof(content)); ArgumentValidator.ThrowIfNullOrWhitespace(filename, nameof(filename)); ArgumentValidator.ThrowIfNullOrWhitespace(contentType, nameof(contentType)); ArgumentValidator.ThrowIfNullOrWhitespace(purpose, nameof(purpose)); Content = content; Filename = filename; ContentType = contentType; Purpose = purpose; } }