PackageInfo.cs 2.6 KB

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