| | 1 | | using System.Diagnostics.CodeAnalysis; |
| | 2 | | using System.Text.Json.Serialization; |
| | 3 | | using Spdx3.Model.Core.Classes; |
| | 4 | | using Spdx3.Serialization; |
| | 5 | | using Spdx3.Utility; |
| | 6 | |
|
| | 7 | | namespace Spdx3.Model.ExpandedLicensing.Classes; |
| | 8 | |
|
| | 9 | | /// <summary> |
| | 10 | | /// Portion of an AnyLicenseInfo representing this version, or any later version, of the indicated License. |
| | 11 | | /// See https://spdx.github.io/spdx-spec/v3.0.1/model/ExpandedLicensing/Classes/OrLaterOperator/ |
| | 12 | | /// </summary> |
| | 13 | | public class OrLaterOperator : ExtendableLicense |
| | 14 | | { |
| | 15 | | [JsonPropertyName("expandedlicensing_subjectLicense")] |
| | 16 | | [JsonConverter(typeof(SpdxModelConverterFactory))] |
| 9 | 17 | | public required License SubjectLicense { get; set; } |
| | 18 | |
|
| 1 | 19 | | protected internal OrLaterOperator() |
| | 20 | | { |
| 1 | 21 | | } |
| | 22 | |
|
| | 23 | | [SetsRequiredMembers] |
| 2 | 24 | | public OrLaterOperator(Catalog catalog, CreationInfo creationInfo, License subjectLicense) : base(catalog, |
| 2 | 25 | | creationInfo) |
| | 26 | | { |
| 2 | 27 | | SubjectLicense = subjectLicense; |
| 2 | 28 | | } |
| | 29 | |
|
| | 30 | | public override void Validate() |
| | 31 | | { |
| 2 | 32 | | base.Validate(); |
| 2 | 33 | | ValidateRequiredProperty(nameof(SubjectLicense)); |
| 2 | 34 | | } |
| | 35 | | } |