예제 #1
0
        /// <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 &#x60;yyyy-mm-dd&#x60; format. (required).</param>
        /// <param name="endDate">Event end date in &#x60;yyyy-mm-dd&#x60; format. (required).</param>
        /// <param name="year">Year the event data is for. (required).</param>
        /// <param name="shortName">Same as &#x60;name&#x60; but doesn&#39;t include event specifiers, such as &#39;Regional&#39; or &#39;District&#39;. 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 &#39;preseason&#39; 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&#39;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&#39;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&#39;s parent. Used to link back to the event from a division event. It is also the inverse relation of &#x60;divison_keys&#x60;..</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 &#x60;playoff_type&#x60;, 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="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 &#x60;yyyy-mm-dd&#x60; format. (required).</param>
 /// <param name="endDate">Event end date in &#x60;yyyy-mm-dd&#x60; 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)
     this.Key = key ?? throw new ArgumentNullException("key is a required property for EventSimple and cannot be null");
     // to ensure "name" is required (not null)
     this.Name = name ?? throw new ArgumentNullException("name is a required property for EventSimple and cannot be null");
     // to ensure "eventCode" is required (not null)
     this.EventCode = eventCode ?? throw new ArgumentNullException("eventCode is a required property for EventSimple and cannot be null");
     this.EventType = eventType;
     this.StartDate = startDate;
     this.EndDate   = endDate;
     this.Year      = year;
     this.District  = district;
     this.City      = city;
     this.StateProv = stateProv;
     this.Country   = country;
 }
예제 #3
0
        /// <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 &#x60;yyyy-mm-dd&#x60; format. (required).</param>
        /// <param name="endDate">Event end date in &#x60;yyyy-mm-dd&#x60; 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;
        }