using System;
namespace ShareeBike.Services.BluetoothLock.Tdo
{
/// Genuine ILOCKIT state.
public enum LockitLockingState
{
Open = 0x00,
Closed = 0x01,
Unknown = 0x02,
CouldntCloseMoving = 0x03,
CouldntOpenBoltBlocked = 0x04,
CouldntCloseBoltBlocked = 0x05
}
/// Object holding info about bluetooth lock.
public class LockInfoTdo
{
private LockInfoTdo() { }
/// Identification number of bluetooth lock, 6-digits, second part of advertisement name.
public int Id { get; private set; }
/// Guid for direct connect.
public Guid Guid { get; private set; }
/// Gets the current state of the lock.
public LockitLockingState? State { get; private set; }
public class Builder
{
private LockInfoTdo lockInfoTdo = new LockInfoTdo();
/// Identification number of bluetooth lock, 6-digits, second part of advertisement name.
public int Id { get => lockInfoTdo.Id; set => lockInfoTdo.Id = value; }
/// Guid for direct connect.
public Guid Guid { get => lockInfoTdo.Guid; set => lockInfoTdo.Guid = value; }
/// Gets the current state of the lock.
public LockitLockingState? State { get => lockInfoTdo.State; set => lockInfoTdo.State = value; }
public LockInfoTdo Build()
{
return lockInfoTdo;
}
}
}
}