BaseItemPerson.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #nullable disable
  2. using System.Text.Json.Serialization;
  3. namespace MediaBrowser.Model.Dto
  4. {
  5. /// <summary>
  6. /// This is used by the api to get information about a Person within a BaseItem.
  7. /// </summary>
  8. public class BaseItemPerson
  9. {
  10. /// <summary>
  11. /// Gets or sets the name.
  12. /// </summary>
  13. /// <value>The name.</value>
  14. public string Name { get; set; }
  15. /// <summary>
  16. /// Gets or sets the identifier.
  17. /// </summary>
  18. /// <value>The identifier.</value>
  19. public string Id { get; set; }
  20. /// <summary>
  21. /// Gets or sets the role.
  22. /// </summary>
  23. /// <value>The role.</value>
  24. public string Role { get; set; }
  25. /// <summary>
  26. /// Gets or sets the type.
  27. /// </summary>
  28. /// <value>The type.</value>
  29. public string Type { get; set; }
  30. /// <summary>
  31. /// Gets or sets the primary image tag.
  32. /// </summary>
  33. /// <value>The primary image tag.</value>
  34. public string PrimaryImageTag { get; set; }
  35. /// <summary>
  36. /// Gets a value indicating whether this instance has primary image.
  37. /// </summary>
  38. /// <value><c>true</c> if this instance has primary image; otherwise, <c>false</c>.</value>
  39. [JsonIgnore]
  40. public bool HasPrimaryImage => PrimaryImageTag != null;
  41. }
  42. }