Debian Codegraph @

v2/sarif/artifact_content.go

raw
1 package sarif
2
3 // ArtifactContent ...
4 type ArtifactContent struct {
5 Text *string `json:"text,omitempty"`
6 Binary *string `json:"binary,omitempty"`
7 Rendered *MultiformatMessageString `json:"rendered,omitempty"`
8 PropertyBag
9 }
10
11 // NewArtifactContent creates a new ArtifactContent and returns a pointer to it
12 func NewArtifactContent() *ArtifactContent {
13 return &ArtifactContent{}
14 }
15
16 // WithText sets the Text
17 func (artifactContent *ArtifactContent) WithText(text string) *ArtifactContent {
18 artifactContent.Text = &text
19 return artifactContent
20 }
21
22 // WithBinary sets the Binary
23 func (artifactContent *ArtifactContent) WithBinary(binary string) *ArtifactContent {
24 artifactContent.Binary = &binary
25 return artifactContent
26 }
27
28 // WithRendered sets the Rendered
29 func (artifactContent *ArtifactContent) WithRendered(mms *MultiformatMessageString) *ArtifactContent {
30 artifactContent.Rendered = mms
31 return artifactContent
32 }