File: reporting_descriptor_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 (40 lines) | stat: -rw-r--r-- 1,165 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
34
35
36
37
38
39
40
package sarif

// ReportingDescriptorReference ...
type ReportingDescriptorReference struct {
	PropertyBag
	Id            *string                 `json:"id,omitempty"`
	Index         *uint                   `json:"index,omitempty"`
	Guid          *string                 `json:"guid,omitempty"`
	ToolComponent *ToolComponentReference `json:"toolComponent,omitempty"`
}

// NewReportingDescriptorReference ...
func NewReportingDescriptorReference() *ReportingDescriptorReference {
	return &ReportingDescriptorReference{}
}

// WithId ...
func (r *ReportingDescriptorReference) WithId(id string) *ReportingDescriptorReference {
	r.Id = &id
	return r
}

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

// WithGuid ...
func (r *ReportingDescriptorReference) WithGuid(guid string) *ReportingDescriptorReference {
	r.Guid = &guid
	return r
}

// WithToolComponentReference ...
func (r *ReportingDescriptorReference) WithToolComponentReference(toolComponentRef *ToolComponentReference) *ReportingDescriptorReference {
	r.ToolComponent = toolComponentRef
	return r
}