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

namespace CareFusion.Mosaic.Interfaces.Messages.Input
{
    /// <summary>
    /// Class which implements the InfeedInputPlacePackRequest Mosaic message.
    /// This request is used to notify an IT system about the necessity to place
    /// a pack on an infeed belt for an active infeed input process.
    /// </summary>
    public class InfeedInputPlacePackRequest : 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; }

        #endregion

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

        /// <summary>
        /// Initializes a new instance of the <see cref="InfeedInputPlacePackRequest"/> class.
        /// </summary>
        /// <param name="converterStream">The converter stream which created the request.</param>
        public InfeedInputPlacePackRequest(IConverterStream converterStream)
            : base(MessageType.InfeedInputPlacePackRequest, 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 InfeedInputPlacePackRequest(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;
            return clone;
        }
    }
}
