-
-
Notifications
You must be signed in to change notification settings - Fork 19
/
physical_location.go
39 lines (33 loc) · 1.16 KB
/
physical_location.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
33
34
35
36
37
38
39
package sarif
// PhysicalLocation ...
type PhysicalLocation struct {
ArtifactLocation *ArtifactLocation `json:"artifactLocation,omitempty"`
Region *Region `json:"region,omitempty"`
ContextRegion *Region `json:"contextRegion,omitempty"`
Address *Address `json:"address,omitempty"`
PropertyBag
}
// NewPhysicalLocation creates a new PhysicalLocation and returns a pointer to it
func NewPhysicalLocation() *PhysicalLocation {
return &PhysicalLocation{}
}
// WithArtifactLocation sets the ArtifactLocation
func (pl *PhysicalLocation) WithArtifactLocation(artifactLocation *ArtifactLocation) *PhysicalLocation {
pl.ArtifactLocation = artifactLocation
return pl
}
// WithRegion sets the Region
func (pl *PhysicalLocation) WithRegion(region *Region) *PhysicalLocation {
pl.Region = region
return pl
}
// WithContextRegion sets the ContextRegion
func (pl *PhysicalLocation) WithContextRegion(contextRegion *Region) *PhysicalLocation {
pl.ContextRegion = contextRegion
return pl
}
// WithAddress sets the Address
func (pl *PhysicalLocation) WithAddress(address *Address) *PhysicalLocation {
pl.Address = address
return pl
}