/// <summary>
 /// Initializes a new instance of the <see cref="APIStatus" /> class.
 /// </summary>
 /// <param name="currentSeason">Year of the current FRC season. (required).</param>
 /// <param name="maxSeason">Maximum FRC season year for valid queries. (required).</param>
 /// <param name="isDatafeedDown">True if the entire FMS API provided by FIRST is down. (required).</param>
 /// <param name="downEvents">An array of strings containing event keys of any active events that are no longer updating. (required).</param>
 /// <param name="ios">ios (required).</param>
 /// <param name="android">android (required).</param>
 public APIStatus(int currentSeason = default(int), int maxSeason = default(int), bool isDatafeedDown = default(bool), List <string> downEvents = default(List <string>), APIStatusAppVersion ios = default(APIStatusAppVersion), APIStatusAppVersion android = default(APIStatusAppVersion))
 {
     this.CurrentSeason  = currentSeason;
     this.MaxSeason      = maxSeason;
     this.IsDatafeedDown = isDatafeedDown;
     // to ensure "downEvents" is required (not null)
     this.DownEvents = downEvents ?? throw new ArgumentNullException("downEvents is a required property for APIStatus and cannot be null");
     // to ensure "ios" is required (not null)
     this.Ios = ios ?? throw new ArgumentNullException("ios is a required property for APIStatus and cannot be null");
     // to ensure "android" is required (not null)
     this.Android = android ?? throw new ArgumentNullException("android is a required property for APIStatus and cannot be null");
 }
Esempio n. 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="APIStatus" /> class.
        /// </summary>
        /// <param name="currentSeason">Year of the current FRC season. (required).</param>
        /// <param name="maxSeason">Maximum FRC season year for valid queries. (required).</param>
        /// <param name="isDatafeedDown">True if the entire FMS API provided by FIRST is down. (required).</param>
        /// <param name="downEvents">An array of strings containing event keys of any active events that are no longer updating. (required).</param>
        /// <param name="ios">ios (required).</param>
        /// <param name="android">android (required).</param>
        public APIStatus(int currentSeason = default(int), int maxSeason = default(int), bool isDatafeedDown = default(bool), List <string> downEvents = default(List <string>), APIStatusAppVersion ios = default(APIStatusAppVersion), APIStatusAppVersion android = default(APIStatusAppVersion))
        {
            // to ensure "currentSeason" is required (not null)
            if (currentSeason == null)
            {
                throw new InvalidDataException("currentSeason is a required property for APIStatus and cannot be null");
            }
            else
            {
                this.CurrentSeason = currentSeason;
            }

            // to ensure "maxSeason" is required (not null)
            if (maxSeason == null)
            {
                throw new InvalidDataException("maxSeason is a required property for APIStatus and cannot be null");
            }
            else
            {
                this.MaxSeason = maxSeason;
            }

            // to ensure "isDatafeedDown" is required (not null)
            if (isDatafeedDown == null)
            {
                throw new InvalidDataException("isDatafeedDown is a required property for APIStatus and cannot be null");
            }
            else
            {
                this.IsDatafeedDown = isDatafeedDown;
            }

            // to ensure "downEvents" is required (not null)
            if (downEvents == null)
            {
                throw new InvalidDataException("downEvents is a required property for APIStatus and cannot be null");
            }
            else
            {
                this.DownEvents = downEvents;
            }

            // to ensure "ios" is required (not null)
            if (ios == null)
            {
                throw new InvalidDataException("ios is a required property for APIStatus and cannot be null");
            }
            else
            {
                this.Ios = ios;
            }

            // to ensure "android" is required (not null)
            if (android == null)
            {
                throw new InvalidDataException("android is a required property for APIStatus and cannot be null");
            }
            else
            {
                this.Android = android;
            }
        }