using System;
using System.Collections.Generic;
using Volpe.Cafe.Initializers;

namespace Volpe.Cafe.ModelSettings
{
    /// <summary>
    /// Provides attributes relating to a single vehicle technology.
    /// </summary>
    [Serializable]
    public sealed class TechnologyAttributes
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="TechnologyAttributes"/> class.
        /// </summary>
        public TechnologyAttributes(Dictionary<string, object> values)
        {
            DataObjectInitializer.SetPropertyValues(this, values);
        }


        //----- tech availability -----
        /// <summary>Gets whether the current technology can be used with a specific technology class.</summary>
        public bool Applicable { get; private set; }
        /// <summary>Gets the model year when the technology becomes available for applicability.</summary>
        public int YearAvailable { get; private set; }
        /// <summary>Gets the last model year that the technology is available for applicability.</summary>
        public int YearRetired { get; private set; }

        //----- tech attributes -----
        /// <summary>
        /// Gets the amount of miles a vehicle is expected to run on the secondary fuel after applying the current
        /// technology. This value is only applicable to duel-fuel technologies, such as PHEVs.
        /// </summary>
        public double SecondaryFS { get; private set; }

        /// <summary>
        /// Gets what the range, in miles, of an electric vehicle would be when operating on a battery, as a result of
        /// applying the current technology. This value is only applicable to PHEV and EV technologies.
        /// </summary>
        public double ElectricRange { get; private set; }
        /// <summary>
        /// Gets what the motor power, in HP-equivalent, of an electric vehicle would be when operating on a battery,
        /// as a result of applying the current technology. This value is only applicable to PHEV and EV technologies.
        /// </summary>
        public double ElectricPower { get; private set; }

        /// <summary>
        /// Gets the percentage by which the vehicle's weight changes as a result of applying the current technology.
        /// </summary>
        public double DeltaWeightPCT { get; private set; }
        /// <summary>
        /// Gets the amount of pounds by which the vehicle's weight changes as a result of applying the current
        /// technology.
        /// </summary>
        public double DeltaWeightLBS { get; private set; }

        /// <summary>
        /// Gets the amount of extra cost that consumers are willing to pay for the current HEV/EV technology.
        /// </summary>
        public double ConsumerWTP { get; private set; }

    }
}
