xref: /aosp_15_r20/external/spdx-tools/spdx/v2_1/annotation.go (revision ba677afa8f67bb56cbc794f4d0e378e0da058e16)
1// SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
2
3package v2_1
4
5import "github.com/spdx/tools-golang/spdx/common"
6
7// Annotation is an Annotation section of an SPDX Document for version 2.1 of the spec.
8type Annotation struct {
9	// 8.1: Annotator
10	// Cardinality: conditional (mandatory, one) if there is an Annotation
11	Annotator common.Annotator `json:"annotator"`
12
13	// 8.2: Annotation Date: YYYY-MM-DDThh:mm:ssZ
14	// Cardinality: conditional (mandatory, one) if there is an Annotation
15	AnnotationDate string `json:"annotationDate"`
16
17	// 8.3: Annotation Type: "REVIEW" or "OTHER"
18	// Cardinality: conditional (mandatory, one) if there is an Annotation
19	AnnotationType string `json:"annotationType"`
20
21	// 8.4: SPDX Identifier Reference
22	// Cardinality: conditional (mandatory, one) if there is an Annotation
23	// This field is not used in hierarchical data formats where the referenced element is clear, such as JSON or YAML.
24	AnnotationSPDXIdentifier common.DocElementID `json:"-"`
25
26	// 8.5: Annotation Comment
27	// Cardinality: conditional (mandatory, one) if there is an Annotation
28	AnnotationComment string `json:"comment"`
29}
30