/// <summary> /// Initializes a new instance of the <see cref="Event" /> class. /// </summary> /// <param name="key">TBA event key with the format yyyy[EVENT_CODE], where yyyy is the year, and EVENT_CODE is the event code of the event. (required).</param> /// <param name="name">Official name of event on record either provided by FIRST or organizers of offseason event. (required).</param> /// <param name="eventCode">Event short code, as provided by FIRST. (required).</param> /// <param name="eventType">Event Type, as defined here: https://github.com/the-blue-alliance/the-blue-alliance/blob/master/consts/event_type.py#L2 (required).</param> /// <param name="district">district.</param> /// <param name="city">City, town, village, etc. the event is located in..</param> /// <param name="stateProv">State or Province the event is located in..</param> /// <param name="country">Country the event is located in..</param> /// <param name="startDate">Event start date in `yyyy-mm-dd` format. (required).</param> /// <param name="endDate">Event end date in `yyyy-mm-dd` format. (required).</param> /// <param name="year">Year the event data is for. (required).</param> /// <param name="shortName">Same as `name` but doesn't include event specifiers, such as 'Regional' or 'District'. May be null..</param> /// <param name="eventTypeString">Event Type, eg Regional, District, or Offseason. (required).</param> /// <param name="week">Week of the event relative to the first official season event, zero-indexed. Only valid for Regionals, Districts, and District Championships. Null otherwise. (Eg. A season with a week 0 'preseason' event does not count, and week 1 events will show 0 here. Seasons with a week 0.5 regional event will show week 0 for those event(s) and week 1 for week 1 events and so on.).</param> /// <param name="address">Address of the event's venue, if available..</param> /// <param name="postalCode">Postal code from the event address..</param> /// <param name="gmapsPlaceId">Google Maps Place ID for the event address..</param> /// <param name="gmapsUrl">Link to address location on Google Maps..</param> /// <param name="lat">Latitude for the event address..</param> /// <param name="lng">Longitude for the event address..</param> /// <param name="locationName">Name of the location at the address for the event, eg. Blue Alliance High School..</param> /// <param name="timezone">Timezone name..</param> /// <param name="website">The event's website, if any..</param> /// <param name="firstEventId">The FIRST internal Event ID, used to link to the event on the FRC webpage..</param> /// <param name="firstEventCode">Public facing event code used by FIRST (on frc-events.firstinspires.org, for example).</param> /// <param name="webcasts">webcasts.</param> /// <param name="divisionKeys">An array of event keys for the divisions at this event..</param> /// <param name="parentEventKey">The TBA Event key that represents the event's parent. Used to link back to the event from a division event. It is also the inverse relation of `divison_keys`..</param> /// <param name="playoffType">Playoff Type, as defined here: https://github.com/the-blue-alliance/the-blue-alliance/blob/master/consts/playoff_type.py#L4, or null..</param> /// <param name="playoffTypeString">String representation of the `playoff_type`, or null..</param> public Event(string key = default(string), string name = default(string), string eventCode = default(string), int eventType = default(int), DistrictList district = default(DistrictList), string city = default(string), string stateProv = default(string), string country = default(string), DateTime startDate = default(DateTime), DateTime endDate = default(DateTime), int year = default(int), string shortName = default(string), string eventTypeString = default(string), int week = default(int), string address = default(string), string postalCode = default(string), string gmapsPlaceId = default(string), string gmapsUrl = default(string), double lat = default(double), double lng = default(double), string locationName = default(string), string timezone = default(string), string website = default(string), string firstEventId = default(string), string firstEventCode = default(string), List <Webcast> webcasts = default(List <Webcast>), List <string> divisionKeys = default(List <string>), string parentEventKey = default(string), int playoffType = default(int), string playoffTypeString = default(string)) { // to ensure "key" is required (not null) if (key == null) { throw new InvalidDataException("key is a required property for Event and cannot be null"); } else { this.Key = key; } // to ensure "name" is required (not null) if (name == null) { throw new InvalidDataException("name is a required property for Event and cannot be null"); } else { this.Name = name; } // to ensure "eventCode" is required (not null) if (eventCode == null) { throw new InvalidDataException("eventCode is a required property for Event and cannot be null"); } else { this.EventCode = eventCode; } // to ensure "eventType" is required (not null) if (eventType == null) { throw new InvalidDataException("eventType is a required property for Event and cannot be null"); } else { this.EventType = eventType; } // to ensure "startDate" is required (not null) if (startDate == null) { throw new InvalidDataException("startDate is a required property for Event and cannot be null"); } else { this.StartDate = startDate; } // to ensure "endDate" is required (not null) if (endDate == null) { throw new InvalidDataException("endDate is a required property for Event and cannot be null"); } else { this.EndDate = endDate; } // to ensure "year" is required (not null) if (year == null) { throw new InvalidDataException("year is a required property for Event and cannot be null"); } else { this.Year = year; } // to ensure "eventTypeString" is required (not null) if (eventTypeString == null) { throw new InvalidDataException("eventTypeString is a required property for Event and cannot be null"); } else { this.EventTypeString = eventTypeString; } this.District = district; this.City = city; this.StateProv = stateProv; this.Country = country; this.ShortName = shortName; this.Week = week; this.Address = address; this.PostalCode = postalCode; this.GmapsPlaceId = gmapsPlaceId; this.GmapsUrl = gmapsUrl; this.Lat = lat; this.Lng = lng; this.LocationName = locationName; this.Timezone = timezone; this.Website = website; this.FirstEventId = firstEventId; this.FirstEventCode = firstEventCode; this.Webcasts = webcasts; this.DivisionKeys = divisionKeys; this.ParentEventKey = parentEventKey; this.PlayoffType = playoffType; this.PlayoffTypeString = playoffTypeString; }
/// <summary> /// Initializes a new instance of the <see cref="ModelEvent" /> class. /// </summary> /// <param name="Key">TBA event key with the format yyyy[EVENT_CODE], where yyyy is the year, and EVENT_CODE is the event code of the event. (required).</param> /// <param name="Name">Official name of event on record either provided by FIRST or organizers of offseason event. (required).</param> /// <param name="EventCode">Event short code, as provided by FIRST. (required).</param> /// <param name="EventType">Event Type, as defined here: https://github.com/the-blue-alliance/the-blue-alliance/blob/master/consts/event_type.py#L2 (required).</param> /// <param name="District">The district this event is in, may be null..</param> /// <param name="City">City, town, village, etc. the event is located in..</param> /// <param name="StateProv">State or Province the event is located in..</param> /// <param name="Country">Country the event is located in..</param> /// <param name="StartDate">Event start date in `yyyy-mm-dd` format. (required).</param> /// <param name="EndDate">Event end date in `yyyy-mm-dd` format. (required).</param> /// <param name="Year">Year the event data is for. (required).</param> /// <param name="ShortName">Same as `name` but doesn't include event specifiers, such as 'Regional' or 'District'. May be null..</param> /// <param name="EventTypeString">Event Type, eg Regional, District, or Offseason. (required).</param> /// <param name="Week">Week of the event relative to the first official season event, zero-indexed. Only valid for Regionals, Districts, and District Championships. Null otherwise. (Eg. A season with a week 0 'preseason' event does not count, and week 1 events will show 0 here. Seasons with a week 0.5 regional event will show week 0 for those event(s) and week 1 for week 1 events and so on.).</param> /// <param name="Address">Address of the event's venue, if available..</param> /// <param name="PostalCode">Postal code from the event address..</param> /// <param name="GmapsPlaceId">Google Maps Place ID for the event address..</param> /// <param name="GmapsUrl">Link to address location on Google Maps..</param> /// <param name="Lat">Latitude for the event address..</param> /// <param name="Lng">Longitude for the event address..</param> /// <param name="LocationName">Name of the location at the address for the event, eg. Blue Alliance High School..</param> /// <param name="Timezone">Timezone name..</param> /// <param name="Website">The event's website, if any..</param> /// <param name="FirstEventId">The FIRST internal Event ID, used to link to the event on the FRC webpage..</param> /// <param name="FirstEventCode">Public facing event code used by FIRST (on frc-events.firstinspires.org, for example).</param> /// <param name="Webcasts">Webcasts.</param> /// <param name="DivisionKeys">An array of event keys for the divisions at this event..</param> /// <param name="ParentEventKey">The TBA Event key that represents the event's parent. Used to link back to the event from a division event. It is also the inverse relation of `divison_keys`..</param> /// <param name="PlayoffType">Playoff Type, as defined here: https://github.com/the-blue-alliance/the-blue-alliance/blob/master/consts/playoff_type.py#L4, or null..</param> /// <param name="PlayoffTypeString">String representation of the `playoff_type`, or null..</param> public ModelEvent(string Key = default(string), string Name = default(string), string EventCode = default(string), int?EventType = default(int?), DistrictList District = default(DistrictList), string City = default(string), string StateProv = default(string), string Country = default(string), DateTime?StartDate = default(DateTime?), DateTime?EndDate = default(DateTime?), int?Year = default(int?), string ShortName = default(string), string EventTypeString = default(string), int?Week = default(int?), string Address = default(string), string PostalCode = default(string), string GmapsPlaceId = default(string), string GmapsUrl = default(string), double?Lat = default(double?), double?Lng = default(double?), string LocationName = default(string), string Timezone = default(string), string Website = default(string), string FirstEventId = default(string), string FirstEventCode = default(string), List <Webcast> Webcasts = default(List <Webcast>), List <string> DivisionKeys = default(List <string>), string ParentEventKey = default(string), int?PlayoffType = default(int?), string PlayoffTypeString = default(string)) { // to ensure "Key" is required (not null) if (Key == null) { throw new InvalidDataException("Key is a required property for ModelEvent and cannot be null"); } else { this.Key = Key; } // to ensure "Name" is required (not null) if (Name == null) { throw new InvalidDataException("Name is a required property for ModelEvent and cannot be null"); } else { this.Name = Name; } // to ensure "EventCode" is required (not null) if (EventCode == null) { throw new InvalidDataException("EventCode is a required property for ModelEvent and cannot be null"); } else { this.EventCode = EventCode; } // to ensure "EventType" is required (not null) if (EventType == null) { throw new InvalidDataException("EventType is a required property for ModelEvent and cannot be null"); } else { this.EventType = EventType; } // to ensure "StartDate" is required (not null) if (StartDate == null) { throw new InvalidDataException("StartDate is a required property for ModelEvent and cannot be null"); } else { this.StartDate = StartDate; } // to ensure "EndDate" is required (not null) if (EndDate == null) { throw new InvalidDataException("EndDate is a required property for ModelEvent and cannot be null"); } else { this.EndDate = EndDate; } // to ensure "Year" is required (not null) if (Year == null) { throw new InvalidDataException("Year is a required property for ModelEvent and cannot be null"); } else { this.Year = Year; } // to ensure "EventTypeString" is required (not null) if (EventTypeString == null) { throw new InvalidDataException("EventTypeString is a required property for ModelEvent and cannot be null"); } else { this.EventTypeString = EventTypeString; } this.District = District; this.City = City; this.StateProv = StateProv; this.Country = Country; this.ShortName = ShortName; this.Week = Week; this.Address = Address; this.PostalCode = PostalCode; this.GmapsPlaceId = GmapsPlaceId; this.GmapsUrl = GmapsUrl; this.Lat = Lat; this.Lng = Lng; this.LocationName = LocationName; this.Timezone = Timezone; this.Website = Website; this.FirstEventId = FirstEventId; this.FirstEventCode = FirstEventCode; this.Webcasts = Webcasts; this.DivisionKeys = DivisionKeys; this.ParentEventKey = ParentEventKey; this.PlayoffType = PlayoffType; this.PlayoffTypeString = PlayoffTypeString; }
/// <summary> /// Initializes a new instance of the <see cref="EventSimple" /> class. /// </summary> /// <param name="key">TBA event key with the format yyyy[EVENT_CODE], where yyyy is the year, and EVENT_CODE is the event code of the event. (required).</param> /// <param name="name">Official name of event on record either provided by FIRST or organizers of offseason event. (required).</param> /// <param name="eventCode">Event short code, as provided by FIRST. (required).</param> /// <param name="eventType">Event Type, as defined here: https://github.com/the-blue-alliance/the-blue-alliance/blob/master/consts/event_type.py#L2 (required).</param> /// <param name="district">district.</param> /// <param name="city">City, town, village, etc. the event is located in..</param> /// <param name="stateProv">State or Province the event is located in..</param> /// <param name="country">Country the event is located in..</param> /// <param name="startDate">Event start date in `yyyy-mm-dd` format. (required).</param> /// <param name="endDate">Event end date in `yyyy-mm-dd` format. (required).</param> /// <param name="year">Year the event data is for. (required).</param> public EventSimple(string key = default(string), string name = default(string), string eventCode = default(string), int eventType = default(int), DistrictList district = default(DistrictList), string city = default(string), string stateProv = default(string), string country = default(string), DateTime startDate = default(DateTime), DateTime endDate = default(DateTime), int year = default(int)) { // to ensure "key" is required (not null) if (key == null) { throw new InvalidDataException("key is a required property for EventSimple and cannot be null"); } else { this.Key = key; } // to ensure "name" is required (not null) if (name == null) { throw new InvalidDataException("name is a required property for EventSimple and cannot be null"); } else { this.Name = name; } // to ensure "eventCode" is required (not null) if (eventCode == null) { throw new InvalidDataException("eventCode is a required property for EventSimple and cannot be null"); } else { this.EventCode = eventCode; } // to ensure "eventType" is required (not null) if (eventType == null) { throw new InvalidDataException("eventType is a required property for EventSimple and cannot be null"); } else { this.EventType = eventType; } // to ensure "startDate" is required (not null) if (startDate == null) { throw new InvalidDataException("startDate is a required property for EventSimple and cannot be null"); } else { this.StartDate = startDate; } // to ensure "endDate" is required (not null) if (endDate == null) { throw new InvalidDataException("endDate is a required property for EventSimple and cannot be null"); } else { this.EndDate = endDate; } // to ensure "year" is required (not null) if (year == null) { throw new InvalidDataException("year is a required property for EventSimple and cannot be null"); } else { this.Year = year; } this.District = district; this.City = city; this.StateProv = stateProv; this.Country = country; }