using System.Text.Json.Serialization;

namespace NATS.Server.LeafNodes;

/// <summary>
/// CONNECT payload sent on solicited leaf connections.
/// Go reference: leafnode.go leafConnectInfo.
/// </summary>
public sealed class LeafConnectInfo
{
    [JsonPropertyName("jwt")]
    public string? Jwt { get; init; }

    [JsonPropertyName("nkey")]
    public string? Nkey { get; init; }

    [JsonPropertyName("sig")]
    public string? Sig { get; init; }

    [JsonPropertyName("hub")]
    public bool Hub { get; init; }

    [JsonPropertyName("cluster")]
    public string? Cluster { get; init; }

    [JsonPropertyName("headers")]
    public bool Headers { get; init; }

    [JsonPropertyName("jetstream")]
    public bool JetStream { get; init; }

    [JsonPropertyName("compression")]
    public string? Compression { get; init; }

    [JsonPropertyName("remote_account")]
    public string? RemoteAccount { get; init; }

    [JsonPropertyName("proto")]
    public int Proto { get; init; }
}
