using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
namespace Umbraco.Web.HealthCheck
{
///
/// The status returned for a health check when it performs it check
/// TODO: This model will be used in the WebApi result so needs attributes for JSON usage
///
[DataContract(Name = "healthCheckStatus", Namespace = "")]
public class HealthCheckStatus
{
public HealthCheckStatus(string message)
{
Message = message;
Actions = Enumerable.Empty();
}
///
/// The status message
///
[DataMember(Name = "message")]
public string Message { get; private set; }
///
/// The status description if one is necessary
///
[DataMember(Name = "description")]
public string Description { get; set; }
///
/// This is optional but would allow a developer to specify a path to an angular HTML view
/// in order to either show more advanced information and/or to provide input for the admin
/// to configure how an action is executed
///
[DataMember(Name = "view")]
public string View { get; set; }
///
/// The status type
///
[DataMember(Name = "resultType")]
public StatusResultType ResultType { get; set; }
///
/// The potential actions to take (in any)
///
[DataMember(Name = "actions")]
public IEnumerable Actions { get; set; }
// TODO: What else?
}
}