-
-
Notifications
You must be signed in to change notification settings - Fork 19
/
reporting_descriptor_reference.go
40 lines (34 loc) · 1.26 KB
/
reporting_descriptor_reference.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
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 creates a new ReportingDescriptorReference and returns a pointer to it
func NewReportingDescriptorReference() *ReportingDescriptorReference {
return &ReportingDescriptorReference{}
}
// WithId sets the Id
func (r *ReportingDescriptorReference) WithId(id string) *ReportingDescriptorReference {
r.Id = &id
return r
}
// WithIndex sets the Index
func (r *ReportingDescriptorReference) WithIndex(index int) *ReportingDescriptorReference {
i := uint(index)
r.Index = &i
return r
}
// WithGuid sets the Guid
func (r *ReportingDescriptorReference) WithGuid(guid string) *ReportingDescriptorReference {
r.Guid = &guid
return r
}
// WithToolComponentReference sets the ToolComponentReference
func (r *ReportingDescriptorReference) WithToolComponentReference(toolComponentRef *ToolComponentReference) *ReportingDescriptorReference {
r.ToolComponent = toolComponentRef
return r
}