using System.Collections.Generic;
using CareFusion.Mosaic.Interfaces.Converters;

namespace CareFusion.Mosaic.Interfaces.Messages.Task
{
    /// <summary>
    /// Class which implements the TaskCancelInfeedInputRequest Mosaic message.
    /// This request is used to request the cancellation of a running infeed input process.
    /// </summary>
    public class TaskCancelInfeedInputRequest : MosaicMessage
    {
        #region Members

        /// <summary>
        /// Holds the list of infeed tasks to cancel.
        /// </summary>
        private readonly List<Task> _tasks = new List<Task>();

        #endregion

        #region Properties

        /// <summary>
        /// Gets the list of infeed tasks to cancel.
        /// </summary>
        public List<Task> Tasks => _tasks;

        #endregion

        /// <summary>
        /// Initializes a new instance of the <see cref="TaskCancelInfeedInputRequest"/> class.
        /// </summary>
        public TaskCancelInfeedInputRequest()
            : base(MessageType.TaskCancelInfeedInputRequest)
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="TaskCancelInfeedInputRequest"/> class.
        /// </summary>
        /// <param name="converterStream">The converter stream which created the request.</param>
        public TaskCancelInfeedInputRequest(IConverterStream converterStream)
            : base(MessageType.TaskCancelInfeedInputRequest, converterStream)
        {
        }
    }
}
