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 MessageContentType
    {
        /// <summary>
        /// Format of the message.
        /// </summary>
        [Required]
        [JsonConverter(typeof(StringEnumConverter))]
        public MessageFormatEnumType Format { set; get; }

        /// <summary>
        /// Message language identifier. Contains a
        ///language code as defined in [RFC5646].
        /// </summary>
        [StringLength(8,MinimumLength =0)]
        public string Language { set; get; }

        /// <summary>
        ///Message contents.A
        /// </summary>
        [Required]
        [StringLength(8, MinimumLength = 0)]
        public string Content { set; get; }
    }
}
