using System.Runtime.Serialization;
namespace TINK.Repository.Response
{
///
/// Holds info about a single bike.
///
[DataContract]
public class BikeInfoBase
{
///
/// Id of the bike.
///
[DataMember]
public string bike { get; private set; }
///
/// Id of the station.
///
[DataMember]
public string 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
/// Loading state of motor battery in % ]0..100[.
[DataMember]
public string bike_charge { get; private set; }
///
/// 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)}.";
}
}
}