using System;

namespace Volpe.Cafe.MarketData.BaselineInfo
{
    /// <summary>
    /// Defines various credits and adjustments that a manufacturer may use toward compliance with either NHTSA's CAFE
    /// standards or EPA's CO-2 standards, for a single regulatory class and model year.
    /// </summary>
    [Serializable]
    public class CreditsAndAdjustmentsInfo
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="CreditsAndAdjustmentsInfo"/> class.
        /// </summary>
        /// <param name="acEfficiency">
        ///     The adjustment factor associated with improvements in air conditioning efficiency a manufacturer may
        ///     claim toward compliance with either NHTSA's CAFE standards or EPA's CO-2 standards.
        /// </param>
        /// <param name="acLeakage">
        ///     The adjustment factor associated with improvements in air conditioning leakage a manufacturer may claim
        ///     toward compliance with EPA's CO-2 standards.
        /// </param>
        /// <param name="offCycleCredits">
        ///     The amount of initial off-cycle credits a manufacturer may claim toward compliance with either NHTSA's
        ///     CAFE standards or EPA's CO-2 standards.
        /// </param>
        /// <param name="fspCredits">
        ///     The amount of full sized pickup credits a manufacturer may claim toward compliance with either 
        ///     NHTSA's CAFE standards or EPA's CO-2 standards.
        /// </param>
        /// <param name="ffvCredits">
        ///     The amount of flex-fuel vehicle (FFV) credits a manufacturer may claim toward compliance with NHTSA's
        ///     CAFE standards.
        /// </param>
        public CreditsAndAdjustmentsInfo(double acEfficiency,
                                         double acLeakage,
                                         double offCycleCredits,
                                         double fspCredits,
                                         double ffvCredits)
        {
            this.ACEfficiency = acEfficiency;
            this.ACLeakage = acLeakage;
            this.OffCycleCredits = offCycleCredits;
            this.FSPCredits = fspCredits;
            this.FFVCredits = ffvCredits;
        }

        /// <summary>
        /// Represents an empty <see cref="CreditsAndAdjustmentsInfo"/> instance. This value is read-only.
        /// </summary>
        public static readonly CreditsAndAdjustmentsInfo Empty = new CreditsAndAdjustmentsInfo(0, 0, 0, 0, 0);

        /// <summary>
        /// Gets the adjustment factor associated with improvements in air conditioning efficiency a manufacturer may
        /// claim toward compliance with either NHTSA's CAFE standards or EPA's CO-2 standards. This value is specified
        /// in grams/mile of CO-2.
        /// </summary>
        public double ACEfficiency { get; }

        /// <summary>
        /// Gets the adjustment factor associated with improvements in air conditioning leakage a manufacturer may
        /// claim toward compliance with EPA's CO-2 standards. This value is specified in grams/mile of CO-2.
        /// </summary>
        public double ACLeakage { get; }

        /// <summary>
        /// Gets the amount of initial off-cycle credits a manufacturer may claim toward compliance with either NHTSA's
        /// CAFE standards or EPA's CO-2 standards. This value is specified in grams/mile of CO-2.
        /// </summary>
        public double OffCycleCredits { get; }

        /// <summary>
        /// Gets the amount of full sized pickup credits a manufacturer may claim toward compliance with either NHTSA's
        /// CAFE standards or EPA's CO-2 standards. This value is specified in grams/mile of CO-2.
        /// </summary>
        public double FSPCredits { get; }

        /// <summary>
        /// Gets the amount of flex-fuel vehicle (FFV) credits a manufacturer may claim toward compliance with NHTSA's
        /// CAFE standards. This value is specified in mpg and is added directly to a manufacturer's CAFE rating.
        /// </summary>
        public double FFVCredits { get; }

    }
}
