using System;
namespace MediaBrowser.Model.QuickConnect
{
///
/// Stores the non-sensitive results of an incoming quick connect request.
///
public class QuickConnectResultDto
{
///
/// Gets a value indicating whether this request is authorized.
///
public bool Authenticated { get; private set; }
///
/// Gets the user facing code used so the user can quickly differentiate this request from others.
///
public string? Code { get; private set; }
///
/// Gets the public value used to uniquely identify this request. Can only be used to authorize the request.
///
public string? Lookup { get; private set; }
///
/// Gets the device friendly name.
///
public string? FriendlyName { get; private set; }
///
/// Gets the DateTime that this request was created.
///
public DateTime? DateAdded { get; private set; }
///
/// Cast an internal quick connect result to a DTO by removing all sensitive properties.
///
/// QuickConnectResult object to cast
public static implicit operator QuickConnectResultDto(QuickConnectResult result)
{
QuickConnectResultDto resultDto = new QuickConnectResultDto
{
Authenticated = result.Authenticated,
Code = result.Code,
FriendlyName = result.FriendlyName,
DateAdded = result.DateAdded,
Lookup = result.Lookup
};
return resultDto;
}
}
}