using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EVCB_OCPP.Packet20.DataTypes
{
    public class ChargingSchedulePeriodType
    {
        /// <summary>
        /// Start of the period, in seconds from the start of
        ///   schedule.The value of StartPeriod also defines the stop
        ///time of the previous period.
        /// </summary>
        [Required]
        public int StartPeriod { set; get; }

        /// <summary>
        /// Charging rate limit during the schedule period,
        ///in the applicable chargingRateUnit, for example in
        ///Amperes(A) or Watts(W). Accepts at most one digit
        ///fraction(e.g. 8.1).
        /// </summary>
        [Required]
        public decimal Limit { set; get; }

        /// <summary>
        /// The number of phases that can be used for
        /// charging.If a number of phases is needed,
        ///numberPhases=3 will be assumed unless another
        ///number is given.
        /// </summary>
        public int? NumberPhases { set; get; }

        /// <summary>
        /// Values: 1..3, Used if numberPhases=1 and if the
        ///   EVSE is capable of switching the phase connected to the
        ///EV, i.e.ACPhaseSwitchingSupported is defined and true.
        ///It’s not allowed unless both conditions above are true. If
        ///both conditions are true, and phaseToUse is omitted, the
        ///Charging Station / EVSE will make the selection on its
        ///own.
        /// </summary>
        public int? PhaseToUse { set; get; }

    }
}
