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 VPNType
    {
        /// <summary>
        /// VPN Server Address
        /// </summary>
        [Required]
        [StringLength(512,MinimumLength =0)]
        public string Server { set; get; }

        /// <summary>
        /// VPN User
        /// </summary>
        [Required]
        [StringLength(20, MinimumLength = 0)]
        public string User { set; get; }

        /// <summary>
        /// VPN group.
        /// </summary>       
        [StringLength(20, MinimumLength = 0)]
        public string Group { set; get; }

        /// <summary>
        /// VPN Password.
        /// </summary>
        [Required]
        [StringLength(20, MinimumLength = 0)]
        public string Password { set; get; }

        /// <summary>
        ///VPN shared secret.
        /// </summary>
        [Required]
        [StringLength(255, MinimumLength = 0)]
        public string Key { set; get; }

        /// <summary>
        /// Type of VPN
        /// </summary>
        [Required]
        [JsonConverter(typeof(StringEnumConverter))]
        public VPNEnumType Type { set; get; }
    }
}
