using System.Runtime.Serialization; namespace UptimeSharp.Models { /// /// Base for Responses /// [DataContract] internal class ResponseBase { /// /// Gets or sets the error code. /// /// /// The error code. /// [DataMember(Name = "id")] public string ErrorCode { get; set; } /// /// Gets or sets the error message. /// /// /// The error message. /// [DataMember(Name = "message")] public string ErrorMessage { get; set; } /// /// Gets or sets a value indicating whether this is status. /// /// /// "ok" or "fail" /// [DataMember(Name = "stat")] public string RawStatus { get; set; } /// /// Gets or sets a value indicating whether this is status. /// /// /// true if status is OK; otherwise, false. /// [IgnoreDataMember] public bool Status { get { return RawStatus == "ok"; } } } }