using EVCB_OCPP.Packet20.DataTypes;
using EVCB_OCPP.Packet20.DataTypes.EnumTypes;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EVCB_OCPP.Packet20.Messages
{
    public class GetLogRequest
    {
        /// <summary>
        /// This contains the type of log file that the
        /// Charging Station should send.
        /// </summary>
        [Required]
        [JsonConverter(typeof(StringEnumConverter))]
        public LogEnumType LogType { set; get; }

        /// <summary>
        /// The Id of this request
        /// </summary>
        [Required]
        public int RequestId { set; get; }

        /// <summary>
        /// This specifies how many times the Charging
        /// Station must try to upload the log before giving up.If this
        /// field is not present, it is left to Charging Station to decide
        /// how many times it wants to retry
        /// </summary>
        public int? Retries { set; get; }

        /// <summary>
        /// The interval in seconds after which a retry may
        ///  be attempted.If this field is not present, it is left to
        ///  Charging Station to decide how long to wait between
        /// attempts.
        /// </summary>
        public int? RetryInterval { set; get; }

        /// <summary>
        /// This field specifies the requested log and the
        /// location to which the log should be sent
        /// </summary>
        [Required]
        public LogParametersType Log { set; get; }
    }
}