Debian Codegraph @

v2/sarif/physical_location.go

raw
1 package sarif
2
3 // PhysicalLocation ...
4 type PhysicalLocation struct {
5 ArtifactLocation *ArtifactLocation `json:"artifactLocation,omitempty"`
6 Region *Region `json:"region,omitempty"`
7 ContextRegion *Region `json:"contextRegion,omitempty"`
8 Address *Address `json:"address,omitempty"`
9 PropertyBag
10 }
11
12 // NewPhysicalLocation creates a new PhysicalLocation and returns a pointer to it
13 func NewPhysicalLocation() *PhysicalLocation {
14 return &PhysicalLocation{}
15 }
16
17 // WithArtifactLocation sets the ArtifactLocation
18 func (pl *PhysicalLocation) WithArtifactLocation(artifactLocation *ArtifactLocation) *PhysicalLocation {
19 pl.ArtifactLocation = artifactLocation
20 return pl
21 }
22
23 // WithRegion sets the Region
24 func (pl *PhysicalLocation) WithRegion(region *Region) *PhysicalLocation {
25 pl.Region = region
26 return pl
27 }
28
29 // WithContextRegion sets the ContextRegion
30 func (pl *PhysicalLocation) WithContextRegion(contextRegion *Region) *PhysicalLocation {
31 pl.ContextRegion = contextRegion
32 return pl
33 }
34
35 // WithAddress sets the Address
36 func (pl *PhysicalLocation) WithAddress(address *Address) *PhysicalLocation {
37 pl.Address = address
38 return pl
39 }