Debian Codegraph @

v2/sarif/tool_component_reference.go

raw
1 package sarif
2
3 // ToolComponentReference ...
4 type ToolComponentReference struct {
5 Name *string `json:"name"`
6 Index *uint `json:"index"`
7 Guid *string `json:"guid"`
8 PropertyBag
9
10 }
11
12 // NewToolComponentReference creates a new ToolComponentReference and returns a pointer to it
13 func NewToolComponentReference() *ToolComponentReference {
14 return &ToolComponentReference{}
15 }
16
17 // WithName sets the Name
18 func (t *ToolComponentReference) WithName(name string) *ToolComponentReference {
19 t.Name = &name
20 return t
21 }
22
23 // WithIndex sets the Index
24 func (t *ToolComponentReference) WithIndex(index int) *ToolComponentReference {
25 i := uint(index)
26 t.Index = &i
27 return t
28 }
29
30 // WithGuid sets the Guid
31 func (t *ToolComponentReference) WithGuid(guid string) *ToolComponentReference {
32 t.Guid = &guid
33 return t
34 }