using EVCB_OCPP.Packet20.DataTypes.EnumTypes;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.ComponentModel.DataAnnotations;

namespace EVCB_OCPP.Packet20.DataTypes
{
    public class APNType
    {
        /// <summary>
        /// Required. The Access Point Name as an URL.
        /// </summary>
        [JsonRequired]
        [StringLength(512, MinimumLength = 0)]
        public string Apn { set; get; }

        /// <summary>
        /// Optional. APN username
        /// </summary>      
        [StringLength(20, MinimumLength = 0)]
        public string ApnUserName { set; get; }

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

        /// <summary>
        /// Optional. SIM card pin code.
        /// </summary>  
        public int? SimPin { set; get; }

        /// <summary>
        /// Optional. Preferred network, written as MCC and MNC
        /// concatenated.See note.
        /// </summary>      
        [StringLength(6, MinimumLength = 0)]
        public string PreferredNetwork { set; get; }

        /// <summary>
        /// Optional. Default: false. Use only the preferred Network,
        ///do not dial in when not available.See Note.
        /// </summary>   
        public bool? UseOnlyPreferredNetwork { set; get; }


        [JsonConverter(typeof(StringEnumConverter))]
        public APNAuthenticationEnumType? apnAuthentication { set; get; }




    }
}
