sharee.bike-App/SharedBusinessLogic/Model/Bikes/BikeInfoNS/BC/IBikeInfoMutable.cs
2024-04-09 12:53:23 +02:00

90 lines
2.5 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using ShareeBike.Model.Bikes.BikeInfoNS.BikeNS;
using ShareeBike.Model.Bikes.BikeInfoNS.DriveNS;
using ShareeBike.Model.State;
namespace ShareeBike.Model.Bikes.BikeInfoNS.BC
{
public interface IBikeInfoMutable
{
/// <summary>
/// Holds the unique id of the bike;
/// </summary>
string Id { get; }
/// <summary> True if bike is a demo bike. </summary>
bool IsDemo { get; }
/// <summary> Returns the group (ShareeBike, Citybike, ...). </summary>
IEnumerable<string> Group { get; }
/// <summary>
/// Holds the count of wheels.
/// </summary>
WheelType? WheelType { get; }
/// <summary>
/// Holds the type of bike.
/// </summary>
TypeOfBike? TypeOfBike { get; }
/// <summary>
/// Gets whether bike is a AA bike (bike must be always returned a the same station) or AB bike (start and end stations can be different stations).
/// </summary>
AaRideType? AaRideType { get; }
/// <summary> Gets the model of the lock. </summary>
LockModel LockModel { get; }
/// <summary> Holds the description of the bike. </summary>
string Description { get; }
/// <summary>
/// Station a which bike is located, null otherwise.
/// </summary>
string StationId { get; }
/// <summary>
/// Holds the rent state of the bike.
/// </summary>
IStateInfoMutable State { get; }
/// <summary>
/// Uri of the operator or null, in case of single operator setup.
/// </summary>
Uri OperatorUri { get; }
/// <summary>
/// Hold the drive object.
/// </summary>
DriveMutable Drive { get; }
/// <summary> Gets or sets the information where the data origins from. </summary>
DataSource DataSource { get; set; }
/// <summary>
/// Gets the rental description.
/// </summary>
IRentalDescription TariffDescription { get; }
/// <summary> Loads a bike object from copri server booking_cancel (cancel reservation)/ booking_update (return bike) response.</summary>
/// <param name="notifyLevel">Controls whether notify property changed events are fired or not.</param>
/// <param name="stationId">Id of the station if bike station changed, null otherwise.</param>
void Load(
NotifyPropertyChangedLevel notifyLevel,
string stationId = null);
event PropertyChangedEventHandler PropertyChanged;
}
public enum NotifyPropertyChangedLevel
{
/// <summary> Notify about all property changes.</summary>
All,
/// <summary> Notify about no property changes.</summary>
None
}
}