// ***********************************************************************
// 
//     Heath
// 
// ***********************************************************************
using Lib.Common.LoggingAPI.Service.Constants;
using System.ComponentModel;
using System.Text.Json.Serialization;
namespace Lib.Common.LoggingAPI.Service.DataTransferObjects.Error
{
    /// 
    /// The service HTTP error data transfer object.
    /// 
    public class HttpErrorDto
    {
        /// 
        /// Gets or sets the error.
        /// 
        [DisplayName(DisplayNames.Error)]
        [JsonPropertyName(DisplayNames.Error)]
        public ErrorDetailsDto Error { get; set; }
        /// 
        /// Creates a new instance of 
        /// with custom parameters.
        /// 
        /// The HTTP error message.
        /// The HTTP error code.
        /// The HTTP error target.
        public HttpErrorDto(
            string? message,
            string? errorCode,
            string? target)
        {
            this.Error = new ErrorDetailsDto
            {
                ErrorCode = errorCode,
                Message = message,
                Target = target,
            };
        }
    }
}