| | 1 | | using System.Diagnostics.CodeAnalysis; |
| | 2 | | using System.Text.Json.Serialization; |
| | 3 | | using Spdx3.Model.Core.Enums; |
| | 4 | | using Spdx3.Serialization; |
| | 5 | | using Spdx3.Utility; |
| | 6 | |
|
| | 7 | | namespace Spdx3.Model.Core.Classes; |
| | 8 | |
|
| | 9 | | /// <summary> |
| | 10 | | /// A collection of Elements, not necessarily with unifying context. An intermediate (abstract/base) class. |
| | 11 | | /// See https://spdx.github.io/spdx-spec/v3.0.1/model/Core/Classes/ElementCollection/ |
| | 12 | | /// </summary> |
| | 13 | | public abstract class ElementCollection : Element |
| | 14 | | { |
| | 15 | | [JsonPropertyName("profileConformance")] |
| 81 | 16 | | public IList<ProfileIdentifierType> ProfileConformance { get; } = new List<ProfileIdentifierType>(); |
| | 17 | |
|
| | 18 | | /// <summary> |
| | 19 | | /// Yep, the spec says zero to many root elements. Go figure. |
| | 20 | | /// </summary> |
| | 21 | | [JsonPropertyName("rootElement")] |
| | 22 | | [JsonConverter(typeof(SpdxModelConverterFactory))] |
| 89 | 23 | | public IList<Element> RootElement { get; } = new List<Element>(); |
| | 24 | |
|
| | 25 | | [JsonPropertyName("element")] |
| | 26 | | [JsonConverter(typeof(SpdxModelConverterFactory))] |
| 152 | 27 | | public IList<Element> Element { get; } = new List<Element>(); |
| | 28 | |
|
| | 29 | | // protected internal no-parm constructor required for deserialization |
| 10 | 30 | | protected internal ElementCollection() |
| | 31 | | { |
| 10 | 32 | | } |
| | 33 | |
|
| | 34 | |
|
| | 35 | | [SetsRequiredMembers] |
| 27 | 36 | | protected ElementCollection(Catalog catalog, CreationInfo creationInfo) : base(catalog, creationInfo) |
| | 37 | | { |
| 27 | 38 | | } |
| | 39 | | } |