using System.Collections.Generic;
using System.Net.Http;

namespace StellaOps.Feedser.Source.Common.Fetch;

/// <summary>
/// Parameters describing a fetch operation for a source connector.
/// </summary>
public sealed record SourceFetchRequest(
    string ClientName,
    string SourceName,
    HttpMethod Method,
    Uri RequestUri,
    IReadOnlyDictionary<string, string>? Metadata = null,
    string? ETag = null,
    DateTimeOffset? LastModified = null,
    TimeSpan? TimeoutOverride = null,
    IReadOnlyList<string>? AcceptHeaders = null)
{
    public SourceFetchRequest(string clientName, string sourceName, Uri requestUri)
        : this(clientName, sourceName, HttpMethod.Get, requestUri)
    {
    }
}
