#if !BESTHTTP_DISABLE_SERVERSENT_EVENTS
using System;
namespace BestHTTP.ServerSentEvents
{
[PlatformSupport.IL2CPP.Preserve]
public sealed class Message
{
///
/// Event Id of the message. If it's null, then it's not present.
///
[PlatformSupport.IL2CPP.Preserve]
public string Id { get; internal set; }
///
/// Name of the event, or an empty string.
///
[PlatformSupport.IL2CPP.Preserve]
public string Event { get; internal set; }
///
/// The actual payload of the message.
///
[PlatformSupport.IL2CPP.Preserve]
public string Data { get; internal set; }
///
/// A reconnection time, in milliseconds. This must initially be a user-agent-defined value, probably in the region of a few seconds.
///
[PlatformSupport.IL2CPP.Preserve]
public TimeSpan Retry { get; internal set; }
///
/// If this is true, the Data property holds the comment sent by the server.
///
[PlatformSupport.IL2CPP.Preserve]
internal bool IsComment { get; set; }
public override string ToString()
{
return string.Format("\"{0}\": \"{1}\"", Event, Data);
}
}
}
#endif