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