using EVCB_OCPP.Packet.Features;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EVCB_OCPP.Packet.Messages.Core
{
    public class DataTransferRequest : IRequest
    {
        public DataTransferRequest()
        {
            Action = Actions.DataTransfer.ToString();
        }

        [JsonIgnore]
        public string Action { set; get; }

        [MaxLength(255)]
        public string vendorId { set; get; }

        [MaxLength(50)]
        public string messageId { set; get; }

        public string data { set; get; }

        public bool TransactionRelated()
        {
            return false;
        }

        public bool Validate()
        {
            return Validator.TryValidateObject(this, new ValidationContext(this), null, true);
        }
    }
}
