File: tool_component_reference.go

package info (click to toggle)
golang-github-owenrumney-go-sarif 2.3.3-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 712 kB
  • sloc: makefile: 13
file content (33 lines) | stat: -rw-r--r-- 708 bytes parent folder | download
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
package sarif

// ToolComponentReference ...
type ToolComponentReference struct {
	PropertyBag
	Name  *string `json:"name"`
	Index *uint   `json:"index"`
	Guid  *string `json:"guid"`
}

// NewToolComponentReference ...
func NewToolComponentReference() *ToolComponentReference {
	return &ToolComponentReference{}
}

// WithName ...
func (t *ToolComponentReference) WithName(name string) *ToolComponentReference {
	t.Name = &name
	return t
}

// WithIndex ...
func (t *ToolComponentReference) WithIndex(index int) *ToolComponentReference {
	i := uint(index)
	t.Index = &i
	return t
}

// WithGuid ...
func (t *ToolComponentReference) WithGuid(guid string) *ToolComponentReference {
	t.Guid = &guid
	return t
}