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

namespace CareFusion.Mosaic.Interfaces.Messages.Task
{
    /// <summary>
    /// Class which implements the TaskCancelResponse Mosaic message.
    /// This response is used as answer for a TaskCancelRequest.
    /// </summary>
    public class TaskCancelInfeedInputResponse : MosaicMessage
    {
        #region Members

        /// <summary>
        /// Holds the list of infeed tasks that have been requested to be cancelled.
        /// </summary>
        private readonly List<Task> _tasks = new List<Task>();

        #endregion

        #region Properties

        /// <summary>
        /// Gets the list of infeed tasks that have been requested to be cancelled.
        /// </summary>
        public List<Task> Tasks => _tasks;

        #endregion

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

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