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