using System;

namespace Quadarax.Foundation.Core.Value
{
    public class ValidationResult
    {

        public enum ValidationSeverityEnum
        {
            Info,
            Warning,
            Error,
            Critical
        }

        public string Name { get; private set; }
        public string Code { get; private set; }
        public ValidationSeverityEnum Severity { get; private set; }
        public string Description { get; private set; }


        public ValidationResult(string name, string code, ValidationSeverityEnum severity, string description)
        {
            if (string.IsNullOrEmpty(name))
                throw new ArgumentNullException(nameof(name));

            if (string.IsNullOrEmpty(description))
                throw new ArgumentNullException(nameof(description));

            Name = name;
            Code = code;
            Severity = severity;
            Description = description;
        }
        public ValidationResult(string name, ValidationSeverityEnum severity, string description) : this(name, string.Empty,severity,description)
        {
        }

    }
}
