| | 1 | | using System.Diagnostics.CodeAnalysis; |
| | 2 | | using System.Text.Json.Serialization; |
| | 3 | | using Spdx3.Model.Core.Classes; |
| | 4 | | using Spdx3.Model.Lite; |
| | 5 | | using Spdx3.Serialization; |
| | 6 | | using Spdx3.Utility; |
| | 7 | |
|
| | 8 | | namespace Spdx3.Model.Software.Classes; |
| | 9 | |
|
| | 10 | | public class Package : SoftwareArtifact, ILiteDomainCompliantElement |
| | 11 | | { |
| | 12 | | [JsonPropertyName("software_packageVersion")] |
| | 13 | | [JsonConverter(typeof(SpdxModelConverterFactory))] |
| 12 | 14 | | public string? PackageVersion { get; set; } |
| | 15 | |
|
| | 16 | | [JsonPropertyName("software_downloadLocation")] |
| | 17 | | [JsonConverter(typeof(SpdxModelConverterFactory))] |
| 16 | 18 | | public string? DownloadLocation { get; set; } |
| | 19 | |
|
| | 20 | | [JsonPropertyName("software_packageUrl")] |
| | 21 | | [JsonConverter(typeof(SpdxModelConverterFactory))] |
| 10 | 22 | | public Uri? PackageUrl { get; set; } |
| | 23 | |
|
| | 24 | | [JsonPropertyName("software_homePage")] |
| | 25 | | [JsonConverter(typeof(SpdxModelConverterFactory))] |
| 13 | 26 | | public Uri? HomePage { get; set; } |
| | 27 | |
|
| | 28 | | [JsonPropertyName("software_sourceInfo")] |
| | 29 | | [JsonConverter(typeof(SpdxModelConverterFactory))] |
| 10 | 30 | | public string? SourceInfo { get; set; } |
| | 31 | |
|
| | 32 | | // protected internal no-parm constructor required for deserialization |
| | 33 | | // ReSharper disable once UnusedMember.Global |
| 13 | 34 | | protected internal Package() |
| | 35 | | { |
| 13 | 36 | | } |
| | 37 | |
|
| | 38 | |
|
| | 39 | | [SetsRequiredMembers] |
| 41 | 40 | | public Package(Catalog catalog, CreationInfo creationInfo) : base(catalog, creationInfo) |
| | 41 | | { |
| 41 | 42 | | } |
| | 43 | |
|
| | 44 | | public void Accept(ILiteDomainComplianceVisitor visitor) |
| | 45 | | { |
| 2 | 46 | | visitor.Visit(this); |
| 2 | 47 | | } |
| | 48 | | } |