using System.Runtime.Serialization;
using TINK.Repository.Response;
namespace TINK.Model.Repository.Response
{
///
/// Holds info about a single bike.
///
[DataContract]
public class BikeInfoBase
{
///
/// Id of the bike.
///
[DataMember]
public int bike { get; private set; }
///
/// Id of the station.
///
[DataMember]
public int? station { get; private set; }
///
/// Holds the localized (german) description of the bike.
///
[DataMember]
public string description { get; private set; }
/// Holds the group of the bike.
///
/// Copri returns values "TINK", "Konrad".
///
[DataMember]
public string bike_group { get; private set; }
///
/// Rental state.
///
[DataMember]
public string state { get; private set; }
///
/// Holds the uri where to reserve/ rent the bike.
///
[DataMember]
public string uri_operator { get; private set; }
/// Holds whether bike is equipped with computer or if bike is a lock bike.
///
///
///
Value
Type of bike
Member to extract info.
///
LOCK
Bike with manual lock.
TextToTypeHelper.GetIsNonBikeComputerBike
///
Bike with a bord computer.
///
?
Bike with a bluetooth lock.
///
///
[DataMember]
public string system { get; private set; }
#if !NOTARIFFDESCRIPTION
/// Holds the tariff information for a bike.
[DataMember]
public TariffDescription tariff_description { get; private set; }
#endif
///
/// Textual description of response.
///
/// Object as text.
public new string ToString()
{
return $"Bike {bike}{(station != null ? $", at station {station}" : string.Empty)}{(!string.IsNullOrEmpty(description) ? $", {description}" : string.Empty)}{(!string.IsNullOrEmpty(state) ? $", status={state}" : string.Empty)}.";
}
}
}