/// <summary> /// Initializes a new instance of the <see cref="MatchSimple" /> class. /// </summary> /// <param name="key">TBA match key with the format `yyyy[EVENT_CODE]_[COMP_LEVEL]m[MATCH_NUMBER]`, where `yyyy` is the year, and `EVENT_CODE` is the event code of the event, `COMP_LEVEL` is (qm, ef, qf, sf, f), and `MATCH_NUMBER` is the match number in the competition level. A set number may append the competition level if more than one match in required per set. (required).</param> /// <param name="compLevel">The competition level the match was played at. (required).</param> /// <param name="setNumber">The set number in a series of matches where more than one match is required in the match series. (required).</param> /// <param name="matchNumber">The match number of the match in the competition level. (required).</param> /// <param name="alliances">alliances.</param> /// <param name="winningAlliance">The color (red/blue) of the winning alliance. Will contain an empty string in the event of no winner, or a tie..</param> /// <param name="eventKey">Event key of the event the match was played at. (required).</param> /// <param name="time">UNIX timestamp (seconds since 1-Jan-1970 00:00:00) of the scheduled match time, as taken from the published schedule..</param> /// <param name="predictedTime">UNIX timestamp (seconds since 1-Jan-1970 00:00:00) of the TBA predicted match start time..</param> /// <param name="actualTime">UNIX timestamp (seconds since 1-Jan-1970 00:00:00) of actual match start time..</param> public MatchSimple(string key = default(string), CompLevelEnum compLevel = default(CompLevelEnum), int setNumber = default(int), int matchNumber = default(int), MatchSimpleAlliances alliances = default(MatchSimpleAlliances), WinningAllianceEnum?winningAlliance = default(WinningAllianceEnum?), string eventKey = default(string), long time = default(long), long predictedTime = default(long), long actualTime = default(long)) { // to ensure "key" is required (not null) if (key == null) { throw new InvalidDataException("key is a required property for MatchSimple and cannot be null"); } else { this.Key = key; } // to ensure "compLevel" is required (not null) if (compLevel == null) { throw new InvalidDataException("compLevel is a required property for MatchSimple and cannot be null"); } else { this.CompLevel = compLevel; } // to ensure "setNumber" is required (not null) if (setNumber == null) { throw new InvalidDataException("setNumber is a required property for MatchSimple and cannot be null"); } else { this.SetNumber = setNumber; } // to ensure "matchNumber" is required (not null) if (matchNumber == null) { throw new InvalidDataException("matchNumber is a required property for MatchSimple and cannot be null"); } else { this.MatchNumber = matchNumber; } // to ensure "eventKey" is required (not null) if (eventKey == null) { throw new InvalidDataException("eventKey is a required property for MatchSimple and cannot be null"); } else { this.EventKey = eventKey; } this.Alliances = alliances; this.WinningAlliance = winningAlliance; this.Time = time; this.PredictedTime = predictedTime; this.ActualTime = actualTime; }
/// <summary> /// Initializes a new instance of the <see cref="Match" /> class. /// </summary> /// <param name="key">TBA match key with the format `yyyy[EVENT_CODE]_[COMP_LEVEL]m[MATCH_NUMBER]`, where `yyyy` is the year, and `EVENT_CODE` is the event code of the event, `COMP_LEVEL` is (qm, ef, qf, sf, f), and `MATCH_NUMBER` is the match number in the competition level. A set number may be appended to the competition level if more than one match in required per set. (required).</param> /// <param name="compLevel">The competition level the match was played at. (required).</param> /// <param name="setNumber">The set number in a series of matches where more than one match is required in the match series. (required).</param> /// <param name="matchNumber">The match number of the match in the competition level. (required).</param> /// <param name="alliances">alliances.</param> /// <param name="winningAlliance">The color (red/blue) of the winning alliance. Will contain an empty string in the event of no winner, or a tie..</param> /// <param name="eventKey">Event key of the event the match was played at. (required).</param> /// <param name="time">UNIX timestamp (seconds since 1-Jan-1970 00:00:00) of the scheduled match time, as taken from the published schedule..</param> /// <param name="actualTime">UNIX timestamp (seconds since 1-Jan-1970 00:00:00) of actual match start time..</param> /// <param name="predictedTime">UNIX timestamp (seconds since 1-Jan-1970 00:00:00) of the TBA predicted match start time..</param> /// <param name="postResultTime">UNIX timestamp (seconds since 1-Jan-1970 00:00:00) when the match result was posted..</param> /// <param name="scoreBreakdown">Score breakdown for auto, teleop, etc. points. Varies from year to year. May be null..</param> /// <param name="videos">Array of video objects associated with this match..</param> public Match(string key = default(string), CompLevelEnum compLevel = default(CompLevelEnum), int setNumber = default(int), int matchNumber = default(int), MatchSimpleAlliances alliances = default(MatchSimpleAlliances), WinningAllianceEnum?winningAlliance = default(WinningAllianceEnum?), string eventKey = default(string), long time = default(long), long actualTime = default(long), long predictedTime = default(long), long postResultTime = default(long), Object scoreBreakdown = default(Object), List <MatchVideos> videos = default(List <MatchVideos>)) { // to ensure "key" is required (not null) this.Key = key ?? throw new ArgumentNullException("key is a required property for Match and cannot be null"); this.CompLevel = compLevel; this.SetNumber = setNumber; this.MatchNumber = matchNumber; // to ensure "eventKey" is required (not null) this.EventKey = eventKey ?? throw new ArgumentNullException("eventKey is a required property for Match and cannot be null"); this.Alliances = alliances; this.WinningAlliance = winningAlliance; this.Time = time; this.ActualTime = actualTime; this.PredictedTime = predictedTime; this.PostResultTime = postResultTime; this.ScoreBreakdown = scoreBreakdown; this.Videos = videos; }