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

namespace CareFusion.Mosaic.Interfaces.Messages.Input
{
    /// <summary>
    /// Class which implements the InfeedInputPlacePackResponse Mosaic message.
    /// This message is used to answer to a InfeedInputPlacePackRequest.
    /// </summary>
    public class InfeedInputPlacePackResponse : MosaicMessage, ICloneable
    {
        #region Properties

        /// <summary>
        /// Gets or sets the infeed for which a pack placement is requested.
        /// </summary>
        public int InfeedNumber { get; set; }

        /// <summary>
        /// Gets or sets an optional informational external order number.
        /// </summary>
        public string ExternalOrderNumber { get; set; }

        /// <summary>
        /// Gets or sets the control status of the initiated input process.
        /// </summary>
        public InfeedInputPlacePackState Status { get; set; }

        #endregion

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

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

        /// <summary>
        /// Creates a new object that is a copy of the current instance.
        /// </summary>
        /// <returns>
        /// A new object that is a copy of this instance.
        /// </returns>
        public object Clone()
        {
            var clone = new InfeedInputPlacePackResponse(this.ConverterStream);
            clone.ConverterData = this.ConverterData;
            clone.Destination = this.Destination;
            clone.ID = this.ID;
            clone.Source = this.Source;
            clone.TenantID = this.TenantID;
            clone.InfeedNumber = this.InfeedNumber;
            clone.ExternalOrderNumber = this.ExternalOrderNumber;
            clone.Status = this.Status;
            return clone;
        }
    }
}
