| | | 1 | | #nullable disable |
| | | 2 | | using System; |
| | | 3 | | using System.ComponentModel; |
| | | 4 | | using MediaBrowser.Model.Configuration; |
| | | 5 | | using MediaBrowser.Model.Users; |
| | | 6 | | |
| | | 7 | | namespace MediaBrowser.Model.Dto |
| | | 8 | | { |
| | | 9 | | /// <summary> |
| | | 10 | | /// Class UserDto. |
| | | 11 | | /// </summary> |
| | | 12 | | public class UserDto : IItemDto, IHasServerId |
| | | 13 | | { |
| | | 14 | | /// <summary> |
| | | 15 | | /// Initializes a new instance of the <see cref="UserDto"/> class. |
| | | 16 | | /// </summary> |
| | | 17 | | public UserDto() |
| | | 18 | | { |
| | 54 | 19 | | Configuration = new UserConfiguration(); |
| | 54 | 20 | | Policy = new UserPolicy(); |
| | 54 | 21 | | } |
| | | 22 | | |
| | | 23 | | /// <summary> |
| | | 24 | | /// Gets or sets the name. |
| | | 25 | | /// </summary> |
| | | 26 | | /// <value>The name.</value> |
| | | 27 | | public string Name { get; set; } |
| | | 28 | | |
| | | 29 | | /// <summary> |
| | | 30 | | /// Gets or sets the server identifier. |
| | | 31 | | /// </summary> |
| | | 32 | | /// <value>The server identifier.</value> |
| | | 33 | | public string ServerId { get; set; } |
| | | 34 | | |
| | | 35 | | /// <summary> |
| | | 36 | | /// Gets or sets the name of the server. |
| | | 37 | | /// This is not used by the server and is for client-side usage only. |
| | | 38 | | /// </summary> |
| | | 39 | | /// <value>The name of the server.</value> |
| | | 40 | | public string ServerName { get; set; } |
| | | 41 | | |
| | | 42 | | /// <summary> |
| | | 43 | | /// Gets or sets the id. |
| | | 44 | | /// </summary> |
| | | 45 | | /// <value>The id.</value> |
| | | 46 | | public Guid Id { get; set; } |
| | | 47 | | |
| | | 48 | | /// <summary> |
| | | 49 | | /// Gets or sets the primary image tag. |
| | | 50 | | /// </summary> |
| | | 51 | | /// <value>The primary image tag.</value> |
| | | 52 | | public string PrimaryImageTag { get; set; } |
| | | 53 | | |
| | | 54 | | /// <summary> |
| | | 55 | | /// Gets or sets a value indicating whether this instance has password. |
| | | 56 | | /// </summary> |
| | | 57 | | /// <value><c>true</c> if this instance has password; otherwise, <c>false</c>.</value> |
| | | 58 | | [Obsolete("This information is no longer provided")] |
| | 54 | 59 | | public bool? HasPassword { get; set; } = true; |
| | | 60 | | |
| | | 61 | | /// <summary> |
| | | 62 | | /// Gets or sets a value indicating whether this instance has configured password. |
| | | 63 | | /// </summary> |
| | | 64 | | /// <value><c>true</c> if this instance has configured password; otherwise, <c>false</c>.</value> |
| | | 65 | | [Obsolete("This is always true")] |
| | 54 | 66 | | public bool? HasConfiguredPassword { get; set; } = true; |
| | | 67 | | |
| | | 68 | | /// <summary> |
| | | 69 | | /// Gets or sets a value indicating whether this instance has configured easy password. |
| | | 70 | | /// </summary> |
| | | 71 | | /// <value><c>true</c> if this instance has configured easy password; otherwise, <c>false</c>.</value> |
| | | 72 | | [Obsolete("Easy Password has been replaced with Quick Connect")] |
| | 54 | 73 | | public bool? HasConfiguredEasyPassword { get; set; } = false; |
| | | 74 | | |
| | | 75 | | /// <summary> |
| | | 76 | | /// Gets or sets whether async login is enabled or not. |
| | | 77 | | /// </summary> |
| | | 78 | | public bool? EnableAutoLogin { get; set; } |
| | | 79 | | |
| | | 80 | | /// <summary> |
| | | 81 | | /// Gets or sets the last login date. |
| | | 82 | | /// </summary> |
| | | 83 | | /// <value>The last login date.</value> |
| | | 84 | | public DateTime? LastLoginDate { get; set; } |
| | | 85 | | |
| | | 86 | | /// <summary> |
| | | 87 | | /// Gets or sets the last activity date. |
| | | 88 | | /// </summary> |
| | | 89 | | /// <value>The last activity date.</value> |
| | | 90 | | public DateTime? LastActivityDate { get; set; } |
| | | 91 | | |
| | | 92 | | /// <summary> |
| | | 93 | | /// Gets or sets the configuration. |
| | | 94 | | /// </summary> |
| | | 95 | | /// <value>The configuration.</value> |
| | | 96 | | public UserConfiguration Configuration { get; set; } |
| | | 97 | | |
| | | 98 | | /// <summary> |
| | | 99 | | /// Gets or sets the policy. |
| | | 100 | | /// </summary> |
| | | 101 | | /// <value>The policy.</value> |
| | | 102 | | public UserPolicy Policy { get; set; } |
| | | 103 | | |
| | | 104 | | /// <summary> |
| | | 105 | | /// Gets or sets the primary image aspect ratio. |
| | | 106 | | /// </summary> |
| | | 107 | | /// <value>The primary image aspect ratio.</value> |
| | | 108 | | public double? PrimaryImageAspectRatio { get; set; } |
| | | 109 | | |
| | | 110 | | /// <inheritdoc /> |
| | | 111 | | public override string ToString() |
| | | 112 | | { |
| | 0 | 113 | | return Name ?? base.ToString(); |
| | | 114 | | } |
| | | 115 | | } |
| | | 116 | | } |