Пример #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="RequestTimeMapArrivalSearch" /> class.
        /// </summary>
        /// <param name="id">id (required).</param>
        /// <param name="coords">coords (required).</param>
        /// <param name="transportation">transportation (required).</param>
        /// <param name="travelTime">travelTime (required).</param>
        /// <param name="arrivalTime">arrivalTime (required).</param>
        /// <param name="properties">properties.</param>
        /// <param name="range">range.</param>
        public RequestTimeMapArrivalSearch(string id = default(string), Coords coords = default(Coords), RequestTransportation transportation = default(RequestTransportation), int travelTime = default(int), DateTime arrivalTime = default(DateTime), List <RequestTimeMapProperty> properties = default(List <RequestTimeMapProperty>), RequestRangeNoMaxResults range = default(RequestRangeNoMaxResults))
        {
            // to ensure "id" is required (not null)
            if (id == null)
            {
                throw new InvalidDataException("id is a required property for RequestTimeMapArrivalSearch and cannot be null");
            }
            else
            {
                this.Id = id;
            }

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

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

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

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

            this.Properties = properties;
            this.Range      = range;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="RequestTimeMapArrivalSearch" /> class.
 /// </summary>
 /// <param name="id">id (required).</param>
 /// <param name="coords">coords (required).</param>
 /// <param name="transportation">transportation (required).</param>
 /// <param name="travelTime">travelTime (required).</param>
 /// <param name="arrivalTime">arrivalTime (required).</param>
 /// <param name="properties">properties.</param>
 /// <param name="range">range.</param>
 public RequestTimeMapArrivalSearch(string id = default(string), Coords coords = default(Coords), RequestTransportation transportation = default(RequestTransportation), int travelTime = default(int), DateTime arrivalTime = default(DateTime), List <RequestTimeMapProperty> properties = default(List <RequestTimeMapProperty>), RequestRangeNoMaxResults range = default(RequestRangeNoMaxResults))
 {
     // to ensure "id" is required (not null)
     this.Id = id ?? throw new ArgumentNullException("id is a required property for RequestTimeMapArrivalSearch and cannot be null");;
     // to ensure "coords" is required (not null)
     this.Coords = coords ?? throw new ArgumentNullException("coords is a required property for RequestTimeMapArrivalSearch and cannot be null");;
     // to ensure "transportation" is required (not null)
     this.Transportation = transportation ?? throw new ArgumentNullException("transportation is a required property for RequestTimeMapArrivalSearch and cannot be null");;
     this.TravelTime     = travelTime;
     this.ArrivalTime    = arrivalTime;
     this.Properties     = properties;
     this.Range          = range;
 }