mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-04-27 23:06:29 +02:00
Initial version.
This commit is contained in:
parent
193aaa1a56
commit
b72c67a53e
228 changed files with 25924 additions and 0 deletions
76
TINKLib/Repository/Response/BikeInfoBase.cs
Normal file
76
TINKLib/Repository/Response/BikeInfoBase.cs
Normal file
|
@ -0,0 +1,76 @@
|
|||
using System.Runtime.Serialization;
|
||||
using TINK.Repository.Response;
|
||||
|
||||
namespace TINK.Model.Repository.Response
|
||||
{
|
||||
/// <summary>
|
||||
/// Holds info about a single bike.
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public class BikeInfoBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Id of the bike.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public int bike { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Id of the station.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public int? station { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Holds the localized (german) description of the bike.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string description { get; private set; }
|
||||
|
||||
/// <summary> Holds the group of the bike.</summary>
|
||||
/// <remarks>
|
||||
/// Copri returns values "TINK", "Konrad".
|
||||
/// </remarks>
|
||||
[DataMember]
|
||||
public string bike_group { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Rental state.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string state { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Holds the uri where to reserve/ rent the bike.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string uri_operator { get; private set; }
|
||||
|
||||
/// <summary> Holds whether bike is equipped with computer or if bike is a lock bike.</summary>
|
||||
/// <remarks>
|
||||
/// <table>
|
||||
/// <tr><th>Value </th><th>Type of bike </th><th>Member to extract info.</th></tr>
|
||||
/// <tr><td>LOCK </td><td>Bike with manual lock. </td><td>TextToTypeHelper.GetIsNonBikeComputerBike</td></tr>
|
||||
/// <tr><td> </td><td>Bike with a bord computer. </td><td></td></tr>
|
||||
/// <tr><td>? </td><td>Bike with a bluetooth lock.</td><td></td></tr>
|
||||
/// </table>
|
||||
/// </remarks>
|
||||
[DataMember]
|
||||
public string system { get; private set; }
|
||||
|
||||
#if !NOTARIFFDESCRIPTION
|
||||
/// <summary> Holds the tariff information for a bike. </summary>
|
||||
[DataMember]
|
||||
public TariffDescription tariff_description { get; private set; }
|
||||
#endif
|
||||
/// <summary>
|
||||
/// Textual description of response.
|
||||
/// </summary>
|
||||
/// <returns>Object as text.</returns>
|
||||
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)}.";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue