/// <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), string WinningAlliance = default(string), 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) if (Key == null) { throw new InvalidDataException("Key is a required property for Match 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 Match 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 Match 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 Match 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 Match and cannot be null"); } else { this.EventKey = EventKey; } this.Alliances = Alliances; this.WinningAlliance = WinningAlliance; this.Time = Time; this.ActualTime = ActualTime; this.PredictedTime = PredictedTime; this.PostResultTime = PostResultTime; this.ScoreBreakdown = ScoreBreakdown; this.Videos = Videos; }
/// <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; }