xref: /aosp_15_r20/external/spdx-tools/spdx/v2_2/relationship.go (revision ba677afa8f67bb56cbc794f4d0e378e0da058e16)
1// SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
2
3package v2_2
4
5import "github.com/spdx/tools-golang/spdx/common"
6
7// Relationship is a Relationship section of an SPDX Document for
8// version 2.2 of the spec.
9type Relationship struct {
10
11	// 11.1: Relationship
12	// Cardinality: optional, one or more; one per Relationship
13	//              one mandatory for SPDX Document with multiple packages
14	// RefA and RefB are first and second item
15	// Relationship is type from 11.1.1
16	RefA         common.DocElementID `json:"spdxElementId"`
17	RefB         common.DocElementID `json:"relatedSpdxElement"`
18	Relationship string              `json:"relationshipType"`
19
20	// 11.2: Relationship Comment
21	// Cardinality: optional, one
22	RelationshipComment string `json:"comment,omitempty"`
23}
24