Debian Codegraph @

v2/sarif/thread_flow_location.go

raw
1 package sarif
2
3 import "time"
4
5 // ThreadFlowLocation ...
6 type ThreadFlowLocation struct {
7 ExecutionOrder *int `json:"executionOrder,omitempty"`
8 ExecutionTimeUTC *time.Time `json:"executionTimeUtc,omitempty"`
9 Importance interface{} `json:"importance,omitempty"`
10 Index *int `json:"index,omitempty"`
11 Kinds []string `json:"kinds,omitempty"`
12 Location *Location `json:"location,omitempty"`
13 Module *string `json:"module,omitempty"`
14 NestingLevel *int `json:"nestingLevel,omitempty"`
15 Stack *Stack `json:"stack,omitempty"`
16 State map[string]*MultiformatMessageString `json:"state,omitempty"`
17 Taxa []*ReportingDescriptorReference `json:"taxa,omitempty"`
18 WebRequest *WebRequest `json:"webRequest,omitempty"`
19 WebResponse *WebResponse `json:"webResponse,omitempty"`
20 PropertyBag
21
22 }
23
24 // NewThreadFlowLocation creates a new ThreadFlowLocation and returns a pointer to it
25 func NewThreadFlowLocation() *ThreadFlowLocation {
26 return &ThreadFlowLocation{}
27 }
28
29 // WithExecutionOrder sets the ExecutionOrder
30 func (threadFlowLocation *ThreadFlowLocation) WithExecutionOrder(order int) *ThreadFlowLocation {
31 threadFlowLocation.ExecutionOrder = &order
32 return threadFlowLocation
33 }
34
35 // WithExecutionTimeUTC sets the ExecutionTimeUTC
36 func (threadFlowLocation *ThreadFlowLocation) WithExecutionTimeUTC(executionTimeUTC *time.Time) *ThreadFlowLocation {
37 threadFlowLocation.ExecutionTimeUTC = executionTimeUTC
38 return threadFlowLocation
39 }
40
41 // WithImportance sets the Importance
42 func (threadFlowLocation *ThreadFlowLocation) WithImportance(importance interface{}) *ThreadFlowLocation {
43 threadFlowLocation.Importance = importance
44 return threadFlowLocation
45 }
46
47 // WithIndex sets the Index
48 func (threadFlowLocation *ThreadFlowLocation) WithIndex(index int) *ThreadFlowLocation {
49 threadFlowLocation.Index = &index
50 return threadFlowLocation
51 }
52
53 // WithKinds sets the Kinds
54 func (threadFlowLocation *ThreadFlowLocation) WithKinds(kinds []string) *ThreadFlowLocation {
55 threadFlowLocation.Kinds = kinds
56 return threadFlowLocation
57 }
58
59 // AddKind ...
60 func (threadFlowLocation *ThreadFlowLocation) AddKind(kind string) {
61 threadFlowLocation.Kinds = append(threadFlowLocation.Kinds, kind)
62 }
63
64 // WithLocation sets the Location
65 func (threadFlowLocation *ThreadFlowLocation) WithLocation(location *Location) *ThreadFlowLocation {
66 threadFlowLocation.Location = location
67 return threadFlowLocation
68 }
69
70 // WithModule sets the Module
71 func (threadFlowLocation *ThreadFlowLocation) WithModule(module string) *ThreadFlowLocation {
72 threadFlowLocation.Module = &module
73 return threadFlowLocation
74 }
75
76 // WithNestingLevel sets the NestingLevel
77 func (threadFlowLocation *ThreadFlowLocation) WithNestingLevel(nestingLevel int) *ThreadFlowLocation {
78 threadFlowLocation.NestingLevel = &nestingLevel
79 return threadFlowLocation
80 }
81
82 // WithStack sets the Stack
83 func (threadFlowLocation *ThreadFlowLocation) WithStack(stack *Stack) *ThreadFlowLocation {
84 threadFlowLocation.Stack = stack
85 return threadFlowLocation
86 }
87
88 // WithState sets the State
89 func (threadFlowLocation *ThreadFlowLocation) WithState(state map[string]*MultiformatMessageString) *ThreadFlowLocation {
90 threadFlowLocation.State = state
91 return threadFlowLocation
92 }
93
94 // WithTaxa sets the Taxa
95 func (threadFlowLocation *ThreadFlowLocation) WithTaxa(taxa []*ReportingDescriptorReference) *ThreadFlowLocation {
96 threadFlowLocation.Taxa = taxa
97 return threadFlowLocation
98 }
99
100 // AddTaxa ...
101 func (threadFlowLocation *ThreadFlowLocation) AddTaxa(taxa *ReportingDescriptorReference) {
102 threadFlowLocation.Taxa = append(threadFlowLocation.Taxa, taxa)
103 }
104
105 // WithWebRequest sets the WebRequest
106 func (threadFlowLocation *ThreadFlowLocation) WithWebRequest(webRequest *WebRequest) *ThreadFlowLocation {
107 threadFlowLocation.WebRequest = webRequest
108 return threadFlowLocation
109 }
110
111 // WithWebResponse sets the WebResponse
112 func (threadFlowLocation *ThreadFlowLocation) WithWebResponse(webResponse *WebResponse) *ThreadFlowLocation {
113 threadFlowLocation.WebResponse = webResponse
114 return threadFlowLocation
115 }