-
-
Notifications
You must be signed in to change notification settings - Fork 19
/
artifact_content.go
32 lines (27 loc) · 961 Bytes
/
artifact_content.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
package sarif
// ArtifactContent ...
type ArtifactContent struct {
Text *string `json:"text,omitempty"`
Binary *string `json:"binary,omitempty"`
Rendered *MultiformatMessageString `json:"rendered,omitempty"`
PropertyBag
}
// NewArtifactContent creates a new ArtifactContent and returns a pointer to it
func NewArtifactContent() *ArtifactContent {
return &ArtifactContent{}
}
// WithText sets the Text
func (artifactContent *ArtifactContent) WithText(text string) *ArtifactContent {
artifactContent.Text = &text
return artifactContent
}
// WithBinary sets the Binary
func (artifactContent *ArtifactContent) WithBinary(binary string) *ArtifactContent {
artifactContent.Binary = &binary
return artifactContent
}
// WithRendered sets the Rendered
func (artifactContent *ArtifactContent) WithRendered(mms *MultiformatMessageString) *ArtifactContent {
artifactContent.Rendered = mms
return artifactContent
}