using System;
using System.Collections.Generic;
using TINK.Model.Stations.StationNS.Operator;
namespace TINK.Model.Stations.StationNS
{
/// Holds station info.
public class Station : IStation
{
/// Constructs a station object.
/// Id of the station.
/// Group (TINK, Konrad) to which station is related.
/// GPS- position of the station.
/// Name of the station.
public Station(
string id,
IEnumerable group = null,
IPosition position = null,
string stationName = "",
IData operatorData = null,
IBikeGroupCol bikeGropCol = null)
{
Id = id;
Group = group ?? throw new ArgumentException("Can not construct station object. Group of stations must not be null.");
Position = position;
StationName = stationName ?? string.Empty;
OperatorData = operatorData ?? new Data();
BikeGroups = bikeGropCol ?? new BikeGroupCol();
}
/// Holds the unique id of the station.c
public string Id { get; }
/// Holds the group to which the station belongs.
public IEnumerable Group { get; }
/// Gets the name of the station.
public string StationName { get; }
/// Holds the gps- position of the station.
public IPosition Position { get; }
/// Holds operator related info.
public IData OperatorData { get; }
/// Gets the count of bikes available at station.
public int? AvailableBikesCount => BikeGroups.AvailableCount;
/// Gets bike objects.
/// Each entry has a name, holds the count of available bikes at station and the group value. ///
public IBikeGroupCol BikeGroups { get; }
}
}