| 1 |
package sarif |
| 2 |
|
| 3 |
// LogicalLocation ... |
| 4 |
type LogicalLocation struct { |
| 5 |
Index *uint `json:"index,omitempty"` |
| 6 |
Name *string `json:"name,omitempty"` |
| 7 |
FullyQualifiedName *string `json:"fullyQualifiedName,omitempty"` |
| 8 |
DecoratedName *string `json:"decoratedName,omitempty"` |
| 9 |
Kind *string `json:"kind,omitempty"` |
| 10 |
ParentIndex *uint `json:"parentIndex,omitempty"` |
| 11 |
PropertyBag |
| 12 |
} |
| 13 |
|
| 14 |
// NewLogicalLocation creates a new LogicalLocation and returns a pointer to it |
| 15 |
func NewLogicalLocation() *LogicalLocation { |
| 16 |
return &LogicalLocation{} |
| 17 |
} |
| 18 |
|
| 19 |
// WithIndex sets the Index |
| 20 |
func (l *LogicalLocation) WithIndex(index int) *LogicalLocation { |
| 21 |
i := uint(index) |
| 22 |
l.Index = &i |
| 23 |
return l |
| 24 |
} |
| 25 |
|
| 26 |
// WithName sets the Name |
| 27 |
func (l *LogicalLocation) WithName(name string) *LogicalLocation { |
| 28 |
l.Name = &name |
| 29 |
return l |
| 30 |
} |
| 31 |
|
| 32 |
// WithFullyQualifiedName sets the FullyQualifiedName |
| 33 |
func (l *LogicalLocation) WithFullyQualifiedName(fullyQualifiedName string) *LogicalLocation { |
| 34 |
l.FullyQualifiedName = &fullyQualifiedName |
| 35 |
return l |
| 36 |
} |
| 37 |
|
| 38 |
// WithDecoratedName sets the DecoratedName |
| 39 |
func (l *LogicalLocation) WithDecoratedName(decoratedName string) *LogicalLocation { |
| 40 |
l.DecoratedName = &decoratedName |
| 41 |
return l |
| 42 |
} |
| 43 |
|
| 44 |
// WithKind sets the Kind |
| 45 |
func (l *LogicalLocation) WithKind(kind string) *LogicalLocation { |
| 46 |
l.Kind = &kind |
| 47 |
return l |
| 48 |
} |
| 49 |
|
| 50 |
// WithParentIndex sets the ParentIndex |
| 51 |
func (l *LogicalLocation) WithParentIndex(parentIndex int) *LogicalLocation { |
| 52 |
i := uint(parentIndex) |
| 53 |
l.ParentIndex = &i |
| 54 |
return l |
| 55 |
} |