/// <summary>
        /// Initializes a new instance of the <see cref="ResponseDistanceBreakdownItem" /> class.
        /// </summary>
        /// <param name="mode">mode (required).</param>
        /// <param name="distance">distance (required).</param>
        public ResponseDistanceBreakdownItem(ResponseTransportationMode mode = default(ResponseTransportationMode), int distance = default(int))
        {
            // to ensure "mode" is required (not null)
            if (mode == null)
            {
                throw new InvalidDataException("mode is a required property for ResponseDistanceBreakdownItem and cannot be null");
            }
            else
            {
                this.Mode = mode;
            }

            // to ensure "distance" is required (not null)
            if (distance == null)
            {
                throw new InvalidDataException("distance is a required property for ResponseDistanceBreakdownItem and cannot be null");
            }
            else
            {
                this.Distance = distance;
            }
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="ResponseRoutePart" /> class.
 /// </summary>
 /// <param name="id">id (required).</param>
 /// <param name="type">type (required).</param>
 /// <param name="mode">mode (required).</param>
 /// <param name="directions">directions (required).</param>
 /// <param name="distance">distance (required).</param>
 /// <param name="travelTime">travelTime (required).</param>
 /// <param name="coords">coords (required).</param>
 /// <param name="direction">direction.</param>
 /// <param name="road">road.</param>
 /// <param name="turn">turn.</param>
 /// <param name="line">line.</param>
 /// <param name="departureStation">departureStation.</param>
 /// <param name="arrivalStation">arrivalStation.</param>
 /// <param name="departsAt">departsAt.</param>
 /// <param name="arrivesAt">arrivesAt.</param>
 /// <param name="numStops">numStops.</param>
 public ResponseRoutePart(string id = default(string), TypeEnum type = default(TypeEnum), ResponseTransportationMode mode = default(ResponseTransportationMode), string directions = default(string), int distance = default(int), int travelTime = default(int), List <Coords> coords = default(List <Coords>), string direction = default(string), string road = default(string), string turn = default(string), string line = default(string), string departureStation = default(string), string arrivalStation = default(string), string departsAt = default(string), string arrivesAt = default(string), int numStops = default(int))
 {
     // to ensure "id" is required (not null)
     this.Id   = id ?? throw new ArgumentNullException("id is a required property for ResponseRoutePart and cannot be null");;
     this.Type = type;
     // to ensure "mode" is required (not null)
     this.Mode = mode ?? throw new ArgumentNullException("mode is a required property for ResponseRoutePart and cannot be null");;
     // to ensure "directions" is required (not null)
     this.Directions = directions ?? throw new ArgumentNullException("directions is a required property for ResponseRoutePart and cannot be null");;
     this.Distance   = distance;
     this.TravelTime = travelTime;
     // to ensure "coords" is required (not null)
     this.Coords           = coords ?? throw new ArgumentNullException("coords is a required property for ResponseRoutePart and cannot be null");;
     this.Direction        = direction;
     this.Road             = road;
     this.Turn             = turn;
     this.Line             = line;
     this.DepartureStation = departureStation;
     this.ArrivalStation   = arrivalStation;
     this.DepartsAt        = departsAt;
     this.ArrivesAt        = arrivesAt;
     this.NumStops         = numStops;
 }
예제 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ResponseDistanceBreakdownItem" /> class.
 /// </summary>
 /// <param name="mode">mode (required).</param>
 /// <param name="distance">distance (required).</param>
 public ResponseDistanceBreakdownItem(ResponseTransportationMode mode = default(ResponseTransportationMode), int distance = default(int))
 {
     // to ensure "mode" is required (not null)
     this.Mode     = mode ?? throw new ArgumentNullException("mode is a required property for ResponseDistanceBreakdownItem and cannot be null");;
     this.Distance = distance;
 }