2
0

PackageInfo.cs 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #nullable enable
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Text.Json.Serialization;
  5. namespace MediaBrowser.Model.Updates
  6. {
  7. /// <summary>
  8. /// Class PackageInfo.
  9. /// </summary>
  10. public class PackageInfo
  11. {
  12. /// <summary>
  13. /// Initializes a new instance of the <see cref="PackageInfo"/> class.
  14. /// </summary>
  15. public PackageInfo()
  16. {
  17. Versions = Array.Empty<VersionInfo>();
  18. Id = string.Empty;
  19. Category = string.Empty;
  20. Name = string.Empty;
  21. Overview = string.Empty;
  22. Owner = string.Empty;
  23. Description = string.Empty;
  24. }
  25. /// <summary>
  26. /// Gets or sets the name.
  27. /// </summary>
  28. /// <value>The name.</value>
  29. [JsonPropertyName("name")]
  30. public string Name { get; set; }
  31. /// <summary>
  32. /// Gets or sets a long description of the plugin containing features or helpful explanations.
  33. /// </summary>
  34. /// <value>The description.</value>
  35. [JsonPropertyName("description")]
  36. public string Description { get; set; }
  37. /// <summary>
  38. /// Gets or sets a short overview of what the plugin does.
  39. /// </summary>
  40. /// <value>The overview.</value>
  41. [JsonPropertyName("overview")]
  42. public string Overview { get; set; }
  43. /// <summary>
  44. /// Gets or sets the owner.
  45. /// </summary>
  46. /// <value>The owner.</value>
  47. [JsonPropertyName("owner")]
  48. public string Owner { get; set; }
  49. /// <summary>
  50. /// Gets or sets the category.
  51. /// </summary>
  52. /// <value>The category.</value>
  53. [JsonPropertyName("category")]
  54. public string Category { get; set; }
  55. /// <summary>
  56. /// Gets or sets the guid of the assembly associated with this plugin.
  57. /// This is used to identify the proper item for automatic updates.
  58. /// </summary>
  59. /// <value>The name.</value>
  60. [JsonPropertyName("guid")]
  61. public string Id { get; set; }
  62. /// <summary>
  63. /// Gets or sets the versions.
  64. /// </summary>
  65. /// <value>The versions.</value>
  66. [JsonPropertyName("versions")]
  67. #pragma warning disable CA2227 // Collection properties should be read only
  68. public IList<VersionInfo> Versions { get; set; }
  69. #pragma warning restore CA2227 // Collection properties should be read only
  70. /// <summary>
  71. /// Gets or sets the image url for the package.
  72. /// </summary>
  73. [JsonPropertyName("imageUrl")]
  74. public string? ImageUrl { get; set; }
  75. }
  76. }