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.DataTypes
{
    public class SetVariableResultType
    {
        /// <summary>
        /// Type of attribute: Actual, Target, MinSet,
        /// MaxSet.Default is Actual when omitted.
        /// </summary>
        [JsonConverter(typeof(StringEnumConverter))]
        public AttributeEnumType? AttributeType { set; get; }

        /// <summary>
        /// Result status of setting the variable.
        /// </summary>
        [Required]
        [JsonConverter(typeof(StringEnumConverter))]
        public SetVariableStatusEnumType AttributeStatus { set; get; }

        /// <summary>
        /// Component for which monitor is set.
        ///variable VariableType
        /// </summary>
        [Required]
        public ComponentType Component { set; get; }

        /// <summary>
        /// Variable for which monitor is set.
        /// </summary>
        [Required]
        public VariableType Variable { set; get; }
    }
}
