| 1 | package sarif |
| 2 | |
| 3 | // LocationRelationship ... |
| 4 | type LocationRelationship struct { |
| 5 | PropertyBag |
| 6 | Target uint `json:"target"` |
| 7 | Kinds []string `json:"kinds,omitempty"` |
| 8 | Description *Message `json:"description,omitempty"` |
| 9 | } |
| 10 | |
| 11 | // NewLocationRelationship ... |
| 12 | func NewLocationRelationship(target int) *LocationRelationship { |
| 13 | t := uint(target) |
| 14 | return &LocationRelationship{ |
| 15 | Target: t, |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | // WithKind ... |
| 20 | func (l *LocationRelationship) WithKind(kind string) *LocationRelationship { |
| 21 | l.Kinds = append(l.Kinds, kind) |
| 22 | return l |
| 23 | } |
| 24 | |
| 25 | // WithDescription ... |
| 26 | func (l *LocationRelationship) WithDescription(message *Message) *LocationRelationship { |
| 27 | l.Description = message |
| 28 | return l |
| 29 | } |