Debian Codegraph @

v2/sarif/external_properties.go

raw
1 package sarif
2
3 // ExternalProperties ...
4 type ExternalProperties struct {
5 Addresses []*Address `json:"addresses,omitempty"`
6 Artifacts []*Artifact `json:"artifacts,omitempty"`
7 Conversion *Conversion `json:"conversion,omitempty"`
8 Driver *ToolComponent `json:"driver,omitempty"`
9 Extensions []*ToolComponent `json:"extensions,omitempty"`
10 ExternalizedProperties *PropertyBag `json:"externalizedProperties,omitempty"`
11 Graphs []*Graph `json:"graphs,omitempty"`
12 GUID *string `json:"guid,omitempty"`
13 Invocations []*Invocation `json:"invocations,omitempty"`
14 LogicalLocations []*LogicalLocation `json:"logicalLocations,omitempty"`
15 Policies []*ToolComponent `json:"policies,omitempty"`
16 Results []*Result `json:"results,omitempty"`
17 RunGUID *string `json:"runGuid,omitempty"`
18 Schema *string `json:"schema,omitempty"`
19 Taxonomies []*ToolComponent `json:"taxonomies,omitempty"`
20 ThreadFlowLocations []*ThreadFlowLocation `json:"threadFlowLocations,omitempty"`
21 Translations []*ToolComponent `json:"translations,omitempty"`
22 Version string `json:"version,omitempty"`
23 WebRequests []*WebRequest `json:"webRequests,omitempty"`
24 WebResponses []*WebResponse `json:"webResponses,omitempty"`
25 PropertyBag
26
27 }
28
29 // NewExternalProperties creates a new ExternalProperties and returns a pointer to it
30 func NewExternalProperties() *ExternalProperties {
31 return &ExternalProperties{}
32 }
33
34 // WithAddress sets the Address
35 func (externalProperties *ExternalProperties) WithAddress(addresses []*Address) *ExternalProperties {
36 externalProperties.Addresses = addresses
37 return externalProperties
38 }
39
40 // AddAddress ...
41 func (externalProperties *ExternalProperties) AddAddress(address *Address) {
42 externalProperties.Addresses = append(externalProperties.Addresses, address)
43 }
44
45 // WithArtifact sets the Artifact
46 func (externalProperties *ExternalProperties) WithArtifact(artifacts []*Artifact) *ExternalProperties {
47 externalProperties.Artifacts = artifacts
48 return externalProperties
49 }
50
51 // AddArtifact ...
52 func (externalProperties *ExternalProperties) AddArtifact(artifact *Artifact) {
53 externalProperties.Artifacts = append(externalProperties.Artifacts, artifact)
54 }
55
56 // WithConversion sets the Conversion
57 func (externalProperties *ExternalProperties) WithConversion(conversion *Conversion) *ExternalProperties {
58 externalProperties.Conversion = conversion
59 return externalProperties
60 }
61
62 // WithDriver sets the Driver
63 func (externalProperties *ExternalProperties) WithDriver(driver *ToolComponent) *ExternalProperties {
64 externalProperties.Driver = driver
65 return externalProperties
66 }
67
68 // WithExtensions sets the Extensions
69 func (externalProperties *ExternalProperties) WithExtensions(extensions []*ToolComponent) *ExternalProperties {
70 externalProperties.Extensions = extensions
71 return externalProperties
72 }
73
74 // AddExtension ...
75 func (externalProperties *ExternalProperties) AddExtension(extension *ToolComponent) {
76 externalProperties.Extensions = append(externalProperties.Extensions, extension)
77 }
78
79 // WithExternalizedProperties sets the ExternalizedProperties
80 func (externalProperties *ExternalProperties) WithExternalizedProperties(externalizedProperties *PropertyBag) *ExternalProperties {
81 externalProperties.ExternalizedProperties = externalizedProperties
82 return externalProperties
83 }
84
85 // WithGraphs sets the Graphs
86 func (externalProperties *ExternalProperties) WithGraphs(graphs []*Graph) *ExternalProperties {
87 externalProperties.Graphs = graphs
88 return externalProperties
89 }
90
91 // AddGraph ...
92 func (externalProperties *ExternalProperties) AddGraph(graph *Graph) {
93 externalProperties.Graphs = append(externalProperties.Graphs, graph)
94 }
95
96 // WithGUID sets the GUID
97 func (externalProperties *ExternalProperties) WithGUID(guid string) *ExternalProperties {
98 externalProperties.GUID = &guid
99 return externalProperties
100 }
101
102 // WithInvocations sets the Invocations
103 func (externalProperties *ExternalProperties) WithInvocations(invocations []*Invocation) *ExternalProperties {
104 externalProperties.Invocations = invocations
105 return externalProperties
106 }
107
108 // AddInvocation ...
109 func (externalProperties *ExternalProperties) AddInvocation(invocation *Invocation) {
110 externalProperties.Invocations = append(externalProperties.Invocations, invocation)
111 }
112
113 // WithLogicalLocations sets the LogicalLocations
114 func (externalProperties *ExternalProperties) WithLogicalLocations(logicalLocations []*LogicalLocation) *ExternalProperties {
115 externalProperties.LogicalLocations = logicalLocations
116 return externalProperties
117 }
118
119 // AddLogicalLocation ...
120 func (externalProperties *ExternalProperties) AddLogicalLocation(logicalLocation *LogicalLocation) {
121 externalProperties.LogicalLocations = append(externalProperties.LogicalLocations, logicalLocation)
122 }
123
124 // WithPolicies sets the Policies
125 func (externalProperties *ExternalProperties) WithPolicies(policies []*ToolComponent) *ExternalProperties {
126 externalProperties.Policies = policies
127 return externalProperties
128 }
129
130 // AddPolicy ...
131 func (externalProperties *ExternalProperties) AddPolicy(policy *ToolComponent) {
132 externalProperties.Policies = append(externalProperties.Policies, policy)
133 }
134
135 // WithResults sets the Results
136 func (externalProperties *ExternalProperties) WithResults(results []*Result) *ExternalProperties {
137 externalProperties.Results = results
138 return externalProperties
139 }
140
141 // AddResult ...
142 func (externalProperties *ExternalProperties) AddResult(result *Result) {
143 externalProperties.Results = append(externalProperties.Results, result)
144 }
145
146 // WithRunGUID sets the RunGUID
147 func (externalProperties *ExternalProperties) WithRunGUID(runGUID string) *ExternalProperties {
148 externalProperties.RunGUID = &runGUID
149 return externalProperties
150 }
151
152 // WithSchema sets the Schema
153 func (externalProperties *ExternalProperties) WithSchema(schema string) *ExternalProperties {
154 externalProperties.Schema = &schema
155 return externalProperties
156 }
157
158 // WithVersion sets the Version
159 func (externalProperties *ExternalProperties) WithVersion(version string) *ExternalProperties {
160 externalProperties.Version = version
161 return externalProperties
162 }
163
164 // WithTaxonomies sets the Taxonomies
165 func (externalProperties *ExternalProperties) WithTaxonomies(taxonomies []*ToolComponent) *ExternalProperties {
166 externalProperties.Taxonomies = taxonomies
167 return externalProperties
168 }
169
170 // AddTaxonomie ...
171 func (externalProperties *ExternalProperties) AddTaxonomie(taxonomy *ToolComponent) {
172 externalProperties.Taxonomies = append(externalProperties.Taxonomies, taxonomy)
173 }
174
175 // WithThreadFlowLocations sets the ThreadFlowLocations
176 func (externalProperties *ExternalProperties) WithThreadFlowLocations(threadFlowLocations []*ThreadFlowLocation) *ExternalProperties {
177 externalProperties.ThreadFlowLocations = threadFlowLocations
178 return externalProperties
179 }
180
181 // AddThreadFlowLocations ...
182 func (externalProperties *ExternalProperties) AddThreadFlowLocations(threadFlowLocation *ThreadFlowLocation) {
183 externalProperties.ThreadFlowLocations = append(externalProperties.ThreadFlowLocations, threadFlowLocation)
184 }
185
186 // WithTranslations sets the Translations
187 func (externalProperties *ExternalProperties) WithTranslations(translation []*ToolComponent) *ExternalProperties {
188 externalProperties.Translations = translation
189 return externalProperties
190 }
191
192 // AddTranslation ...
193 func (externalProperties *ExternalProperties) AddTranslation(translation *ToolComponent) {
194 externalProperties.Translations = append(externalProperties.Translations, translation)
195 }
196
197 // WithWebRequests sets the WebRequests
198 func (externalProperties *ExternalProperties) WithWebRequests(webRequests []*WebRequest) *ExternalProperties {
199 externalProperties.WebRequests = webRequests
200 return externalProperties
201 }
202
203 // AddWebRequest ...
204 func (externalProperties *ExternalProperties) AddWebRequest(webRequest *WebRequest) {
205 externalProperties.WebRequests = append(externalProperties.WebRequests, webRequest)
206 }
207
208 // WithWebResponses sets the WebResponses
209 func (externalProperties *ExternalProperties) WithWebResponses(webResponses []*WebResponse) *ExternalProperties {
210 externalProperties.WebResponses = webResponses
211 return externalProperties
212 }
213
214 // AddWebResponse ...
215 func (externalProperties *ExternalProperties) AddWebResponse(webResponse *WebResponse) {
216 externalProperties.WebResponses = append(externalProperties.WebResponses, webResponse)
217 }