Debian Codegraph @

v2/sarif/suppression.go

raw
1 package sarif
2
3 // Suppression ...
4 type Suppression struct {
5 Kind string `json:"kind"`
6 Status *string `json:"status"`
7 Location *Location `json:"location"`
8 Guid *string `json:"guid"`
9 Justification *string `json:"justification"`
10 PropertyBag
11
12 }
13
14 // NewSuppression creates a new Suppression and returns a pointer to it
15 func NewSuppression(kind string) *Suppression {
16 return &Suppression{
17 Kind: kind,
18 }
19 }
20
21 // WithStatus sets the Status
22 func (s *Suppression) WithStatus(status string) *Suppression {
23 s.Status = &status
24 return s
25 }
26
27 // WithLocation sets the Location
28 func (s *Suppression) WithLocation(location *Location) *Suppression {
29 s.Location = location
30 return s
31 }
32
33 // WithGuid sets the Guid
34 func (s *Suppression) WithGuid(guid string) *Suppression {
35 s.Guid = &guid
36 return s
37 }
38
39 // WithJustifcation sets the Justifcation
40 func (s *Suppression) WithJustifcation(justification string) *Suppression {
41 s.Justification = &justification
42 return s
43 }