using Newtonsoft.Json.Converters;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;

namespace CommonUsage.Protocols.VDA5050.Objects
{
    public class actionState
    {
        public actionState(action action,ActionStateEnum state)
        {
            actionId = action.actionId;
            actionDescription = action.actionDescription;
            actionType = action.actionType;
            actionStatus = state;
        }

        public actionState()
        {
        }

        public string actionId { get; set; }

        public string actionType { get; set; }
        public string actionDescription { get; set; }

        [JsonConverter(typeof(StringEnumConverter))]
        public ActionStateEnum actionStatus { get; set; }

        public string resultDescription { get; set; }

        public enum ActionStateEnum
        {
            WAITING,
            INITIALIZING,
            RUNNING,
            PAUSED,
            FINISHED,
            FAILED
        }

    }

}