using Google.Protobuf.WellKnownTypes; using MxGateway.Contracts.Proto; namespace MxGateway.Server.Sessions; public sealed record SessionOpenRequest( string? RequestedBackend, string? ClientSessionName, string? ClientCorrelationId, Duration? CommandTimeout) { public static SessionOpenRequest FromContract(OpenSessionRequest request) { ArgumentNullException.ThrowIfNull(request); return new SessionOpenRequest( request.RequestedBackend, request.ClientSessionName, request.ClientCorrelationId, request.CommandTimeout); } }